/* ============================================================
   DenunciasBO — Main Stylesheet
   Paleta: oscuro gubernamental con acento ámbar cívico
   Fuentes: Syne (display) + DM Sans (body)
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  --bg:          #0f1117;
  --bg2:         #181c27;
  --bg3:         #1f2436;
  --border:      rgba(255,255,255,0.07);
  --border-soft: rgba(255,255,255,0.04);

  --text:        #e8eaf0;
  --text-sub:    #7a84a0;
  --text-muted:  #4d5570;

  --accent:      #f5a623;
  --accent-dark: #c47d0f;
  --accent-glow: rgba(245,166,35,0.15);

  --success:     #2ec982;
  --warning:     #f5a623;
  --danger:      #f05252;
  --info:        #4fa3e8;
  --primary:     #5d82f5;

  --nav-h:       60px;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.3);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

input, select, textarea, button {
  font-family: var(--font-body);
  font-size: 0.95rem;
}

/* ── Topnav ───────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 2rem;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
}

.nav-logo { width: 28px; height: 28px; flex-shrink: 0; }

.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--accent); background: var(--accent-glow); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.nav-username {
  font-size: 0.85rem;
  color: var(--text-sub);
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  margin-top: var(--nav-h);
  padding: 2rem 2.5rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Page header ──────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

.page-sub { color: var(--text-sub); font-size: 0.9rem; margin-top: 0.2rem; }

.page-actions { display: flex; gap: 0.5rem; }

.back-link {
  font-size: 0.85rem;
  color: var(--text-sub);
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

/* ── KPI Grid ─────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.kpi-total::before  { background: var(--accent); }
.kpi-warn::before   { background: var(--warning); }
.kpi-info::before   { background: var(--info); }
.kpi-success::before{ background: var(--success); }
.kpi-danger::before { background: var(--danger); }

.kpi-value {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.4rem;
}

.kpi-label { font-size: 0.8rem; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Two column layout ────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  gap: 1.5rem;
  align-items: start;
}

.card-wide { grid-column: 1 / -1; }
@media (min-width: 1024px) { .card-wide { grid-column: auto; } }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

.date-col { color: var(--text-sub); font-size: 0.82rem; white-space: nowrap; }

.geo-col { font-size: 0.82rem; }

.empty-msg {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem !important;
  font-style: italic;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-lg { font-size: 0.85rem; padding: 0.3em 0.85em; }
.badge-sm { font-size: 0.7rem; }

.badge-warning  { background: rgba(245,166,35,0.15); color: #f5a623; border: 1px solid rgba(245,166,35,0.3); }
.badge-info     { background: rgba(79,163,232,0.12); color: #4fa3e8; border: 1px solid rgba(79,163,232,0.3); }
.badge-primary  { background: rgba(93,130,245,0.12); color: #5d82f5; border: 1px solid rgba(93,130,245,0.3); }
.badge-danger   { background: rgba(240,82,82,0.12);  color: #f05252; border: 1px solid rgba(240,82,82,0.3); }
.badge-secondary{ background: rgba(155,155,200,0.1); color: #9b9bc8; border: 1px solid rgba(155,155,200,0.2); }
.badge-success  { background: rgba(46,201,130,0.12); color: #2ec982; border: 1px solid rgba(46,201,130,0.3); }
.badge-light    { background: var(--bg3); color: var(--text-sub); border: 1px solid var(--border); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary  { background: var(--accent); color: #000; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); color: #000; }

.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text-sub); }
.btn-outline:hover { border-color: var(--text-sub); color: var(--text); background: var(--bg3); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea { resize: vertical; min-height: 80px; }

/* ── Filters ──────────────────────────────────────────────── */
.filter-bar { margin-bottom: 1.5rem; }

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filter-input, .filter-select {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.filter-input:focus, .filter-select:focus { border-color: var(--accent); }
.filter-input { min-width: 220px; }

option { background: var(--bg2); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-success { background: rgba(46,201,130,0.1); border-color: rgba(46,201,130,0.3); color: #2ec982; }
.alert-danger  { background: rgba(240,82,82,0.1);  border-color: rgba(240,82,82,0.3);  color: #f77; }
.alert-warning { background: rgba(245,166,35,0.1); border-color: rgba(245,166,35,0.3); color: #f5a623; }
.alert-info    { background: rgba(79,163,232,0.1); border-color: rgba(79,163,232,0.3); color: #4fa3e8; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--bg3);
  color: var(--text-sub);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.page-btn:hover { color: var(--text); border-color: var(--text-sub); }
.page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }

/* ── Data list ────────────────────────────────────────────── */
.data-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.5rem 1rem;
  font-size: 0.9rem;
}

.data-list dt {
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: start;
  padding-top: 0.1rem;
}

.data-list dd { color: var(--text); }

/* ── Detail grid ──────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.detail-main { display: flex; flex-direction: column; gap: 1.5rem; }
.detail-side { position: sticky; top: calc(var(--nav-h) + 1.5rem); }

/* ── Evidence media ───────────────────────────────────────── */
.evidence-img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  border: 1px solid var(--border);
  display: block;
  transition: opacity 0.2s;
}
.evidence-img:hover { opacity: 0.9; }

.evidence-img {
  display: block;
  max-width: 100%;
  max-height: 480px;
  width: auto;
  margin: 0 auto;
}

.evidence-video {
  display: block;
  max-height: 480px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #000;
}

.file-path { font-size: 0.78rem; margin-top: 0.5rem; }

.img-modal {
  background: transparent;
  border: none;
  padding: 0;
  margin: auto;
  max-width: 92vw;
  max-height: 92vh;
  overflow: visible;
  cursor: zoom-out;
}

.img-modal::backdrop {
  background: rgba(0,0,0,0.88);
  backdrop-filter: blur(3px);
}

.img-modal img {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.25rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.tl-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  border: 2px solid var(--bg2);
  background: var(--text-muted);
  position: relative;
  z-index: 1;
}

.tl-dot-pendiente    { background: var(--warning); }
.tl-dot-en-revision  { background: var(--info); }
.tl-dot-validada     { background: var(--primary); }
.tl-dot-rechazada    { background: var(--danger); }
.tl-dot-en-proceso   { background: var(--text-sub); }
.tl-dot-resuelta     { background: var(--success); }

.tl-body { flex: 1; }
.tl-header { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.3rem; }
.tl-date { font-size: 0.78rem; color: var(--text-muted); }
.tl-op   { font-size: 0.78rem; color: var(--text-sub); }
.tl-nota { font-size: 0.85rem; color: var(--text-sub); background: var(--bg3); padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); margin-top: 0.35rem; }

/* ── Tipo list (dashboard) ────────────────────────────────── */
.tipo-list { display: flex; flex-direction: column; gap: 0.85rem; }

.tipo-row { display: grid; grid-template-columns: 1fr 40px; gap: 0.5rem; align-items: center; }
.tipo-name { font-size: 0.88rem; color: var(--text); }
.tipo-count { text-align: right; font-size: 0.85rem; font-weight: 600; color: var(--accent); }

.tipo-bar-wrap {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  margin-top: -0.3rem;
}

.tipo-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 2px;
  transition: width 0.8s ease;
}

/* ── Code tag ─────────────────────────────────────────────── */
.code-tag {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  background: var(--bg3);
  padding: 0.15em 0.5em;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* ── Misc ─────────────────────────────────────────────────── */
.link-sm     { font-size: 0.82rem; color: var(--text-sub); }
.link-sm:hover { color: var(--accent); }
.link-action { font-size: 0.82rem; color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.map-link    { color: var(--info); font-size: 0.82rem; }
.map-link:hover { color: var(--accent); }

.file-badge  { font-size: 0.78rem; }
.file-img    { color: var(--primary); }
.file-vid    { color: var(--info); }

.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ── Login page ───────────────────────────────────────────── */
.login-page { background: var(--bg); }

.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-brand {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.brand-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.brand-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(245,166,35,0.3);
}

.brand-icon svg { width: 44px; height: 44px; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.brand-tagline {
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.brand-stats { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }

.stat-pill {
  display: inline-block;
  padding: 0.3em 0.9em;
  border-radius: 100px;
  background: var(--accent-glow);
  border: 1px solid rgba(245,166,35,0.25);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
}

.brand-bg-circles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.brand-bg-circles span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(245,166,35,0.06);
}

.brand-bg-circles span:nth-child(1) { width: 400px; height: 400px; top: -100px; right: -100px; }
.brand-bg-circles span:nth-child(2) { width: 280px; height: 280px; bottom: -80px; left: -80px; }
.brand-bg-circles span:nth-child(3) { width: 160px; height: 160px; top: 40%; left: 40%; }

.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.login-sub { color: var(--text-sub); font-size: 0.9rem; margin-bottom: 1.75rem; }

.login-footer-note { color: var(--text-muted); font-size: 0.8rem; margin-top: 1.5rem; text-align: center; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-content { padding: 1.25rem 1rem; }
  .login-split  { grid-template-columns: 1fr; }
  .login-brand  { display: none; }
  .topnav       { padding: 0 1rem; gap: 1rem; }
  .nav-links    { display: none; }
  .nav-username { display: none; }
  .kpi-grid     { grid-template-columns: repeat(2, 1fr); }
}

/* ── Dropzone (evidencia del operador) ────────────────────── */
.dz-wrap {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg3);
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}

.dz-wrap:not(.dz-has-file) { cursor: pointer; }
.dz-wrap:not(.dz-has-file):hover { border-color: var(--accent); background: var(--accent-glow); }
.dz-wrap.dz-dragover { border-color: var(--accent); background: var(--accent-glow); border-style: solid; }
.dz-wrap.dz-has-file { border-style: solid; border-color: var(--border); cursor: default; }

.dz-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  pointer-events: none;
}

/* Idle state */
.dz-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.75rem 1rem;
  pointer-events: none;
}

.dz-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 0.15rem;
  color: var(--text-sub);
}

