/* ==========================================================================
   BENIGNO - sistema de diseño compartido
   Claro, mucho aire, detalles negros. Un solo lugar para colores, tipografía,
   barra superior, botones, tarjetas, formularios y pie de página.
   ========================================================================== */
:root {
  --bg: #ffffff;
  --panel: #f4f4f4;
  --panel-2: #eceded;
  --ink: #171a20;
  --ink-2: #393c41;
  --muted: #5c5e62;
  --line: #e2e3e5;
  --line-2: #d0d1d2;
  --black: #171a20;
  --white: #ffffff;
  --ok: #1a7f4b;
  --ok-bg: #e7f4ec;
  --err: #c4261d;
  --err-bg: #fcebea;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --star: #171a20;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --nav-h: 56px;
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* acento: coral #ff7979, solo para detalles (no para texto chico sobre blanco) */
  --coral: #ff7979;
  --coral-d: #f25f5f;
  --coral-soft: #ffeded;
  --coral-ring: rgba(255,121,121,.40);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.bg-site {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.bg-site img { max-width: 100%; }
body.bg-site a { color: inherit; }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; border-radius: 4px; box-shadow: 0 0 0 5px var(--coral-ring); }
::selection { background: var(--coral); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 20px; } }

/* ---------- barra superior ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; background: rgba(255,255,255,.0);
  transition: background .25s var(--ease), box-shadow .25s var(--ease), transform .3s var(--ease);
}
.topbar.hide { transform: translateY(-100%); box-shadow: none; }
.topbar.solid, .topbar.always { background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--line); }
.topbar-in { width: 100%; max-width: 1560px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { font-weight: 800; font-size: 15px; letter-spacing: .5em; text-decoration: none; color: var(--ink); padding: 8px 4px; white-space: nowrap; }
.brand:hover { opacity: .75; }
.topnav { display: flex; gap: 2px; justify-self: center; }
.topnav a { text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 6px; color: var(--ink); transition: background .15s; white-space: nowrap; }
.topnav a:hover, .topnav a[aria-current="page"] { background: rgba(23,26,32,.07); }
.topicons { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.iconbtn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ink); text-decoration: none; background: transparent; border: 0; cursor: pointer; font-size: 18px; transition: background .15s; }
.iconbtn:hover { background: rgba(23,26,32,.07); }
.topbtn { font-weight: 600; font-size: 14px; text-decoration: none; padding: 7px 16px; border-radius: 6px; background: var(--black); color: #fff !important; margin-left: 6px; white-space: nowrap; }
.topbtn:hover { background: #000; }
.menubtn { display: none; }
@media (max-width: 960px) {
  .topnav { display: none; }
  .topbar-in { grid-template-columns: 1fr auto; padding: 0 12px 0 16px; }
  .menubtn { display: inline-grid; }
  .brand { letter-spacing: .38em; }
}
.drawer { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); background: #fff; z-index: 200; transform: translateX(100%); transition: transform .3s var(--ease); display: flex; flex-direction: column; padding: 12px 20px 24px; box-shadow: -10px 0 40px rgba(0,0,0,.12); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: flex-end; height: 44px; }
.drawer a.dl { display: block; padding: 14px 4px; font-size: 17px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); color: var(--ink); }
.drawer .btn { margin-top: 18px; }
.scrim { position: fixed; inset: 0; background: rgba(23,26,32,.35); z-index: 150; opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px; line-height: 1; min-height: 42px; padding: 0 24px; border-radius: 6px; border: 2px solid var(--black); background: var(--black); color: #fff !important; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn:hover { background: #000; }
.btn:active { transform: scale(.98); }
.btn.light { background: #fff; color: var(--ink) !important; border-color: #fff; }
.btn.light:hover { background: #f1f1f1; border-color: #f1f1f1; }
.btn.ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff !important; }
.btn.ghost-w { background: transparent; color: #fff !important; border-color: #fff; }
.btn.ghost-w:hover { background: #fff; color: var(--ink) !important; }
.btn.block { display: flex; width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }

/* ---------- pie ---------- */
.foot { padding: 56px 0 40px; color: var(--muted); font-size: 13px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; }
.foot a { text-decoration: none; color: var(--muted); font-weight: 500; }
.foot a:hover { color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-note { max-width: 640px; line-height: 1.6; }

/* ---------- tarjetas / etiquetas ---------- */
.card-panel { background: var(--panel); border-radius: var(--radius); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--panel); color: var(--ink); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.black { background: var(--black); color: #fff; }

/* ---------- formularios ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.input, .field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 11px 14px; min-height: 44px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px var(--coral-ring); }

/* ---------- botón flotante inferior ---------- */
.float-cta { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 90; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 6px 24px rgba(0,0,0,.12); border-radius: 8px; padding: 0 22px; min-height: 46px; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); transition: transform .35s var(--ease); white-space: nowrap; }
.float-cta.show { transform: translate(-50%, 0); }
.float-cta:hover { background: #fafafa; }

/* ---------- pantallas de acceso (login, registro, recuperar) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.auth-art { position: sticky; top: 0; height: 100vh; align-self: start; background: linear-gradient(135deg, #f1f2f3, #e2e4e6); overflow: hidden; }
.auth-art .fondo { position: absolute; inset: 0; background-size: cover; background-position: center; transition: background-image .6s; }
.auth-art .image-loader { display: none !important; }
.art-copy { position: absolute; left: 40px; right: 40px; bottom: 40px; max-width: 420px; background: rgba(255,255,255,.94); border-radius: var(--radius); padding: 22px 24px; }
.art-copy strong { display: block; font-size: 22px; letter-spacing: -.015em; margin-bottom: 4px; }
.art-copy span { color: var(--muted); font-size: 14.5px; }
.auth-main { display: flex; flex-direction: column; padding: 24px clamp(20px, 5vw, 64px) 40px; min-width: 0; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-top .back { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); }
.auth-top .back:hover { color: var(--ink); }
.auth-card { margin: auto; width: 100%; max-width: 420px; padding: 40px 0; }
.auth-card h1 { font-size: 32px; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; font-weight: 700; }
.auth-sub { color: var(--muted); margin: 0 0 28px; font-size: 15px; }
.pw { position: relative; }
.pw input { padding-right: 48px !important; }
.pwbtn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; font-size: 16px; }
.pwbtn:hover { color: var(--ink); background: var(--panel); }
.form-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; font-size: 14px; }
.remember-me { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); }
.remember-me input { width: 16px; height: 16px; accent-color: var(--coral); }
.forgot-password { color: var(--ink); font-weight: 600; text-decoration: underline; cursor: pointer; background: none; border: 0; font: inherit; font-weight: 600; padding: 0; }
.message { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; line-height: 1.45; }
.message.error { background: var(--err-bg); color: var(--err); }
.message.success { background: var(--ok-bg); color: var(--ok); }
.message.info { background: var(--panel); color: var(--ink); }
.alt-link { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--muted); }
.alt-link a { color: var(--ink); font-weight: 700; text-decoration: underline; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- acento coral + grises (detalles de controles) ---------- */
.topnav a { position: relative; }
.topnav a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.topnav a[aria-current="page"]::after { transform: scaleX(1); }
.iconbtn:active, .btn:not(.light):not(.ghost-w):active, .topbtn:active { background: var(--coral-d); border-color: var(--coral-d); color: var(--ink) !important; }
.iconbtn:active { background: var(--coral-soft); }
.drawer a.dl[aria-current="page"] { border-bottom-color: var(--coral); box-shadow: inset 3px 0 0 var(--coral); padding-left: 12px; }
.art-copy::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 4px; background: var(--coral); margin-bottom: 12px; }
.alt-link a, .forgot-password { text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tag.accent { background: var(--coral-soft); color: #7a2323; }
.tag.accent::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.doc a, .foot a { text-underline-offset: 3px; }
@media (hover: hover) {
  .topnav a:hover::after { transform: scaleX(1); }
  .iconbtn:hover { background: var(--coral-soft); }
  .btn:not(.light):not(.ghost-w):hover, .topbtn:hover { background: var(--coral); border-color: var(--coral); color: var(--ink) !important; }
  .btn.light:hover { background: var(--coral-soft); border-color: var(--coral-soft); }
  .float-cta:hover { background: var(--coral-soft); border-color: var(--coral); }
  .drawer a.dl:hover { border-bottom-color: var(--coral); }
  .foot a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
  .pwbtn:hover { background: var(--coral-soft); }
}
