:root {
    --bg: #07111f;
    --bg-soft: #0a1626;
    --sidebar: #081424;
    --panel: #101d2e;
    --panel-2: #132238;
    --line: #263750;
    --line-soft: #1d2c43;
    --text: #e8f0fb;
    --muted: #8ea0ba;
    --primary: #36d1c4;
    --primary-dark: #13a99d;
    --blue: #60a5fa;
    --warning: #f7b84b;
    --danger: #f87171;
    --success: #34d399;
    --radius: 16px;
    --shadow: 0 18px 44px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.icon { flex: 0 0 auto; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
    background: linear-gradient(180deg, #091729 0%, #07111f 100%);
    border-right: 1px solid var(--line-soft);
    padding: 24px 18px;
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    z-index: 30;
    display: flex;
    flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border-bottom: 1px solid var(--line-soft); }
.brand-mark {
    width: 44px; height: 44px; border-radius: 13px;
    display: grid; place-items: center;
    color: #05201f; font-weight: 900; letter-spacing: -.04em;
    background: linear-gradient(135deg, #70efe5, #1cafaa);
    box-shadow: 0 10px 24px rgba(54, 209, 196, .2);
}
.brand-copy strong { display: block; letter-spacing: .04em; font-size: 13px; }
.brand-copy span { color: var(--primary); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.nav-label { color: #60728d; font-size: 10px; letter-spacing: .16em; font-weight: 700; margin: 25px 12px 9px; }
.nav { display: grid; gap: 5px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 13px; border-radius: 11px; color: #9fb0c7; font-weight: 600; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .035); }
.nav a.active { color: #dffffc; background: rgba(54, 209, 196, .11); box-shadow: inset 3px 0 var(--primary); }
.nav a.active .icon { color: var(--primary); }
.nav-count { margin-left: auto; min-width: 21px; height: 21px; padding: 0 6px; display: grid; place-items: center; background: var(--danger); color: #fff; border-radius: 20px; font-size: 10px; }
.sidebar-user { margin-top: auto; border: 1px solid var(--line-soft); border-radius: 13px; padding: 12px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #173452; color: var(--primary); font-weight: 800; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong, .user-copy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-copy strong { font-size: 12px; }.user-copy span { font-size: 10px; color: var(--muted); }

.main { grid-column: 2; min-width: 0; }
.topbar { height: 76px; display: flex; align-items: center; padding: 0 30px; border-bottom: 1px solid var(--line-soft); background: rgba(7, 17, 31, .84); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.topbar-title { min-width: 0; }
.topbar-title strong { display: block; font-size: 15px; }.topbar-title span { color: var(--muted); font-size: 11px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--muted); cursor: pointer; position: relative; }
.icon-btn:hover { color: var(--text); border-color: #3a4f6e; }
.notif-dot { width: 8px; height: 8px; border: 2px solid var(--bg); background: var(--danger); border-radius: 50%; position: absolute; top: 7px; right: 7px; }
.mobile-menu { display: none; margin-right: 12px; }
.content { padding: 28px 30px 44px; max-width: 1580px; margin: 0 auto; }

.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { font-size: 25px; margin: 2px 0 5px; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--primary); letter-spacing: .15em; font-size: 10px; font-weight: 800; margin: 0 0 3px; text-transform: uppercase; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 19px; background: linear-gradient(145deg, var(--panel), #0d192a); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: var(--accent, var(--primary)); opacity: .05; right: -25px; top: -30px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--accent, var(--primary)); background: color-mix(in srgb, var(--accent, var(--primary)) 12%, transparent); }
.stat-value { font-size: 30px; line-height: 1.1; font-weight: 800; margin-top: 14px; letter-spacing: -.04em; }
.stat-foot { color: var(--muted); font-size: 11px; margin-top: 6px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr); gap: 20px; }
.grid-equal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card-header { min-height: 66px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line-soft); }
.card-header h2, .card-header h3 { margin: 0; font-size: 15px; }.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.card-body { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 2px 0 0; font-size: 22px; }.section-heading h3 { margin: 0; }

.btn { border: 1px solid var(--line); border-radius: 10px; background: #14243a; color: var(--text); min-height: 40px; padding: 8px 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: .16s ease; }
.btn:hover { transform: translateY(-1px); border-color: #405777; }.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { border-color: transparent; color: #04211f; background: linear-gradient(135deg, #50e0d5, #19b7aa); }
.btn.danger { border-color: rgba(248, 113, 113, .28); color: #ffc1c1; background: rgba(248, 113, 113, .08); }
.btn.ghost { background: transparent; }.btn.small { min-height: 32px; padding: 5px 10px; font-size: 11px; }.btn.wide { width: 100%; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.search-box { position: relative; flex: 1; min-width: 220px; }.search-box .icon { position: absolute; left: 12px; top: 11px; color: var(--muted); }.search-box input { padding-left: 40px; }
.field { display: grid; gap: 7px; min-width: 0; }.field > span { font-size: 11px; font-weight: 700; color: #a8b7ca; }
.field small { color: var(--muted); }.field.full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; color: var(--text); background: #0b1728; border: 1px solid var(--line); border-radius: 10px; outline: none; padding: 10px 12px; min-height: 42px; }
textarea { resize: vertical; min-height: 95px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(54, 209, 196, .08); }
input::placeholder, textarea::placeholder { color: #5b6d87; }
.form-grid { display: grid; gap: 16px; }.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section { padding: 4px 0 21px; margin-bottom: 21px; border-bottom: 1px solid var(--line-soft); }.form-section:last-child { border: 0; margin-bottom: 0; }
.form-section h3 { margin: 0 0 15px; font-size: 13px; color: #dce7f5; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.check-field { display: flex; align-items: center; gap: 9px; color: #a8b7ca; }.check-field input { width: 17px; min-height: 17px; accent-color: var(--primary); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: #70839d; font-size: 10px; text-transform: uppercase; letter-spacing: .09em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); color: #cdd9e9; vertical-align: middle; }
tbody tr:hover { background: rgba(255, 255, 255, .018); }tbody tr:last-child td { border-bottom: 0; }
.table-main { display: flex; align-items: center; gap: 11px; min-width: 170px; }.table-main strong { display: block; color: #fff; }.table-main small { display: block; color: var(--muted); margin-top: 2px; }
.vehicle-thumb { width: 43px; height: 43px; border-radius: 10px; background: #132a43; display: grid; place-items: center; color: var(--primary); overflow: hidden; }.vehicle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.actions { display: flex; align-items: center; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 4px 8px; border-radius: 99px; color: #aebed1; font-size: 10px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success { color: var(--success); border-color: rgba(52, 211, 153, .24); background: rgba(52, 211, 153, .06); }
.badge.warning { color: var(--warning); border-color: rgba(247, 184, 75, .25); background: rgba(247, 184, 75, .06); }
.badge.danger { color: var(--danger); border-color: rgba(248, 113, 113, .25); background: rgba(248, 113, 113, .06); }
.badge.info { color: var(--blue); border-color: rgba(96, 165, 250, .25); background: rgba(96, 165, 250, .06); }
.badge.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 38px 20px; }.empty .icon { color: #3a4f6b; margin-bottom: 9px; }

.alert { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin-bottom: 15px; }
.alert.success { color: #a9f5d6; border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.08); }
.alert.danger { color: #ffc1c1; border-color: rgba(248,113,113,.3); background: rgba(248,113,113,.08); }
.alert.warning { color: #ffe0a8; border-color: rgba(247,184,75,.3); background: rgba(247,184,75,.08); }
.alert.info { color: #b9d8ff; border-color: rgba(96,165,250,.3); background: rgba(96,165,250,.08); }

.vehicle-hero { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 24px; }.vehicle-photo { aspect-ratio: 4/3; border-radius: 14px; border: 1px solid var(--line); background: #0a1727; display: grid; place-items: center; overflow: hidden; color: #3c5978; }.vehicle-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }.detail-title h1 { margin: 0; font-size: 25px; }.detail-sub { color: var(--muted); margin: 5px 0 17px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }.detail-item { border: 1px solid var(--line-soft); border-radius: 11px; padding: 11px 12px; background: #0c192a; }.detail-item span, .detail-item strong { display: block; }.detail-item span { color: var(--muted); font-size: 10px; margin-bottom: 3px; }.detail-item strong { font-size: 12px; }
.timeline { display: grid; }.timeline-item { display: grid; grid-template-columns: 32px 1fr; gap: 11px; }.timeline-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--primary); background: rgba(54,209,196,.09); border: 1px solid rgba(54,209,196,.2); }.timeline-copy { border-bottom: 1px solid var(--line-soft); padding: 3px 0 16px; margin-bottom: 14px; }.timeline-item:last-child .timeline-copy { border: 0; }.timeline-copy strong { display: block; }.timeline-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.quick-actions { display: grid; gap: 9px; }.quick-actions a { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line-soft); border-radius: 11px; padding: 12px; color: #bdcadd; }.quick-actions a:hover { border-color: #37506f; background: #122238; }.quick-actions .icon { color: var(--primary); }.quick-actions .arrow { margin-left: auto; color: var(--muted); }
.notification-list { display: grid; gap: 10px; }.notification { border: 1px solid var(--line-soft); border-radius: 12px; padding: 13px; display: flex; align-items: flex-start; gap: 12px; }.notification.unread { background: rgba(54,209,196,.035); border-color: rgba(54,209,196,.18); }.notification-copy { flex: 1; }.notification-copy strong { display: block; }.notification-copy p { color: var(--muted); margin: 4px 0; }.notification-copy small { color: #617590; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 7px; margin-top: 16px; }.pagination a, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }.pagination .current { background: var(--primary); color: #05201f; border-color: var(--primary); font-weight: 800; }

.auth-page { min-height: 100vh; background: radial-gradient(circle at 18% 14%, rgba(54,209,196,.12), transparent 30%), radial-gradient(circle at 90% 90%, rgba(59,130,246,.1), transparent 32%), var(--bg); display: grid; place-items: center; padding: 24px; }
.auth-shell { width: min(960px, 100%); min-height: 570px; display: grid; grid-template-columns: 1.05fr .95fr; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: rgba(11, 23, 40, .94); box-shadow: 0 30px 90px rgba(0,0,0,.42); }
.auth-art { padding: 50px; background: linear-gradient(145deg, rgba(54,209,196,.14), rgba(7,17,31,.2)), #0d1b2e; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art::after { content:""; width: 310px; height: 310px; border: 46px solid rgba(54,209,196,.055); border-radius: 50%; position: absolute; right: -120px; bottom: -100px; }
.auth-brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }.auth-brand strong { display: block; letter-spacing: .05em; }.auth-brand span { color: var(--primary); font-size: 11px; letter-spacing: .12em; }
.auth-message { position: relative; z-index: 1; max-width: 390px; }.auth-message .big-icon { color: var(--primary); margin-bottom: 20px; }.auth-message h1 { font-size: 34px; line-height: 1.12; letter-spacing: -.04em; margin: 0 0 15px; }.auth-message p { color: #9fb0c7; margin: 0; line-height: 1.7; }
.auth-form { padding: 50px; display: flex; flex-direction: column; justify-content: center; }.auth-form h2 { margin: 4px 0 7px; font-size: 25px; }.auth-form > p { color: var(--muted); margin: 0 0 25px; }.auth-form form { display: grid; gap: 16px; }.auth-links { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }.auth-links a:hover { color: var(--primary); }

.install-page { min-height: 100vh; padding: 36px; background: radial-gradient(circle at 15% 12%, rgba(54,209,196,.13), transparent 28%), var(--bg); }
.install-shell { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 24px; align-items: start; }
.install-intro { position: sticky; top: 36px; padding: 30px; }.install-intro h1 { font-size: 34px; margin: 8px 0 12px; }.install-intro > p { color: var(--muted); }.install-intro .brand-mark { margin-bottom: 26px; }
.requirements { margin-top: 28px; display: grid; gap: 10px; color: #aab9cc; font-size: 12px; }.requirements div { display:flex; align-items:center; gap:9px; }.req-dot { width: 8px; height: 8px; border-radius: 50%; }.req-dot.ok { background:var(--success); box-shadow:0 0 10px rgba(52,211,153,.5); }.req-dot.bad { background: var(--danger); }
.install-card { padding: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }.install-card h3 { margin: 28px 0 14px; font-size: 13px; color: #c7d4e5; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }.step-chip { color: var(--primary); border: 1px solid rgba(54,209,196,.2); background:rgba(54,209,196,.07); border-radius:99px; padding:5px 9px; font-size:10px; }
.smtp-fields { display: none; margin-top: 16px; }.smtp-fields.visible { display: grid; }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .app-shell { display: block; }.sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.35); }.sidebar.open { transform: translateX(0); }.main { grid-column: auto; }.mobile-menu { display: grid; }.topbar { padding: 0 18px; }.content { padding: 22px 18px 38px; }
    .auth-shell { grid-template-columns: 1fr; min-height: auto; max-width: 520px; }.auth-art { padding: 30px; min-height: 250px; }.auth-message h1 { font-size: 27px; }.auth-form { padding: 32px; }
    .install-shell { grid-template-columns: 1fr; }.install-intro { position: static; padding: 10px 4px; }.install-page { padding: 20px; }
}
@media (max-width: 640px) {
    .page-heading { display: block; }.heading-actions { justify-content: flex-start; margin-top: 15px; }.stats-grid, .grid-equal { grid-template-columns: 1fr; }.form-grid.two, .form-grid.three { grid-template-columns: 1fr; }.field.full { grid-column: auto; }
    .topbar-title span { display:none; }.content { padding-left: 14px; padding-right: 14px; }.card-header, .card-body { padding-left: 15px; padding-right: 15px; }.vehicle-hero { grid-template-columns: 1fr; }.vehicle-photo { max-width: 260px; }.detail-grid { grid-template-columns: 1fr 1fr; }
    .auth-page { padding: 12px; }.auth-art { min-height: 220px; padding: 24px; }.auth-form { padding: 26px 22px; }.install-card { padding: 22px 16px; }.install-page { padding: 12px; }
}

