/* ProblemBD design system — mobile first */
:root {
    --primary: #0F9D58;
    --primary-dark: #0B7A44;
    --ink: #1F2933;
    --muted: #5F6B76;
    --line: #DDE3E8;
    --bg: #F5F7F6;
    --surface: #FFFFFF;

    /* Report status colors */
    --st-reported: #D93025;
    --st-verification: #F29900;
    --st-verified: #F4B400;
    --st-working: #1A73E8;
    --st-resolved: #188038;

    --primary-content: #FFFFFF;
    --status-reported-content: #FFFFFF;
    --status-verification-content: #1F2933;
    --status-verified-content: #1F2933;
    --status-working-content: #FFFFFF;
    --status-resolved-content: #FFFFFF;
    --input-bg: #FFFFFF;
    --soft-surface: #EAF1EE;
    --warning-bg: #FFF4E5;
    --warning-ink: #733B00;
    --warning-border: #B54708;
    --error: #D93025;
    --map-bg: #DCE8E7;
    --map-panel-bg: rgba(255, 255, 255, .97);
    --map-shadow: rgba(31, 41, 51, .18);
    --sheet-shadow: rgba(31, 41, 51, .3);
    --marker-shadow: rgba(0, 0, 0, .5);
    --map-truncated: #9A3412;
    --marker-outline: #FFFFFF;
    --dialog-backdrop: rgba(0, 0, 0, .48);
    color-scheme: light;

    --radius: 10px;
    --header-h: 64px;
    --bottom-h: 62px;
}

html[data-theme="dark"] {
    --primary: #18A86B;
    --primary-dark: #5BDBA0;
    --ink: #EAF1F1;
    --muted: #A9B9BA;
    --line: #3A5052;
    --bg: #101819;
    --surface: #192526;
    --st-reported: #FF6B6B;
    --st-verification: #FFB84D;
    --st-verified: #FFE07A;
    --st-working: #63B3FF;
    --st-resolved: #55D6A1;
    --primary-content: #04170D;
    --status-reported-content: #260909;
    --status-verification-content: #2B1C06;
    --status-verified-content: #2B2508;
    --status-working-content: #071A2B;
    --status-resolved-content: #062519;
    --input-bg: #142021;
    --soft-surface: #263838;
    --warning-bg: #3B2D17;
    --warning-ink: #FFE1AA;
    --warning-border: #F4B942;
    --error: #FF7972;
    --map-bg: #142526;
    --map-panel-bg: rgba(25, 37, 38, .97);
    --map-shadow: rgba(0, 0, 0, .48);
    --sheet-shadow: rgba(0, 0, 0, .55);
    --marker-shadow: rgba(0, 0, 0, .75);
    --map-truncated: #FDBA74;
    --marker-outline: #101819;
    --dialog-backdrop: rgba(0, 0, 0, .68);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
    padding-bottom: var(--bottom-h); /* room for the phone bottom bar */
}

h1, h2 { line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--st-working); outline-offset: 2px; }

.container { width: 100%; max-width: 960px; margin-inline: auto; padding-inline: 16px; }
.main { padding-block: 20px; }
.center { text-align: center; }

