:root {
    --bg: #eef4fb;
    --bg-accent: #f8fbff;
    --panel: rgba(255,255,255,.96);
    --panel-strong: #ffffff;
    --text: #172033;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-2: #1d4ed8;
    --primary-soft: rgba(37,99,235,.12);
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --border: #d9e4f2;
    --border-strong: #c5d4e6;
    --sidebar: #0f172a;
    --sidebar-2: #111c34;
    --sidebar-link: rgba(255,255,255,.82);
    --shadow: 0 18px 45px rgba(15,23,42,.08);
    --shadow-soft: 0 8px 24px rgba(15,23,42,.06);
    --shadow-card-hover: 0 18px 40px rgba(37,99,235,.12);
    --radius: 22px;
    --radius-sm: 16px;
    --container: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Sarabun', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.08), transparent 28%),
        radial-gradient(circle at top right, rgba(14,165,233,.06), transparent 24%),
        linear-gradient(180deg, #f6faff 0%, var(--bg) 100%);
    color: var(--text);
}
body { min-height: 100vh; line-height: 1.6; }
body.sidebar-lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.app-shell {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.main-content {
    flex: 1;
    width: min(100%, var(--container));
    max-width: var(--container);
    padding: 28px;
    margin: 0 auto;
}
.main-auth {
    width: min(100%, var(--container));
    max-width: var(--container);
}

.app-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(15,23,42,.48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 70;
}
body.sidebar-open .app-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sidebar {
    width: 286px;
    flex: 0 0 286px;
    background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
    color: #fff;
    padding: 22px 18px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,.04);
    box-shadow: 0 0 0 1px rgba(255,255,255,.02) inset;
    z-index: 80;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
.sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}
.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}
.brand-badge {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: .02em;
    color: #fff;
    box-shadow: 0 10px 26px rgba(37,99,235,.25);
}
.brand-meta { min-width: 0; }
.brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}
.brand-subtitle {
    color: rgba(255,255,255,.68);
    font-size: .92rem;
    line-height: 1.45;
}
.sidebar-close {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    border-radius: 14px;
    color: #fff;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
}
.sidebar-close span {
    position: absolute;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}
.sidebar-close span:first-child { transform: rotate(45deg); }
.sidebar-close span:last-child { transform: rotate(-45deg); }
.sidebar-nav-title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.46);
    margin: 20px 10px 10px;
}
.nav-section { display: grid; gap: 6px; }
.nav-section-last { margin-bottom: 14px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--sidebar-link);
    font-weight: 600;
    transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav-link::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    box-shadow: 0 0 0 4px rgba(255,255,255,.04);
    flex: 0 0 auto;
}
.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
    transform: translateX(2px);
}
.nav-link-active {
    background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.08) 100%);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.nav-link-active::before {
    background: #7dd3fc;
    box-shadow: 0 0 0 4px rgba(125,211,252,.15);
}
.nav-link-danger:hover {
    background: rgba(220,38,38,.16);
    color: #fff;
}
.nav-link-danger:hover::before { background: rgba(255,255,255,.9); }
.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer-user { font-weight: 700; }
.sidebar-footer-role {
    color: rgba(255,255,255,.68);
    font-size: .9rem;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}
.topbar-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}
.topbar-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-2);
    font-size: .82rem;
    font-weight: 700;
}
.topbar h1 {
    margin: 0 0 2px;
    font-size: clamp(1.4rem, 2vw, 2rem);
    line-height: 1.2;
}
.topbar p { margin: 0; }
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.sidebar-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-soft);
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
}
.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel-strong);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    min-width: min(100%, 320px);
}
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #bfdbfe, #60a5fa);
    font-weight: 800;
    color: #0f172a;
    flex: 0 0 auto;
}

.grid {
    display: grid;
    gap: 18px;
    min-width: 0;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    background: var(--panel);
    border: 1px solid rgba(255,255,255,.82);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    min-width: 0;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(147,197,253,.55);
}
.card h2, .card h3 { margin-top: 0; }
.section-title {
    margin: 0 0 14px;
    font-size: 1.12rem;
    line-height: 1.35;
}
.muted { color: var(--muted); }
.small { font-size: .92rem; }

