/* ════ MovIA — Design System unificado ════
   Extraído de los 9 HTML del Sprint 2.
   Estilos específicos de cada página quedan en su propio <style> inline.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --azul:      #1a3a6b;
  --azul-dark: #163060;
  --azul-glow: #2c5a8c;
  --azul-soft: #f0f4fa;
  --verde:     #1a7a3a;
  --verde-soft:#e8f5e9;
  --rojo:      #c62828;
  --rojo-soft: #ffebee;
  --gris-bg:   #f4f5f7;
  --gris-card: #ffffff;
  --gris-text: #333333;
  --gris-sub:  #6b7280;
  --sombra:    0 4px 16px rgba(0,0,0,0.09);
  --radio:     14px;
  --trans:     all 0.25s ease;
}

/* ── Reset mínimo ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--gris-text);
  margin: 0;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.evf-footer {
  text-align: center;
  padding: 14px 20px;
  font-size: 0.8rem;
  color: #888;
  background: rgba(233,236,239,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: auto;
}
body.has-bottom-bar .evf-footer { padding-bottom: 68px; }

/* ── Header ────────────────────────────────────────────────────────────── */
.evf-header {
  background: var(--azul);
  color: white;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.evf-header-brand { display: flex; align-items: center; gap: 12px; }
.evf-header-brand img { height: 34px; width: auto; }
.evf-header-brand h1 {
  font-size: 1.08rem; font-weight: 700; margin: 0; color: white;
  letter-spacing: 0.01em;
}
.evf-header-right { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.evf-header-right span { opacity: 0.85; color: white; }

/* ── Botón de header ───────────────────────────────────────────────────── */
.btn-h {
  background: rgba(255,255,255,0.12);
  border: none; color: #fff;
  padding: 6px 14px; border-radius: 8px;
  cursor: pointer; font-size: 0.85rem;
  font-family: inherit;
  transition: var(--trans);
}
.btn-h:hover { background: rgba(255,255,255,0.22); }

/* ── Botones ───────────────────────────────────────────────────────────── */
.btn-evf {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border: none; border-radius: var(--radio);
  font-size: 0.9rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: var(--trans); text-decoration: none;
}
.btn-evf-primary   { background: var(--azul); color: white; box-shadow: 0 4px 12px rgba(26,58,107,0.18); }
.btn-evf-primary:hover   { background: var(--azul-dark); transform: translateY(-1px); }
.btn-evf-secondary { background: #6c757d; color: white; }
.btn-evf-secondary:hover { background: #495057; transform: translateY(-1px); }
.btn-evf-success   { background: #2e7d32; color: white; }
.btn-evf-success:hover   { background: #1b5e20; transform: translateY(-1px); }
.btn-evf-outline {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  color: white;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.btn-evf-outline:hover { background: rgba(255,255,255,0.24); }

/* ── Barra de contexto ─────────────────────────────────────────────────── */
.contexto-bar {
  background: var(--azul) !important;
  color: white !important;
  padding: 8px 24px;
  display: flex; align-items: center; gap: 14px;
  font-size: 0.84rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.contexto-bar a { color: rgba(255,255,255,0.72) !important; text-decoration: none; font-size: 0.81rem; transition: var(--trans); }
.contexto-bar a:hover { color: white !important; }
.ctx-sep { opacity: 0.35; }
.ctx-badge { background: rgba(255,255,255,0.18) !important; padding: 2px 10px; border-radius: 20px; font-weight: 600; font-size: 0.81rem; }

/* ── Card ──────────────────────────────────────────────────────────────── */
.evf-card { background: white; border-radius: var(--radio); padding: 24px; box-shadow: var(--sombra); }

/* ── Centro del header ─────────────────────────────────────────────────── */
.evf-header-center { font-size: 0.88rem; opacity: 0.88; color: white; }

/* ── Botón de header (variante outline) ────────────────────────────────── */
.evf-btn-header {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  color: white;
  padding: 8px 18px; border-radius: 10px;
  cursor: pointer; font-size: 0.85rem;
  font-family: inherit; font-weight: 600;
  transition: var(--trans); text-decoration: none;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: inline-flex; align-items: center;
}
.evf-btn-header:hover { background: rgba(255,255,255,0.24); }
.evf-btn-header-success {
  background: rgba(46,125,50,0.85);
  border-color: rgba(46,125,50,0.5);
}
.evf-btn-header-success:hover { background: rgba(27,94,32,0.9); }

/* ── Responsive header ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .evf-header { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .evf-header-center { display: none; }
}

/* ── Tipografía base ───────────────────────────────────────────────────── */
h1, h2, h3, h4 { color: var(--azul); letter-spacing: -0.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
label { font-size: 0.85rem; font-weight: 600; color: var(--gris-sub); display: block; margin-bottom: 5px; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE GLOBAL — Sprint 4
   Breakpoints: tablet ≤1023px | mobile ≤767px | small ≤375px
   ══════════════════════════════════════════════════════════════ */

/* ── Utilidad: tabla con scroll horizontal ─────────────────── */
.evf-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Tablet (≤ 1023 px) ────────────────────────────────────── */
@media (max-width: 1023px) {
  .evf-header-center { font-size: 0.85rem; }
  .evf-grid-2col,
  .evf-grid-3col { grid-template-columns: 1fr; }
  .evf-card { width: 100%; }
}

/* ── Mobile (≤ 767 px) ─────────────────────────────────────── */
@media (max-width: 767px) {
  /* Header */
  .evf-header { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; }
  .evf-header-center { display: none; }
  .evf-header-right { width: 100%; justify-content: flex-end; }

  /* Contexto bar */
  .contexto-bar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }

  /* Tipografía */
  h1 { font-size: 1.25rem; }
  h2 { font-size: 1.05rem; }

  /* Inputs y selects: full-width */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  select,
  textarea { width: 100%; box-sizing: border-box; font-size: 1rem; }

  /* Botones de acción: full-width */
  .btn-evf { width: 100%; justify-content: center; }

  /* Contenedor genérico */
  .container { padding: 12px !important; }

  /* Columnas ocultas en tablas */
  .evf-col-hide-mobile { display: none; }

  /* Canvas de video */
  canvas { max-width: 100%; height: auto; }

  /* Cards */
  .evf-card { padding: 16px; }
}

/* ── Small mobile (≤ 375 px) ───────────────────────────────── */
@media (max-width: 375px) {
  .evf-header { padding: 8px 10px; }
  h1 { font-size: 1.1rem; }
  .btn-evf { font-size: 0.82rem; padding: 8px 12px; }
  .contexto-bar { font-size: 0.78rem; }
}
