:root {
    --bg: #0b0d12;
    --bg-soft: #10141b;
    --surface: rgba(22, 26, 34, 0.92);
    --surface-soft: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(18, 22, 30, 0.96);
    --text: #f6f8fb;
    --muted: #98a3b3;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.16);
    --blue: #2563eb;
    --blue-soft: rgba(37, 99, 235, 0.16);
    --green: #059669;
    --green-soft: rgba(5, 150, 105, 0.16);
    --violet: #8b5cf6;
    --violet-soft: rgba(139, 92, 246, 0.16);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.16);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", "Malgun Gothic", sans-serif;
    background:
        radial-gradient(circle at top center, rgba(37, 99, 235, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(5, 150, 105, 0.12), transparent 28%),
        var(--bg);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 10, 16, 0.88), rgba(6, 10, 16, 0.92)),
        var(--brand-photo) center/cover no-repeat;
    opacity: 0.14;
    pointer-events: none;
}

body,
body * {
    word-break: keep-all;
    overflow-wrap: normal;
    line-break: strict;
}

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

img {
    display: block;
}

.page-shell {
    min-height: 100vh;
    padding: 28px 20px 52px;
    position: relative;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    gap: 28px;
    position: relative;
    z-index: 1;
}

.topbar,
.action-card,
.control-strip,
.feature-card,
.stat-card,
.vehicle-card,
.table-card,
.form-card,
.summary-card,
.alert,
.auth-card,
.narrow-card {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.topbar {
    max-width: 1180px;
    margin: 0 auto 28px;
    padding: 22px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-mark {
    width: 76px;
    min-width: 76px;
    height: 76px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.08));
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.brand-mark img {
    width: 58px;
    height: auto;
}

.admin-mark {
    background: linear-gradient(180deg, rgba(5, 150, 105, 0.18), rgba(5, 150, 105, 0.08));
    border-color: rgba(52, 211, 153, 0.18);
}

.admin-mark img {
    width: 62px;
}

.brand-copy {
    min-width: 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: #7fb0ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    color: var(--text);
}

h2,
.hero-title {
    margin-bottom: 0;
    font-size: clamp(2.25rem, 4.8vw, 4rem);
    line-height: 1.14;
    letter-spacing: -0.04em;
    color: #ffffff;
}

h3 {
    margin-bottom: 0;
    font-size: clamp(1.15rem, 1.7vw, 1.4rem);
    color: #ffffff;
}

h4 {
    margin-bottom: 8px;
    font-size: 1.24rem;
    color: #ffffff;
}

.subtle,
.feature-card p,
.action-card p,
.vehicle-card p,
.summary-card p,
.hero-subtitle {
    color: var(--muted);
    line-height: 1.72;
}

.nav-links,
.hero-actions,
.card-actions,
.form-actions,
.inline-actions,
.control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.nav-links {
    justify-content: flex-end;
}

.nav-links a {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.hero-intro {
    max-width: 820px;
    margin: 0 auto;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 18px;
}

.hero-badge {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.08));
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.hero-badge img {
    width: 58px;
    height: auto;
}

.hero-subtitle {
    margin: 0;
    max-width: 40em;
    font-size: 1.05rem;
}

.dashboard-actions,
.feature-grid,
.stats-grid,
.vehicle-grid {
    display: grid;
    gap: 20px;
}

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

.action-card {
    border-radius: 28px;
    padding: 22px 24px 24px;
    display: grid;
    gap: 18px;
}

.action-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.action-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
}

