/* ═══════════════════════════════════════
   UCV APARECIDOS — Design System
   Paleta: Noche Andina + Llama Encendida
═══════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg:         #0D1B2A;
  --surface:    #162336;
  --surface-2:  #1E2F42;
  --surface-3:  #253347;

  /* Borders */
  --border:     #2C4060;
  --border-up:  #3A5278;

  /* Accent — Amber (hope / warmth) */
  --amber:      #E8A95C;
  --amber-lt:   #F0BC7A;
  --amber-dim:  rgba(232,169,92,0.12);
  --amber-glow: rgba(232,169,92,0.22);

  /* Emerald — found / alive */
  --emerald:    #52C78A;
  --emerald-lt: #6EE0A2;
  --emerald-dim:rgba(82,199,138,0.10);
  --emerald-gl: rgba(82,199,138,0.20);

  /* Rose — missing */
  --rose:       #E06678;
  --rose-lt:    #F07888;
  --rose-dim:   rgba(224,102,120,0.10);

  /* Slate — fallecido */
  --slate:      #9BB5C8;
  --slate-lt:   #B0C8D8;
  --slate-dim:  rgba(155,181,200,0.10);
  --slate-glow: rgba(155,181,200,0.20);

  /* Text */
  --text:       #EDE8E0;
  --text-sec:   #BACDD8;
  --text-muted: #7A98B4;

  /* Radii */
  --r-sm: 6px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* Shadows */
  --sh:    0 4px 20px rgba(0,0,0,.45);
  --sh-lg: 0 10px 40px rgba(0,0,0,.55);

  /* Theme-sensitive hardcoded colors */
  --nav-bg:     rgba(13,27,42,.96);
  --overlay-bg: rgba(5,12,22,.88);

  /* Fonts */
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'DM Sans', system-ui, sans-serif;
  --ff-mono:    'JetBrains Mono', 'Courier New', monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }

/* ─────────────────────────
   NAVBAR
───────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1220px; margin: 0 auto; padding: 0 28px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.brand-icon {
  width: 38px; height: 38px;
  background: var(--amber-dim);
  border: 1px solid var(--amber-glow);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--amber); flex-shrink: 0;
}
.brand-icon svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-ucv {
  font-family: var(--ff-display);
  font-weight: 700; font-size: 21px;
  color: var(--amber); letter-spacing: .06em;
}
.brand-sub {
  font-size: 12px; color: var(--text-muted);
  letter-spacing: .08em; text-transform: uppercase;
}

/* ─────────────────────────
   HERO
───────────────────────── */
.hero {
  padding: 76px 28px 60px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 900px 450px at 15% 60%, rgba(232,169,92,.05) 0%, transparent 70%),
    radial-gradient(ellipse 600px 300px at 85% 40%, rgba(82,199,138,.04) 0%, transparent 70%);
}
.hero-inner { max-width: 1220px; margin: 0 auto; position: relative; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 26px;
}
.pulse-dot {
  width: 8px; height: 8px;
  background: var(--emerald); border-radius: 50%;
  position: relative; flex-shrink: 0;
}
.pulse-dot::after {
  content: ''; position: absolute; inset: -4px;
  background: var(--emerald); border-radius: 50%;
  opacity: 0; animation: pulse-ring 2.2s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(.7); opacity: .9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700; line-height: 1.15;
  color: var(--text); margin-bottom: 20px; max-width: 660px;
  overflow-wrap: break-word; word-break: break-word;
}
.hero-title em { font-style: italic; color: var(--amber); }

.hero-subtitle {
  font-size: 17px; color: var(--text-sec);
  max-width: 540px; margin-bottom: 48px; line-height: 1.75;
}

