/* ============================================================
   RÁC Ở ĐÂU? — Design tokens
   Ý tưởng: các trạng thái "vấn đề" đi từ đỏ → cam → xanh dương,
   và khi xử lý xong thì "trở về" đúng màu xanh ngọc thương hiệu —
   bảng màu tự kể câu chuyện "từ rác thải trở lại sạch sẽ".
   ============================================================ */

:root {
    --ink: #12211C;
    --paper: #F3F6F1;
    --paper-alt: #FFFFFF;
    --primary: #0F7A5C;
    --primary-dark: #0B5C46;
    --primary-tint: #E3F1EA;
    --muted: #5B6B63;
    --line: #DDE5DD;

    --status-new: #E8491E;
    --status-confirmed: #E8871E;
    --status-processing: #2563A8;
    --status-resolved: #0F7A5C;
    --status-duplicate: #8A9A91;

    --font-display: 'Space Grotesk', 'Be Vietnam Pro', sans-serif;
    --font-body: 'Be Vietnam Pro', -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 2px 12px rgba(18, 33, 28, 0.06);
    --shadow-lift: 0 12px 28px rgba(18, 33, 28, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}

a {
    color: var(--primary-dark);
}

/* ---------- Navbar ---------- */

.navbar {
    background: linear-gradient(135deg, var(--ink) 0%, #1B3229 100%) !important;
    box-shadow: 0 2px 16px rgba(18, 33, 28, 0.18);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.navbar-brand .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 3px 8px rgba(15, 122, 92, 0.5);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

/* ---------- Buttons ---------- */

.btn-success {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.2rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.btn-success:hover, .btn-success:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 122, 92, 0.28);
}

.btn-outline-success {
    color: var(--primary-dark);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-outline-success:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-light {
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.btn-light {
    border-radius: var(--radius-sm);
    font-weight: 600;
    background: #fff;
}

.btn-warning, .btn-primary {
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* ---------- Cards & containers ---------- */

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper-alt);
    box-shadow: var(--shadow-soft);
}

.card:hover {
    box-shadow: var(--shadow-lift);
}

.card .card-body h2, .card .card-body h3 {
    font-family: var(--font-mono);
}

/* ---------- Status badges (driven by inline StatusColor, this just shapes them) ---------- */

.badge {
    color: #fff;
    padding: 0.4em 0.8em;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

/* ---------- Tables ---------- */

.table th {
    width: 35%;
    color: var(--muted);
    font-weight: 600;
    border-color: var(--line);
}

.table td {
    border-color: var(--line);
}

.table-hover tbody tr:hover {
    background-color: var(--primary-tint);
}

/* ---------- Alerts ---------- */

.alert-info {
    background-color: var(--primary-tint);
    border: 1px solid #BFE0D2;
    color: var(--primary-dark);
    border-radius: var(--radius-md);
}

.alert-success {
    background-color: var(--primary-tint);
    border: 1px solid #BFE0D2;
    color: var(--primary-dark);
    border-radius: var(--radius-md);
}

/* ---------- Forms ---------- */

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--line);
    padding: 0.6rem 0.85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(15, 122, 92, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--ink);
    font-size: 0.92rem;
}

/* Image upload dropzone styling for the report-creation form */
.upload-dropzone {
    border: 2px dashed var(--line);
    border-radius: var(--radius-md);
    background: var(--paper);
    padding: 1.5rem;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-dropzone:hover, .upload-dropzone.has-file {
    border-color: var(--primary);
    background: var(--primary-tint);
}

.upload-dropzone i {
    font-size: 1.8rem;
    color: var(--primary);
}

/* ---------- Map containers ---------- */

.map-frame {
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.map-offline-notice {
    position: absolute;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    background: rgba(243, 246, 241, 0.94);
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* ---------- Coordinate / numeric data — use monospace to signal "this is data" ---------- */

.mono-data {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- Hero banner (trang chủ) ---------- */

.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lift);
    min-height: 260px;
    display: flex;
    align-items: flex-end;
}

.hero-banner__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-banner__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 33, 28, 0.05) 0%, rgba(18, 33, 28, 0.78) 100%);
    z-index: 1;
}

.hero-banner__content {
    position: relative;
    z-index: 2;
    padding: 1.75rem 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-banner__eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: #BFEFDD;
    margin-bottom: 0.35rem;
    display: block;
}

.hero-banner__title {
    color: #F3F6F1;
    font-size: clamp(1.5rem, 2.4vw, 2.15rem);
    margin-bottom: 0.35rem;
}

.hero-banner__subtitle {
    color: #D7E4DC;
    max-width: 46ch;
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .hero-banner {
        min-height: 210px;
    }

    .hero-banner__content {
        padding: 1.25rem 1.25rem;
    }
}

/* ---------- Signature element: community cleanup progress bar ---------- */

.cleanup-progress {
    background: var(--paper-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.25rem;
}

.cleanup-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cleanup-progress__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
}

.cleanup-progress__stat {
    font-family: var(--font-mono);
    color: var(--primary-dark);
    font-weight: 600;
}

.cleanup-progress__bar {
    display: flex;
    width: 100%;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--line);
}

.cleanup-progress__segment {
    height: 100%;
    transition: width 0.4s ease;
}

.cleanup-progress__legend {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--muted);
}

.cleanup-progress__legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

/* ---------- Footer ---------- */

footer {
    background-color: var(--paper-alt);
    border-top: 1px solid var(--line);
    color: var(--muted);
}

/* ---------- Utility ---------- */

.text-brand {
    color: var(--primary-dark) !important;
}

.section-eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--muted);
}
