:root {
    --bg: #080C14;
    --bg-soft: #0C1220;
    --surface: #111A2B;
    --surface-2: #16203412;
    --panel: #131E31;
    --panel-2: #182540;
    --border: rgba(255, 255, 255, 0.075);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #E9EEF7;
    --text-soft: #B4C0D4;
    --muted: #7C8AA5;
    --accent: #3D7BFF;
    --accent-dark: #2C5FD8;
    --accent-soft: rgba(61, 123, 255, 0.14);
    --success: #22C79A;
    --success-soft: rgba(34, 199, 154, 0.13);
    --warn: #F0A93B;
    --warn-soft: rgba(240, 169, 59, 0.13);
    --danger: #F04A5B;
    --danger-soft: rgba(240, 74, 91, 0.13);
    --info: #58A6FF;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --shadow: 0 20px 45px -25px rgba(0, 0, 0, 0.9);
    --shadow-sm: 0 8px 22px -14px rgba(0, 0, 0, 0.8);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --nav-h: 62px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

[hidden] {
    display: none !important;
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px 500px at 82% -12%, rgba(61, 123, 255, 0.16), transparent 65%),
        radial-gradient(700px 420px at 5% 8%, rgba(34, 199, 154, 0.09), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

svg {
    flex-shrink: 0;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.13);
    border-radius: 10px;
}

.app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 18px;
}

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(8, 12, 20, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding-top: env(safe-area-inset-top, 0px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 10px 18px;
    max-width: 1180px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 17px;
    color: var(--text);
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), #7A5CFF);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 8px 18px -10px rgba(61, 123, 255, 0.9);
}

.brand small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
    line-height: 1.1;
}

.topbar-spacer {
    flex: 1;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-soft);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid rgba(61, 123, 255, 0.3);
}

/* ---------- Nav desktop ---------- */
.mainnav {
    display: none;
    gap: 4px;
    margin-left: 8px;
}

.mainnav a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 500;
    transition: 0.18s;
}

.mainnav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.mainnav a.active {
    background: var(--accent-soft);
    color: #9CBEFF;
}

/* ---------- Bottom nav mobile ---------- */
.bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(12, 18, 32, 0.94);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    display: flex;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottomnav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 2px 8px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.18s;
    min-height: var(--nav-h);
}

.bottomnav a.active {
    color: #8FB6FF;
}

.bottomnav a.active .nav-dot {
    opacity: 1;
}

.nav-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
}

.main {
    flex: 1;
    padding: 20px 0 calc(var(--nav-h) + 34px);
}

/* ---------- Typo ---------- */
h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 15px;
    font-weight: 650;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
}

.page-head p {
    color: var(--muted);
    font-size: 13.5px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
}

/* ---------- Cards ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

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

.card-head h2,
.card-head h3 {
    display: flex;
    align-items: center;
    gap: 9px;
}

.card-sub {
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 3px;
}

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

.grid-kpi {
    grid-template-columns: 1fr;
}

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

.section {
    margin-top: 22px;
}

/* ---------- KPI ---------- */
.kpi {
    background: linear-gradient(160deg, var(--panel), var(--bg-soft));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px 16px;
    position: relative;
    overflow: hidden;
}

.kpi::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.75;
}

.kpi-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.kpi-value {
    font-size: 23px;
    font-weight: 720;
    letter-spacing: -0.03em;
    margin-top: 7px;
    font-variant-numeric: tabular-nums;
}

.kpi-value small {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-left: 2px;
}

.kpi-foot {
    margin-top: 5px;
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 650;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 999px;
}

.trend.up {
    color: var(--danger);
    background: var(--danger-soft);
}

.trend.down {
    color: var(--success);
    background: var(--success-soft);
}

.trend.flat {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.18s;
    white-space: nowrap;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.09);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 26px -16px rgba(61, 123, 255, 1);
}

.btn-primary:hover {
    filter: brightness(1.08);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-soft);
}

.btn-danger {
    background: var(--danger-soft);
    border-color: rgba(240, 74, 91, 0.35);
    color: #FF9AA4;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 12.5px;
    border-radius: var(--radius-xs);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 650;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-soft);
    border: 1px solid var(--border);
}