/* Stats band */
.stats-band {
  display: flex; align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; width: fit-content; max-width: 100%;
}
.stat-item { padding: 20px 38px; text-align: center; min-width: 110px; }
.stat-div  { width: 1px; background: var(--border); flex-shrink: 0; }
.stat-num {
  font-family: var(--ff-display);
  font-size: 38px; font-weight: 700;
  line-height: 1; margin-bottom: 6px;
  transition: all .4s ease;
}
.stat-num.missing  { color: var(--rose); }
.stat-num.found    { color: var(--emerald); }
.stat-num.neutral  { color: var(--text); }
.stat-num.accent   { color: var(--amber); }
.stat-num.deceased { color: var(--slate); }
.stat-label {
  font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--text-muted);
}

/* ─────────────────────────
   MAIN
───────────────────────── */
.main { min-height: calc(100vh - 64px); padding: 40px 28px 100px; }
.main-inner { max-width: 1220px; margin: 0 auto; }

/* ─────────────────────────
   FILTER BAR
───────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px; flex-wrap: wrap;
}
.filter-search-wrap {
  position: relative; flex: 1; min-width: 200px;
}
.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--text-muted); pointer-events: none;
}
.filter-search {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 11px 14px 11px 40px;
  font-size: 15.5px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.filter-search::placeholder { color: var(--text-muted); }
.filter-search:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
.filter-select {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 11px 34px 11px 13px;
  font-size: 15.5px; outline: none; cursor: pointer;
  transition: border-color .2s; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%235A7490' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 16px;
}
.filter-select:focus  { border-color: var(--amber); }
.filter-select:disabled { opacity: .4; cursor: not-allowed; }
.filter-select option { background: var(--surface-2); }

.filter-tabs {
  display: flex; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 3px; gap: 2px;
}
.tab-btn {
  padding: 8px 16px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500;
  color: var(--text-muted); transition: all .2s; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--surface-3); color: var(--text); }

/* ─────────────────────────
   FACULTY CHIPS BAR
───────────────────────── */
.faculty-bar {
  display: flex; gap: 7px; flex-wrap: wrap;
  margin-bottom: 28px; min-height: 32px;
}
.fac-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px 5px 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; font-size: 13.5px; color: var(--text-sec);
  cursor: pointer; transition: all .2s;
}
.fac-chip:hover  { border-color: var(--amber); color: var(--amber); }
.fac-chip.active { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.fac-count {
  font-family: var(--ff-mono); font-size: 11.5px;
  padding: 1px 6px; border-radius: 4px;
  background: var(--surface-3); color: var(--text-muted);
}
.fac-chip.active .fac-count { background: var(--amber-glow); color: var(--amber); }

/* ─────────────────────────
   STUDENTS GRID
───────────────────────── */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ─────────────────────────
   STUDENT CARD
───────────────────────── */
.s-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden; position: relative;
  cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.s-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}
.s-card.missing {
  border-top: 2px solid var(--rose);
}
.s-card.found {
  border-top: 2px solid var(--emerald);
}
.s-card.deceased {
  border-top: 2px solid var(--slate);
  opacity: 0.88;
}
.s-card.missing:hover  { border-color: rgba(224,102,120,.5); border-top-color: var(--rose); }
.s-card.found:hover    { border-color: rgba(82,199,138,.5);  border-top-color: var(--emerald); }
.s-card.deceased:hover { border-color: rgba(155,181,200,.4); border-top-color: var(--slate); opacity: 1; }

/* ── Heartbeat line (missing only) ── */
.hb-wrap {
  padding: 8px 18px 2px;
  height: 32px; overflow: hidden;
}
.hb-svg { width: 100%; height: 22px; }
.hb-path {
  stroke: var(--rose); stroke-width: 1.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 400; stroke-dashoffset: 400;
  animation: draw-hb 3.8s ease-in-out infinite;
}
@keyframes draw-hb {
  0%   { stroke-dashoffset: 400; opacity: 0; }
  12%  { opacity: .75; }
  60%  { stroke-dashoffset: 0; opacity: .75; }
  78%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 400; opacity: 0; }
}