/* Header */
.account-bar { background: var(--soft-surface); border-bottom: 1px solid var(--line); color: var(--ink); }
.account-bar-inner { min-height: 32px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: nowrap; }
.account-bar .header-user-name { max-width: 180px; }
.account-bar .header-auth-action { min-height: 28px; padding: 2px 6px; border-radius: 4px; background: transparent; font-size: .76rem; line-height: 1.3; }
.account-bar .header-auth-action:hover { background: var(--surface); }
.header-logout-form { margin: 0; }
.notification-bell { position: relative; display: inline-grid; width: 30px; height: 28px; flex: 0 0 30px; place-items: center; color: var(--ink); font-size: 1rem; text-decoration: none; }
.notification-count-badge { position: absolute; top: -3px; right: -4px; min-width: 16px; padding: 0 4px; border-radius: 999px; color: #FFFFFF; background: var(--st-reported); font-size: .65rem; font-weight: 700; line-height: 16px; text-align: center; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { min-height: var(--header-h); display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-brand { display: flex; align-items: center; gap: 16px; }
.header-controls { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.25rem; }
.tagline { display: none; margin: 0; color: var(--muted); font-size: .9rem; }
.top-nav { display: none; margin-left: auto; gap: 4px; }
.top-nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; }
.top-nav a:hover { background: var(--bg); }
.top-nav a[aria-current="page"] { background: var(--primary); color: var(--primary-content); }
.language-toggle { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--primary-dark); font-size: .875rem; font-weight: 700; text-decoration: none; }
.language-toggle:hover { background: var(--bg); }
.theme-toggle { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font: inherit; font-size: 1.15rem; cursor: pointer; }
.theme-toggle:hover { background: var(--soft-surface); }
.help-toggle { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font: inherit; font-size: 1.15rem; cursor: pointer; }
.help-toggle:hover { background: var(--soft-surface); }
.header-user-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.header-auth-action { padding: 4px 9px; border-radius: 6px; font-size: .82rem; line-height: 1.45; white-space: nowrap; }
.help-dialog { width: min(560px, calc(100% - 24px)); max-height: min(82dvh, 760px); overflow-y: auto; margin: auto; padding: 20px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); }
.help-dialog[open] { display: block; }
.help-dialog::backdrop { background: var(--dialog-backdrop); }
.help-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.help-dialog-heading h2 { margin: 0; }
.help-close { min-height: 44px; flex: 0 0 auto; }
.help-steps { margin: 12px 0 0; padding-left: 1.5rem; }
.help-steps li { padding: 6px 0; }
.help-steps h3 { margin: 0 0 3px; font-size: 1rem; }
.help-steps p { margin: 0; color: var(--muted); }
.map-pin-hint { margin-block: 0 6px; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border: 0; border-radius: var(--radius); font: inherit; font-weight: 700; text-decoration: none; text-align: center; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--primary-content); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }

/* Status badges */
.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: .85rem; font-weight: 500; color: var(--status-reported-content); }
.badge-reported     { background: var(--st-reported); }
.badge-verification { background: var(--st-verification); color: var(--status-verification-content); }
.badge-verified     { background: var(--st-verified); color: var(--status-verified-content); }
.badge-working      { background: var(--st-working); color: var(--status-working-content); }
.badge-resolved     { background: var(--st-resolved); color: var(--status-resolved-content); }
.badge-reopened     { background: var(--st-reported); color: var(--status-reported-content); }
.badge-assigned     { background: var(--st-working); }
.badge-rejected      { background: var(--st-reported); }
.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }

/* Forms (used from step 2) */
.form-input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; color: var(--ink); background: var(--input-bg); }
.form-input:focus { border-color: var(--primary); }
.searchable-select { position: relative; min-width: 0; width: 100%; }
.searchable-select-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.searchable-select-list { position: fixed; z-index: 2000; top: 0; left: 0; width: 100%; max-height: 16rem; overflow-y: auto; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 20px var(--map-shadow); }
.searchable-select-list[hidden] { display: none; }
.searchable-select-option { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 5px; text-align: start; font: inherit; color: var(--ink); background: transparent; cursor: pointer; }
.searchable-select-option:hover, .searchable-select-option[aria-selected="true"] { color: var(--ink); background: var(--soft-surface); }
.searchable-select-empty { margin: 0; padding: 9px 10px; color: var(--muted); }