.badge.ok {
    background: var(--success-soft);
    color: #5FE3BC;
    border-color: rgba(34, 199, 154, 0.3);
}

.badge.warn {
    background: var(--warn-soft);
    color: #F5C477;
    border-color: rgba(240, 169, 59, 0.3);
}

.badge.danger {
    background: var(--danger-soft);
    color: #FF9AA4;
    border-color: rgba(240, 74, 91, 0.3);
}

.badge.info {
    background: var(--accent-soft);
    color: #9CBEFF;
    border-color: rgba(61, 123, 255, 0.3);
}

/* ---------- Forms ---------- */
.field {
    display: block;
    margin-bottom: 14px;
}

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.input,
.select,
textarea.input {
    width: 100%;
    padding: 11px 13px;
    background: var(--bg-soft);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14.5px;
    transition: 0.18s;
    -webkit-appearance: none;
    appearance: none;
}

.input:focus,
.select:focus,
textarea.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237C8AA5' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
}

.help {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.grid-2 {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.file-drop {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 22px 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: 0.18s;
}

.file-drop:hover,
.file-drop.drag {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.file-drop strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14.5px;
}

.file-drop span {
    color: var(--muted);
    font-size: 12.5px;
}

/* ---------- Tables ---------- */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -18px;
    padding: 0 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

th {
    text-align: left;
    padding: 9px 12px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

tr:last-child td {
    border-bottom: none;
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.mono {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* ---------- Vehicle cards ---------- */
.veh-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.veh {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.veh-media {
    position: relative;
    height: 158px;
    background: linear-gradient(140deg, #16233A, #0D1524);
}

.veh-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.94;
}

.veh-media .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(8, 12, 20, 0.72);
    backdrop-filter: blur(6px);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.veh-plate {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #F4F6FA;
    color: #0B1220;
    font-weight: 800;
    font-size: 12.5px;
    padding: 3px 9px;
    border-radius: 5px;
    border: 2px solid #0B1220;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
}

.veh-body {
    padding: 14px 15px 16px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    flex: 1;
}

.veh-title {
    font-weight: 650;
    font-size: 15px;
}

.veh-sub {
    color: var(--muted);
    font-size: 12px;
}

.veh-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px solid var(--border);
    padding-top: 11px;
    margin-top: auto;
}

.mini-stat span {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 650;
    margin-bottom: 2px;
}

.mini-stat strong {
    font-size: 14.5px;
    font-weight: 680;
    font-variant-numeric: tabular-nums;
}

/* ---------- Progress ---------- */
.bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.bar > i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #7A5CFF);
}

.bar.ok > i {
    background: linear-gradient(90deg, var(--success), #5FE3BC);
}

.bar.warn > i {
    background: linear-gradient(90deg, var(--warn), #F5C477);
}

/* ---------- Insights ---------- */
.insight {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid var(--border);
    border-left: 3px solid var(--muted);
}

.insight.critique {
    border-left-color: var(--danger);
    background: var(--danger-soft);
}

.insight.attention {
    border-left-color: var(--warn);
    background: var(--warn-soft);
}

.insight.info {
    border-left-color: var(--accent);
    background: var(--accent-soft);
}

.insight.succes {
    border-left-color: var(--success);
    background: var(--success-soft);
}

.insight-ico {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.insight h3 {
    font-size: 14px;
    margin-bottom: 3px;
}

.insight p {
    font-size: 13px;
    color: var(--text-soft);
}

.reco {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 15px;
    background: linear-gradient(150deg, rgba(61, 123, 255, 0.07), rgba(255, 255, 255, 0.015));
}

.reco-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.reco h3 {
    font-size: 14.5px;
}

.reco p {
    font-size: 13.2px;
    color: var(--text-soft);
}

.reco-eco {
    font-weight: 700;
    color: #5FE3BC;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---------- Chat ---------- */
.chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 460px;
    overflow-y: auto;
    padding: 4px 2px 8px;
}

.msg {
    display: flex;
    gap: 10px;
    max-width: 92%;
}

.msg.me {
    margin-left: auto;
    flex-direction: row-reverse;
}

.msg-bubble {
    padding: 11px 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13.8px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.msg.me .msg-bubble {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: transparent;
    color: #fff;
}

.chat-input {
    display: flex;
    gap: 9px;
    align-items: flex-end;
    margin-top: 12px;
}

.chat-input .input {
    flex: 1;
    resize: none;
    max-height: 130px;
}

.suggestions {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-top: 10px;
}

.suggestions button {
    white-space: nowrap;
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 12.5px;
    cursor: pointer;
}

.suggestions button:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* ---------- Tabs / chips ---------- */
.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 6px;
}

.chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.16s;
}

.chip.active {
    background: var(--accent-soft);
    border-color: rgba(61, 123, 255, 0.45);
    color: #9CBEFF;
}

/* ---------- Chart ---------- */
.chart-box {
    position: relative;
    height: 250px;
    width: 100%;
}

.chart-box.sm {
    height: 200px;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-soft);
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    display: inline-block;
}

/* ---------- Empty / loading ---------- */
.empty {
    text-align: center;
    padding: 38px 20px;
    color: var(--muted);
}

.empty svg {
    opacity: 0.5;
    margin-bottom: 12px;
}

.empty h3 {
    color: var(--text-soft);
    margin-bottom: 5px;
}

.empty p {
    font-size: 13px;
    max-width: 380px;
    margin: 0 auto;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
    background-size: 200% 100%;
    animation: sk 1.4s infinite;
    border-radius: 8px;
    height: 14px;
}

@keyframes sk {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ---------- Toast ---------- */
.toasts {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom, 0px));
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(92vw, 420px);
}

.toast {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    background: #16233A;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    font-size: 13.5px;
    animation: toastIn 0.22s ease;
}

.toast.ok {
    border-color: rgba(34, 199, 154, 0.45);
    color: #8FEBD0;
}

.toast.err {
    border-color: rgba(240, 74, 91, 0.45);
    color: #FFB0B8;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Modal ---------- */
.modal-back {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 13, 0.75);
    backdrop-filter: blur(4px);
    z-index: 150;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal {
    background: var(--panel);
    border: 1px solid var(--border-strong);
    border-radius: 18px 18px 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    animation: sheetUp 0.24s ease;
}

@keyframes sheetUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

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

/* ---------- Login ---------- */
.auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 18px calc(28px + env(safe-area-inset-bottom, 0px));
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px 22px;
    box-shadow: var(--shadow);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 20px;
}

.auth h1 {
    font-size: 21px;
    margin-bottom: 4px;
}

.auth-sub {
    color: var(--muted);
    font-size: 13.5px;
    margin-bottom: 20px;
}

.auth-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

.notice {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
}

.notice.err {
    border-color: rgba(240, 74, 91, 0.45);
    background: var(--danger-soft);
    color: #FFB0B8;
}

.notice.ok {
    border-color: rgba(34, 199, 154, 0.45);
    background: var(--success-soft);
    color: #8FEBD0;
}

.notice.warn {
    border-color: rgba(240, 169, 59, 0.45);
    background: var(--warn-soft);
    color: #F5C477;
}

/* ---------- Install banner ---------- */
.install-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(61, 123, 255, 0.16), rgba(122, 92, 255, 0.1));
    border: 1px solid rgba(61, 123, 255, 0.32);
    flex-wrap: wrap;
}

.install-bar p {
    flex: 1;
    font-size: 13px;
    color: var(--text-soft);
    min-width: 180px;
}

.store-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cards-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.stat-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}

.stat-line:last-child {
    border-bottom: none;
}

.stat-line span {
    color: var(--muted);
}

.stat-line strong {
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .grid-2,
    .grid-kpi,
    .veh-grid,
    .cards-row {
        grid-template-columns: 1fr !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .table-scroll table {
        min-width: 620px;
    }
}

@media (min-width: 768px) {
    .mainnav {
        display: flex;
    }

    .bottomnav {
        display: none;
    }

    .main {
        padding-bottom: 40px;
    }

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

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

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

    .cards-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-back {
        align-items: center;
    }

    .modal {
        border-radius: 18px;
        padding-bottom: 22px;
    }

    .toasts {
        bottom: 24px;
        right: 24px;
        left: auto;
        transform: none;
    }
}

@media (min-width: 1024px) {
    .grid-kpi {
        grid-template-columns: repeat(4, 1fr);
    }

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

    h1 {
        font-size: 27px;
    }

    .main {
        padding-top: 28px;
    }
}
