/* Sistema Ríos — cord.com design system (20/11/2026).
   Tokens: Midnight Harbor #0b3658, Signal Blue #4e9ad9, Slate Channel #486984,
   Pale Steel #688dac, Sea Fog #dde7ee, Ice Tint #e6f1fa, Light Mist #c8d8e4,
   Canvas White #ffffff, Active Teal #42b3b1 (status only).
   Font: Figtree self-hosted (public/fonts/figtree.woff2, variable 400-800),
   zero external requests; system-ui fallback keeps the app working offline. */


/* v4.2: Figtree autoalojada — mismo archivo variable que servia Google Fonts
   (un solo woff2 latin para los pesos 400-800), sin peticiones a terceros. */
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/figtree.woff2') format('woff2');
}

:root {
  --color-midnight-harbor: #0b3658;
  --color-signal-blue: #4e9ad9;
  --color-slate-channel: #486984;
  --color-pale-steel: #688dac;
  --color-sea-fog: #dde7ee;
  --color-ice-tint: #e6f1fa;
  --color-light-mist: #c8d8e4;
  --color-canvas-white: #ffffff;
  --color-active-teal: #42b3b1;

  --font-figtree: 'Figtree', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --text-caption: 10px;
  --text-body-sm: 14px;
  --text-body: 16px;
  --text-subheading: 18px;
  --text-heading: 24px;

  --radius-cards: 20px;
  --radius-badges: 5px;
  --radius-inputs: 24px;
  --radius-buttons: 24px;

  --shadow-md: rgba(11, 54, 88, 0.04) 0px 4px 12px 0px;
  --shadow-xl: rgba(11, 54, 88, 0.08) 0px 12px 48px 0px;
  --shadow-focus: rgba(11, 54, 88, 0.08) 0px 4px 32px 0px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-figtree);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.08px;
  color: var(--color-midnight-harbor);
  background: var(--color-canvas-white);
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* Narrow auth pages (login, cambiar contraseña). */
body.auth { max-width: 26rem; padding-top: 12vh; }

/* Wordmark: Signal Blue, weight 800, at the top of every view. */
.wordmark {
  margin: 0 0 8px;
  font-size: var(--text-heading);
  font-weight: 800;
  letter-spacing: -0.12px;
  line-height: 1.3;
  color: var(--color-signal-blue);
}

h1 {
  margin: 0 0 16px;
  font-size: var(--text-heading);
  font-weight: 800;
  letter-spacing: -0.12px;
  line-height: 1.3;
  color: var(--color-midnight-harbor);
}

h2, h3 {
  margin: 32px 0 12px;
  font-size: var(--text-subheading);
  font-weight: 700;
  letter-spacing: -0.09px;
  line-height: 1.4;
  color: var(--color-midnight-harbor);
}

p { margin: 0 0 16px; }

a { color: var(--color-signal-blue); text-decoration: underline; text-decoration-color: var(--color-sea-fog); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--color-signal-blue); }

/* Top user / navigation line. */
.topbar {
  font-size: var(--text-body-sm);
  color: var(--color-slate-channel);
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-sea-fog);
}
.topbar a { font-weight: 600; }

/* Card: white surface, Sea Fog hairline, blue-tinted shadow. */
.card {
  background: var(--color-canvas-white);
  border: 1px solid var(--color-sea-fog);
  border-radius: var(--radius-cards);
  padding: 20px;
  margin: 0 0 20px;
  box-shadow: var(--shadow-md);
}

/* Primary CTA: filled Signal Blue pill. */
.btn, button[type="submit"] {
  display: inline-block;
  background: var(--color-signal-blue);
  color: var(--color-canvas-white);
  font-family: var(--font-figtree);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.5;
  padding: 12px 20px;
  min-height: 48px;
  border: none;
  border-radius: var(--radius-buttons);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover, button[type="submit"]:hover { box-shadow: var(--shadow-md); }

/* Ghost button: transparent, Midnight text, Ice Tint wash on hover. */
.btn-ghost {
  background: transparent;
  color: var(--color-midnight-harbor);
  font-weight: 600;
  padding: 8px 16px;
  min-height: 40px;
}
.btn-ghost:hover { background: var(--color-ice-tint); box-shadow: none; }

/* Button that looks like a text link (logout). */
.link-button {
  background: none;
  border: none;
  padding: 0;
  min-height: 0;
  font-family: var(--font-figtree);
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: var(--color-signal-blue);
  text-decoration: underline;
  text-decoration-color: var(--color-sea-fog);
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { box-shadow: none; text-decoration-color: var(--color-signal-blue); }

.inline-form { display: inline; }

/* Form fields: white pill inputs with Sea Fog hairline. */
label {
  display: block;
  margin: 16px 0 6px;
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: var(--color-midnight-harbor);
}
label.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }

input, select, textarea {
  display: block;
  width: 100%;
  max-width: 26rem;
  padding: 12px 16px;
  min-height: 48px;
  font-family: var(--font-figtree);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--color-midnight-harbor);
  background: var(--color-canvas-white);
  border: 1px solid var(--color-sea-fog);
  border-radius: var(--radius-inputs);
}
textarea { min-height: 0; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--color-slate-channel); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-signal-blue);
  box-shadow: var(--shadow-focus);
}
input[type="checkbox"] { display: inline-block; width: auto; min-height: 0; padding: 0; }
input[type="date"] { max-width: 16rem; }

form p { margin: 0 0 12px; }
form button[type="submit"] { margin-top: 12px; }

/* Search row on the list view. */
.search-form { display: flex; gap: 12px; align-items: center; }
.search-form .search-input { flex: 1; max-width: 22rem; margin: 0; }
.search-form button[type="submit"] { margin-top: 0; flex-shrink: 0; }

/* Table: hairline rows, no heavy grid. */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--color-sea-fog); vertical-align: top; }
.table th { font-size: var(--text-body-sm); font-weight: 700; color: var(--color-midnight-harbor); }
.table tr:last-child td { border-bottom: none; }

/* Lists (historial, incidencias, asistencias): hairline separators. */
.list { list-style: none; margin: 0 0 16px; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--color-sea-fog); }
.list li:last-child { border-bottom: none; }

/* Definition list (ficha detail). */
dl { margin: 0; }
dt {
  margin: 12px 0 2px;
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: var(--color-pale-steel);
}
dt:first-child { margin-top: 0; }
dd { margin: 0 0 4px; }

/* Status badge (e.g. menor): Ice Tint wash, Signal Blue text. */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-badges);
  background: var(--color-ice-tint);
  color: var(--color-signal-blue);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}

/* Notice line (confirmations, warnings): Ice Tint wash. */
.notice {
  background: var(--color-ice-tint);
  border-radius: 12px;
  padding: 12px 16px;
}
.notice strong { color: var(--color-midnight-harbor); }

/* Secondary / meta copy. */
.meta { font-size: var(--text-body-sm); color: var(--color-slate-channel); }
.lead { color: var(--color-slate-channel); }

/* Status text (teal, status only). */
.status-ok { color: var(--color-active-teal); font-weight: 600; }

:focus-visible { outline: 2px solid var(--color-signal-blue); outline-offset: 2px; }

/* v4.2: en pantallas angostas el buscador se apila para que el placeholder
   ("Buscar por nombre o telefono") no se corte (visto en el telefono 20/11). */
@media (max-width: 560px) {
  .search-form { flex-wrap: wrap; }
  .search-form .search-input { flex: 1 1 100%; max-width: none; }
  .search-form button[type="submit"] { width: 100%; }
}