.stat-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.stat-card::before,
.stat-card::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}
.stat-card::before {
    width: 140px;
    height: 140px;
    right: -48px;
    top: -34px;
    background: radial-gradient(circle, rgba(37,99,235,.18) 0%, rgba(37,99,235,.04) 62%, transparent 68%);
}
.stat-card::after {
    width: 110px;
    height: 110px;
    left: -40px;
    bottom: -44px;
    background: radial-gradient(circle, rgba(14,165,233,.12) 0%, rgba(14,165,233,.03) 62%, transparent 70%);
}
.stat-label {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.stat-value {
    position: relative;
    z-index: 1;
    font-size: clamp(1.75rem, 2.8vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
}
.stat-note {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: var(--muted);
    font-size: .9rem;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
th, td {
    padding: 13px 14px;
    border-bottom: 1px solid #e8eef6;
    text-align: left;
    vertical-align: top;
}
thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6fd 100%);
    color: var(--muted);
    font-weight: 700;
    z-index: 1;
}
tbody tr:nth-child(even) td { background: rgba(248,251,255,.62); }
tbody tr:hover td { background: rgba(219,234,254,.24); }
tbody tr:last-child td { border-bottom: 0; }

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid .full { grid-column: 1 / -1; }
label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 1rem;
    color: var(--text);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
textarea {
    min-height: 110px;
    resize: vertical;
}
input:focus, select:focus, textarea:focus {
    outline: 0;
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59,130,246,.12);
}
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 6px;
}
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 18px;
}
.table-inline-form {
    display: grid !important;
    gap: 8px;
    min-width: 0 !important;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37,99,235,.18);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background .18s ease;
}
.btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.04);
    box-shadow: 0 14px 26px rgba(37,99,235,.22);
}
.btn-outline {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn-outline:hover { box-shadow: var(--shadow-soft); }
.btn-success { background: linear-gradient(180deg, #22c55e 0%, var(--success) 100%); }
.btn-warning { background: linear-gradient(180deg, #f59e0b 0%, var(--warning) 100%); }
.btn-danger { background: linear-gradient(180deg, #ef4444 0%, var(--danger) 100%); }
.btn-muted { background: linear-gradient(180deg, #64748b 0%, #475569 100%); }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .86rem;
    font-weight: 800;
    white-space: nowrap;
}
.badge-warning { background: rgba(217,119,6,.12); color: #a16207; }
.badge-info { background: rgba(59,130,246,.12); color: #1d4ed8; }
.badge-primary { background: rgba(37,99,235,.12); color: #1d4ed8; }
.badge-success { background: rgba(22,163,74,.12); color: #15803d; }
.badge-danger { background: rgba(220,38,38,.12); color: #b91c1c; }
.badge-muted { background: rgba(100,116,139,.16); color: #475569; }

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}
.alert-success {
    background: rgba(22,163,74,.1);
    color: #166534;
    border: 1px solid rgba(22,163,74,.16);
}
.alert-danger {
    background: rgba(220,38,38,.1);
    color: #991b1b;
    border: 1px solid rgba(220,38,38,.16);
}

.kv {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
}
.kv div {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    min-width: 0;
    overflow-wrap: anywhere;
}
.kv-compact { grid-template-columns: 180px 1fr; }
.route-detail-grid { align-items: start; }

.footer {
    margin-top: 24px;
    padding: 18px 4px 0;
    border-top: 1px solid rgba(148,163,184,.24);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.footer-meta { align-self: flex-end; }

.auth-wrap {
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: stretch;
}
.hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 28px;
    padding: 36px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.hero-card::before,
.hero-card::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.hero-card::before { width: 220px; height: 220px; right: -70px; top: -60px; }
.hero-card::after { width: 180px; height: 180px; left: -60px; bottom: -50px; }
.hero-card h2 {
    font-size: 2rem;
    margin-top: 0;
    position: relative;
    z-index: 1;
}
.hero-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    position: relative;
    z-index: 1;
}
.hero-list div {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    padding: 14px 16px;
    border-radius: 16px;
}
.auth-card { align-self: center; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-weight: 800;
}
.list-clean { margin: 0; padding-left: 18px; }
.list-clean li { margin: 6px 0; }
.timeline { display: grid; gap: 10px; }
.timeline-item {
    border-left: 3px solid #bfdbfe;
    padding: 4px 0 4px 12px;
}
.empty {
    padding: 30px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: #fafcff;
}
.searchbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: stretch;
}
.searchbar > * { flex: 1; min-width: 180px; }
.searchbar .btn,
.searchbar button { flex: 0 0 auto; }

.map-panel {
    margin-top: 22px;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}
.map-panel-disabled { background: #fff; }
.map-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.map-actions-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.map-canvas {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    margin-top: 16px;
    box-shadow: var(--shadow-soft);
}
.map-hint {
    margin-top: 14px;
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1d4ed8;
    font-weight: 800;
}
.map-summary {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    font-weight: 700;
}
.map-summary-error {
    color: #991b1b;
    border-color: rgba(220,38,38,.2);
    background: rgba(220,38,38,.06);
}
.map-preview-image {
    width: 100%;
    display: block;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* ===== Login Responsive Improvement ===== */
.main-auth .topbar,
.main-auth .footer {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
.main-auth .topbar { margin-bottom: 18px; }
.auth-shell {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - 210px);
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    gap: 24px;
    align-items: center;
}
.auth-hero,
.auth-form-card { min-width: 0; }
.auth-hero {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    border-radius: 28px;
}
.auth-hero h2 {
    margin: 14px 0 12px;
    font-size: clamp(2rem, 3vw, 2.7rem);
    line-height: 1.2;
}
.auth-hero-desc {
    max-width: 760px;
    color: rgba(255,255,255,.92);
    font-size: 1.03rem;
    line-height: 1.8;
    margin: 0;
}
.auth-feature-list { margin-top: 26px; gap: 14px; }
.auth-feature-list div {
    padding: 16px 18px;
    border-radius: 18px;
    line-height: 1.65;
    backdrop-filter: blur(4px);
}
.auth-form-card {
    width: 100%;
    max-width: 620px;
    justify-self: end;
    align-self: center;
    padding: 28px;
    border-radius: 24px;
}
.auth-form-head { margin-bottom: 14px; }
.auth-form-head .section-title {
    margin-bottom: 6px;
    font-size: 1.45rem;
}
.auth-form { margin-top: 8px; }
.auth-form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
}
.auth-form-grid input {
    height: 48px;
    border-radius: 14px;
}
.auth-actions { margin-top: 20px; }
.auth-submit { min-width: 140px; }
.auth-note {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.auth-note-title {
    font-weight: 700;
    margin-bottom: 6px;
}

@media (max-width: 1360px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
        gap: 20px;
    }
    .auth-hero {
        min-height: 560px;
        padding: 34px;
    }
}

@media (max-width: 1100px) {
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .kv,
    .kv-compact { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .app-shell { display: block; }
    .main-content {
        width: 100%;
        max-width: none;
        padding: 20px 18px 24px;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        transform: translateX(-104%);
        transition: transform .25s ease;
        box-shadow: 0 20px 40px rgba(15,23,42,.24);
    }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-toggle { display: inline-flex; }
    .sidebar-close { display: inline-flex; }
    .topbar {
        padding: 16px 16px;
        gap: 14px;
        border-radius: 20px;
    }
    .topbar-actions { width: 100%; justify-content: flex-start; }
    .topbar-user { min-width: 0; width: 100%; border-radius: 18px; }
    .grid-2,
    .grid-3,
    .grid-4,
    .auth-wrap,
    .auth-shell { grid-template-columns: 1fr; }
    .auth-shell {
        min-height: auto;
        align-items: stretch;
    }
    .auth-form-card {
        max-width: 100%;
        justify-self: stretch;
    }
    .auth-hero { min-height: auto; }
}

@media (max-width: 900px) {
    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }
    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: 100%;
    }
    .table-wrap thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .table-wrap tbody {
        display: grid;
        gap: 14px;
    }
    .table-wrap tr {
        border: 1px solid var(--border);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow-soft);
        overflow: hidden;
    }
    .table-wrap tbody tr:nth-child(even) td,
    .table-wrap tbody tr:hover td {
        background: transparent;
    }
    .table-wrap td {
        border-bottom: 1px dashed #e6edf6;
        padding: 12px 14px;
    }
    .table-wrap td:last-child { border-bottom: 0; }
    .table-wrap td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--muted);
        font-size: .8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }
}

@media (max-width: 640px) {
    .main-content { padding: 16px; }
    .topbar {
        position: static;
        flex-direction: column;
        align-items: stretch;
        border-radius: 18px;
        padding: 14px;
    }
    .topbar-left {
        width: 100%;
        align-items: flex-start;
    }
    .topbar-kicker {
        font-size: .76rem;
        margin-bottom: 4px;
    }
    .topbar h1 { font-size: 1.35rem; }
    .topbar-user {
        padding: 10px 12px;
        border-radius: 16px;
    }
    .hero-card,
    .card,
    .auth-hero,
    .auth-form-card {
        padding: 18px;
        border-radius: 20px;
    }
    .actions,
    .map-actions-inline {
        width: 100%;
    }
    .actions > .btn,
    .actions > .btn-outline,
    .actions > form,
    .map-actions-inline .btn {
        width: 100%;
        flex: 1 1 100%;
    }
    .searchbar > * {
        min-width: 100%;
        flex-basis: 100%;
    }
    .map-canvas { min-height: 320px; }
    .main-auth .topbar,
    .main-auth .footer,
    .auth-shell {
        max-width: 100%;
    }
    .main-auth .topbar { margin-bottom: 14px; }
    .auth-shell { gap: 16px; }
    .auth-hero h2 { font-size: 1.75rem; }
    .auth-hero-desc,
    .auth-feature-list div {
        font-size: .98rem;
        line-height: 1.65;
    }
    .auth-actions { margin-top: 18px; }
    .auth-submit { width: 100%; }
}
