:root {
    --c-950: #081634;
    --c-900: #0b1f4d;
    --c-850: #102a63;
    --c-800: #13306e;
    --c-700: #1b3f8f;
    --primary: #1d4ed8;
    --primary-strong: #1e40af;
    --primary-hover: #1e3a8a;
    --accent: #2563eb;
    --accent-2: #3b82f6;
    --sky: #0ea5e9;
    --sky-2: #38bdf8;
    --sky-soft: #7dd3fc;
    --primary-light: #dbeafe;
    --primary-bg: #eff6ff;
    --bg-main: #eef3fb;
    --bg-card: #ffffff;
    --text-main: #0f1f3d;
    --text-muted: #5d6b88;
    --text-soft: #8290ad;
    --border: #d3ddf2;
    --border-strong: #b8c6e6;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(15, 31, 61, 0.05);
    --shadow-md: 0 6px 18px rgba(15, 31, 61, 0.08);
    --shadow-lg: 0 20px 45px rgba(11, 31, 77, 0.16);
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Segoe UI', 'Inter', system-ui, -apple-system, 'Roboto', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(1200px 600px at 15% -10%, #dbeafe 0%, transparent 55%),
                radial-gradient(1000px 700px at 110% 120%, #bfdbfe 0%, transparent 50%),
                linear-gradient(135deg, #e8f0fd 0%, #eef3fb 100%);
}

.auth-container {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    padding: 44px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-brand h1 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--c-900);
    margin-bottom: 8px;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
    background: #e6edfa;
    padding: 6px;
    border-radius: var(--radius-md);
}

.tabs button {
    flex: 1;
    background: none;
    color: var(--text-muted);
    border: none;
    font-size: 14px;
    font-weight: 600;
    padding: 11px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.tabs button.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 7px;
}

.address-autocomplete {
    position: relative;
}

.address-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 220px;
    overflow-y: auto;
}

.address-suggestions li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 10px;
    border-radius: 7px;
    cursor: pointer;
}

.address-suggestions li:hover,
.address-suggestions li.is-active {
    background: #eef4ff;
}

.suggestion-street {
    font-size: 13px;
    font-weight: 700;
    color: var(--c-900);
}

.suggestion-district {
    font-size: 11.5px;
    color: var(--text-muted);
}

.address-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    min-height: 18px;
}

.address-hint.is-ok {
    color: #15803d;
    font-weight: 600;
}

.address-hint.is-warn {
    color: #b45309;
    font-weight: 600;
}

.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

input, select {
    padding: 12px 15px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    background: #ffffff;
    color: var(--text-main);
    transition: var(--transition);
    width: 100%;
}

input::placeholder {
    color: var(--text-soft);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

button {
    padding: 12px 22px;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover {
    background-color: var(--primary-hover);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-form > button[type="submit"] {
    margin-top: 6px;
    padding: 14px;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.25);
}

.btn-danger { background-color: var(--danger); box-shadow: 0 6px 14px rgba(220, 38, 38, 0.22); }
.btn-danger:hover { background-color: #b91c1c; }
.btn-export { background-image: linear-gradient(135deg, var(--sky) 0%, var(--accent) 100%); box-shadow: 0 8px 18px rgba(14, 165, 233, 0.28); }
.btn-export:hover { background-image: linear-gradient(135deg, #0284c7 0%, var(--primary-strong) 100%); }
.btn-ghost { background: var(--primary-bg); color: var(--primary-strong); border: 1px solid var(--border-strong); box-shadow: none; }
.btn-ghost:hover { background: #e2ebfd; }

.error-text {
    color: var(--danger);
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 282px;
    background: linear-gradient(185deg, var(--c-900) 0%, var(--c-950) 100%);
    color: #fff;
    padding: 34px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(8, 22, 52, 0.18);
}

.brand-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sky-2), var(--accent));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 14px rgba(56, 189, 248, 0.35);
}

.sidebar-role {
    font-size: 11px;
    color: var(--sky-soft);
    margin-top: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 38px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    color: #aec6f5;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.menu-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(29, 78, 216, 0.4);
}

.menu-item::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

.main-content {
    flex: 1;
    margin-left: 282px;
    padding: 40px 44px;
    background-color: var(--bg-main);
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--c-900);
}

.page-header .sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
    display: block;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--bg-card);
    padding: 22px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.kpi-card.accent-navy::after { background: var(--c-800); }
.kpi-card.accent-primary::after { background: var(--primary); }
.kpi-card.accent-sky::after { background: var(--sky); }
.kpi-card.accent-azure::after { background: var(--accent-2); }

.kpi-card .label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card .value {
    font-size: 27px;
    font-weight: 700;
    color: var(--c-900);
    letter-spacing: -0.5px;
}

.grid-2x3 {
    display: grid;
    grid-template-columns: 1fr 1.7fr;
    gap: 26px;
}

.card {
    background: var(--bg-card);
    padding: 26px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.card:last-child {
    margin-bottom: 0;
}

.card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-900);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.card .card-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}

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

