:root {
    --bg: #0d0f14;
    --surface: #151820;
    --surface-2: #1d2230;
    --surface-3: #262c3d;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f0f2f7;
    --muted: #94a0b8;
    --accent: #f5a623;
    --accent-soft: rgba(245, 166, 35, 0.14);
    --blue: #4a9eff;
    --green: #2ecc8a;
    --red: #ff6b6b;
    --yellow: #d4ef57;
    --head-font: "Syne", sans-serif;
    --body-font: "DM Sans", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(74, 158, 255, 0.12), transparent 30%),
        radial-gradient(circle at bottom right, rgba(245, 166, 35, 0.16), transparent 28%),
        var(--bg);
    color: var(--text);
    font-family: var(--body-font);
}

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

.auth-body {
    min-height: 100vh;
}

.auth-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
}

.auth-brand h1,
.topbar h1,
.panel-header h2 {
    font-family: var(--head-font);
    margin: 0;
}

.auth-brand h1 {
    font-size: clamp(2.5rem, 4vw, 4.6rem);
    line-height: 0.95;
    margin-top: 18px;
}

.auth-brand p {
    max-width: 540px;
    color: var(--muted);
    font-size: 1rem;
    margin: 18px 0 0;
}

.auth-logo-card {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px 28px;
    margin-left: 2cm;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.auth-logo {
    display: block;
    width: min(320px, 70vw);
    height: auto;
}

.brand-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.feature-card,
.panel-card,
.panel,
.stat-card {
    background: rgba(21, 24, 32, 0.92);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.feature-card {
    padding: 20px;
}

.feature-kicker {
    color: var(--accent);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.feature-card strong,
.demo-row strong,
.table-wrap strong,
.vehicle-item strong,
.access-row strong {
    display: block;
    margin-top: 10px;
    font-size: 1rem;
}

.feature-card p,
.demo-row span,
.table-wrap span,
.vehicle-item span,
.access-note,
.access-row span {
    color: var(--muted);
}

.auth-panel {
    display: flex;
    justify-content: center;
}

.panel-card {
    width: min(460px, 100%);
    padding: 28px;
}

.panel-header,
.topbar,
.logo,
.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header {
    gap: 16px;
    margin-bottom: 24px;
}

.panel-header h2 {
    margin-top: 10px;
    font-size: 1.6rem;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: var(--muted);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
}

.form-input:focus {
    outline: none;
    border-color: rgba(245, 166, 35, 0.8);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="email"]:focus {
    outline: none;
    border-color: rgba(245, 166, 35, 0.8);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #f5a623, #ffd767);
    color: #161616;
}

.btn-block {
    width: 100%;
}

.message-box {
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.95rem;
}

.message-box.error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.28);
    color: #ffc7c7;
}

.demo-box {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 12px;
}

.demo-title {
    font-family: var(--head-font);
    font-size: 1rem;
}

.demo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--surface-2);
    border-radius: 14px;
}

.demo-row code {
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 10px;
    border-radius: 10px;
}

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

.sidebar {
    background: rgba(21, 24, 32, 0.95);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.logo,
.sidebar-footer {
    padding: 24px;
}

.logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto;
}

.logo-mark {
    font-family: var(--head-font);
    font-weight: 800;
    color: var(--accent);
    font-size: 1.35rem;
}

.logo-sub {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav {
    display: grid;
    gap: 8px;
    padding: 18px 14px;
}

.nav-section {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 8px 10px 4px;
}

.nav-item {
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--muted);
    transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text);
    background: var(--accent-soft);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f5a623, #ffe07a);
    color: #111;
    font-weight: 800;
}

.user-name {
    font-weight: 700;
}

.user-role {
    color: var(--muted);
    font-size: 0.85rem;
}

.main {
    padding: 24px 28px 36px;
}

.topbar {
    padding: 4px 0 24px;
    border-bottom: 1px solid var(--border);
}

.topbar p {
    margin: 8px 0 0;
    color: var(--muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-chip,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.date-chip {
    border: 1px solid var(--border);
    color: var(--muted);
}

.content {
    padding-top: 24px;
}

.alert-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(245, 166, 35, 0.12);
    border: 1px solid rgba(245, 166, 35, 0.22);
}

.alert-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.stat-card {
    padding: 20px;
}

.stat-label,
th {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--muted);
}

.stat-value {
    display: block;
    font-family: var(--head-font);
    font-size: 1.8rem;
    margin: 10px 0 8px;
}

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

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.panel {
    padding: 22px;
}

.span-2 {
    grid-column: span 2;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

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

.progress-list,
.vehicle-list,
.access-box {
    display: grid;
    gap: 14px;
}

.progress-meta,
.access-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-meta span:last-child {
    color: var(--muted);
}

.progress-bar {
    height: 10px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
}

.progress-fill.blue {
    background: var(--blue);
}

.progress-fill.orange {
    background: var(--accent);
}

.progress-fill.green {
    background: var(--green);
}

.progress-fill.yellow {
    background: var(--yellow);
}

.vehicle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-2);
}

.status-green {
    background: rgba(46, 204, 138, 0.14);
    color: #80efb6;
}

.status-orange {
    background: rgba(245, 166, 35, 0.15);
    color: #ffd17a;
}

.status-red {
    background: rgba(255, 107, 107, 0.14);
    color: #ffc0c0;
}

.status-blue {
    background: rgba(74, 158, 255, 0.14);
    color: #afd4ff;
}

.access-note {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-2);
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .auth-shell,
    .app-shell,
    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .sidebar {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    .main,
    .panel-card,
    .feature-card,
    .panel,
    .stat-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar,
    .topbar-actions,
    .alert-strip,
    .vehicle-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .demo-row,
    .access-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