/* Report form */
.report-page { max-width: 720px; margin-inline: auto; }
.report-heading { margin-bottom: 16px; }
.report-heading p, .field-hint { color: var(--muted); font-size: .9rem; }
.report-form { padding: 16px; }
.report-step { min-width: 0; margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); }
.report-step legend { width: 100%; padding: 0 0 10px; font-size: 1.1rem; font-weight: 700; }
.field-label { display: block; margin: 12px 0 6px; font-weight: 500; }
.field-hint { margin: 6px 0; }
.photo-input { min-height: 52px; padding: 8px; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-previews img { width: 88px; height: 88px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.location-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.address-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-location, .btn-secondary { color: var(--ink); background: var(--soft-surface); }
.btn-location { min-height: 48px; }
.report-map { height: 300px; width: 100%; border: 1px solid var(--line); border-radius: 6px; z-index: 0; }
.report-coordinates { margin-top: 8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sensitive-warning { margin: 12px 0; padding: 12px; border-left: 4px solid var(--warning-border); background: var(--warning-bg); color: var(--warning-ink); }
.report-description { min-height: 130px; resize: vertical; }
.severity-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.severity-option, .anonymous-option { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.severity-option input, .anonymous-option input { width: 20px; height: 20px; accent-color: var(--primary); }
.anonymous-option { margin-top: 12px; }
.report-submit { width: 100%; min-height: 56px; margin-top: 18px; }
.report-errors { border-color: var(--error); }
.report-errors ul { margin-bottom: 0; }
.flash-success { margin-bottom: 16px; border-color: var(--primary); }
.guest-report-note { margin: 18px 0 0; color: var(--muted); font-size: .9rem; }
.guest-report-note a { font-weight: 700; }
.auth-page, .my-reports-page { max-width: 720px; margin-inline: auto; }
.auth-heading { margin-bottom: 16px; }
.auth-heading p { color: var(--muted); }
.auth-form { padding: 16px; }
.auth-submit { width: 100%; min-height: 48px; margin-top: 18px; }
.auth-switch { margin-top: 14px; text-align: center; }
.reports-empty { text-align: center; }
.reports-empty .btn { margin-top: 6px; }
.my-report-list { display: grid; gap: 12px; }
.my-report-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0; padding: 12px; }
.my-report-photo { width: 76px; height: 76px; border-radius: 6px; object-fit: cover; background: var(--soft-surface); }
.my-report-copy { min-width: 0; }
.my-report-copy p { margin: 0 0 3px; }
.my-report-category { font-weight: 700; }
.my-report-code, .my-report-copy time { color: var(--muted); font-size: .85rem; }
.my-report-area { margin-top: 6px !important; overflow-wrap: anywhere; }
.my-report-link { grid-column: 1 / -1; justify-self: start; }
.reports-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; }
.reports-pagination .btn { padding: 7px 12px; }
.reports-pagination span { white-space: nowrap; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.report-success { max-width: 640px; margin: 24px auto; }
.report-code { font-size: 1.5rem; font-weight: 700; }
.success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

/* Public reports map */
.public-map-page { position: relative; left: 50%; width: 100vw; height: min(76vh, 820px); min-height: 560px; margin: -20px 0 24px; transform: translateX(-50%); overflow: hidden; background: var(--map-bg); }
.public-map-canvas { position: absolute; inset: 0; z-index: 1; }
.map-filters { position: absolute; z-index: 500; top: 14px; left: max(14px, calc((100vw - 1240px) / 2)); width: 290px; max-height: calc(100% - 28px); overflow: auto; padding: 14px; color: var(--ink); background: var(--map-panel-bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 3px 14px var(--map-shadow); }
.map-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.map-filter-heading h1 { margin: 0; font-size: 1.15rem; }
.map-filter-toggle { display: none; min-height: 40px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: inherit; }
.map-filter-fields { display: grid; gap: 5px; }
.map-filter-fields label { margin-top: 7px; font-weight: 500; }
.map-filter-fields .form-input { min-height: 44px; padding-block: 7px; }
.near-me-button { width: 100%; margin-top: 10px; }
.map-load-message, .map-truncated-message { margin: 10px 0 4px; font-size: .9rem; }
.map-truncated-message { color: var(--map-truncated); font-weight: 700; }
.map-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .8rem; }
.map-legend li { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; }
.legend-dot.status-reported, .legend-dot.status-reopened { background: var(--st-reported); }
.legend-dot.status-verification { background: var(--st-verification); }
.legend-dot.status-verified { background: var(--st-verified); }
.legend-dot.status-working { background: var(--st-working); }
.legend-dot.status-resolved { background: var(--st-resolved); }
.report-marker-icon { display: grid; place-items: center; background: transparent; border: 0; }
.report-marker-dot { position: absolute; width: 34px; height: 34px; border: 3px solid var(--marker-outline); border-radius: 50%; background: var(--marker-color); box-shadow: 0 1px 5px var(--marker-shadow); }
.map-marker-emoji { position: relative; z-index: 1; font-size: 17px; line-height: 1; }
.map-report-card { width: 280px; max-width: 100%; overflow: hidden; color: var(--ink); }
.map-card-photo { display: block; width: 100%; max-height: 160px; object-fit: cover; }
.map-report-copy { padding: 12px; }
.map-report-copy h3 { margin: 2px 0 6px; font-size: 1rem; }
.map-report-copy p { margin: 6px 0; font-size: .9rem; }
.map-report-code { color: var(--muted); font-size: .8rem !important; }
.map-mobile-sheet[hidden] { display: none; }
.map-mobile-sheet { position: absolute; z-index: 700; right: 10px; bottom: 10px; left: 10px; max-height: 45%; overflow: auto; border-radius: 8px; background: var(--surface); box-shadow: 0 3px 18px var(--sheet-shadow); }
.map-sheet-close { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--ink); background: var(--surface); font-size: 1.5rem; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { color: var(--ink); background: var(--surface); }
.leaflet-control-attribution { color: var(--muted) !important; background: var(--map-panel-bg) !important; }
.leaflet-control-attribution a { color: var(--primary-dark); }
.leaflet-bar a, .leaflet-bar a:hover { color: var(--ink); background: var(--surface); border-bottom-color: var(--line); }
html[data-theme="dark"] .leaflet-tile { filter: brightness(.72) saturate(.82) contrast(1.05); }

/* Home report stats */
.home-map-section { padding-block: 8px 28px; }
.home-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.home-stat { min-height: 90px; display: flex; flex-direction: column; justify-content: center; padding: 12px 16px; border-left: 4px solid var(--primary); background: var(--surface); }
.home-stat span { color: var(--muted); font-size: .9rem; }
.home-stat strong { font-size: 1.55rem; line-height: 1.3; }
.home-share-section, .detail-share-actions { margin-block: 18px; }
.home-share-section h2, .detail-share-actions h2 { margin-bottom: 8px; font-size: 1.1rem; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; }

.leaderboard-page { max-width: 1100px; margin-inline: auto; }
.leaderboard-heading { margin-bottom: 16px; }
.leaderboard-heading h1 { margin-bottom: 4px; }
.leaderboard-heading p { margin: 0; color: var(--muted); }
.leaderboard-table th a { color: var(--ink); text-decoration: none; }
.leaderboard-table th a:hover { color: var(--primary-dark); text-decoration: underline; }
.leaderboard-rank { white-space: nowrap; font-weight: 700; }
.leaderboard-division { display: block; color: var(--muted); }
.leaderboard-top-1 td, .leaderboard-top-2 td, .leaderboard-top-3 td { background: var(--soft-surface); }
.leaderboard-top-1 .leaderboard-rank { color: var(--warning-ink); font-size: 1.15rem; }
.leaderboard-top-2 .leaderboard-rank, .leaderboard-top-3 .leaderboard-rank { font-size: 1.1rem; }
.leaderboard-empty { color: var(--muted); font-style: italic; }

/* Public report detail */
.report-detail-page { max-width: 1040px; margin: 0 auto; }
.detail-heading { margin-bottom: 18px; }
.detail-heading h1 { margin: 2px 0; overflow-wrap: anywhere; }
.detail-category { margin-bottom: 4px; color: var(--muted); }
.detail-code { display: inline-block; margin: 4px 10px 8px 0; font-weight: 700; }
.detail-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 18px; }
.detail-photos img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 6px; background: var(--soft-surface); }
.detail-photo-comparison figure { min-width: 0; margin: 0; }
.detail-photo-comparison figcaption { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); gap: 28px; margin-bottom: 22px; }
.detail-facts, .detail-description, .detail-timeline { padding-block: 14px; border-bottom: 1px solid var(--line); }
.detail-facts p { margin: 4px 0; }
.detail-description p { white-space: normal; overflow-wrap: anywhere; }
.detail-timeline ol { margin: 0; padding-left: 22px; }
.detail-timeline li { padding: 0 0 14px 5px; }
.detail-timeline time { display: block; color: var(--muted); font-size: .85rem; }
.detail-timeline li p { margin: 6px 0 0; }
.detail-map-wrap h2 { margin-bottom: 10px; }
.detail-map { width: 100%; height: 280px; border: 1px solid var(--line); border-radius: 6px; }
.confirmation-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.confirmation-button { min-height: 44px; }
.confirmation-button.is-active { color: var(--primary-content); background: var(--primary); }
.confirmation-button:disabled { cursor: not-allowed; opacity: .62; }
.confirmation-count { display: inline-grid; min-width: 1.5em; place-items: center; margin-left: 4px; padding: 0 4px; border-radius: 999px; background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums; }
.confirmation-login-link { font-size: .9rem; font-weight: 700; }
.confirmation-message { flex-basis: 100%; margin: 0; color: var(--error); font-size: .9rem; }
.flag-report-panel { flex-basis: 100%; }
.flag-report-panel summary { display: inline-block; cursor: pointer; list-style: none; }
.flag-report-panel summary::-webkit-details-marker { display: none; }
.flag-report-form { display: grid; gap: 10px; max-width: 440px; margin-top: 10px; padding: 12px; }
.flag-reasons { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.flag-reasons legend { margin-bottom: 6px; font-weight: 700; }
.flag-reason-option { display: flex; align-items: center; gap: 8px; }
.flag-reason-option input { margin: 0; }
.flag-report-form .btn { justify-self: start; }
.admin-page { max-width: 1100px; margin-inline: auto; }
.admin-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.admin-heading h1, .admin-heading p { margin-bottom: 0; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-stat { display: flex; min-height: 100px; flex-direction: column; justify-content: center; margin: 0; }
.admin-stat span { color: var(--muted); }
.admin-stat strong { font-size: 1.6rem; line-height: 1.3; }
.admin-stat-warning { border-color: var(--warning-border); }
.admin-flag-stat { color: var(--ink); text-decoration: none; }
.admin-flag-stat-urgent { border-color: var(--error); background: var(--warning-bg); }
.admin-flag-urgent-count { color: var(--error) !important; font-weight: 700; }
.admin-flag-urgent td { background: var(--warning-bg); }
.admin-flag-urgent td:first-child { border-left: 4px solid var(--error); }
.admin-flag-details { margin-top: 24px; }
.admin-status-section { margin-top: 24px; }
.admin-status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.admin-status-card { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 8px; margin: 0; padding: 12px; color: var(--ink); text-decoration: none; }
.admin-status-card strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.admin-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 12px; }
.admin-filters label { min-width: 0; }
.admin-filters label span { display: block; margin-bottom: 4px; font-weight: 500; }
.admin-filters .btn { min-height: 44px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { background: var(--soft-surface); white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-detail-link { padding: 5px 9px; white-space: nowrap; }
.admin-empty { margin-bottom: 0; }
.admin-sensitive-note { margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--warning-border); border-left-width: 5px; background: var(--warning-bg); color: var(--warning-ink); }
.admin-sensitive-note p { margin: 4px 0 0; }
.admin-detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr); gap: 16px; align-items: start; }
.admin-report-information p { overflow-wrap: anywhere; }
.admin-note { min-height: 100px; resize: vertical; }
.admin-status-form-card .btn { width: 100%; margin-top: 14px; }
.sensitive-verify-button { min-height: 52px; font-size: 1.05rem; }
.admin-history { margin-top: 24px; }
.admin-history-list { margin: 0; padding-left: 22px; }
.admin-history-list li { padding: 0 0 14px 4px; }
.admin-history-list time, .admin-history-list span { display: block; color: var(--muted); font-size: .88rem; }
.notifications-page { max-width: 800px; margin-inline: auto; }
.notification-list { display: grid; gap: 10px; }
.notification-item { margin: 0; padding: 16px; }
.notification-item.is-unread { border-left: 4px solid var(--primary); background: var(--soft-surface); }
.notification-item.is-read { color: var(--muted); }
.notification-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.notification-item-heading h2 { margin: 0; font-size: 1rem; }
.notification-item-heading time { flex: 0 0 auto; color: var(--muted); font-size: .82rem; }
.notification-item p { margin: 8px 0; white-space: pre-line; overflow-wrap: anywhere; }
.notification-report-link { padding: 5px 10px; font-size: .85rem; }
.notifications-empty { text-align: center; }
.notifications-empty h2 { margin-bottom: 6px; font-size: 1.1rem; }
.notifications-empty p { margin: 0; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 600px) {
    .auth-form { padding: 24px; }
    .my-report-card { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; padding: 16px; }
    .my-report-photo { width: 92px; height: 92px; }
    .my-report-link { grid-column: auto; }
    .report-form { padding: 24px; }
    .report-step { padding-block: 22px; }
    .report-map { height: 360px; }
    .address-actions { flex-direction: row; align-items: stretch; }
    .address-actions .form-input { flex: 1; min-width: 0; }
    .severity-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .public-map-page { left: auto; width: calc(100% + 32px); height: calc(100dvh - var(--header-h) - var(--bottom-h)); min-height: 520px; margin: -20px -16px 0; transform: none; }
    .map-filters { top: 10px; right: 10px; left: 10px; width: auto; max-height: none; padding: 10px 12px; }
    .map-filter-toggle { display: inline-block; }
    .map-filter-fields[hidden] { display: none; }
    .map-filter-fields { grid-template-columns: 1fr 1fr; gap: 4px 8px; }
    .map-filter-fields label { align-self: end; }
    .map-filter-fields .form-input { min-width: 0; }
    .near-me-button { grid-column: 1 / -1; }
    .map-legend { grid-template-columns: repeat(3, 1fr); }
    .map-report-card { width: auto; }
    .home-stat-grid { gap: 6px; }
    .home-stat { min-height: 82px; padding: 8px; }
    .home-stat span { font-size: .78rem; }
    .home-stat strong { font-size: 1.25rem; }
    .detail-columns { grid-template-columns: 1fr; gap: 18px; }
    .admin-stat-grid { grid-template-columns: 1fr; }
    .admin-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-filters { grid-template-columns: 1fr; }
    .admin-filters .btn { width: 100%; }
    .admin-detail-grid { grid-template-columns: 1fr; }
    .admin-heading { align-items: flex-start; }
    .share-button { flex: 1 1 100%; }
}

