/* Open Data Deporte v2 · opendata2.portalgestiona.com
   Minimalista y claro, al estilo de Google: fondo blanco, una sola tipografía,
   líneas finas en lugar de cajas y mucho espacio. La marca se conserva en el
   degradado magenta → morado de los botones principales y en el verde azulado
   de los enlaces y los datos. */

:root {
  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --bg-hover: #f1f3f4;
  --text: #202124;
  --text-2: #3c4043;
  --muted: #5f6368;
  --faint: #80868b;
  --line: #e8eaed;
  --line-2: #dadce0;
  --primary: #00857f;            /* enlaces, foco y selección (AA sobre blanco) */
  --primary-soft: #e6f4f3;
  --magenta: #ff0050;
  --purple: #7b2cbf;
  --grad-hot: linear-gradient(120deg, #ff0050 0%, #7b2cbf 100%);
  --grad: linear-gradient(120deg, #00a8a1 0%, #4f6ef5 50%, #7b2cbf 100%);
  --ok: #188038;
  --warn: #b06000;
  --danger: #c5221f;
  --radius: 12px;
  --head: 64px;
  --display: 'Inter', system-ui, sans-serif;
  --surface: #ffffff;
  --secondary: #d6245a;
  --accent: #7b2cbf;
  --shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  --shadow-lg: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.55; font-size: 15px;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hot { background: var(--grad-hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { width: min(1200px, 100% - 48px); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }
h1, h2, h3 { font-weight: 500; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.2; }
h2 { font-size: 1.35rem; line-height: 1.3; }
h3 { font-size: 1.02rem; font-weight: 600; }
.lead { color: var(--muted); font-size: 1.02rem; max-width: 680px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Cabecera ─────────────────────────────────────────────────────────── */
.od-top {
  position: sticky; top: 0; z-index: 50; height: var(--head); display: flex; align-items: center; gap: 28px;
  padding: 0 24px; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.od-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 1.06rem; white-space: nowrap; }
.od-brand:hover { text-decoration: none; }
.od-brand b { font-weight: 600; }
.od-links { display: flex; gap: 4px; flex: 1; }
.od-links a { color: var(--text-2); padding: 8px 12px; border-radius: 999px; font-size: .92rem; }
.od-links a:hover { background: var(--bg-hover); text-decoration: none; }
.od-links a.on { color: var(--primary); background: var(--primary-soft); font-weight: 500; }
.od-user { position: relative; display: flex; align-items: center; gap: 16px; }
.od-user .link { color: var(--text-2); font-size: .92rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--grad-hot); color: #fff; font-weight: 600; font-size: .85rem; cursor: pointer; }
.pop { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 240px; display: none; z-index: 70; }
.od-user.open .user-pop { display: flex; flex-direction: column; }
.user-pop b { padding: 10px 12px 0; font-weight: 600; }
.user-pop span { padding: 0 12px; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.user-pop span.muted { padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-pop a, .user-pop button { display: block; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--text); border: 0; background: none; cursor: pointer; font-size: .92rem; }
.user-pop a:hover, .user-pop button:hover { background: var(--bg-hover); text-decoration: none; }
.od-burger { display: none; margin-left: auto; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.od-burger i { display: block; width: 20px; height: 2px; background: var(--text-2); transition: transform .2s, opacity .2s; }
.od-burger.x i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.od-burger.x i:nth-child(2) { opacity: 0; }
.od-burger.x i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.od-menu { position: fixed; inset: var(--head) 0 auto 0; background: #fff; z-index: 49; display: none; flex-direction: column; padding: 8px 16px 20px; box-shadow: var(--shadow-lg); }
.od-menu.open { display: flex; }
.od-menu a { color: var(--text); padding: 12px 8px; border-bottom: 1px solid var(--line); font-weight: 500; }
.od-menu a small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
@media (max-width: 980px) {
  .od-links, .od-user .link { display: none; }
  .od-user { margin-left: auto; }
  .od-burger { display: flex; margin-left: 0; }
}

/* ── Pie ──────────────────────────────────────────────────────────────── */
.od-foot { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; margin-top: 64px; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; padding: 18px 0; flex-wrap: wrap; }
.foot-in nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-in a { color: var(--muted); }

/* ── Botones ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--primary);
  font-weight: 500; font-size: .92rem; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--primary-soft); text-decoration: none; }
.btn svg { width: 18px; height: 18px; }
.btn-hot { background: var(--grad-hot); color: #fff; border: 0; }
.btn-hot:hover { background: var(--grad-hot); box-shadow: 0 1px 3px rgba(123, 44, 191, .35), 0 4px 10px rgba(255, 0, 80, .2); filter: saturate(1.1); }
.btn-ghost { border-color: transparent; background: none; }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: #fce8e6; }
.btn-sm { height: 34px; padding: 0 16px; font-size: .86rem; }
.btn-xs { height: 28px; padding: 0 12px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.link-btn { border: 0; background: none; color: var(--primary); cursor: pointer; font-weight: 500; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ── Formularios ──────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field > label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.input, .select, textarea.input {
  height: 44px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 14px; background: #fff; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; }
.input:hover, .select:hover { border-color: #bdc1c6; }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.input-sm { height: 36px; }
.grid-form { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px 16px; }
.grid-form .c3 { grid-column: span 3; } .grid-form .c4 { grid-column: span 4; } .grid-form .c6 { grid-column: span 6; }
.grid-form .c8 { grid-column: span 8; } .grid-form .c12 { grid-column: span 12; }
@media (max-width: 760px) { .grid-form > * { grid-column: span 12 !important; } }
.hint { font-size: .8rem; color: var(--faint); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .92rem; }
.check input { appearance: none; width: 18px; height: 18px; border: 2px solid #5f6368; border-radius: 3px; flex: none; cursor: pointer; display: grid; place-items: center; }
.check input:checked { background: var(--primary) var(--check) center / 14px no-repeat; border-color: var(--primary); }
.check .switch, .switch { position: relative; border: 0; display: inline-block; width: 40px; height: 22px; appearance: none; background: #bdc1c6; border-radius: 999px; cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.check .switch:checked, .switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(18px); }
.msg { padding: 12px 16px; border-radius: 8px; font-size: .9rem; }
.msg.err { background: #fce8e6; color: var(--danger); }
.msg.ok { background: #e6f4ea; color: var(--ok); }
.msg.info { background: var(--bg-soft); color: var(--text-2); border: 1px solid var(--line); }
.msg.warn { background: #fef7e0; color: #7a4a00; }

/* ── Búsqueda tipo Google ─────────────────────────────────────────────── */
.search { position: relative; width: 100%; }
.search-box {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 18px; border: 1px solid var(--line-2);
  border-radius: 26px; background: #fff; transition: box-shadow .15s, border-color .15s;
}
.search-box:hover, .search.focus .search-box { box-shadow: 0 1px 6px rgba(32, 33, 36, .28); border-color: transparent; }
.search.open .search-box { border-radius: 26px 26px 0 0; border-bottom-color: var(--line); box-shadow: 0 1px 6px rgba(32, 33, 36, .28); }
.search-box > svg { width: 20px; height: 20px; color: var(--faint); flex: none; }
.search-box input { flex: 1; border: 0; outline: none; height: 100%; font-size: 1rem; background: transparent; min-width: 0; }
.search-sug { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-radius: 0 0 26px 26px; box-shadow: 0 4px 6px rgba(32, 33, 36, .28);
  padding: 6px 0 14px; z-index: 40; display: none; max-height: 60vh; overflow: auto; }
.search.open .search-sug { display: block; }
.search-sug .grp { font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 10px 22px 4px; }
.search-sug button { display: flex; width: 100%; align-items: center; gap: 14px; padding: 7px 22px; border: 0; background: none; text-align: left; cursor: pointer; font-size: .95rem; }
.search-sug button svg { width: 16px; height: 16px; color: var(--faint); flex: none; }
.search-sug button small { color: var(--faint); margin-left: auto; font-size: .78rem; white-space: nowrap; }
.search-sug button:hover, .search-sug button.on { background: var(--bg-hover); }
.search-sug mark { background: none; font-weight: 600; color: inherit; }
.search-sug .sum { padding: 10px 22px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 6px; }

/* ── Chips ────────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff; color: var(--text-2); font-size: .86rem; cursor: pointer; white-space: nowrap; max-width: 100%;
}
.chip:hover { background: var(--bg-hover); text-decoration: none; }
.chip svg { width: 16px; height: 16px; flex: none; }
.chip.on { background: var(--primary-soft); border-color: transparent; color: #00524e; font-weight: 500; }
.chip .x { margin-left: 2px; opacity: .7; font-size: 1.05rem; line-height: 1; }
.chip .val { overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.chip.round { border-radius: 999px; }

/* ── Pestañas ─────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 12px 16px; color: var(--muted); font-weight: 500; font-size: .92rem; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs button svg { width: 18px; height: 18px; }
.tabs button:hover { color: var(--text); background: var(--bg-soft); }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs .cnt { background: var(--bg-hover); border-radius: 999px; padding: 0 8px; font-size: .75rem; color: var(--muted); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 0 12px; height: 34px; font-size: .84rem; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button svg { width: 17px; height: 17px; }
.seg button:hover { background: var(--bg-hover); }
.seg button.on { background: var(--primary-soft); color: #00524e; font-weight: 500; }

/* ── Tablas ───────────────────────────────────────────────────────────── */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { font-weight: 600; color: var(--text-2); background: var(--bg-soft); position: sticky; top: 0; z-index: 1; font-size: .8rem; }
.tbl th.sort { cursor: pointer; user-select: none; }
.tbl th.sort:hover { color: var(--text); }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #fafbfc; }
.tbl tfoot td { font-weight: 600; background: var(--bg-soft); border-top: 1px solid var(--line-2); }
.tbl td.wrap-cell { white-space: normal; min-width: 220px; }
.tbl .acts { display: flex; gap: 2px; justify-content: flex-end; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 500; background: var(--bg-hover); color: var(--muted); white-space: nowrap; }
.badge.ok { background: #e6f4ea; color: var(--ok); }
.badge.ap { background: #fde7ef; color: #a3123f; }
.badge.warn { background: #fef7e0; color: #7a4a00; }
.badge.off { background: #f1f3f4; color: var(--faint); text-decoration: line-through; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 2px; color: var(--muted); font-size: .85rem; }

/* ── Menús desplegables (descargas) y avisos ───────────────────────────── */
.dl { position: relative; }
.dl-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px 0; min-width: 270px; z-index: 60; display: none; }
.dl.open .dl-menu { display: block; }
.dl-menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 16px; border: 0; background: none; text-align: left; cursor: pointer; font-size: .9rem; color: var(--text); }
.dl-menu button:hover { background: var(--bg-hover); }
.dl-menu .lbl { font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 8px 16px 2px; }
.dl-menu .sep { height: 1px; background: var(--line); margin: 6px 0; }
.toast { position: fixed; left: 24px; bottom: 24px; background: #323232; color: #fff; padding: 12px 20px; border-radius: 6px; font-size: .9rem; z-index: 200;
  transform: translateY(20px); opacity: 0; transition: .2s; pointer-events: none; box-shadow: var(--shadow-lg); }
.toast.show { transform: none; opacity: 1; }

/* ── Bloques comunes ──────────────────────────────────────────────────── */
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 24px; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.kicker { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; }
.stat .n { font-size: 2rem; font-weight: 400; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .88rem; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--line-2); margin-bottom: 10px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { position: fixed; inset: 0; background: #fff; display: grid; place-items: center; z-index: 100; color: var(--muted); text-align: center; transition: opacity .3s; }
.loading.done { opacity: 0; pointer-events: none; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; counter-reset: st; }
.steps > div { counter-increment: st; }
.steps > div::before { content: counter(st); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--grad-hot); color: #fff; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: .92rem; }
.list-plain { list-style: none; display: grid; gap: 2px; }
.list-plain li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.list-plain li:last-child { border-bottom: 0; }

/* ── Portada ──────────────────────────────────────────────────────────── */
.home-hero { min-height: calc(100vh - var(--head) - 40px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 0 72px; }
.home-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.home-logo img { width: 56px; height: 56px; }
.home-logo h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 400; letter-spacing: -.03em; }
.home-logo h1 b { font-weight: 600; }
.home-sub { color: var(--muted); margin-bottom: 30px; font-size: 1.02rem; }
.home-hero .search { max-width: 640px; text-align: left; }
.home-actions { display: flex; gap: 12px; margin: 28px 0 22px; flex-wrap: wrap; justify-content: center; }
.home-actions .btn { background: var(--bg-soft); border-color: var(--bg-soft); color: var(--text-2); border-radius: 6px; }
.home-actions .btn:hover { border-color: var(--line-2); box-shadow: 0 1px 1px rgba(0, 0, 0, .1); background: var(--bg-soft); }
.home-actions .btn-hot { background: var(--grad-hot); color: #fff; border: 0; border-radius: 6px; }
.home-chips { justify-content: center; max-width: 760px; }
.home-meta { margin-top: 34px; font-size: .85rem; color: var(--muted); }
.home-meta b { color: var(--text-2); font-weight: 500; }

/* ── Datos (explorador unificado) ─────────────────────────────────────── */
.dx-top { padding: 22px 0 10px; display: grid; gap: 14px; }
.dx-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dx-row .search { flex: 1 1 420px; }
.dx-row .search-box { height: 46px; }
.dx-ind { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dx-ind h1 { font-size: 1.45rem; }
.dx-ind .ind-btn { border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 1.45rem; font-weight: 500; color: var(--text); padding: 4px 8px; margin-left: -8px; border-radius: 8px; text-align: left; }
.dx-ind .ind-btn:hover { background: var(--bg-hover); }
.dx-ind .ind-btn svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.dx-sub { color: var(--muted); font-size: .88rem; }
.fpop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 340px; max-width: calc(100vw - 24px); display: none; }
.fwrap { position: relative; }
.fwrap.open .fpop { display: block; }
.fpop-h { padding: 12px 12px 8px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.fpop-h .input { height: 38px; }
.fpop-list { max-height: 320px; overflow: auto; padding: 6px 0; }
.fpop-list label { display: flex; align-items: center; gap: 10px; padding: 7px 14px; cursor: pointer; font-size: .9rem; }
.fpop-list label:hover { background: var(--bg-hover); }
.fpop-list label .c { margin-left: auto; color: var(--faint); font-size: .78rem; font-variant-numeric: tabular-nums; }
.fpop-list label span.t { overflow: hidden; text-overflow: ellipsis; }
.fpop-list .grp { font-size: .72rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px 4px; }
.fpop-list button.opt { display: flex; width: 100%; text-align: left; gap: 10px; padding: 8px 14px; border: 0; background: none; cursor: pointer; font-size: .9rem; align-items: baseline; }
.fpop-list button.opt:hover { background: var(--bg-hover); }
.fpop-list button.opt.on { color: var(--primary); font-weight: 500; background: var(--primary-soft); }
.fpop-list button.opt small { margin-left: auto; color: var(--faint); font-size: .76rem; white-space: nowrap; }
.fpop-f { display: flex; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); }
.fpop.wide { width: 440px; }
.fpop .years { display: flex; gap: 10px; padding: 14px; align-items: end; }
.dx-tabs { display: flex; justify-content: space-between; align-items: end; gap: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dx-tabs .tabs { border-bottom: 0; }
.dx-tabs .acts { display: flex; gap: 8px; align-items: center; padding-bottom: 6px; }
.dx-ctl { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; padding: 16px 0 6px; }
.dx-ctl .field { flex: 0 1 200px; }
.dx-ctl .field .select { height: 36px; font-size: .88rem; }
.dx-note { font-size: .84rem; color: var(--muted); padding: 6px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dx-note .warn { color: #7a4a00; background: #fef7e0; padding: 4px 10px; border-radius: 6px; }
.dx-chart { height: min(62vh, 560px); min-height: 360px; margin-top: 8px; }
.dx-stats { display: flex; gap: 36px; flex-wrap: wrap; padding: 14px 0 4px; }
.dx-stats div { display: flex; flex-direction: column; }
.dx-stats b { font-size: 1.35rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.dx-stats span { color: var(--muted); font-size: .8rem; }
.cmp-list { display: grid; gap: 8px; margin: 14px 0; }
.cmp-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.cmp-item i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.cmp-item .t { flex: 1; min-width: 0; }
.cmp-item .t b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-item .t small { color: var(--muted); }
.multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; }
.multiples .m { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 4px; }
.multiples .m h3 { font-size: .9rem; }
.multiples .m .dx-chart { height: 280px; min-height: 0; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; padding: 22px 0; }
.about-grid h3 { margin-bottom: 6px; }
.about-grid p, .about-grid li { color: var(--text-2); font-size: .9rem; }

/* ── Acceso ───────────────────────────────────────────────────────────── */
.auth { flex: 1; display: grid; place-items: center; padding: 48px 16px; background: var(--bg-soft); }
.auth-card { width: min(450px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 44px 40px 36px; }
.auth-card.wide { width: min(620px, 100%); }
.auth-card .mark { width: 44px; height: 44px; margin-bottom: 14px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 400; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-2); margin-bottom: 28px; }
.auth-card form { display: grid; gap: 16px; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; flex-wrap: wrap; }
@media (max-width: 520px) { .auth-card { padding: 32px 22px; border-radius: 20px; } }

/* ── Panel y administración ───────────────────────────────────────────── */
.page-head { padding: 32px 0 8px; display: flex; justify-content: space-between; gap: 20px; align-items: end; flex-wrap: wrap; }
.page-head p { color: var(--muted); }
.panel-body { padding: 24px 0; }
.form-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-sec { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; grid-column: span 12; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.form-actions .msg { margin-right: auto; }
.value-field { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; height: 44px; }
.value-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.value-field input { border: 0; outline: none; height: 100%; padding: 0 14px; flex: 1; min-width: 0; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.value-field span { padding: 0 14px; color: var(--muted); background: var(--bg-soft); height: 100%; display: grid; place-items: center; border-left: 1px solid var(--line); font-size: .86rem; white-space: nowrap; }
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); max-height: 280px; overflow: auto; z-index: 30; display: none; padding: 6px 0; }
.ac.open .ac-list { display: block; }
.ac-list button { display: flex; width: 100%; text-align: left; padding: 8px 14px; border: 0; background: none; cursor: pointer; font-size: .9rem; gap: 10px; }
.ac-list button small { margin-left: auto; color: var(--faint); }
.ac-list button:hover, .ac-list button.on { background: var(--bg-hover); }
.paste { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; min-height: 180px; white-space: pre; }
.preview td.err { background: #fce8e6; }
.cred-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cred { border: 1px dashed var(--line-2); border-radius: 10px; padding: 16px; font-size: .88rem; }
.cred b { display: block; font-size: 1rem; font-weight: 600; }
.cred code { font-size: 1rem; background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { max-width: 320px; height: 38px; }

@media print {
  .od-top, .od-foot, .od-menu, .no-print, .tabs, .toast { display: none !important; }
  body { font-size: 11pt; }
  .cred { break-inside: avoid; }
}

/* Enlaces-botón (los usa también el generador de informes heredado) */
.link-arrow { border: 0; background: none; color: var(--primary); font-weight: 500; cursor: pointer; padding: 0; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow:hover { text-decoration: underline; }
