/* ===========================================================================
   Registro de Comités — tema "institucional elegante".
   Azul marino + neutros, serif fina (Fraunces) en títulos, Inter en texto.
   Móvil-first, sin frameworks.
   =========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #15233b;          /* primario profundo */
  --navy-2: #1f3253;        /* hover / variante */
  --navy-soft: #3a4d70;
  --accent: #2e5aac;        /* azul acero — enlaces, foco */
  --accent-2: #c8a86a;      /* dorado tenue — detalles finos */

  --ink: #1a2333;
  --muted: #69728a;
  --line: #e7e9ef;
  --line-2: #f0f2f6;
  --bg: #f4f5f8;
  --card: #ffffff;

  --ok-ink: #156a4a;  --ok-bg: #eef7f2;  --ok-line: #c4e3d4;
  --warn-ink: #8a5d12; --warn-bg: #fbf5e8; --warn-line: #ecd7a6;
  --err-ink: #ad2a22;  --err-bg: #fbecea; --err-line: #f1c9c5;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 30px -16px rgba(21, 35, 59, .18);
  --shadow-lg: 0 24px 56px -20px rgba(21, 35, 59, .26);
  --ring: 0 0 0 3px rgba(46, 90, 172, .16);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .stat-num {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  letter-spacing: -.01em;
  font-weight: 600;
}

/* --- Barra superior -------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 22px;
  background: var(--navy);
  color: #fff;
  border-bottom: 2px solid var(--accent-2);
  position: sticky; top: 0; z-index: 20;
}
.brand { color: #fff; font-weight: 600; text-decoration: none; font-size: 1.2rem; display: inline-flex; align-items: center; gap: 11px; }
.brand::before {
  content: ''; width: 18px; height: 18px; border-radius: 4px;
  background: transparent; border: 2px solid var(--accent-2); transform: rotate(45deg);
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: rgba(255, 255, 255, .82); text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: background .18s, color .18s;
}
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-user { color: rgba(255, 255, 255, .6); font-size: .85rem; }

/* --- Contenedor ------------------------------------------------------------ */
.container { max-width: 820px; margin: 0 auto; padding: 34px 18px 48px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; letter-spacing: .02em; padding: 12px 16px 40px; }

/* --- Tarjetas / hero ------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 22px;
}
.card-narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.card h1 { margin: 0 0 8px; font-size: 1.7rem; }
.card h2 { margin: 22px 0 14px; font-size: 1.2rem; font-weight: 600; }
.card > h1:first-child, .card > h2:first-child { margin-top: 0; }

.hero { text-align: center; padding: 56px 12px 30px; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 600; margin: 0 0 16px; line-height: 1.08; color: var(--navy); }
.lead { color: var(--muted); font-size: 1.1rem; line-height: 1.7; max-width: 50ch; margin: 0 auto; }
.cta { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; margin-top: 30px; }

.muted { color: var(--muted); }
.micro { font-size: .84rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; letter-spacing: -.01em; }

/* --- Formularios ----------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 17px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; color: var(--navy-soft); }
.form input, .form select {
  font: inherit; font-size: 1rem; text-transform: none; letter-spacing: normal; font-weight: 400;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
  transition: border-color .16s, box-shadow .16s;
}
.form input::placeholder { color: #aab1c0; }
.form input:hover, .form select:hover { border-color: #cdd2de; }
.form input:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.form select:disabled { background: #f5f6f9; color: var(--muted); cursor: not-allowed; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; margin: 0; display: flex; flex-direction: column; gap: 17px; }
legend { font-weight: 600; padding: 0 8px; color: var(--navy); font-size: 1rem; }
.row { display: grid; grid-template-columns: 1fr; gap: 17px; }

/* --- Botones --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .96rem; padding: 12px 24px;
  border-radius: var(--radius-sm); border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; text-align: center; letter-spacing: .01em;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px -8px rgba(21, 35, 59, .5); }
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 10px 22px -8px rgba(21, 35, 59, .55); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy-soft); background: #fafbfc; }
.btn-success { background: var(--ok-ink); color: #fff; box-shadow: 0 6px 16px -8px rgba(21, 106, 74, .5); }
.btn-success:hover { background: #125b3f; }
.btn-danger { background: #fff; color: var(--err-ink); border-color: #e7b6b2; }
.btn-danger:hover { background: var(--err-bg); }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 8px; }

/* --- Alertas --------------------------------------------------------------- */
.alert {
  padding: 14px 16px 14px 46px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .95rem;
  position: relative; border: 1px solid; border-left-width: 4px;
}
.alert::before { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); border-left-color: var(--ok-ink); }
.alert-ok::before { content: '✓'; font-weight: 700; }
.alert-error { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-line); border-left-color: var(--err-ink); }
.alert-error::before { content: '!'; font-weight: 700; }
.alert-info { background: #eef2fb; color: #25406f; border-color: #cfdcf2; border-left-color: var(--accent); }
.alert-info::before { content: 'i'; font-weight: 700; font-style: italic; }

/* --- Badges ---------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; border: 1px solid; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-draft { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.badge-done { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-line); }

/* --- Pasos (wizard) -------------------------------------------------------- */
.steps { display: flex; list-style: none; margin: 8px 0 30px; padding: 0; }
.step { flex: 1; text-align: center; position: relative; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.step + .step::before {
  content: ''; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px;
  background: var(--line); z-index: 0; transition: background .3s;
}
.step .dot {
  position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%;
  background: #fff; color: var(--muted); font-weight: 700; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 9px;
  font-family: 'Inter', sans-serif; transition: all .25s;
}
.step.active { color: var(--navy); }
.step.active .dot { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(21, 35, 59, .1); }
.step.done .dot { background: #fff; color: var(--ok-ink); border-color: var(--ok-ink); }
.step.done + .step::before, .step.active::before { background: var(--navy-soft); }

/* Contador + chips */
.contador { font-size: 1rem; color: var(--muted); margin: 0 0 12px; }
.contador strong { color: var(--navy); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 18px; padding: 0; list-style: none; }
.chip { background: #f2f5fa; color: var(--navy); border: 1px solid #dde4ef; border-radius: 8px; padding: 6px 13px; font-size: .82rem; font-weight: 500; }
.chip .mono { font-size: .8rem; }

/* --- Encabezado del comité ------------------------------------------------- */
.comite-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-enviar { border-color: var(--ok-line); background: linear-gradient(180deg, var(--ok-bg), #fff 70%); }

/* --- Tablas ---------------------------------------------------------------- */
.tabla-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th, .tabla td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tabla thead th { background: #f7f8fb; color: var(--navy-soft); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.tabla tbody tr:last-child td { border-bottom: none; }
.tabla tbody tr:hover { background: #f9fafc; }
.tabla form { margin: 0; }

/* --- Tablero del admin ----------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px 14px; text-align: center; }
.stat-num { display: block; font-size: 2.2rem; font-weight: 600; color: var(--navy); line-height: 1.1; }
.stat-lbl { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.acciones { display: flex; flex-wrap: wrap; gap: 9px; }
.acciones form { margin: 0; }

a { color: var(--accent); }
a:hover { color: var(--navy); }

/* --- Escritorio ------------------------------------------------------------ */
@media (min-width: 640px) {
  .row { grid-template-columns: 1fr 1fr; }
}