/* ── Found shimmer header ── */
.found-shimmer {
  padding: 8px 18px;
  display: flex; align-items: center; gap: 7px;
  background: var(--emerald-dim);
  color: var(--emerald);
  font-size: 13px; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase;
}
.found-shimmer svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Deceased header ── */
.deceased-header {
  padding: 8px 18px;
  display: flex; align-items: center; gap: 7px;
  background: var(--slate-dim);
  color: var(--slate);
  font-size: 13px; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase;
}
.deceased-header svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Card body ── */
.card-body { padding: 16px 18px 14px; flex: 1; }
.card-head {
  display: flex; align-items: flex-start; gap: 13px;
  margin-bottom: 14px;
}
.card-avatar {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-size: 19px; font-weight: 600;
  flex-shrink: 0;
}
.av-missing {
  background: var(--rose-dim); color: var(--rose-lt);
  border: 1px solid rgba(224,102,120,.22);
}
.av-found {
  background: var(--emerald-dim); color: var(--emerald-lt);
  border: 1px solid rgba(82,199,138,.22);
}
.av-deceased {
  background: var(--slate-dim); color: var(--slate-lt);
  border: 1px solid rgba(155,181,200,.22);
}
.card-info { flex: 1; min-width: 0; }
.card-name {
  font-family: var(--ff-display); font-size: 20px; font-weight: 600;
  color: var(--text); margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 2px; }
