/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:       #1a6b3c;
  --brand-light: #e8f5ee;
  --brand-dark:  #134f2c;
  --accent:      #f05a28;
  --bg:          #f6f7f9;
  --surface:     #ffffff;
  --border:      #e4e7ec;
  --text:        #111827;
  --text-muted:  #6b7280;
  --text-light:  #9ca3af;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow:      0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1,h2,h3 { font-weight: 600; line-height: 1.3; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.main-layout { max-width: 1140px; margin: 2rem auto; padding: 0 1.25rem; display: grid; grid-template-columns: 240px 1fr; gap: 1.75rem; }
.detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.75rem; margin: 2rem 0; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; display: flex; align-items: center; height: 60px; gap: 1rem; }
.nav-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.1rem; color: var(--brand); text-decoration: none; }
.brand-icon { font-size: 1.3rem; }
.nav-links { display: flex; gap: .25rem; margin-left: auto; }
.nav-link { padding: .4rem .75rem; border-radius: 6px; font-size: .9rem; color: var(--text-muted); font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover, .nav-link.active { background: var(--brand-light); color: var(--brand); text-decoration: none; }
.btn-report-nav { background: var(--brand); color: #fff; padding: .45rem 1rem; border-radius: 7px; font-size: .88rem; font-weight: 600; white-space: nowrap; transition: background .15s; }
.btn-report-nav:hover { background: var(--brand-dark); text-decoration: none; }
.nav-hamburger { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text); margin-left: .5rem; }

.mobile-menu { display: none; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); }
.mobile-menu a { padding: .8rem 1.25rem; font-size: .95rem; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-menu a:hover { background: var(--bg); }
.mobile-menu.open { display: flex; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero-strip { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 3.5rem 1.25rem; }
.hero-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.hero-text h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }
.hero-text p { margin-top: .6rem; opacity: .85; font-size: 1.05rem; }
.btn-hero { background: #fff; color: var(--brand); padding: .75rem 1.75rem; border-radius: 8px; font-weight: 700; font-size: 1rem; white-space: nowrap; transition: transform .15s; }
.btn-hero:hover { transform: translateY(-1px); text-decoration: none; }

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar { background: var(--surface); border-bottom: 1px solid var(--border); display: flex; gap: 0; }
.stat-item { flex: 1; text-align: center; padding: 1rem; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-item strong { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-item span { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.text-success { color: #16a34a; }
.text-warning { color: #d97706; }
.text-danger  { color: #dc2626; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.sidebar-card h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .9rem; }
.cat-list, .status-list { list-style: none; display: flex; flex-direction: column; gap: .25rem; }
.cat-list a, .status-list a { display: block; padding: .4rem .65rem; border-radius: 6px; font-size: .9rem; color: var(--text-muted); transition: background .15s, color .15s; }
.cat-list a:hover, .status-list a:hover, .cat-list a.active, .status-list a.active { text-decoration: none; }
.cat-list a.active, .status-list a.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }

/* ── Feed ─────────────────────────────────────────────────── */
.feed { min-width: 0; }
.feed-controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.search-form { display: flex; gap: .5rem; flex: 1; min-width: 200px; }
.search-input { flex: 1; padding: .5rem .85rem; border: 1px solid var(--border); border-radius: 7px; font-size: .9rem; font-family: inherit; outline: none; transition: border-color .15s; }
.search-input:focus { border-color: var(--brand); }
.btn-search { background: var(--brand); color: #fff; border: none; padding: .5rem 1rem; border-radius: 7px; cursor: pointer; font-size: .9rem; font-weight: 500; }
.sort-tabs { display: flex; gap: .35rem; font-size: .85rem; }
.sort-tab { padding: .35rem .7rem; border-radius: 6px; color: var(--text-muted); transition: background .15s; }
.sort-tab:hover { background: var(--bg); text-decoration: none; }
.sort-tab.active { background: var(--brand); color: #fff; text-decoration: none; }

/* ── Report Card ──────────────────────────────────────────── */
.report-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 1rem; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.report-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.report-img { width: 100%; height: 200px; object-fit: cover; }
.report-body { padding: 1.1rem 1.25rem; }
.report-meta-top { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.report-title { font-size: 1.05rem; font-weight: 600; margin-bottom: .4rem; }
.report-title a { color: var(--text); }
.report-title a:hover { color: var(--brand); text-decoration: none; }
.report-excerpt { font-size: .9rem; color: var(--text-muted); margin-bottom: .75rem; }
.report-footer { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-muted); margin-bottom: .75rem; flex-wrap: wrap; gap: .25rem; }
.report-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

/* ── Badges ───────────────────────────────────────────────── */
.cat-badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .22rem .65rem; border-radius: 20px; letter-spacing: .02em; }
.color-amber  { background: #fef3c7; color: #92400e; }
.color-green  { background: #d1fae5; color: #065f46; }
.color-coral  { background: #fee2e2; color: #991b1b; }
.color-red    { background: #fee2e2; color: #7f1d1d; }
.color-blue   { background: #dbeafe; color: #1e40af; }
.color-purple { background: #ede9fe; color: #5b21b6; }
.color-pink   { background: #fce7f3; color: #9d174d; }
.color-gray   { background: #f3f4f6; color: #374151; }

.status-badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .22rem .65rem; border-radius: 20px; }
.status-reported   { background: #fee2e2; color: #991b1b; }
.status-seen       { background: #fef3c7; color: #92400e; }
.status-in_progress{ background: #dbeafe; color: #1e40af; }
.status-resolved   { background: #d1fae5; color: #065f46; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-upvote, .btn-verify {
  background: var(--bg); border: 1px solid var(--border); border-radius: 7px;
  padding: .35rem .8rem; font-size: .85rem; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s; color: var(--text);
}
.btn-upvote:hover  { background: #dbeafe; border-color: #93c5fd; }
.btn-verify:hover  { background: #d1fae5; border-color: #6ee7b7; }
.btn-upvote.voted  { background: #dbeafe; border-color: #3b82f6; color: #1e40af; font-weight: 600; }
.btn-verify.voted  { background: #d1fae5; border-color: #10b981; color: #065f46; font-weight: 600; }
.btn-lg            { padding: .55rem 1.1rem; font-size: .95rem; }
.btn-view          { font-size: .85rem; color: var(--brand); font-weight: 600; padding: .35rem .5rem; }
.btn-primary       { display: inline-block; background: var(--brand); color: #fff; padding: .55rem 1.25rem; border-radius: 7px; font-weight: 600; font-size: .95rem; border: none; cursor: pointer; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-sm            { display: inline-block; padding: .3rem .75rem; background: var(--brand); color: #fff; border-radius: 6px; font-size: .82rem; font-weight: 600; }
.btn-sm:hover      { background: var(--brand-dark); text-decoration: none; }
.btn-submit { width: 100%; background: var(--brand); color: #fff; padding: .8rem; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; font-family: inherit; margin-top: 1rem; transition: background .15s; }
.btn-submit:hover  { background: var(--brand-dark); }

/* ── Forms ────────────────────────────────────────────────── */
.form-container { padding-top: 2rem; padding-bottom: 3rem; }
.report-form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: .4rem; }
.required { color: var(--accent); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .6rem .85rem; border: 1px solid var(--border); border-radius: 7px;
  font-size: .95rem; font-family: inherit; color: var(--text); background: var(--surface);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,107,60,.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .3rem; display: block; }
.form-check { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.form-check input { width: auto; }
.form-check label { font-weight: 400; font-size: .9rem; margin: 0; }
.btn-locate { background: none; border: 1px dashed var(--border); border-radius: 6px; padding: .3rem .75rem; font-size: .82rem; color: var(--brand); cursor: pointer; margin-top: .4rem; font-family: inherit; }

/* Upload zone */
.upload-zone { position: relative; border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s; background: var(--bg); }
.upload-zone:hover { border-color: var(--brand); }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-placeholder p { font-size: .9rem; color: var(--text-muted); margin: .4rem 0 .2rem; }
.upload-placeholder small { font-size: .78rem; color: var(--text-light); }
.image-preview { width: 100%; max-height: 240px; object-fit: cover; border-radius: 6px; margin-top: .75rem; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert { padding: .85rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: .92rem; font-weight: 500; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state h3 { margin-bottom: .5rem; }
.empty-state p { color: var(--text-muted); margin-bottom: 1.25rem; }

/* ── Page Header ──────────────────────────────────────────── */
.page-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 2rem 1.25rem; }
.page-header h1 { font-size: 1.6rem; }
.page-header p { color: var(--text-muted); margin-top: .4rem; }

/* ── Detail Page ──────────────────────────────────────────── */
.detail-container { padding-top: 1.5rem; padding-bottom: 3rem; }
.back-link { display: inline-block; font-size: .88rem; color: var(--text-muted); margin-bottom: 1rem; }
.back-link:hover { color: var(--brand); }
.detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; }
.detail-img { width: 100%; max-height: 380px; object-fit: cover; }
.detail-body { padding: 1.5rem; }
.detail-title { font-size: 1.5rem; margin: .75rem 0 .5rem; }
.detail-meta { font-size: .85rem; color: var(--text-muted); margin-bottom: 1.1rem; }
.detail-description { font-size: .97rem; line-height: 1.75; color: var(--text); white-space: pre-line; }
.detail-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.stat-row:last-child { border-bottom: none; }

/* ── Timeline ─────────────────────────────────────────────── */
.timeline-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.timeline-card h2 { font-size: 1.05rem; margin-bottom: 1.25rem; }
.timeline { display: flex; align-items: flex-start; gap: 0; margin-bottom: 1.25rem; }
.timeline-step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.timeline-step::before { content: ''; position: absolute; top: 10px; left: 50%; right: -50%; height: 2px; background: var(--border); z-index: 0; }
.timeline-step:last-child::before { display: none; }
.timeline-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--border); border: 3px solid var(--surface); z-index: 1; position: relative; }
.timeline-step.done .timeline-dot { background: var(--brand); }
.timeline-step.current .timeline-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(240,90,40,.2); }
.timeline-step.done::before { background: var(--brand); }
.timeline-label { font-size: .72rem; color: var(--text-muted); text-align: center; margin-top: .4rem; max-width: 70px; line-height: 1.3; }
.timeline-step.done .timeline-label { color: var(--brand); font-weight: 600; }
.timeline-updates { display: flex; flex-direction: column; gap: .75rem; border-top: 1px solid var(--border); padding-top: 1rem; margin-top: .5rem; }
.timeline-update { background: var(--bg); padding: .75rem 1rem; border-radius: 8px; font-size: .88rem; }
.update-note { margin: .3rem 0; color: var(--text); }
.timeline-update small { color: var(--text-muted); font-size: .78rem; }

/* ── Authority Panel ──────────────────────────────────────── */
.authority-panel { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius-lg); padding: 1.5rem; }
.authority-panel h2 { font-size: 1.05rem; margin-bottom: 1rem; color: var(--brand); }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .85rem; margin: 2rem 0 1.5rem; }
.dash-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; text-align: center; box-shadow: var(--shadow-sm); }
.dash-stat-num { font-size: 2rem; font-weight: 700; line-height: 1; }
.dash-stat-label { font-size: .78rem; color: var(--text-muted); margin-top: .4rem; text-transform: uppercase; letter-spacing: .04em; }
.dash-stat-card.color-danger  .dash-stat-num { color: #dc2626; }
.dash-stat-card.color-warning .dash-stat-num { color: #d97706; }
.dash-stat-card.color-success .dash-stat-num { color: #16a34a; }
.dash-stat-card.color-blue    .dash-stat-num { color: #2563eb; }

.dash-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.25rem; font-size: .88rem; }
.filter-group { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.filter-group label { font-weight: 600; color: var(--text-muted); }
.filter-pill { padding: .3rem .75rem; border-radius: 20px; border: 1px solid var(--border); color: var(--text-muted); background: var(--surface); font-size: .82rem; }
.filter-pill:hover { background: var(--bg); text-decoration: none; }
.filter-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.dash-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.dash-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.dash-table th { background: var(--bg); padding: .75rem 1rem; text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.dash-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--bg); }
.table-title-link { color: var(--text); font-weight: 500; }
.table-title-link:hover { color: var(--brand); }

/* ── Ads ──────────────────────────────────────────────────── */
.ad-wrap { max-width: 1140px; margin: 1rem auto; padding: 0 1.25rem; text-align: center; min-height: 90px; }
.ad-wrap-sidebar { min-height: 250px; text-align: center; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 2.5rem 1.25rem; margin-top: 4rem; }
.footer-inner { max-width: 1140px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: .85rem; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1rem; }
.footer-tagline { color: var(--text-muted); font-size: .85rem; font-weight: 400; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .88rem; color: var(--text-muted); }
.footer-copy { font-size: .8rem; color: var(--text-light); }

/* ── Category link colors on hover ───────────────────────── */
.cat-link.color-amber:hover, .cat-link.color-amber.active { color: #92400e; background: #fef3c7; }
.cat-link.color-green:hover, .cat-link.color-green.active  { color: #065f46; background: #d1fae5; }
.cat-link.color-coral:hover, .cat-link.color-coral.active  { color: #991b1b; background: #fee2e2; }
.cat-link.color-red:hover, .cat-link.color-red.active      { color: #7f1d1d; background: #fee2e2; }
.cat-link.color-blue:hover, .cat-link.color-blue.active    { color: #1e40af; background: #dbeafe; }
.cat-link.color-purple:hover, .cat-link.color-purple.active{ color: #5b21b6; background: #ede9fe; }
.cat-link.color-pink:hover, .cat-link.color-pink.active    { color: #9d174d; background: #fce7f3; }
.cat-link.color-gray:hover, .cat-link.color-gray.active    { color: #374151; background: #f3f4f6; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { order: -1; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 640px) {
  .nav-links, .btn-report-nav { display: none; }
  .nav-hamburger { display: block; }
  .hero-strip { padding: 2.5rem 1.25rem; }
  .stats-bar { flex-wrap: wrap; }
  .stat-item { flex: 1 1 45%; }
  .form-row { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
  .detail-sidebar { grid-template-columns: 1fr; }
  .timeline-label { font-size: .65rem; max-width: 55px; }
}