:root {
    --bg: #f6f8fc;
    --bg2: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.12);

    --primary: #0f172a;
    --accent: #10b981;

    --shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background:
        radial-gradient(1200px 600px at 20% 0%, #e8f0ff 0%, rgba(232, 240, 255, 0) 60%),
        radial-gradient(900px 500px at 90% 10%, #e8fff5 0%, rgba(232, 255, 245, 0) 55%),
        var(--bg);
    color: var(--text);
}

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

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 0 auto;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
    background: rgba(246, 248, 252, 0.7);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    color: #0f172a;
    font-weight: 900;
}

.nav {
    display: flex;
    gap: 22px;
    font-weight: 700;
    color: var(--text-muted);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border);
}

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: var(--text-muted);
    font-weight: 700;
}

/* Buttons */
.btn {
    border: 0;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.18);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border);
    color: var(--text);
}

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

.full {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Main */
.main {
    padding-bottom: 80px;
}

.hero {
    padding: 54px 0 24px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 34px;
    align-items: start;
}

.pill {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.10);
    color: #2563eb;
    font-weight: 900;
    margin-bottom: 14px;
}

.hero-left h1 {
    font-size: clamp(42px, 4.6vw, 62px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 0 16px;
}

.lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 22px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.legend {
    display: flex;
    gap: 18px;
    align-items: center;
    color: var(--text-muted);
    font-weight: 800;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.dot-high {
    background: #ef4444;
}

.dot-medium {
    background: #f59e0b;
}

.dot-low {
    background: #10b981;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-shell {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.map-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--border);
}

.map-title {
    font-weight: 900;
}

.map-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-badge {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
    font-weight: 900;
}

.map {
    height: 360px;
    width: 100%;
}

.map-card {
    padding: 14px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.85);
}

.tag {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    font-weight: 900;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    font-size: 12px;
}

.map-card-body {
    margin-top: 8px;
    font-weight: 800;
}

.map-card-footer {
    margin-top: 12px;
    color: var(--text-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section {
    padding: 54px 0;
}

.section.alt {
    background: rgba(255, 255, 255, 0.55);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section h2 {
    margin: 0 0 12px;
    font-size: 32px;
    letter-spacing: -0.03em;
}

.muted {
    color: var(--text-muted);
    font-weight: 600;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.06);
    padding: 16px;
}

.card h3 {
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.footer {
    padding: 32px 0;
    margin-top: 54px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 700;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 20;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(660px, calc(100% - 26px));
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    padding: 16px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

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

.tab {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.75);
    padding: 12px 10px;
    font-weight: 900;
    cursor: pointer;
}

.tab.active {
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.35);
}

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

.field label {
    display: block;
    font-weight: 900;
    margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(246, 248, 252, 0.6);
    font-weight: 700;
    outline: none;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.error {
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    font-weight: 800;
    padding: 12px;
}

.hint {
    margin: 0;
    color: var(--text-muted);
    font-weight: 700;
}

/* Mobile */
.mobile-actions {
    display: none;
}

@media (max-width: 920px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .map {
        height: 320px;
    }

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

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

    .mobile-actions {
        display: block;
    }
}

/* Photo upload preview */
.photo-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-top: 10px;
}

/* Dashboard */
.dash-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.dash-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 320px;
    justify-content: flex-end;
}

.input {
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(246, 248, 252, 0.6);
    font-weight: 800;
    outline: none;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
    align-items: start;
}

.dash-list {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 14px;
}

.issues {
    display: grid;
    gap: 10px;
}

.issue-item {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
}

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

.issue-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-muted);
}

.issue-title {
    font-weight: 900;
    letter-spacing: -0.02em;
}

.issue-meta {
    color: var(--text-muted);
    font-weight: 800;
    font-size: 13px;
    margin-top: 6px;
}

.issue-desc {
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 8px;
}

.dash-map {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
}

@media (max-width: 920px) {
    .dash-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dash-controls {
        justify-content: flex-start;
        min-width: auto;
        width: 100%;
    }

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