.tag {
  font-size: 12px; padding: 3px 8px; border-radius: 4px;
  font-weight: 500; letter-spacing: .02em;
}
.tag-f-ciencias    { background: rgba(100,160,240,.14); color: #7aaff0; }
.tag-f-medicina    { background: rgba(240,100,100,.14); color: #f07a7a; }
.tag-f-ingenieria  { background: rgba(100,200,200,.14); color: #7ad4d4; }
.tag-f-derecho     { background: rgba(180,140,240,.14); color: #c0a0f0; }
.tag-f-humanidades { background: rgba(240,180,100,.14); color: #f0c070; }
.tag-f-arquit      { background: rgba(200,160,80,.14);  color: #d4b060; }
.tag-f-faces       { background: rgba(100,220,180,.14); color: #70d4c0; }
.tag-f-default     { background: var(--surface-3); color: var(--text-sec); }
.tag-missing  { background: var(--rose-dim);    color: var(--rose);    border: 1px solid rgba(224,102,120,.2); }
.tag-found    { background: var(--emerald-dim); color: var(--emerald); border: 1px solid rgba(82,199,138,.2); }
.tag-deceased { background: var(--slate-dim);   color: var(--slate);   border: 1px solid rgba(155,181,200,.2); }

.card-career { font-size: 15px; color: var(--text-sec); }

.card-details { display: flex; flex-direction: column; gap: 7px; }
.d-row { display: flex; gap: 8px; align-items: flex-start; }
.d-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-muted); min-width: 82px; flex-shrink: 0; padding-top: 2px;
}
.d-val { font-size: 15px; color: var(--text); line-height: 1.5; }
.d-val.mono { font-family: var(--ff-mono); font-size: 14px; }

/* ── Confirmation block ── */
.conf-block {
  margin: 0 18px 14px;
  padding: 13px 14px;
  background: var(--emerald-dim);
  border: 1px solid rgba(82,199,138,.16);
  border-radius: var(--r);
}
.conf-type {
  display: flex; align-items: center; gap: 7px; margin-bottom: 7px;
}
.conf-icon { font-size: 17px; }
.conf-label {
  font-size: 12.5px; font-weight: 600;
  color: var(--emerald); text-transform: uppercase; letter-spacing: .05em;
}
.conf-text {
  font-size: 14px; color: var(--text-sec); line-height: 1.6;
  font-style: italic;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Card footer ── */
.card-foot {
  padding: 11px 18px 15px;
  border-top: 1px solid var(--border);
  display: flex; gap: 7px; align-items: center;
}
.c-btn {
  flex: 1; padding: 9px 10px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; text-align: center;
  transition: all .15s;
}
.c-btn-detail {
  background: var(--surface-2); color: var(--text-sec);
  border: 1px solid var(--border);
}
.c-btn-detail:hover { border-color: var(--amber); color: var(--amber); }
.c-btn-found {
  background: var(--emerald-dim); color: var(--emerald);
  border: 1px solid rgba(82,199,138,.22);
}
.c-btn-found:hover { background: rgba(82,199,138,.2); }
.card-time {
  font-family: var(--ff-mono); font-size: 12px;
  color: var(--text-muted); flex-shrink: 0; margin-left: auto;
}

/* ─────────────────────────
   BUTTONS
───────────────────────── */
.btn-primary {
  background: var(--amber); color: #0D1B2A;
  border: none; border-radius: var(--r);
  padding: 11px 22px; font-size: 15.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
}
.btn-primary:hover {
  background: var(--amber-lt);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--amber-glow);
}
.btn-primary:active { transform: none; }

.btn-secondary {
  background: var(--surface-2); color: var(--text-sec);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 11px 22px; font-size: 15.5px; font-weight: 500;
  transition: all .2s;
}
.btn-secondary:hover { color: var(--text); border-color: var(--border-up); }

.btn-found {
  background: var(--emerald); color: #0D1B2A;
  border: none; border-radius: var(--r);
  padding: 11px 22px; font-size: 15.5px; font-weight: 600;
  transition: all .2s;
}
.btn-found:hover {
  background: var(--emerald-lt);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--emerald-gl);
}
.btn-found:active { transform: none; }

.btn-deceased {
  background: var(--slate-dim); color: var(--slate);
  border: 1px solid rgba(155,181,200,.3); border-radius: var(--r);
  padding: 11px 22px; font-size: 15.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all .2s;
}
.btn-deceased:hover {
  background: rgba(155,181,200,.18);
  border-color: var(--slate);
}
.btn-deceased:active { transform: none; }

/* ─────────────────────────
   MODALS
───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--overlay-bg);
  backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%; max-width: 570px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(18px);
  transition: transform .25s;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-wide { max-width: 680px; }

.modal-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.found-header {
  background: var(--emerald-dim) !important;
  border-bottom-color: rgba(82,199,138,.22) !important;
}
.modal-title {
  font-family: var(--ff-display); font-size: 24px; font-weight: 600;
}
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--text-muted); transition: all .15s;
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-close svg  { width: 17px; height: 17px; }

.modal-student-banner {
  padding: 13px 24px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 16px; color: var(--text-sec);
}

/* ─────────────────────────
   FORMS
───────────────────────── */
.modal-form {
  padding: 22px 24px 24px;
  display: flex; flex-direction: column; gap: 0;
}
.fsec {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--amber); font-weight: 600;
  margin: 22px 0 12px; padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}
.modal-form > .fsec:first-child { margin-top: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 13px; display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 14.5px; font-weight: 500; color: var(--text-sec); }
.req { color: var(--rose); }

.form-input, .form-select, .form-textarea {
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 11px 14px; font-size: 15.5px;
  outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
.form-input.input-error, .form-select.input-error, .form-textarea.input-error {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--rose-dim);
}
.form-select {
  appearance: none; cursor: pointer;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%235A7490' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.form-select option { background: var(--surface-2); }
.form-select:disabled { opacity: .4; cursor: not-allowed; }
.form-textarea { resize: vertical; min-height: 96px; }
.mono { font-family: var(--ff-mono); font-size: 14.5px; }

.form-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
}
.form-actions button:disabled { opacity: .5; cursor: not-allowed; }

/* ─────────────────────────
   DETAIL MODAL BODY
───────────────────────── */
.modal-detail-body { padding: 24px; }
.det-section { margin-bottom: 26px; }
.det-sec-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--amber); font-weight: 600; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.det-field { display: flex; flex-direction: column; gap: 3px; }
.det-fl { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.det-fv { font-size: 15.5px; color: var(--text); line-height: 1.5; }
.det-fv.mono { font-family: var(--ff-mono); font-size: 14px; }
.det-fv .empty { color: var(--text-muted); font-style: italic; }
.det-conf-box {
  background: var(--emerald-dim);
  border: 1px solid rgba(82,199,138,.16);
  border-radius: var(--r); padding: 18px;
}
.det-conf-box-deceased {
  background: var(--slate-dim);
  border: 1px solid rgba(155,181,200,.2);
  border-radius: var(--r); padding: 18px;
}
.conf-label-deceased {
  font-size: 12.5px; font-weight: 600;
  color: var(--slate); text-transform: uppercase; letter-spacing: .05em;
}
.det-conf-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.det-conf-when { font-size: 13px; color: var(--text-muted); margin-left: auto; }
.det-conf-text {
  font-size: 15px; color: var(--text-sec); line-height: 1.65; font-style: italic;
}
.det-conf-reporter { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.det-actions {
  display: flex; gap: 10px; margin-top: 22px;
  padding-top: 18px; border-bottom: none; border-top: 1px solid var(--border);
}

/* ─────────────────────────
   LOADING / EMPTY STATES
───────────────────────── */
.loading-state, .empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 24px; gap: 14px; text-align: center;
  grid-column: 1 / -1; color: var(--text-muted);
}
.loading-spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border); border-top-color: var(--amber);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-icon { font-size: 44px; margin-bottom: 6px; }
.empty-state h3 {
  font-family: var(--ff-display); font-size: 23px;
  color: var(--text-sec); font-weight: 600;
}
.empty-state p { font-size: 16px; max-width: 300px; }

/* ─────────────────────────
   TOAST
───────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 16px;
  font-size: 15.5px; max-width: 360px;
  box-shadow: var(--sh-lg); pointer-events: auto;
  transform: translateX(110px); opacity: 0;
  transition: all .3s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.success { border-left: 3px solid var(--emerald); }
.toast.error   { border-left: 3px solid var(--rose); }
.toast.info    { border-left: 3px solid var(--amber); }

/* ─────────────────────────
   RESPONSIVE
───────────────────────── */

/* ── Tablet (≤ 860px) ── */
@media (max-width: 860px) {
  .nav-inner { padding: 0 18px; }
  .students-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
  .hero { padding: 52px 20px 44px; }
  .main { padding: 32px 20px 80px; }
}

/* ── Mobile (≤ 640px) ── */
@media (max-width: 640px) {
  /* — Navbar — */
  .nav-inner { padding: 0 14px; height: 56px; }
  .brand-ucv { font-size: 17px; }
  .brand-sub { display: none; }
  .nav-actions { gap: 6px; }
  /* ocultar etiquetas de texto solo en botones secundarios del nav en mobile */
  .btn-secondary .nav-btn-txt { display: none; }
  .btn-secondary { padding: 8px 10px; min-width: 0; }
  .btn-primary   { padding: 9px 11px; font-size: 13.5px; }

  /* — Hero — */
  .hero { padding: 40px 16px 36px; }
  .hero-eyebrow { font-size: 11.5px; margin-bottom: 18px; }
  /* Reducir el título para que el texto italic quepa sin desbordarse */
  .hero-title { font-size: 22px; line-height: 1.3; max-width: 100%; }
  .hero-subtitle { font-size: 15px; margin-bottom: 32px; }

  /* — Stats band: horizontal scroll on small screens — */
  .stats-band {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .stats-band::-webkit-scrollbar { display: none; }
  .stat-item { padding: 14px 16px; min-width: 108px; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 10.5px; white-space: nowrap; }

  /* — Main — */
  .main { padding: 24px 14px 80px; }

  /* — Filter bar: stack everything — */
  .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .filter-search-wrap { width: 100%; min-width: 0; flex: none; }
  .filter-select { width: 100%; }
  /* tabs scrollables horizontalmente para que quepan las 4 opciones */
  .filter-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .filter-tabs::-webkit-scrollbar { display: none; }
  .tab-btn { flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; font-size: 13px; }
  .faculty-bar { gap: 6px; }

  /* — Cards — */
  .students-grid { grid-template-columns: 1fr; gap: 12px; }
  .card-foot { flex-wrap: wrap; gap: 6px; }
  .card-time { margin-left: 0; width: 100%; text-align: right; }

  /* — Modals: bottom-sheet pattern — */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    margin: 0;
  }
  .modal-header { padding: 16px 16px 12px; }
  .modal-form,
  .modal-detail-body { padding: 0 14px 20px; }

  /* — Forms inside modals — */
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-actions { flex-direction: column-reverse; gap: 8px; }
  .form-actions button { width: 100%; justify-content: center; }

  /* — Detail modal — */
  .det-grid { grid-template-columns: 1fr; }
  .det-actions { flex-wrap: wrap; gap: 8px; }
  .det-actions button { flex: 1; min-width: 130px; justify-content: center; }

  /* — Toast: full-width at bottom — */
  .toast-container {
    left: 12px; right: 12px; bottom: 16px;
    width: auto; max-width: none; align-items: stretch;
  }
  .toast { width: 100%; }

}

@media (prefers-reduced-motion: reduce) {
  .hb-path { animation: none; opacity: .4; stroke-dashoffset: 0; }
  .pulse-dot::after { animation: none; }
  .loading-spinner { animation-duration: 1.4s; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ── Nav actions (multiple buttons) ── */
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ── Result count bar ── */
.result-count-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px; min-height: 24px;
  font-size: 13.5px; color: var(--text-muted);
}
.count-clear {
  font-size: 13px; color: var(--amber); font-weight: 500;
  padding: 0; background: none; border: none; cursor: pointer;
  transition: opacity .15s;
}
.count-clear:hover { opacity: .7; }
.btn-clear-filters {
  margin-top: 14px;
  font-size: 14px; padding: 9px 20px;
}

/* ── Tel link ── */
.tel-link {
  color: inherit; text-decoration: none;
  border-bottom: 1px dashed var(--border-up);
  transition: color .15s, border-color .15s;
}
.tel-link:hover { color: var(--amber); border-color: var(--amber); }

/* ── Button loading state ── */
.btn-loading { opacity: .65; cursor: wait; }

/* ═══════════════════════════════════════
   LIGHT THEME OVERRIDES
═══════════════════════════════════════ */
[data-theme="light"] {
  --bg:         #F5F0EA;
  --surface:    #FFFFFF;
  --surface-2:  #EEE8DF;
  --surface-3:  #E5DDD3;
  --border:     #D0C5B8;
  --border-up:  #B8ADA0;

  --amber:      #A85808;
  --amber-lt:   #C06818;
  --amber-dim:  rgba(168,88,8,.10);
  --amber-glow: rgba(168,88,8,.18);

  --emerald:    #19884E;
  --emerald-lt: #229D5D;
  --emerald-dim:rgba(25,136,78,.10);
  --emerald-gl: rgba(25,136,78,.18);

  --rose:       #B82040;
  --rose-lt:    #C83050;
  --rose-dim:   rgba(184,32,64,.10);

  --slate:      #3E6880;
  --slate-lt:   #4E7890;
  --slate-dim:  rgba(62,104,128,.10);
  --slate-glow: rgba(62,104,128,.18);

  --text:       #1A2530;
  --text-sec:   #385060;
  --text-muted: #607080;

  --sh:    0 4px 20px rgba(0,0,0,.10);
  --sh-lg: 0 10px 40px rgba(0,0,0,.14);

  --nav-bg:     rgba(245,240,234,.96);
  --overlay-bg: rgba(90,80,70,.70);
}
[data-theme="light"] .hero::before {
  background:
    radial-gradient(ellipse 900px 450px at 15% 60%, rgba(168,88,8,.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 300px at 85% 40%, rgba(25,136,78,.04) 0%, transparent 70%);
}
[data-theme="light"] .filter-select,
[data-theme="light"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23607080' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
[data-theme="light"] .filter-select option,
[data-theme="light"] .form-select option { background: #EEE8DF; }
[data-theme="light"] .modal { box-shadow: 0 20px 60px rgba(0,0,0,.18); }

/* ── Tema claro: foco visible ── */
[data-theme="light"] :focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ─────────────────────────
   THEME TOGGLE BUTTON
───────────────────────── */
.btn-theme {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); color: var(--text-muted);
  transition: background .2s, color .2s;
  border: 1px solid transparent; flex-shrink: 0;
}
.btn-theme:hover { background: var(--surface-2); color: var(--amber); border-color: var(--border); }
.btn-theme .icon-moon { display: none; }
[data-theme="light"] .btn-theme .icon-sun  { display: none; }
[data-theme="light"] .btn-theme .icon-moon { display: block; }

/* ─────────────────────────
   CONTACT FILTER BUTTON
───────────────────────── */
.tab-contact {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: var(--r);
  font-size: 14.5px; font-weight: 500; white-space: nowrap;
  color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  transition: all .2s;
}
.tab-contact:hover { color: var(--emerald); border-color: rgba(82,199,138,.35); }
.tab-contact.active {
  background: var(--emerald-dim); border-color: rgba(82,199,138,.35);
  color: var(--emerald);
}
[data-theme="light"] .tab-contact.active { background: rgba(25,136,78,.08); }

/* ─────────────────────────
   ACTIVE FILTER CHIPS
───────────────────────── */
.count-num { font-weight: 500; color: var(--text-sec); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--amber-dim); border: 1px solid var(--amber-glow);
  border-radius: 20px; padding: 3px 5px 3px 10px;
  font-size: 12.5px; color: var(--amber); white-space: nowrap;
}
.chip-remove {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; color: var(--amber);
  transition: background .15s; padding: 0;
}
.chip-remove:hover { background: var(--amber-glow); }

/* ─────────────────────────
   SKELETON CARDS
───────────────────────── */
.s-skeleton { pointer-events: none; border-top-color: var(--border) !important; }
.s-skeleton:hover { transform: none !important; box-shadow: none !important; }
@keyframes sk-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.sk-header {
  height: 32px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.5s ease-in-out infinite;
}
.sk-avatar {
  width: 50px; height: 50px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.5s ease-in-out infinite;
}
.sk-info { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.sk-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: sk-shimmer 1.5s ease-in-out infinite;
}
.sk-name   { height: 18px; width: 68%; }
.sk-tag    { width: 45%; }
.sk-career { width: 35%; }
.sk-detail { margin-top: 8px; }

/* ─────────────────────────
   LAST-SYNC LABEL (#1)
───────────────────────── */
.last-sync { color: var(--text-muted); opacity: .8; }

/* ─────────────────────────
   EXPORT BUTTON (#12)
───────────────────────── */
.btn-export {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; border-radius: var(--r);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
  transition: all .2s;
}
.btn-export:hover { color: var(--amber); border-color: var(--amber-glow); }

/* ─────────────────────────
   TIMELINE (#13)
───────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; padding: 4px 0; }
.tl-item { display: flex; gap: 14px; align-items: flex-start; }
.tl-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
  border: 2px solid;
}
.tl-register  .tl-dot { background: var(--amber-dim);    border-color: var(--amber); }
.tl-aparecido .tl-dot { background: var(--emerald-dim);  border-color: var(--emerald); }
.tl-fallecido .tl-dot { background: var(--slate-dim);    border-color: var(--slate); }
.tl-pending   .tl-dot-pending {
  background: var(--surface-2); border-color: var(--border-up);
  border-style: dashed;
}
.tl-connector {
  width: 2px; height: 22px;
  margin-left: 5px;
  background: var(--border);
}
.tl-connector-dashed {
  background: repeating-linear-gradient(
    to bottom,
    var(--border) 0, var(--border) 4px,
    transparent 4px, transparent 8px
  );
}
.tl-content { padding-bottom: 14px; }
.tl-label { font-size: 14px; font-weight: 500; color: var(--text); }
.tl-date  { font-size: 12.5px; color: var(--text-muted); font-family: var(--ff-mono); margin-top: 2px; }
.tl-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─────────────────────────
   GOOGLE MAPS INPUT & EMBED
───────────────────────── */
.maps-input-wrap {
  position: relative;
}
.maps-pin-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--amber); pointer-events: none; flex-shrink: 0;
}
.maps-input { padding-left: 38px !important; }

/* Dropdown de Nominatim / OpenStreetMap */
.osm-dropdown {
  display: none;
  position: fixed; z-index: 9999;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh);
  max-height: 240px; overflow-y: auto;
}
.osm-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 14px;
  color: var(--text-sec); font-size: 13.5px;
  cursor: pointer;
  border-top: 1px solid var(--border);
  transition: background .12s;
}
.osm-item:first-child { border-top: none; }
.osm-item:hover { background: var(--surface-3); color: var(--text); }
.osm-pin { color: var(--amber); flex-shrink: 0; margin-top: 2px; }

