/* ═══════════════════════════════════════════════════════════════════
   PLATAFORMA LIVIANA — tema base
   Mismo lineamiento que la landing de Romi: fondo claro rosado,
   tarjetas blancas, ciruela + frambuesa, Fraunces + Jost. Sin emojis.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Paleta manual de marca Romi Oviedo: crema · terracota · arena · rosa */
  --bg:        #f4ede1;   /* crema */
  --blush:     #f6e3da;   /* durazno suave */
  --blush-2:   #efd8ca;   /* durazno medio */
  --card:      #fffdf8;   /* blanco cálido */
  --field:     #fffdf8;
  --border:    #ece0cf;   /* arena */
  --border-hi: #e0b79f;   /* arena + terracota */
  --ink:       #33291f;   /* marrón oscuro (texto) */
  --muted:     #7a6d5c;   /* gris cálido (secundario) */
  --faint:     #a89680;
  --accent:    #a1567a;   /* rosa ciruela (secundario) */
  --accent-2:  #e7c9b4;   /* arena rosada */
  --accent-dk: #b0512e;   /* terracota (CTA / primario) */
  --accent-hover: #8f3f22;
  --plum:      #4a2a39;   /* ciruela (títulos) */
  --plum-deep: #33291f;
  --gold:      #c29a5b;
  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Jost', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--sans);
  background:
    radial-gradient(ellipse 800px 500px at 88% 0%, var(--blush) 0%, transparent 55%),
    radial-gradient(ellipse 700px 500px at 0% 100%, #efe0d0 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dk); }
button { font-family: var(--sans); }
::selection { background: var(--blush-2); color: var(--plum); }

/* ── LOGIN ─────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(87,28,60,.12);
  padding: 44px 38px 34px;
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-dk) 70%, transparent);
}
.login-logo {
  font-family: var(--serif);
  font-size: 30px; font-weight: 600; letter-spacing: .3px;
  color: var(--plum);
  margin-bottom: 6px; text-align: center;
}
.login-logo em { font-style: italic; color: var(--accent-dk); }
.login-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-dk); margin-bottom: 26px;
}
.login-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.login-card form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.field label {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 16px; font-family: var(--sans);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  min-height: 48px;
}
.field input:focus {
  outline: none; border-color: var(--accent-dk);
  box-shadow: 0 0 0 3px rgba(162,37,92,.12);
}
.btn-primary {
  margin-top: 8px;
  background: var(--accent-dk);
  color: #fff; border: none; border-radius: 40px;
  padding: 14px; font-size: 15px; font-weight: 700; letter-spacing: .04em;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  min-height: 48px;
  box-shadow: 0 10px 26px rgba(162,37,92,.30);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 14px 32px rgba(162,37,92,.38); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.login-error {
  display: none;
  width: 100%; margin-top: 14px;
  background: #fdecec;
  border: 1px solid #f3c0c0;
  color: #a33a3a;
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; text-align: center;
}
.login-error.visible { display: block; }
.login-foot { margin-top: 26px; font-size: 12.5px; color: var(--faint); text-align: center; }

/* ── LOGIN PARTIDO: foto de Romi + acceso ───────────────────────── */
.login-split { min-height: 100vh; min-height: 100dvh; display: flex; }
.login-foto { position: relative; flex: 1 1 48%; overflow: hidden; background: var(--blush-2); }
.login-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.login-foto::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(51,41,31,.20), rgba(176,81,46,.08) 50%, rgba(244,237,225,.32) 100%); }
.login-foto .foto-marca { position: absolute; left: 42px; bottom: 42px; z-index: 2; color: #fffdf8;
  font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.1; text-shadow: 0 2px 18px rgba(51,41,31,.45); }
.login-foto .foto-marca em { font-style: italic; color: #ffe0cf; }
.login-foto .foto-marca span { display: block; font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; margin-top: 8px; opacity: .92; }
.login-panel { flex: 1 1 52%; display: flex; align-items: center; justify-content: center; padding: 24px; }
@media (max-width: 860px) {
  .login-split { flex-direction: column; }
  .login-foto { flex: none; height: 32vh; min-height: 210px; }
  .login-foto .foto-marca { left: 24px; bottom: 24px; font-size: 26px; }
  .login-panel { flex: none; padding: 32px 20px 48px; }
}

/* ── HEADER APP ────────────────────────────────────────────────── */
.header {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  gap: 12px;
}
.header-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.logo-badge {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--accent-dk), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic;
  font-size: 20px; font-weight: 600; color: #fff;
}
.header-title h1 { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--plum); white-space: nowrap; }
.header-title h1 em { font-style: italic; color: var(--accent-dk); }
.header-title p  { font-size: 11px; color: var(--faint); margin-top: 1px; }
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 600; border: 1px solid;
}
.chip-rose  { background: var(--blush); border-color: var(--border-hi); color: var(--accent-dk); }
.chip-muted { background: #faf3f6; border-color: var(--border); color: var(--muted); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 30px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: #fff;
  border: 1.5px solid var(--accent-dk);
  color: var(--accent-dk);
  text-decoration: none;
  transition: background .2s, color .2s;
  min-height: 36px;
}
.btn-ghost:hover { background: var(--accent-dk); color: #fff; }

/* ── MAIN + GRID DE MÓDULOS ────────────────────────────────────── */
.main { padding: 26px 28px 60px; max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--accent-dk);
  margin: 26px 0 14px;
}
.saludo { font-family: var(--serif); font-size: clamp(24px, 4vw, 32px); font-weight: 600; color: var(--plum); margin-top: 10px; }
.saludo em { font-style: italic; color: var(--accent-dk); }

.modulos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .modulos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .modulos-grid { grid-template-columns: 1fr; } }

.modulo-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  display: block; text-decoration: none; color: inherit;
}
.modulo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(87,28,60,.14);
  border-color: var(--border-hi);
}
.modulo-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--mc, var(--accent)), transparent);
}
.modulo-inicial {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blush);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic;
  font-size: 20px; font-weight: 600; color: var(--accent-dk);
  margin-bottom: 14px;
}
.modulo-nombre { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--plum); margin-bottom: 6px; }
.modulo-desc { font-size: 14px; color: var(--muted); line-height: 1.55; }
.modulo-cta {
  margin-top: 16px; font-size: 12px; font-weight: 700;
  color: var(--accent-dk); letter-spacing: .08em; text-transform: uppercase;
}

.empty-state { padding: 44px 18px; text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.7; }

/* ── TOAST ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--plum); color: #fff;
  border-radius: 12px; padding: 12px 18px;
  font-size: 13px; font-weight: 600;
  display: none; animation: slideIn .3s ease;
  box-shadow: 0 12px 30px rgba(67,21,47,.3);
}
.toast.visible { display: block; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0 } to { transform: none; opacity: 1 } }

/* accesibilidad */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent-dk); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
