:root {
    color-scheme: dark;
    --bg: #10091f;
    --bg-2: #21113f;
    --panel: rgba(24, 18, 42, 0.78);
    --panel-strong: rgba(31, 24, 55, 0.92);
    --line: rgba(255, 255, 255, 0.13);
    --text: #fff7ff;
    --muted: #cfc5e7;
    --violet: #8b5cf6;
    --purple: #c084fc;
    --cyan: #67e8f9;
    --turquoise: #2dd4bf;
    --pink: #fb7185;
    --amber: #fbbf24;
    --green: #34d399;
    --red: #fb7185;
    --shadow: 0 24px 70px rgba(10, 4, 28, 0.42);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body,
#app {
    min-height: 100%;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(139, 92, 246, 0.36), transparent 30%),
        radial-gradient(circle at 82% 6%, rgba(45, 212, 191, 0.22), transparent 28%),
        linear-gradient(135deg, #10091f 0%, #21113f 52%, #102b37 100%);
    color: var(--text);
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-panel {
    width: min(420px, 100%);
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-badge {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #130a25;
    background: linear-gradient(135deg, var(--cyan), var(--purple), var(--pink));
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.35);
}

.brand-title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.input,
.select,
.textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--text);
    outline: none;
    padding: 12px 13px;
}

.textarea {
    min-height: 92px;
    resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.14);
}

.select option {
    color: #171123;
}

.button {
    border: 0;
    border-radius: 8px;
    padding: 12px 16px;
    color: #130a25;
    font-weight: 850;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    box-shadow: 0 12px 28px rgba(103, 232, 249, 0.18);
}

.button.secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button.danger {
    color: #fff;
    background: rgba(251, 113, 133, 0.22);
    border: 1px solid rgba(251, 113, 133, 0.35);
}

.button.small {
    padding: 8px 10px;
    font-size: 13px;
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}

.remember-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--cyan);
}

.error,
.notice {
    border-radius: 8px;
    padding: 10px 12px;
    display: none;
    font-size: 14px;
}

.error {
    color: #ffe4e8;
    background: rgba(251, 113, 133, 0.16);
    border: 1px solid rgba(251, 113, 133, 0.28);
}

.notice {
    color: #dcfff8;
    background: rgba(45, 212, 191, 0.13);
    border: 1px solid rgba(45, 212, 191, 0.28);
}

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    border-right: 1px solid var(--line);
    background: rgba(14, 9, 28, 0.74);
    backdrop-filter: blur(18px);
}

.sidebar .brand-mark {
    margin-bottom: 24px;
}

.nav {
    display: grid;
    gap: 7px;
}

.nav-section {
    margin: 12px 0 4px;
    color: #ad9bd4;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 850;
}

.nav-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border-radius: 8px;
    color: var(--muted);
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.12);
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--cyan), var(--pink));
}

.main {
    min-width: 0;
    padding: 24px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 900;
    margin: 0;
}

.page-kicker {
    color: var(--muted);
    margin-top: 5px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple), var(--turquoise));
    display: grid;
    place-items: center;
    color: #130a25;
    font-weight: 900;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 52px rgba(8, 3, 23, 0.24);
    backdrop-filter: blur(16px);
}

.panel {
    padding: 18px;
}

.card {
    padding: 15px;
}

.stat-card {
    display: grid;
    gap: 6px;
    min-height: 108px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    padding: 16px;
    background:
        linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(45, 212, 191, 0.13)),
        rgba(255, 255, 255, 0.07);
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.stat-value {
    font-size: 36px;
    line-height: 1;
    font-weight: 950;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-title h2,
.panel-title h3 {
    margin: 0;
    font-size: 18px;
}

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: end;
}

.toolbar .field {
    min-width: min(230px, 100%);
}

.map {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 30% 35%, rgba(103, 232, 249, 0.28), transparent 28%),
        radial-gradient(circle at 75% 65%, rgba(251, 113, 133, 0.2), transparent 24%),
        rgba(255, 255, 255, 0.06);
    background-size: 44px 44px, 44px 44px, auto, auto, auto;
}

.map-road {
    position: absolute;
    height: 4px;
    width: 118%;
    left: -9%;
    top: 52%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    transform: rotate(-12deg);
}

.map-road.second {
    top: 34%;
    transform: rotate(22deg);
    background: rgba(103, 232, 249, 0.16);
}

.taxi-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #160c24;
    font-weight: 950;
    border: 2px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.taxi-pin.free {
    background: var(--turquoise);
}

.taxi-pin.occupied {
    background: var(--pink);
}

.taxi-pin.paused {
    background: var(--amber);
}

.taxi-pin.offline {
    background: #94a3b8;
}

.list {
    display: grid;
    gap: 11px;
}

.row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.row-title {
    font-weight: 850;
}

.row-meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 850;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text);
}

.badge.free,
.badge.ok {
    background: rgba(52, 211, 153, 0.18);
    color: #bfffe7;
}

.badge.occupied,
.badge.exceeded {
    background: rgba(251, 113, 133, 0.18);
    color: #ffe1e7;
}

.badge.paused,
.badge.near_limit {
    background: rgba(251, 191, 36, 0.18);
    color: #ffe8aa;
}

.badge.offline {
    background: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
}

.badge.new {
    background: rgba(103, 232, 249, 0.16);
    color: #d7fbff;
}

.badge.assigned,
.badge.active {
    background: rgba(192, 132, 252, 0.2);
    color: #f0dcff;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 16px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5, 2, 18, 0.65);
}

.modal {
    width: min(840px, 100%);
    max-height: min(780px, calc(100vh - 40px));
    overflow: auto;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    box-shadow: var(--shadow);
    padding: 18px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.order-card.active-order {
    border-color: rgba(103, 232, 249, 0.55);
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.08);
}

.report-card {
    min-height: 132px;
    display: grid;
    align-content: space-between;
}

.muted {
    color: var(--muted);
}

.empty {
    color: var(--muted);
    padding: 18px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 8px;
}

@media (max-width: 1050px) {
    .dashboard-shell,
    .split {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

    .grid.four,
    .grid.three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .main,
    .sidebar,
    .login-page {
        padding: 16px;
    }

    .topbar,
    .row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .grid.two,
    .grid.three,
    .grid.four {
        grid-template-columns: 1fr;
    }

    .toolbar {
        display: grid;
    }

    .toolbar .field {
        min-width: 0;
    }
}