/* Mini preview en el formulario */
.maps-preview { margin-top: 10px; border-radius: var(--r); overflow: hidden; }
.maps-preview-frame {
  width: 100%; height: 180px; border: 0; display: block;
}

/* Mapa en modal de detalle */
.det-map-wrap {
  margin-bottom: 16px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
}
.det-map {
  width: 100%; height: 220px; border: 0; display: block;
}
.det-map-placeholder {
  height: 80px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--surface-2); color: var(--text-muted); font-size: 14px;
}
.det-map-link {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  font-size: 13.5px; font-weight: 500;
  color: var(--amber); text-decoration: none;
  border-top: 1px solid var(--border);
  transition: background .15s;
}
.det-map-link:hover { background: var(--surface-3); }
.maps-search-link {
  font-size: 12px; color: var(--amber); text-decoration: none;
  margin-left: 8px; opacity: .8;
}
.maps-search-link:hover { opacity: 1; }
.card-maps-link {
  font-size: 11.5px; font-weight: 600;
  color: var(--amber); text-decoration: none;
  margin-left: 6px; white-space: nowrap;
  opacity: .85;
}
.card-maps-link:hover { opacity: 1; text-decoration: underline; }

/* ── Photo upload (form) ── */
.foto-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.foto-label {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  color: var(--text-2); font-size: 13.5px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.foto-label:hover { border-color: var(--amber); background: var(--surface-3); }
.foto-label svg { flex-shrink: 0; opacity: .6; }
.foto-preview-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 6px;
}
#foto-preview-img {
  width: 48px; height: 48px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border);
}
#foto-preview-name {
  flex: 1; font-size: 13px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#foto-remove {
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-size: 13px; padding: 4px 8px;
  border-radius: 6px; transition: background .15s, color .15s;
}
#foto-remove:hover { background: var(--rose-dim); color: var(--rose-lt); }

/* ── Card photo ── */
.card-photo {
  width: 50px; height: 50px; border-radius: 12px;
  object-fit: cover; flex-shrink: 0;
  border: 1.5px solid var(--border);
}

/* ── Detail modal photo ── */
.det-foto-wrap {
  display: flex; justify-content: center;
  padding: 20px 0 4px;
}
.det-foto {
  width: 100px; height: 100px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
