/* ==========================================================================
   VideoRAMS TV — hoja de estilo única (sin CDN, sin dependencias)
   Lenguaje visual: editorial (RamsWorld) + televisión (player oscuro)
   ========================================================================== */

:root {
  --blue: #005a8c;
  --blue-dark: #003f63;
  --dark: #1a1a1a;
  --ink: #22313a;
  --gray: #666;
  --light-gray: #e8e8e8;
  --bg: #fafafa;
  --paper: #ffffff;
  --accent: #c62828;
  --gold: #b8860b;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "Consolas", "Courier New", monospace;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 4px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, video { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--dark); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.small { font-size: .85rem; color: var(--gray); }
.mono { font-family: var(--mono); font-size: .82rem; }

.wrap { width: min(1240px, 94vw); margin: 0 auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--blue); color: #fff;
  padding: 10px 16px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------------- topbar -- */
.topbar { background: var(--blue-dark); color: #dbe7ef; font-size: .78rem; letter-spacing: .04em; }
.topbar-in { display: flex; align-items: center; gap: 8px; padding: 6px 0; flex-wrap: wrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-link { color: #dbe7ef; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }
.topbar-link:hover { color: #fff; text-decoration: none; }
.topbar-link.strong { color: #ffd97a; font-weight: 700; }
.topbar-live { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lang { color: #b9cddb; font-weight: 600; }
.lang.is-on { color: #fff; border-bottom: 2px solid var(--gold); }
.lang-sep { color: #6b8ba1; }
form.inline { display: inline; }
form.inline button { background: none; border: 0; cursor: pointer; padding: 0; font: inherit; }

/* -------------------------------------------------------------- masthead -- */
.masthead { background: var(--paper); border-bottom: 3px double var(--light-gray); padding: 18px 0 0; }
.masthead-brand { text-align: center; }
.brand-mark { display: inline-flex; align-items: center; gap: 12px; color: var(--dark); }
.brand-mark:hover { text-decoration: none; }
.brand-tv {
  background: var(--accent); color: #fff; font-family: var(--sans); font-weight: 800;
  font-size: .8rem; letter-spacing: .12em; padding: 6px 9px; border-radius: 3px;
}
.brand-text { font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 3.4rem); font-weight: 700; letter-spacing: -.5px; }
.brand-dot { color: var(--gold); margin: 0 2px; }
.masthead-tagline {
  text-align: center; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem;
  color: var(--gray); margin: 6px 0 14px;
}
.mainnav {
  display: flex; justify-content: center; gap: 26px; border-top: 1px solid var(--light-gray);
  padding: 10px 0; flex-wrap: wrap;
}
.mainnav a {
  color: var(--dark); text-transform: uppercase; font-size: .78rem; letter-spacing: .1em;
  font-weight: 600; padding: 4px 2px; border-bottom: 2px solid transparent;
}
.mainnav a:hover { color: var(--blue); text-decoration: none; }
.mainnav a.is-active { color: var(--blue); border-bottom-color: var(--accent); }

/* ---------------------------------------------------------------- ticker -- */
.ticker { background: var(--paper); border-bottom: 1px solid var(--light-gray); overflow: hidden; }
.ticker-in { display: flex; align-items: center; gap: 14px; padding: 8px 0; font-size: .82rem; }
.ticker-label {
  background: var(--accent); color: #fff; font-weight: 700; font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 2px;
  white-space: nowrap;
}
.ticker-items { display: flex; gap: 22px; overflow: hidden; white-space: nowrap; }
.ticker-items a { color: var(--ink); }
.ticker-items .when { color: var(--gold); font-weight: 700; margin-right: 6px; font-family: var(--mono); font-size: .78rem; }

/* ----------------------------------------------------------------- hero -- */
.hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 26px; padding: 26px 0 10px; }
.hero-side { border-left: 1px solid var(--light-gray); padding-left: 24px; }
.kicker {
  color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .7rem;
  font-weight: 700; margin-bottom: 8px; display: block;
}
.hero-title { font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin-bottom: .35em; }
.hero-sub { color: #46545e; font-size: 1.02rem; }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 18px; }
.chip {
  border: 1px solid var(--light-gray); background: var(--paper); border-radius: 999px;
  padding: 4px 11px; font-size: .74rem; color: #44525c; letter-spacing: .02em;
}
.chip.accent { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip.gold { border-color: var(--gold); color: var(--gold); font-weight: 700; }
.chip.live { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 0; cursor: pointer;
  padding: 11px 20px; border-radius: var(--radius); font-size: .92rem; font-weight: 600;
  font-family: var(--sans); letter-spacing: .02em; text-align: center;
}
.btn:hover { background: var(--blue-dark); text-decoration: none; color: #fff; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: #9e1f1f; }
.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
.btn.ghost:hover { background: #eef4f8; }
.btn.gold { background: var(--gold); }
.btn.small { padding: 7px 13px; font-size: .8rem; }
.btn.danger { background: #8e2020; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ------------------------------------------------------------- avisos IA -- */
.ai-tag {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: #eef2f6; border: 1px solid #c9d6df; color: #33475b; font-size: .64rem;
  letter-spacing: .04em; text-transform: none; font-weight: 700; vertical-align: middle;
}
.ai-notice {
  background: #f2f6fa; border-left: 4px solid var(--blue); border-radius: var(--radius);
  padding: 12px 16px; margin: 12px 0 18px; font-size: .9rem;
}
.ai-notice p { margin: 6px 0; color: #3f4d56; }
.player-ai {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  background: rgba(4, 10, 14, .72); color: #e8eef3; border: 1px solid #2b4657;
  font-size: .62rem; letter-spacing: .04em; padding: 3px 8px; border-radius: 3px;
  max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-item.is-planned { border-left-color: var(--gold); background: #fff8e8; color: #6d5100; }
.state-pendiente { color: var(--gold); }

/* --------------------------------------------------------------- player -- */
.player {
  position: relative; background: #07131b; border-radius: 6px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22); border: 1px solid #0d2231;
}
.player-stage { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.player-empty {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  color: #a9bcc9; gap: 6px; background: linear-gradient(135deg, #0b2233, #00405f);
}
.player-empty .ico { font-size: 2rem; }
.player-badge {
  position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff;
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  padding: 4px 9px; border-radius: 2px; z-index: 2;
}
.player-badge.gold { background: var(--gold); }
.player-controls {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #0b1a24;
  border-top: 1px solid #142c3b; flex-wrap: wrap;
}
.pbtn {
  background: #12303f; color: #dce9f1; border: 1px solid #1d4257; border-radius: 3px;
  width: 34px; height: 30px; cursor: pointer; font-size: .85rem; line-height: 1;
}
.pbtn:hover { background: #1a4f68; color: #fff; }
.pbtn.is-active { background: var(--gold); border-color: var(--gold); color: #1a1a1a; font-weight: 700; }
.player-progress { flex: 1 1 160px; height: 6px; background: #16384a; border-radius: 3px; cursor: pointer; min-width: 100px; }
.player-progress span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 3px; }
.player-time { color: #9db4c2; font-family: var(--mono); font-size: .72rem; min-width: 86px; text-align: right; }
.player-sizes { display: inline-flex; gap: 4px; margin-left: auto; }
.player-status { color: #8fa8b7; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }

/* tamaños S / M / L */
.player.is-m, .player.is-l {
  position: fixed; z-index: 90; left: 50%; transform: translateX(-50%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); animation: pop .18s ease-out;
}
.player.is-m { width: min(76vw, 1080px); top: 6vh; }
.player.is-l { width: min(94vw, 1500px); top: 3vh; }
@keyframes pop { from { opacity: .4; transform: translateX(-50%) scale(.97); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
body.player-dim::before {
  content: ""; position: fixed; inset: 0; background: rgba(4, 10, 14, .78); z-index: 80;
}
.player-close {
  position: absolute; top: 8px; right: 8px; z-index: 3; background: rgba(0, 0, 0, .55);
  color: #fff; border: 0; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  font-size: .9rem;
}
.player-close[hidden] { display: none; }

/* --------------------------------------------------------------- bloques -- */
.section { padding: 30px 0 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--light-gray); padding-bottom: 8px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head .more { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 22px; }
.card {
  background: var(--paper); border: 1px solid var(--light-gray); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 16 / 9; background: #0b2233; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 13px 15px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { color: var(--accent); text-transform: uppercase; font-size: .66rem; letter-spacing: .12em; font-weight: 700; }
.card-title { font-family: var(--serif); font-size: 1.06rem; margin: 0; color: var(--dark); }
.card-meta { display: flex; gap: 10px; font-size: .74rem; color: var(--gray); margin-top: auto; }
.card-meta .state { font-weight: 700; }
.state-scheduled { color: var(--blue); }
.state-live { color: var(--accent); }
.state-emitted { color: var(--gray); }
.card-syn { font-size: .86rem; color: #4d5b64; margin: 0; }
.card-badge {
  position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .72); color: #fff;
  font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 2px;
}

/* ---------------------------------------------------------------- CTA --- */
.cta-band { background: linear-gradient(120deg, var(--blue-dark), var(--blue)); color: #fff; margin: 34px 0 0; }
.cta-in { display: grid; grid-template-columns: 1.6fr auto; gap: 24px; align-items: center; padding: 34px 0; }
.cta-in h2 { color: #fff; margin: 0 0 6px; }
.cta-in p { color: #cfe0ea; margin: 0; }

/* -------------------------------------------------------------- footer -- */
.footer { background: #101c24; color: #b8c8d2; margin-top: 46px; padding-top: 34px; font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr; gap: 30px; padding-bottom: 26px; }
.footer-brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: 8px; }
.footer h4 { color: #fff; font-family: var(--sans); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }
.footer a { color: #b8c8d2; display: block; padding: 2px 0; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e2f3a; padding: 14px 0 22px; font-size: .76rem; color: #8299a6; }

/* ------------------------------------------------------------ programación -- */
.page-head { padding: 28px 0 6px; border-bottom: 1px solid var(--light-gray); margin-bottom: 20px; }
.page-head h1 { margin-bottom: .2em; }
.page-head p { color: var(--gray); }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 14px 0 22px; }
.toolbar .spacer { flex: 1; }
select, input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="datetime-local"], input[type="search"], textarea {
  font: inherit; padding: 9px 11px; border: 1px solid #c9d2d8; border-radius: var(--radius);
  background: #fff; color: var(--ink); width: 100%;
}
select:focus, input:focus, textarea:focus { outline: 2px solid #9fc4da; outline-offset: 1px; }
.toolbar select, .toolbar input { width: auto; min-width: 180px; }

.cal { background: var(--paper); border: 1px solid var(--light-gray); border-radius: var(--radius); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--light-gray); }
.cal-title { font-family: var(--serif); font-size: 1.35rem; margin: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { background: #f2f5f7; text-align: center; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gray); padding: 8px 0; border-bottom: 1px solid var(--light-gray); }
.cal-day { min-height: 112px; border-right: 1px solid #eef1f3; border-bottom: 1px solid #eef1f3; padding: 7px 8px; font-size: .8rem; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #fbfcfc; color: #b3bec5; }
.cal-day.today { background: #fffaf0; box-shadow: inset 0 0 0 2px var(--gold); }
.cal-day .num { font-weight: 700; color: #4a5a66; font-family: var(--mono); font-size: .78rem; }
.cal-day.today .num { color: var(--gold); }
.cal-item { display: block; margin-top: 4px; padding: 3px 6px; border-left: 3px solid var(--blue); background: #eef5fa; border-radius: 2px; font-size: .72rem; line-height: 1.3; color: #1f3b4d; overflow: hidden; text-overflow: ellipsis; }
.cal-item:hover { text-decoration: none; background: #e2eef7; }
.cal-item.is-live { border-left-color: var(--accent); background: #fdeeee; color: #7d1a1a; }
.cal-item.is-past { border-left-color: #9aa8b1; background: #f3f5f6; color: #5b6a74; }
.cal-item .h { font-family: var(--mono); font-size: .68rem; color: var(--gold); margin-right: 4px; }

.daygroup { margin-bottom: 26px; }
.daygroup h3 { display: flex; align-items: center; gap: 12px; font-size: 1.02rem; text-transform: uppercase; letter-spacing: .08em; }
.daygroup h3::after { content: ""; flex: 1; height: 1px; background: var(--light-gray); }
.rowprog { display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px dashed #e6ebee; }
.rowprog .hour { font-family: var(--mono); color: var(--gold); font-weight: 700; }
.rowprog .ttl { font-family: var(--serif); font-size: 1.02rem; }
.rowprog .sub { font-size: .8rem; color: var(--gray); }

/* ------------------------------------------------------------- programa -- */
.prog-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; padding: 24px 0; }
.prog-side { border-left: 1px solid var(--light-gray); padding-left: 24px; }
.prog-title { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: .25em; }
.prog-syn { font-size: 1.05rem; color: #3f4d56; }
.meta-list { list-style: none; padding: 0; margin: 18px 0; font-size: .88rem; }
.meta-list li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dotted #dde4e8; }
.meta-list b { font-weight: 600; color: #4a5a66; }

/* ----------------------------------------------------------------- gate -- */
.gate { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 30px 0; }
.gate-box { background: var(--paper); border: 1px solid var(--light-gray); border-top: 4px solid var(--accent); padding: 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.gate-lock { font-size: 2rem; }
.gate-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

/* ----------------------------------------------------------------- auth -- */
.auth { max-width: 460px; margin: 40px auto; background: var(--paper); border: 1px solid var(--light-gray); border-top: 4px solid var(--blue); padding: 28px 30px 32px; border-radius: var(--radius); box-shadow: var(--shadow); }
.auth h1 { font-size: 1.7rem; margin-bottom: .2em; }
.auth .field { margin-bottom: 15px; }
.auth label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #5b6a74; margin-bottom: 5px; font-weight: 600; }
.auth .hint { font-size: .76rem; color: var(--gray); margin-top: 4px; }
.auth .alt { margin-top: 18px; font-size: .88rem; }
.error-box { background: #fdeeee; border-left: 4px solid var(--accent); color: #7d1a1a; padding: 10px 14px; border-radius: 3px; margin-bottom: 16px; font-size: .88rem; }
.flashes { margin: 16px 0; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 3px; font-size: .88rem; border-left: 4px solid var(--blue); background: #eef5fa; }
.flash-error { border-left-color: var(--accent); background: #fdeeee; color: #7d1a1a; }
.flash-ok { border-left-color: #2e7d32; background: #edf7ee; color: #1e5b23; }

/* ---------------------------------------------------------------- admin -- */
.admin-body .masthead, .admin-body .ticker { display: none; }
.admin-body .topbar { position: sticky; top: 0; z-index: 50; }
.panel.wide { grid-column: 1 / -1; }
.admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 0; min-height: 70vh; }
.admin-side { background: #0f1e28; color: #c6d6e0; padding: 20px 0; }
.admin-side .brand { font-family: var(--serif); color: #fff; font-size: 1.2rem; padding: 0 20px 16px; display: block; }
.admin-side a { display: block; padding: 9px 20px; color: #b7c9d4; font-size: .88rem; border-left: 3px solid transparent; }
.admin-side a:hover { background: #162a36; color: #fff; text-decoration: none; }
.admin-side a.is-active { background: #162a36; color: #fff; border-left-color: var(--gold); }
.admin-side .sep { height: 1px; background: #1d3240; margin: 12px 0; }
.admin-main { padding: 24px 28px 40px; background: #f6f8f9; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.6rem; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--paper); border: 1px solid var(--light-gray); border-left: 4px solid var(--blue); border-radius: var(--radius); padding: 14px 16px; }
.kpi .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gray); }
.kpi .value { font-family: var(--serif); font-size: 1.9rem; color: var(--dark); line-height: 1.1; }
.kpi .sub { font-size: .74rem; color: var(--gray); }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 18px; }
.panel { background: var(--paper); border: 1px solid var(--light-gray); border-radius: var(--radius); padding: 16px 18px 18px; }
.panel h3 { font-size: 1rem; margin-bottom: 10px; }
.chart { width: 100%; height: auto; display: block; }
table.data { width: 100%; border-collapse: collapse; font-size: .84rem; background: var(--paper); }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eef1f3; vertical-align: top; }
table.data th { background: #f2f5f7; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #5b6a74; }
table.data tr:hover td { background: #fbfcfd; }
.badge { display: inline-block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 7px; border-radius: 2px; background: #e8eef2; color: #3f4d56; }
.badge.ok { background: #e6f4e8; color: #1e5b23; }
.badge.warn { background: #fff5e0; color: #8a6100; }
.badge.err { background: #fdeeee; color: #7d1a1a; }
.badge.info { background: #e9f2f9; color: #10496e; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .78rem; font-weight: 600; color: #4a5a66; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }
.check { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.check input { width: auto; }
.card-form { background: var(--paper); border: 1px solid var(--light-gray); border-radius: var(--radius); padding: 22px 24px; }
.progress { height: 10px; background: #e6ebee; border-radius: 5px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--gold)); width: 0; transition: width .4s ease; }
.logbox { background: #0d1a22; color: #b9d3e2; font-family: var(--mono); font-size: .78rem; padding: 14px; border-radius: var(--radius); max-height: 340px; overflow: auto; white-space: pre-wrap; }
.stages { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.stage { flex: 1 1 120px; border: 1px solid var(--light-gray); border-radius: var(--radius); padding: 8px 10px; font-size: .76rem; background: var(--paper); color: var(--gray); }
.stage.done { border-color: #2e7d32; color: #1e5b23; background: #f2faf3; }
.stage.active { border-color: var(--gold); color: #6d5100; background: #fffaf0; }

/* --------------------------------------------------------------- errores -- */
.errorpage { text-align: center; padding: 70px 0; }
.errorpage .code { font-family: var(--serif); font-size: 5rem; color: var(--gold); line-height: 1; }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 980px) {
  .hero, .prog-layout, .gate, .cta-in, .footer-grid { grid-template-columns: 1fr; }
  .hero-side, .prog-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--light-gray); padding-top: 18px; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; padding: 8px; }
  .admin-side a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  .admin-side .brand, .admin-side .sep { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .cal-day { min-height: 84px; }
}
@media (max-width: 620px) {
  .topbar-in { font-size: .7rem; }
  .mainnav { gap: 14px; }
  .rowprog { grid-template-columns: 64px 1fr; }
  .rowprog .actions { grid-column: 2; }
  .player.is-m, .player.is-l { width: 96vw; top: 2vh; }
  .cal-day { min-height: 68px; padding: 4px; }
  .cal-item { font-size: .64rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
