/* ============================================================
   White Paper Stationery — sistema de diseño (tokens + componentes)
   100% presentacional.
   ============================================================ */

@font-face {
  font-family: "Goldenbook";
  src: url("../fonts/Goldenbook_Regular.80e7a56f8168.woff2") format("woff2"),
       url("../fonts/Goldenbook_Regular.ee1648ae7e93.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta de marca */
  --wp-paper: #fbfbfc;
  --wp-ink: #23232a;
  --wp-blue-light: #d5dbe2;
  --wp-blue-dark: #b7bdca;
  --wp-text: #2b2b30;
  --wp-muted: #6b6f78;
  --wp-border: #e3e6ea;
  --wp-border-strong: #c7ccd4;
  --wp-nav-inactive: #a8aeb8;

  /* Tipografía */
  --wp-serif: "Goldenbook", Georgia, "Times New Roman", serif;
  --wp-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Radios */
  --wp-radius: 13px;
  --wp-radius-sm: 10px;

  /* Ritmo vertical: separación pareja entre tarjetas y secciones */
  --wp-gap: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--wp-sans);
  background: var(--wp-paper);
  color: var(--wp-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--wp-serif);
  font-weight: 400;
  color: var(--wp-ink);
  letter-spacing: .2px;
}

a { color: var(--wp-ink); }
code { background: #f1f3f6; padding: 1px 5px; border-radius: 5px; font-size: .9em; }

/* ---- Layout ---- */
.wp-main { max-width: 920px; margin: 0 auto; padding: 24px 16px 40px; }

/* ---- Barra superior (oscura) ---- */
.wp-topbar {
  background: var(--wp-ink);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px; gap: 16px;
}
.wp-topbar a { color: #fff; text-decoration: none; }
.wp-logo img { height: 30px; display: block; }
.wp-topnav { display: flex; align-items: center; gap: 6px; }
.wp-navlink {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 8px; font-size: .9rem; color: #cfd3da;
}
.wp-navlink.active, .wp-navlink:hover { color: #fff; background: rgba(255,255,255,.08); }
.wp-navlink svg { width: 18px; height: 18px; }
.wp-account { display: flex; align-items: center; gap: 14px; font-size: .85rem; color: #cfd3da; }
.wp-logout-btn {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px; border-radius: 8px; font: inherit; font-size: .85rem; cursor: pointer;
}
.wp-logout-btn:hover { background: rgba(255,255,255,.1); }

/* ---- Barra inferior (móvil) ---- */
.wp-bottombar { display: none; }
.wp-account-pop { display: none; }

/* ---- Botones ---- */
.btn, .wp-btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--wp-ink); color: #fff; border: none;
  padding: 12px 18px; border-radius: var(--wp-radius-sm);
  font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover, .wp-btn:hover { background: #34343d; }
.btn svg, .wp-btn svg { width: 18px; height: 18px; }
.wp-btn-secondary {
  background: transparent; color: var(--wp-ink); border: 1px solid var(--wp-blue-dark);
}
.wp-btn-secondary:hover { background: #f1f3f6; }

/* ---- Formularios ---- */
input, select, textarea {
  font: inherit; color: var(--wp-text); width: 100%;
  padding: 10px 12px; border: 1px solid var(--wp-border-strong);
  border-radius: var(--wp-radius-sm); background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--wp-blue-dark);
  box-shadow: 0 0 0 3px rgba(183,189,202,.35);
}
input[type="checkbox"], input[type="radio"] { width: auto; }
label { font-weight: 600; font-size: .9rem; color: var(--wp-text); }
form p { margin: 12px 0; }

/* ---- Tarjetas ---- */
.card, .wp-card {
  background: #fff; border: .5px solid var(--wp-border); border-radius: var(--wp-radius);
  padding: 18px; margin-bottom: var(--wp-gap); box-shadow: 0 1px 2px rgba(35,35,42,.03);
}

/* ---- Badges de estado ---- */
.wp-badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.wp-badge--yes     { background: #e3ece1; color: #4a6147; }
.wp-badge--maybe   { background: #efe9dc; color: #7a6a4a; }
.wp-badge--no      { background: #efe2e2; color: #7a5450; }
.wp-badge--pending { background: #e7eaef; color: #6b7280; }
.wp-badge--open    { background: #d5dbe2; color: #3f4654; }
.wp-badge--sent    { background: #eceef1; color: #6b7280; }

.muted { color: var(--wp-muted); }

/* ============================================================
   Responsivo: móvil = barra inferior, escritorio = barra superior
   ============================================================ */
@media (max-width: 768px) {
  .wp-topnav, .wp-account { display: none; }   /* el menú pasa a la barra inferior */
  .wp-topbar { justify-content: center; padding: 10px 16px; }
  body { padding-bottom: 74px; }               /* deja sitio a la barra inferior fija */

  .wp-bottombar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--wp-border);
    justify-content: space-around; padding: 6px 0 8px;
  }
  .wp-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--wp-nav-inactive); text-decoration: none; font-size: .68rem;
    padding: 2px 0; background: none; border: none; cursor: pointer;
  }
  .wp-tab svg { width: 24px; height: 24px; }
  .wp-tab.active { color: var(--wp-ink); }

  .wp-account-pop.open {
    display: block; position: fixed; bottom: 78px; left: 12px; right: 12px; z-index: 60;
    background: #fff; border: 1px solid var(--wp-border); border-radius: var(--wp-radius);
    padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.14);
  }
}

/* ============================================================
   Páginas de autenticación: tarjeta centrada (lista para fondo)
   ============================================================ */
body.wp-auth { min-height: 100vh; display: flex; flex-direction: column; }
/* Para enchufar un fondo más adelante, define en body.wp-auth la propiedad
   "background" con la imagen deseada (center / cover, no-repeat, fixed). */
body.wp-auth .wp-main {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 16px;
}
.wp-authcard { width: 100%; max-width: 420px; }

/* ============================================================
   Secciones colapsables (details/summary, sin JS)
   ============================================================ */
details.wp-collapse { padding: 0; }
details.wp-collapse > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 18px; font-family: var(--wp-serif); font-size: 1.12rem; color: var(--wp-ink);
}
details.wp-collapse > summary::-webkit-details-marker { display: none; }
details.wp-collapse > summary .chev {
  width: 18px; height: 18px; color: var(--wp-muted); transition: transform .18s ease; flex-shrink: 0;
}
details.wp-collapse[open] > summary .chev { transform: rotate(180deg); }
details.wp-collapse .wp-collapse-body { padding: 0 18px 18px; }

/* ============================================================
   Paginación
   ============================================================ */
.wp-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 4px; font-size: .9rem; flex-wrap: wrap; }
.wp-pagination a { color: var(--wp-ink); text-decoration: none; border: 1px solid var(--wp-border-strong); padding: 7px 14px; border-radius: 8px; }
.wp-pagination a:hover { background: #f1f3f6; }
.wp-pagination .pginfo { color: var(--wp-muted); }

/* ============================================================
   Pie de página (enlaces legales)
   ============================================================ */
.wp-footer {
  border-top: 1px solid var(--wp-border);
  margin-top: 8px; padding: 22px 16px 28px;
  text-align: center;
}
.wp-footer-links { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .88rem; }
.wp-footer-links a { color: var(--wp-ink); text-decoration: none; }
.wp-footer-links a:hover { text-decoration: underline; }
.wp-footer-links span { color: var(--wp-nav-inactive); }
.wp-footer-copy { color: var(--wp-muted); font-size: .78rem; margin: 8px 0 0; }

/* ============================================================
   Prosa de páginas legales (Términos / Privacidad)
   ============================================================ */
.wp-prose { max-width: 720px; margin: 0 auto; }
.wp-prose h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 6px; }
.wp-prose h2 { font-size: 1.18rem; margin: 28px 0 8px; }
.wp-prose p, .wp-prose li { color: var(--wp-text); }
.wp-prose ul { padding-left: 22px; }
.wp-prose li { margin: 4px 0; }
.wp-prose a { color: var(--wp-ink); }
.wp-prose-date { color: var(--wp-muted); font-size: .9rem; margin-top: 0; }
.wp-prose-note {
  background: #f1f3f6; border: 1px solid var(--wp-border);
  border-left: 3px solid var(--wp-blue-dark); border-radius: var(--wp-radius-sm);
  margin: 18px 0; padding: 12px 16px; color: var(--wp-muted); font-size: .92rem;
}