@media (max-width: 360px) {
    .header-inner { gap: 6px; }
    .header-controls { gap: 4px; }
    .account-bar-inner { gap: 4px; }
    .account-bar .header-user-name { max-width: 56px; }
    .account-bar .header-auth-action { padding-inline: 4px; font-size: .7rem; }
    .logo { font-size: 1.05rem; }
}

/* Home */
.hero { padding: 12px 0 24px; }
.hero p { color: var(--muted); }
.map-placeholder { min-height: 220px; display: grid; place-items: center; text-align: center; color: var(--muted); background: var(--soft-surface); border-style: dashed; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0 0 4px; }
.site-footer .note { font-size: .8rem; }

/* Bottom navigation (phones) */
.bottom-nav { position: fixed; inset: auto 0 0 0; height: var(--bottom-h); display: flex; background: var(--surface); border-top: 1px solid var(--line); z-index: 30; }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: var(--muted); font-size: .75rem; line-height: 1.3; }
.bottom-nav a[aria-current="page"] { color: var(--primary-dark); font-weight: 700; }

/* Tablet and desktop */
@media (min-width: 768px) {
    body { padding-bottom: 0; }
    .bottom-nav { display: none; }
    .top-nav { display: flex; }
    .tagline { display: block; }
    .header-controls { margin-left: 0; }
    h1 { font-size: 2rem; }
    .hero { padding: 32px 0; }
}