.card-head h3 {
    margin-bottom: 0;
}

.chart-box {
    position: relative;
    width: 100%;
    height: 280px;
}

.chart-box.is-doughnut {
    height: 300px;
    max-width: 640px;
    margin: 4px auto 0;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    background: #fbfcff;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.list-row:hover {
    background: var(--primary-bg);
    border-color: var(--border-strong);
    transform: translateX(2px);
}

.list-row.is-clickable {
    cursor: pointer;
}

.row-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.row-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.row-accent {
    font-size: 12px;
    color: var(--primary-strong);
    margin-top: 3px;
    font-weight: 600;
}

.row-value {
    font-weight: 700;
    color: var(--primary-strong);
    font-size: 15px;
    white-space: nowrap;
}

.empty-note {
    color: var(--text-muted);
    font-size: 14px;
    padding: 6px 2px;
}

.btn-mini {
    padding: 8px 13px;
    font-size: 12px;
    width: auto;
    margin: 0;
    border-radius: var(--radius-sm);
}

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

.budget-figures {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    flex-wrap: wrap;
}

.budget-figures .muted {
    color: var(--text-muted);
    font-weight: 500;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.status-pill::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.progress-container {
    width: 100%;
    background-color: #e3eaf7;
    border-radius: 99px;
    height: 12px;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid #dbe3f3;
}

.progress-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease, background-color 0.4s ease;
    background: var(--success);
}

.alert-banner {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    color: #92400e;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    border: 1px solid #fcd9a4;
    border-left: 5px solid var(--warning);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.alert-banner .btn-mini {
    background: var(--warning);
    color: #fff;
}

.alert-banner .btn-mini:hover {
    background: #b45309;
}

.residents-map-wrap {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #eef4ff;
}

#residents-map {
    width: 100%;
    height: 480px;
}

.residents-map-status {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--text-soft);
}

.map-residents-panel {
    margin-top: 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: #f9fbff;
    overflow: hidden;
}

.map-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
    border-bottom: 1px solid var(--border-strong);
}

.map-panel-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-900);
}

.map-panel-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
}

.map-balloon-resident {
    padding: 8px 0;
    border-bottom: 1px solid #e6edf9;
}

.map-balloon-resident:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.map-balloon-btn {
    margin-top: 8px;
    cursor: pointer;
}

.map-resident-row {
    align-items: center;
    gap: 12px;
}

.map-summary-body {
    padding: 14px 16px 16px;
}

.map-summary-kpi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.map-summary-kpi-card {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 12px 14px;
}

.map-summary-kpi-card .label {
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.map-summary-kpi-card .value {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-900);
}

.map-meters-list {
    max-height: 320px;
    overflow-y: auto;
}

.districts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.district-list-card {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: #f9fbff;
    overflow: hidden;
}

.district-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
    border-bottom: 1px solid var(--border-strong);
}