.dz-icon-wrap svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 18px;
  display: block;
}

.dz-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.dz-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.dz-browse-btn {
  pointer-events: all;
  margin-top: 0.35rem;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.dz-browse-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg3);
}

/* Filled state */
.dz-filled { display: none; }

.dz-filled-media {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
}

video.dz-filled-media { background: #000; max-height: 180px; }

/* Progress bar */
.dz-progress-wrap {
  height: 3px;
  background: var(--bg3);
  margin: 0 12px 0;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
}

.dz-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 2px;
  transition: width 0.06s linear;
}

/* File meta row */
.dz-file-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-soft);
}

.dz-file-thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.dz-file-thumb-vid {
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
}

.dz-file-thumb-vid svg { width: 14px; height: 14px; }

.dz-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dz-file-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dz-file-size {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dz-remove-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dz-remove-btn svg { width: 12px; height: 12px; }

.dz-remove-btn:hover {
  background: rgba(240,82,82,0.12);
  border-color: rgba(240,82,82,0.35);
  color: #f05252;
}

/* ── Evidencia en el timeline ─────────────────────────────── */
.tl-evidence {
  margin-top: 0.65rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tl-evidence-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.tl-evidence-img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.tl-evidence-img:hover { opacity: 0.88; }

.tl-evidence-video {
  display: block;
  max-height: 320px;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  background: #000;
}

/* ── Timeline: estado previo ──────────────────────────────── */
.tl-prev {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.tl-nota-icon { margin-right: 0.2rem; }

/* ── Dashboard: paginación AJAX ───────────────────────────── */
.card-head-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-pag-info {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dash-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.85rem 0 0.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.dash-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-sub);
  font-size: 0.82rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-page-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg2);
}

.dash-page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 600;
}

