/* Identidad del Club Rotario Nueva Rosita Centenario (docs/referencia-sitio-rotaryrosita.md).
   Siempre por variable; nunca hexadecimales sueltos fuera de :root. */
/* Sora, la fuente del sitio del club, alojada aquí (licencia OFL en /static/fuentes). */
@font-face { font-family: "Sora"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fuentes/sora-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fuentes/sora-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fuentes/sora-latin-700-normal.woff2) format("woff2"); }
:root {
  --azul: #25488D;          /* barra superior del sitio */
  --azul-boton: #1E73BE;    /* botón píldora «Donativos» */
  --azul-boton-hover: #175E9C;
  --azul-claro: #E8EEF8;
  --dorado: #F2B516;        /* acento; nunca como texto sobre blanco */
  --titulo: #202020;
  --texto: #515151;
  --fondo: #FFFFFF;
  --fondo-2: #F5F5F5;
  --pie: #020D1F;
  --linea: #DDE2EA;
  --ok: #2E7D32;   --ok-fondo: #E7F4E8;
  --aviso: #A15C07; --aviso-fondo: #FFF4DC;
  --error: #C62828; --error-fondo: #FDE8E8;
  --radio: 10px;
  --sombra: 0 1px 3px rgba(2, 13, 31, .12), 0 4px 14px rgba(2, 13, 31, .06);
  --fuente: "Sora", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fuente); font-size: 15px; line-height: 1.5; color: var(--texto); background: var(--fondo-2); }
h1, h2, h3 { color: var(--titulo); font-weight: 600; line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.05rem; } h3 { font-size: .95rem; }
a { color: var(--azul-boton); }
[hidden] { display: none !important; }
.oculto-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- encabezado ---------- */
.barra-sup { background: var(--azul); color: #fff; font-size: .82rem; padding: .35rem 1rem; display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.barra-sup strong { color: #fff; }
.encabezado { background: var(--fondo); border-bottom: 4px solid var(--dorado); padding: .6rem 1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.encabezado .logo { height: 46px; width: auto; display: block; }
.encabezado .titulo { flex: 1 1 auto; min-width: 12rem; }
.encabezado .titulo h1 { margin: 0; }
.encabezado .titulo .sub { font-size: .85rem; }
.encabezado .acciones { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.conexion { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; }
.conexion::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--aviso); }
.conexion.en-linea::before { background: var(--ok); }
.conexion.sin-red::before { background: var(--error); }

/* ---------- botones y campos ---------- */
.boton { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .5rem 1.1rem; background: var(--azul-boton); color: #fff; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; gap: .4rem; }
.boton:hover { background: var(--azul-boton-hover); }
.boton:focus-visible, .campo:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.boton.sec { background: var(--fondo); color: var(--azul); border: 2px solid var(--azul-boton); }
.boton.sec:hover { background: var(--azul-claro); }
.boton.peligro { background: var(--error); }
.boton:disabled { opacity: .5; cursor: not-allowed; }
.boton.chico { padding: .25rem .8rem; min-height: 32px; font-size: .85rem; }
.campo { font: inherit; color: var(--titulo); border: 2px solid var(--linea); border-radius: 8px; padding: .45rem .7rem; background: var(--fondo); min-height: 40px; }
.campo:focus { border-color: var(--azul-boton); }
label { font-weight: 600; color: var(--titulo); font-size: .9rem; }
kbd { font-family: Consolas, "Segoe UI Mono", monospace; font-size: .75rem; border: 1px solid #b9c1cf; border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; background: var(--fondo); color: var(--titulo); }

/* ---------- pestañas ---------- */
.pestanas { display: flex; gap: .25rem; padding: 0 1rem; background: var(--fondo); border-bottom: 1px solid var(--linea); overflow-x: auto; }
.pestanas [role="tab"] { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: .65rem .9rem; cursor: pointer; color: var(--texto); white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.pestanas [role="tab"][aria-selected="true"] { color: var(--azul); font-weight: 700; border-bottom-color: var(--dorado); }
.contador { background: var(--azul-claro); color: var(--azul); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; font-weight: 700; }
.contador.alerta { background: var(--error); color: #fff; }

main { padding: 1rem; }
.panel { background: var(--fondo); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1rem; }

/* ---------- tablas ---------- */
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--fondo); }
.tabla th { background: var(--azul); color: #fff; font-weight: 600; text-align: left; padding: .45rem .5rem; position: sticky; top: 0; z-index: 1; }
.tabla td { padding: .4rem .5rem; border-bottom: 1px solid var(--linea); }
.tabla tbody tr:nth-child(even) { background: #FAFBFD; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.centro { text-align: center; }

/* Golpes contra par: color + signo (nunca solo color) */
.bajo { color: var(--ok); font-weight: 700; }
.sobre { color: var(--error); font-weight: 700; }
.par-e { color: var(--titulo); font-weight: 700; }

/* ---------- avisos (en lugar de alert) ---------- */
#avisos { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 50; max-width: min(28rem, calc(100vw - 2rem)); }
.aviso { background: var(--fondo); border-left: 6px solid var(--azul-boton); border-radius: 8px; box-shadow: var(--sombra); padding: .7rem .9rem; display: flex; gap: .75rem; align-items: flex-start; color: var(--titulo); }
.aviso.ok { border-left-color: var(--ok); }
.aviso.advertencia { border-left-color: var(--aviso); background: var(--aviso-fondo); }
.aviso.error { border-left-color: var(--error); background: var(--error-fondo); }
.aviso .texto { flex: 1; }
.aviso .texto strong { display: block; }
.aviso button { font: inherit; background: none; border: 0; cursor: pointer; color: var(--azul); font-weight: 600; padding: 0 .2rem; }

/* ---------- ventana en la página (en lugar de confirm/prompt) ---------- */
.velo { position: fixed; inset: 0; background: rgba(2, 13, 31, .45); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 1rem; }
.ventana { background: var(--fondo); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.25rem; width: min(30rem, 100%); }
.ventana .botones { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }

.pie { background: var(--pie); color: #c9d2e3; font-size: .8rem; padding: .9rem 1rem; text-align: center; }
.pie strong { color: #fff; }

.vacio { padding: 1rem; color: var(--texto); font-style: italic; }
.error-linea { color: var(--error); font-weight: 600; font-size: .88rem; min-height: 1.3em; }