.district-list-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--c-900);
}

.district-count-pill {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
    background: #e8f0ff;
    padding: 5px 10px;
    border-radius: 99px;
    white-space: nowrap;
}

.district-residents-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 10px;
}

.district-empty {
    margin: 0;
    padding: 18px 16px;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.25s ease-out;
    max-width: 340px;
}

.toast.success { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.toast.danger { background: linear-gradient(135deg, #dc2626, #ef4444); }

.sidebar-logout {
    width: 100%;
}

.mobile-topbar,
.sidebar-backdrop {
    display: none;
}

body.nav-locked {
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (max-width: 980px) {
    .grid-2x3 {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 150;
        height: 56px;
        padding: 0 14px;
        padding-top: env(safe-area-inset-top, 0);
        background: linear-gradient(185deg, var(--c-900) 0%, var(--c-950) 100%);
        color: #fff;
        box-shadow: 0 4px 16px rgba(8, 22, 52, 0.2);
    }

    .mobile-menu-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        padding: 0;
        font-size: 22px;
        line-height: 1;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #fff;
        border-radius: var(--radius-sm);
    }

    .mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 0.18);
    }

    .mobile-topbar-title {
        font-size: 16px;
        font-weight: 700;
        letter-spacing: -0.2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 180;
        background: rgba(8, 22, 52, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    body.nav-locked .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .layout {
        flex-direction: column;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 88vw);
        height: 100vh;
        height: 100dvh;
        padding: 24px 18px;
        padding-top: calc(24px + env(safe-area-inset-top, 0));
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 200;
        flex-direction: column;
        justify-content: space-between;
        overflow-y: auto;
    }

    .layout.nav-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-menu {
        margin-top: 28px;
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .menu-item {
        min-height: 48px;
        padding: 14px 16px;
        font-size: 15px;
    }

    .main-content {
        margin-left: 0;
        padding: 72px 14px 24px;
        padding-top: calc(72px + env(safe-area-inset-top, 0));
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 22px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header .btn-export,
    .page-header button {
        width: 100%;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 20px;
    }

    .kpi-card {
        padding: 18px 20px;
    }

    .kpi-card .value {
        font-size: 24px;
    }

    .card {
        padding: 18px 16px;
        margin-bottom: 18px;
        border-radius: var(--radius-sm);
    }

    .card h3 {
        font-size: 16px;
    }

    .card-head,
    .budget-head {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .budget-head > div {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .chart-box {
        height: 220px;
    }

    .chart-box.is-doughnut {
        height: 240px;
        max-width: none;
    }

    .list-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }

    .list-row .btn-mini,
    .list-row .btn-danger {
        width: 100%;
        min-height: 44px;
    }

    .list-row:hover {
        transform: none;
    }

    .row-value {
        white-space: normal;
    }

    .alert-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 14px 16px;
        font-size: 13px;
    }

    .alert-banner .btn-mini {
        width: 100%;
        min-height: 44px;
    }

    #residents-map {
        height: 280px;
    }

    .map-panel-head,
    .district-list-head {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

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

    .toast-container {
        left: 14px;
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0));
    }

    .toast {
        max-width: none;
        width: 100%;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        min-height: 48px;
    }

    button {
        min-height: 48px;
    }

    .auth-wrapper {
        padding: 16px;
        align-items: flex-start;
        padding-top: max(16px, env(safe-area-inset-top));
    }

    .auth-container {
        padding: 28px 20px;
        border-radius: var(--radius-lg);
    }

    .auth-brand h1 {
        font-size: 21px;
    }

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

    .input-group .error-text {
        text-align: left;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding-left: 12px;
        padding-right: 12px;
    }

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

    .kpi-card .value {
        font-size: 22px;
    }

    .tabs button {
        font-size: 13px;
        padding: 10px 8px;
    }
}

@media (min-width: 769px) {
    .mobile-topbar {
        display: none !important;
    }
}