.dash-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.dash-page-ellipsis {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0 0.15rem;
  line-height: 32px;
}

.dash-loading {
  opacity: 0.5;
  font-style: italic;
}

/* ── Semáforo de pendencia ────────────────────────────────── */
.semaforo {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 0.2rem;
  white-space: nowrap;
}

.sem-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* Verde: 0-2 días */
.sem-verde  { color: #2ec982; }
.sem-verde  .sem-dot { background: #2ec982; box-shadow: 0 0 4px rgba(46,201,130,0.5); }

/* Amarillo: 3-7 días */
.sem-amarillo { color: #f5c518; }
.sem-amarillo .sem-dot { background: #f5c518; box-shadow: 0 0 4px rgba(245,197,24,0.5); }

/* Naranja: 8-15 días */
.sem-naranja { color: #ff8c00; }
.sem-naranja .sem-dot { background: #ff8c00; box-shadow: 0 0 4px rgba(255,140,0,0.5); }

/* Rojo: más de 15 días */
.sem-rojo { color: #f05252; }
.sem-rojo .sem-dot { background: #f05252; box-shadow: 0 0 5px rgba(240,82,82,0.6); animation: pulse-rojo 1.5s ease-in-out infinite; }

@keyframes pulse-rojo {
  0%, 100% { opacity: 1; box-shadow: 0 0 5px rgba(240,82,82,0.6); }
  50%       { opacity: 0.6; box-shadow: 0 0 10px rgba(240,82,82,0.9); }
}

/* ── KPI cards clickables ─────────────────────────────────── */
.kpi-link {
  text-decoration: none;
  display: block;
  cursor: pointer;
  position: relative;
}

.kpi-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,0.12);
}

.kpi-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}

.kpi-link:hover .kpi-hint { color: var(--accent); }

/* ── Tipo rows clickables ─────────────────────────────────── */
.tipo-row-link {
  text-decoration: none;
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 0.5rem;
  align-items: center;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  margin: 0 -0.5rem;
  transition: background 0.15s;
  cursor: pointer;
}

.tipo-row-link:hover {
  background: var(--bg3);
}

.tipo-row-link:hover .tipo-name { color: var(--accent); }

.tipo-row-link .tipo-bar-wrap { grid-column: 1 / -1; margin-top: -0.3rem; }

/* ── Tooltip preview de archivo ───────────────────────────── */
.archivo-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.95) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.archivo-tooltip.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.at-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  width: 240px;
}

.at-img {
  display: block;
  width: 240px;
  height: 180px;
  object-fit: cover;
}

.at-video {
  display: block;
  width: 240px;
  height: 160px;
  object-fit: cover;
  background: #000;
}

.archivo-preview-trigger {
  cursor: default;
}

/* ── Indicador de filtro activo ───────────────────────────── */
.filtro-activo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.4rem 0.75rem;
  background: var(--accent-glow);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.filtro-activo-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.filtro-activo-texto {
  font-size: 0.78rem;
  color: var(--text-sub);
}

/* ── Tooltip video wrapper ────────────────────────────────── */
.at-video-wrap {
  position: relative;
  width: 240px;
  height: 160px;
  background: #000;
  overflow: hidden;
}

.at-video-wrap .at-video {
  width: 240px;
  height: 160px;
  object-fit: cover;
  display: block;
}

.at-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  transition: opacity 0.2s;
  pointer-events: none;
}

.at-video-wrap:has(video.playing) .at-play-icon { opacity: 0; }

/* ── Mapa en detalle de denuncia ──────────────────────────── */
.mapa-detalle {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.mapa-detalle-coords {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.detalle-direccion {
  font-size: 0.85rem;
  color: var(--text-sub);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* ── Aviso de carga en dropzone ───────────────────────────── */
.dz-cargando-aviso {
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 0.4rem;
  text-align: center;
  animation: parpadeo 1.2s ease-in-out infinite;
}

@keyframes parpadeo {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ── Panel lateral deslizante ─────────────────────────────── */
.side-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.side-panel-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}

.side-panel.open { transform: translateX(0); }

.side-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.side-panel-head h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.side-panel-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text-sub);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.side-panel-close:hover { background: var(--bg); }

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Area chip en tabla ───────────────────────────────────── */
.area-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

/* ── Checkboxes de tipos en nueva área ───────────────────── */
.tipos-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.tipo-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-sub);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tipo-check:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--text);
}

.tipo-check input { display: none; }

/* ── Grid de áreas en formulario ─────────────────────────── */
.areas-check-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.areas-check-grid .tipo-check {
  grid-template-columns: none;
}

/* ── Botón cerrar del lightbox ────────────────────────────── */
.img-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  z-index: 10;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.img-modal-close:hover {
  background: var(--accent-dark);
  transform: scale(1.1);
}

.img-modal {
  position: relative;
}