.action-label {
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.action-card-primary .action-icon {
    background: var(--blue-soft);
    border: 1px solid rgba(96, 165, 250, 0.18);
}

.action-card-secondary .action-icon {
    background: var(--green-soft);
    border: 1px solid rgba(52, 211, 153, 0.18);
}

.action-card-body {
    display: grid;
    gap: 10px;
}

.control-strip {
    border-radius: 28px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.control-strip h3 {
    margin-bottom: 6px;
}

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

.feature-card {
    border-radius: 24px;
    padding: 22px 22px 24px;
}

.feature-tag {
    margin-bottom: 14px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.feature-tag-blue {
    color: #7fb0ff;
}

.feature-tag-green {
    color: #53d2aa;
}

.feature-tag-violet {
    color: #b99afc;
}

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

.stat-card {
    padding: 22px 24px;
    border-radius: 24px;
}

.stat-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}

.stat-card strong {
    font-size: 2rem;
    color: #ffffff;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.section-header h3 {
    margin-bottom: 8px;
}

.vehicle-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.vehicle-card,
.summary-card {
    padding: 22px;
    border-radius: 26px;
}

.vehicle-card-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.mini-panel {
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 12px;
}

.mini-panel.muted {
    background: rgba(255, 255, 255, 0.03);
}

.mini-panel strong {
    display: block;
    margin-bottom: 6px;
    color: white;
}

.mini-label {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.88rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
}

.badge.success {
    color: #53d2aa;
    background: rgba(5, 150, 105, 0.16);
}

.badge.danger {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.16);
}

.badge.reserved {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.16);
}

.badge.checked_out {
    color: #6ee7b7;
    background: rgba(5, 150, 105, 0.16);
}

.badge.returned,
.badge.muted {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.08);
}

.filter-bar,
.form-grid {
    display: grid;
    gap: 16px;
}

.filter-bar {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.form-card {
    padding: 28px;
    border-radius: 28px;
}

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

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

.form-grid.single-column {
    grid-template-columns: 1fr;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #ffffff;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

select option {
    color: #111827;
}

textarea {
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    color: #ffffff;
    background: var(--blue);
}

.button.primary:hover {
    background: #1d4ed8;
}

.button.secondary {
    color: #ffffff;
    background: var(--green);
}

.button.secondary:hover {
    background: #047857;
}

.button.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line);
}

.button.ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.button.danger {
    color: #ffffff;
    background: var(--danger);
}

.button.small {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.92rem;
}

.info-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.table-card {
    overflow-x: auto;
    border-radius: 28px;
}

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

th,
td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
    color: var(--text);
}

th {
    color: var(--muted);
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.03);
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 34px 18px;
}

.alerts {
    display: grid;
    gap: 12px;
}

.alert {
    padding: 14px 18px;
    border-radius: 18px;
}

.alert.success {
    border-color: rgba(5, 150, 105, 0.2);
    background: rgba(5, 150, 105, 0.12);
}

.alert.error {
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.12);
}

.split-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 66vh;
}

.auth-card,
.narrow-card {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
    border-radius: 28px;
    padding: 28px;
}

.auth-brand {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-logo {
    width: min(220px, 60%);
    height: auto;
    opacity: 0.92;
}

.admin-shell .topbar {
    border-top: 4px solid rgba(5, 150, 105, 0.24);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
    margin: 0;
}

form {
    margin: 0;
}

@media (max-width: 1080px) {
    .dashboard-actions,
    .feature-grid,
    .split-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 960px) {
    .topbar,
    .section-header,
    .control-strip {
        display: grid;
        grid-template-columns: 1fr;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .form-grid,
    .form-grid.compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 16px 12px 32px;
    }

    .topbar,
    .action-card,
    .control-strip,
    .feature-card,
    .form-card,
    .vehicle-card,
    .summary-card,
    .table-card,
    .auth-card,
    .narrow-card {
        border-radius: 24px;
    }

    .topbar {
        padding: 18px 16px;
    }

    .brand-lockup {
        align-items: flex-start;
    }

    .brand-mark,
    .hero-badge {
        width: 68px;
        min-width: 68px;
        height: 68px;
        border-radius: 20px;
    }

    .brand-mark img,
    .hero-badge img {
        width: 50px;
    }

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

    th,
    td {
        padding: 12px 10px;
        font-size: 0.92rem;
    }
}
