/* Luxury Command — identidad: negro puro, blanco y la banda naranja de la agencia.
   Una sola cosa grita (la banda de mando y las cifras en Bodoni); lo demás se queda quieto. */

@font-face {
  font-family: "Bodoni Moda";
  src: url("/static/fonts/bodoni-moda-latin-opsz-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/static/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --ink: rgba(255, 255, 255, 0.94);
  --ash: rgba(255, 255, 255, 0.64);
  --smoke: rgba(255, 255, 255, 0.46);
  --rule: rgba(255, 255, 255, 0.14);
  --rule-strong: rgba(255, 255, 255, 0.34);
  --wash: rgba(255, 255, 255, 0.05);
  --orange: #f26a21;
  --orange-soft: rgba(242, 106, 33, 0.14);
  --ok: #6fd08c;
  --bad: #ff5b4f;
  --font-display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --font-ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --band-h: 40px;
  --rail-w: 276px;
  --gap: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; background: var(--black); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--orange); text-underline-offset: 3px; }
a:hover { color: var(--white); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
::selection { background: var(--orange); color: #000; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ash); }
.faint { color: var(--smoke); }
.nowrap { white-space: nowrap; }
.num, td.num, th.num { font-variant-numeric: tabular-nums lining-nums; }

/* ───────── banda de mando ───────── */
.band {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  min-height: var(--band-h); padding: 0 24px;
  background: var(--orange); color: #000;
  font-size: 13.5px; font-weight: 600;
  animation: band-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.band a { color: #000; text-decoration-thickness: 1.5px; }
.band a:hover { color: #000; text-decoration-thickness: 3px; }
.band .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band .alerts { padding: 3px 10px; background: #000; color: var(--orange); text-decoration: none; font-weight: 700; }
.band .alerts:hover { background: #fff; color: #000; }
.band .demo { background: #000; color: #fff; padding: 3px 10px; font-weight: 700; }
@keyframes band-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ───────── estructura ───────── */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: calc(100vh - var(--band-h)); }
.rail {
  position: sticky; top: var(--band-h); align-self: start;
  height: calc(100vh - var(--band-h)); overflow-y: auto;
  padding: 26px 24px 24px; border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font-weight: 600; font-size: 14.5px; letter-spacing: 0.01em; }
.rail-group > .title { font-size: 12.5px; color: var(--smoke); margin-bottom: 8px; }
.rail-links a { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; color: var(--ash); text-decoration: none; font-size: 14.5px; }
.rail-links a:hover, .rail-links a[aria-current="page"] { color: var(--white); }
.rail-links a[aria-current="page"] { font-weight: 600; }
.count { font-variant-numeric: tabular-nums; font-size: 12.5px; color: #000; background: var(--orange); padding: 0 7px; font-weight: 700; min-width: 20px; text-align: center; }

.roster-item { border-top: 1px solid var(--rule); padding: 12px 0 10px; position: relative; }
.roster-item:last-child { border-bottom: 1px solid var(--rule); }
.roster-item > a.who { display: block; text-decoration: none; color: var(--white); }
.roster-item .name { font: 500 27px/1.05 var(--font-display); letter-spacing: -0.005em; }
.roster-item .meta { font-size: 12.5px; color: var(--ash); margin-top: 3px; font-variant-numeric: lining-nums; }
.roster-item.current::before { content: ""; position: absolute; left: -24px; top: -1px; bottom: 0; width: 4px; background: var(--orange); }
.subnav { margin: 10px 0 4px; }
.subnav a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--rule); color: var(--ash); text-decoration: none; font-size: 14px; }
.subnav .grp { margin: 12px 0 3px; padding-left: 13px; font-size: 12px; color: var(--smoke); }
.subnav .grp.gap { margin: 8px 0 0; }
.subnav a:hover { color: var(--white); }
.subnav a[aria-current="page"] { color: var(--white); font-weight: 600; border-left: 2px solid var(--orange); padding-left: 11px; }
.rail-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 13.5px; }
.rail-foot .who { color: var(--white); font-weight: 600; }
.rail-foot form { margin-top: 6px; }
.linklike { background: none; border: 0; padding: 0; color: var(--ash); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--white); }

.menu-btn { display: none; }

.page { padding: 38px clamp(20px, 4vw, 60px) 110px; max-width: 1320px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.page-title { font: 500 clamp(34px, 4.4vw, 58px)/1.02 var(--font-display); letter-spacing: -0.012em; }
.page-sub { color: var(--ash); margin-top: 10px; max-width: 62ch; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.block { border-top: 1px solid var(--rule-strong); padding-top: 18px; margin-top: 44px; }
.block:first-of-type { margin-top: 0; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.block-head h2 { font: 650 17px/1.2 var(--font-ui); }
.block-head .aside { color: var(--ash); font-size: 13.5px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 4vw, 64px); }
.cols > .block:first-child { margin-top: 44px; }
.cols.tight { gap: 0 36px; }

/* ───────── cifras ───────── */
.kpis { display: flex; flex-wrap: wrap; gap: 28px clamp(28px, 5vw, 76px); margin-bottom: 8px; }
.kpi .num { display: block; font: 500 clamp(46px, 6vw, 78px)/0.95 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: lining-nums; font-variation-settings: "opsz" 30; }
.kpi .lbl { display: block; margin-top: 8px; color: var(--ash); font-size: 13.5px; }
.kpi.small .num { font-size: clamp(34px, 4vw, 52px); }
.delta { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; }
.delta svg { width: 9px; height: 9px; }
.delta.up { color: var(--white); }
.delta.down { color: var(--orange); }
.delta.flat { color: var(--smoke); }

/* ───────── botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 18px; border: 1px solid var(--white);
  background: transparent; color: var(--white); font: 600 14px/1 var(--font-ui);
  text-decoration: none; cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--white); color: #000; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #000; }
.btn.primary:hover { background: var(--white); border-color: var(--white); color: #000; }
.btn.quiet { border-color: var(--rule-strong); color: var(--ink); }
.btn.quiet:hover { border-color: var(--white); background: var(--white); color: #000; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #000; }
.btn.small { min-height: 30px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.inline { display: inline; }

/* ───────── etiquetas de estado ───────── */
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 2px 10px 2px 8px; border: 1px solid var(--rule-strong); border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--ink); }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--smoke); }
.tag.live::before { background: var(--ok); }
.tag.wait::before { background: var(--orange); }
.tag.bad { border-color: var(--bad); color: var(--bad); }
.tag.bad::before { background: var(--bad); }
.tag.review { border-color: var(--orange); color: var(--orange); }
.tag.review::before { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }

/* ───────── tablas ───────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-weight: 500; font-size: 13px; color: var(--ash); padding: 0 14px 10px 0; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.tbl td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl th.r, .tbl td.r { text-align: right; padding-right: 0; padding-left: 14px; font-variant-numeric: lining-nums; }
.tbl th.r + th:not(.r), .tbl td.r + td:not(.r) { padding-left: 30px; }
.tbl tbody tr:hover td { background: var(--wash); }
.tbl .name-cell { font: 500 22px/1.1 var(--font-display); }
.tbl .name-cell a { color: var(--white); text-decoration: none; }
.tbl .name-cell a:hover { color: var(--orange); }
.tbl .sub { display: block; color: var(--ash); font-size: 12.5px; margin-top: 2px; font-family: var(--font-ui); }
.table-scroll { overflow-x: auto; }

/* ───────── formularios ───────── */
.field { display: block; margin-bottom: 20px; }
.field > label, .field > .label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field .hint { display: block; font-size: 13px; color: var(--ash); margin-top: 6px; max-width: 70ch; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input[type="search"],
input[type="datetime-local"], input[type="date"], input[type="time"], input[type="color"], select, textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; background: transparent; color: var(--white);
  border: 1px solid var(--rule-strong); border-radius: 2px; font: 400 15px/1.4 var(--font-ui);
}
input[type="color"] { padding: 3px; width: 64px; }
textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: #000; color: #fff; }
input:hover, select:hover, textarea:hover { border-color: var(--white); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--white); }
::placeholder { color: var(--smoke); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 20px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; cursor: pointer; }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1px solid var(--rule-strong); background: transparent; display: grid; place-items: center; cursor: pointer; }
.check input:checked { background: var(--orange); border-color: var(--orange); }
.check input:checked::after { content: ""; width: 5px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check span { font-size: 14.5px; }
.check small { display: block; color: var(--ash); font-size: 13px; margin-top: 2px; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--ash); border-right: 1px solid var(--rule); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--white); color: #000; }
.seg input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: -2px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--rule); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--wash); padding: 2px 6px; }

/* ───────── avisos ───────── */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: 420px; padding: 14px 18px; background: #000; border: 1px solid var(--white); font-weight: 600; box-shadow: 8px 8px 0 var(--orange); animation: toast-in 0.25s ease-out both; }
.toast.bad { border-color: var(--bad); box-shadow: 8px 8px 0 var(--bad); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.notice { border-left: 3px solid var(--orange); padding: 4px 0 4px 16px; margin: 0 0 20px; max-width: 74ch; }
.notice.bad { border-left-color: var(--bad); }
.empty { padding: 34px 0; max-width: 56ch; }
.empty h3 { font: 500 26px/1.15 var(--font-display); margin-bottom: 8px; }
.empty p { color: var(--ash); margin-bottom: 18px; }
.issues li { padding: 6px 0 6px 14px; border-left: 2px solid var(--orange); margin-bottom: 6px; font-size: 14px; }

/* ───────── línea del día ───────── */
.timeline li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.timeline .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline .what { min-width: 0; }
.timeline .what a { color: var(--ink); text-decoration: none; }
.timeline .what a:hover { color: var(--orange); }
.timeline .what small { display: block; color: var(--ash); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list li { padding: 11px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 18px; align-items: baseline; }

/* ───────── calendario semanal ───────── */
.weeknav { display: flex; align-items: center; gap: 14px; }
.weeknav .range { font: 500 24px/1 var(--font-display); min-width: 12ch; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--rule-strong); }
.day { border-left: 1px solid var(--rule); padding: 14px 12px 18px; min-height: 300px; position: relative; }
.day:first-child { border-left: 0; padding-left: 0; }
.day.today { box-shadow: inset 0 4px 0 var(--orange); }
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 14px; }
.day-head .d { font: 500 34px/1 var(--font-display); font-variant-numeric: lining-nums; }
.day-head .w { color: var(--ash); font-size: 13px; }
.slot { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit; }
.slot:hover .what { color: var(--white); }
.slot .time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.slot .what { color: var(--ash); font-size: 13px; line-height: 1.35; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--smoke); flex: none; }
.slot .dot.live { background: var(--ok); }
.slot .dot.wait { background: var(--orange); }
.slot .dot.bad { background: var(--bad); }
.slot.cancelled { opacity: 0.45; }
.add-slot { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--ash); }
.add-slot:hover { color: var(--orange); }

/* ───────── vista previa tipo Telegram ───────── */
.tg { border: 1px solid var(--rule); padding: 18px; display: grid; gap: 14px; }
.tg-bubble { max-width: 360px; background: rgba(255, 255, 255, 0.09); border-radius: 14px 14px 14px 4px; overflow: hidden; }
.tg-media { aspect-ratio: 4 / 3; background: #1a1a1a center / cover no-repeat; display: grid; place-items: center; color: var(--smoke); font-size: 13px; }
.tg-text { padding: 10px 13px 11px; white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.42; }
.tg-text a { color: var(--orange); }
.tg-text .spoiler { background: #444; color: transparent; border-radius: 3px; }
.tg-btns { display: grid; gap: 2px; padding: 0 4px 4px; }
.tg-btn { text-align: center; padding: 9px 8px; background: rgba(255, 255, 255, 0.11); font-weight: 600; font-size: 14px; border-radius: 4px; }
.tg-poll .opt { display: flex; align-items: center; gap: 10px; padding: 7px 13px; font-size: 14.5px; }
.tg-poll .opt::before { content: ""; width: 16px; height: 16px; border: 1.5px solid var(--ash); border-radius: 50%; flex: none; }
.tg-poll .q { padding: 11px 13px 4px; font-weight: 700; }
.tg-poll .anon { padding: 0 13px 8px; font-size: 12.5px; color: var(--ash); }
.tg-meta { color: var(--ash); font-size: 12.5px; }

/* ───────── biblioteca de medios ───────── */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 18px; }
.media-item { position: relative; }
.media-item .thumb { aspect-ratio: 3 / 4; background: #151515 center / cover no-repeat; display: grid; place-items: center; color: var(--smoke); font-size: 13px; border: 1px solid var(--rule); }
.media-item .cap { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--ash); align-items: center; }
.media-item .variants { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 1px 8px; border: 1px solid var(--rule-strong); color: var(--ash); text-decoration: none; }
.chip:hover { color: #000; background: var(--white); border-color: var(--white); }
.chip.on { background: var(--white); color: #000; border-color: var(--white); font-weight: 600; }
.dropzone { border: 1px dashed var(--rule-strong); padding: 28px; display: grid; gap: 12px; justify-items: start; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; max-height: 280px; overflow-y: auto; padding: 2px; }
.picker label { cursor: pointer; position: relative; display: block; }
.picker input { position: absolute; opacity: 0; }
.picker .p { aspect-ratio: 3/4; background: #151515 center / cover no-repeat; border: 1px solid var(--rule); display: grid; place-items: end start; padding: 4px; font-size: 11px; color: #fff; }
.picker input:checked + .p { outline: 3px solid var(--orange); outline-offset: -3px; }
.picker input:focus-visible + .p { outline: 2px solid var(--white); outline-offset: 2px; }

/* ───────── gráficos (SVG) ───────── */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font: 500 12px var(--font-ui); fill: var(--ash); font-variant-numeric: lining-nums; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .axis { stroke: var(--rule-strong); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--orange); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.alt { stroke: #fff; stroke-opacity: 0.7; stroke-width: 1.5; stroke-dasharray: 2 4; }
.chart .area { fill: var(--orange); fill-opacity: 0.12; }
.chart .bar { fill: var(--orange); }
.chart .bar.alt { fill: #fff; fill-opacity: 0.55; }
.chart .dot { fill: #000; stroke: var(--orange); stroke-width: 2; }
.chart .label-end { fill: var(--white); font-weight: 700; }
.spark { width: 120px; height: 30px; display: block; }
.spark .line { stroke-width: 1.75; }

.chartfig { margin: 0; position: relative; }
.chart-canvas { width: 100%; min-height: 200px; outline-offset: 6px; }
.chart-canvas:focus-visible { outline: 2px solid var(--orange); }
.chart .cross { stroke: var(--white); stroke-opacity: 0.5; stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .bar.on { fill: var(--white); }
.chart .ring { fill: #000; }
.chart .end { fill: var(--orange); }
.tip { position: absolute; z-index: 6; pointer-events: none; min-width: 148px; padding: 10px 14px 11px; background: #000; border: 1px solid var(--rule-strong); box-shadow: 4px 4px 0 var(--orange); }
.tip[hidden] { display: none; }
.tip .when { color: var(--ash); font-size: 12.5px; }
.tip .val { font: 500 30px/1.05 var(--font-display); font-variant-numeric: lining-nums; font-variation-settings: "opsz" 30; margin: 2px 0 3px; }
.tip .what { color: var(--ash); font-size: 13px; display: flex; align-items: center; }
.tip .key { display: inline-block; width: 14px; height: 2px; background: var(--orange); margin-right: 7px; }
.tip .extra { color: var(--ash); font-size: 12.5px; margin-top: 5px; }
.tableview summary { cursor: pointer; color: var(--ash); font-size: 13.5px; margin-top: 14px; width: max-content; }
.tableview summary:hover { color: var(--white); }
.tableview .tbl { margin-top: 12px; max-width: 520px; }
.spark .end { fill: var(--orange); }

.bare { min-height: calc(100vh - var(--band-h)); }
.warn-text { color: var(--orange); font-weight: 600; }
.editor { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr); gap: 0 clamp(28px, 4vw, 64px); align-items: start; }
.editor-side { position: sticky; top: calc(var(--band-h) + 20px); max-height: calc(100vh - var(--band-h) - 40px); overflow-y: auto; border-top: 1px solid var(--rule-strong); padding-top: 18px; }
.editor-side .tg { margin-bottom: 14px; }
.help { margin: 2px 0 0; }
.help summary { cursor: pointer; color: var(--ash); font-size: 13.5px; width: max-content; }
.help summary:hover { color: var(--white); }
.help p { margin: 10px 0 0; font-size: 13.5px; color: var(--ash); max-width: 70ch; }
.check-list { display: grid; gap: 12px; }
.check-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.check-item .fix { display: block; color: var(--ash); font-size: 13.5px; margin-top: 3px; }
tg-spoiler { background: #444; color: transparent; border-radius: 3px; }
.tg-text a { pointer-events: none; }
@media (max-width: 1080px) { .editor { grid-template-columns: 1fr; } .editor-side { position: static; max-height: none; margin-top: 36px; } }

/* ───────── acceso ───────── */
.login { min-height: calc(100vh - var(--band-h)); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); }
.login-art { border-right: 1px solid var(--rule); padding: clamp(28px, 6vw, 84px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-art .big { font: 500 clamp(54px, 9vw, 132px)/0.9 var(--font-display); letter-spacing: -0.03em; }
.login-art p { color: var(--ash); max-width: 38ch; }
.login-form { padding: clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; max-width: 520px; }
.login-form h1 { font: 500 34px/1.1 var(--font-display); margin-bottom: 26px; }

/* ───────── adaptación ───────── */
@media (max-width: 1080px) {
  .week { grid-template-columns: 1fr; border-top: 0; }
  .day { border-left: 0; border-top: 1px solid var(--rule-strong); padding-left: 0; min-height: 0; }
  .day.today { box-shadow: inset 0 4px 0 var(--orange); }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --band-h: 44px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; z-index: 50; inset: var(--band-h) 0 0 0; height: auto; background: #000; transform: translateX(-100%); transition: transform 0.2s ease; width: min(340px, 100%); }
  body.menu-open .rail { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.7); }
  .menu-btn { display: inline-flex; background: #000; color: var(--orange); border: 0; padding: 4px 12px; font: 700 13px var(--font-ui); cursor: pointer; }
  .login { grid-template-columns: 1fr; }
  .login-art { border-right: 0; border-bottom: 1px solid var(--rule); min-height: 40vh; }
  .login-form { max-width: none; }
}
@media (max-width: 560px) {
  .band { padding: 0 14px; gap: 10px; font-size: 13px; }
  .page { padding-top: 26px; }
  .kpis { gap: 22px 32px; }
  .timeline li { grid-template-columns: 48px minmax(0, 1fr); }
  .timeline li .tag { grid-column: 2; justify-self: start; }
  .toast { left: 14px; right: 14px; bottom: 14px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────── ajustes finos tras la primera revisión visual ───────── */
.toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: -12px 0 28px; }
.weeknav .range { white-space: nowrap; }
.day-head .d { font-variation-settings: "opsz" 30; }
input[type="file"] { color: var(--ash); font: 400 14px var(--font-ui); max-width: 100%; }
input[type="file"]::file-selector-button { margin-right: 14px; min-height: 36px; padding: 0 16px; border: 1px solid var(--white); background: transparent; color: var(--white); font: 600 14px var(--font-ui); cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--white); color: #000; }
.notice.warn { border-left-color: var(--orange); }

@media (max-width: 700px) { .hide-sm { display: none; } }
@media (max-width: 560px) { .band .demo { display: none; } .page-head { margin-bottom: 24px; } }

/* las casillas viven dentro de .field: que no hereden el estilo de etiqueta de campo */
.field > label.check, .field label.check { display: flex; font-size: inherit; font-weight: 400; margin-bottom: 14px; }
@media (max-width: 560px) {
  .tbl td { padding-right: 10px; }
  .tbl .name-cell { font-size: 19px; }
  .hide-xs { display: none; }
}


/* ───────── audiencia, fuentes y ficha de persona ───────── */
.fine { font-size: 13px; max-width: 74ch; margin-top: 16px; }
.funnel { list-style: none; margin: 0; padding: 0; max-width: 880px; }
.funnel li { display: grid; grid-template-columns: minmax(150px, 280px) minmax(0, 1fr) 70px 56px; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.funnel .f-label { font-size: 14.5px; }
.funnel .f-bar { display: block; height: 10px; background: var(--wash); position: relative; }
.funnel .f-bar i { position: absolute; inset: 0 auto 0 0; background: var(--orange); min-width: 2px; }
.funnel li:first-child .f-bar i { background: var(--white); }
.funnel .f-num { text-align: right; font: 500 28px/1 var(--font-display); font-variant-numeric: lining-nums; }
.funnel .f-pct { text-align: right; color: var(--ash); font-size: 13px; font-variant-numeric: tabular-nums; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 16px; align-items: end; margin-bottom: 8px; }
.filters .field { margin-bottom: 14px; }
.filters .btn-row { grid-column: 1 / -1; margin-bottom: 14px; }
.page-sub.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 22px 0 4px; }
.bulk { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(220px, 360px) auto; gap: 0 16px; align-items: end; }
.bulk .field { margin-bottom: 0; }
.tbl td.act { text-align: right; white-space: nowrap; padding-right: 0; }
.tbl td.act form { display: inline; }
.tbl td.act form + form { margin-left: 6px; }
.tbl tr.dim td { opacity: 0.55; }
.tbl tfoot td { font-weight: 650; border-top: 1px solid var(--rule-strong); border-bottom: 0; padding-top: 14px; }
.tbl .sub .warn-text { font-weight: 600; }

.kv { display: grid; gap: 0; margin: 0; }
.kv > div { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.kv dt { color: var(--ash); font-size: 13.5px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.history .when { color: var(--ash); font-size: 13px; font-variant-numeric: tabular-nums; }
.history .what small { display: block; color: var(--ash); font-size: 13px; margin-top: 2px; }
.history .where { font-size: 13px; }

.copybox { display: flex; gap: 10px; align-items: stretch; max-width: 760px; }
.copybox input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; }
.copybox .btn { flex: none; min-width: 96px; }

@media (max-width: 700px) {
  .funnel li { grid-template-columns: minmax(0, 1fr) 62px 46px; gap: 4px 12px; }
  .funnel .f-bar { grid-column: 1 / -1; grid-row: 2; }
  .funnel .f-label { grid-column: 1; grid-row: 1; }
  .funnel .f-num { grid-column: 2; grid-row: 1; font-size: 24px; }
  .funnel .f-pct { grid-column: 3; grid-row: 1; }
  .bulk { grid-template-columns: 1fr; gap: 14px; }
  .kv > div { grid-template-columns: 1fr; gap: 3px; }
  .history li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .history .where { display: none; }
  .copybox { flex-direction: column; }
  .tbl td.act { white-space: normal; }
}


/* ───────── laboratorio de demostración ───────── */
.lab { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 0 clamp(28px, 4vw, 64px); align-items: start; }
.phone-wrap { position: sticky; top: calc(var(--band-h) + 20px); }
.phone { border: 1px solid var(--rule-strong); max-width: 460px; display: grid; grid-template-rows: auto minmax(0, 1fr); height: min(680px, calc(100vh - var(--band-h) - 60px)); min-height: 420px; background: #0b0b0b; }
.phone-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.phone-head .av { width: 38px; height: 38px; border-radius: 50%; background: var(--orange); color: #000; display: grid; place-items: center; font: 600 20px var(--font-display); }
.phone-head small { display: block; color: var(--ash); font-size: 12.5px; }
.phone-body { overflow-y: auto; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 8px; }
.phone-status { text-align: center; margin-bottom: 4px; }
.phone-empty { color: var(--ash); text-align: center; margin: auto; max-width: 28ch; font-size: 14px; }
.phone .tg-bubble { max-width: 88%; }
.phone .tg-text a { pointer-events: auto; }
.tg-row { display: flex; }
.tg-me { align-self: flex-end; max-width: 80%; background: var(--orange); color: #000; padding: 8px 13px; border-radius: 14px 14px 4px 14px; font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.tg-form { display: contents; }
button.tg-btn, a.tg-btn { display: block; width: 100%; border: 0; color: var(--white); font: 600 14px var(--font-ui); cursor: pointer; text-decoration: none; }
button.tg-btn:hover, a.tg-btn:hover { background: rgba(255, 255, 255, 0.22); color: var(--white); }
@media (max-width: 900px) {
  .lab { grid-template-columns: 1fr; }
  .phone-wrap { position: static; margin-top: 36px; }
  .phone { max-width: none; height: 560px; }
}
.tg-sys { align-self: center; color: var(--ash); font-size: 12.5px; text-align: center; padding: 2px 10px; max-width: 90%; }


/* ───────── automatización: cupos, secuencias, difusiones, piloto, banco y mejores horas ───────── */
.meter { position: relative; height: 12px; background: var(--wash); border: 1px solid var(--rule); }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--orange); }
.meter.done i, .meter.full i { background: var(--white); }
.meter.thin { height: 8px; min-width: 110px; }
.meter-cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--ash); font-variant-numeric: tabular-nums; }
.lead-in { max-width: 70ch; color: var(--ash); margin: 0 0 22px; }
.stack { display: grid; gap: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; }
.tbl td.wide { white-space: normal; min-width: 220px; }
.tbl .clip { display: block; max-width: 56ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* secuencias: los mensajes van en orden, así que se numeran */
.steps { display: grid; margin-bottom: 18px; }
.step { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 16px; padding: 24px 0; border-top: 1px solid var(--rule); }
.step:first-child { border-top: 1px solid var(--rule-strong); }
.step .n { font: 500 40px/0.95 var(--font-display); color: var(--orange); font-variant-numeric: lining-nums; }
.step .body { min-width: 0; }
.step .wait { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: flex-end; }
.step .wait .field { margin-bottom: 14px; }
.step .wait input[type="text"] { width: 92px; }
.step .wait select { width: 130px; }
.step .remove { margin-left: auto; margin-bottom: 14px; }
.step textarea { min-height: 110px; }

/* difusiones */
.audience { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 16px 0 6px; border-top: 1px solid var(--rule-strong); }
.audience .num { font: 500 clamp(46px, 6vw, 70px)/0.95 var(--font-display); font-variant-numeric: lining-nums; }
.audience.none .num { color: var(--orange); }
.side-preview { border-top: 1px solid var(--rule-strong); padding-top: 18px; }
.side-preview .tg-bubble { max-width: 340px; }

/* banco de contenido */
.bank-item { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.bank-item.off .txt { opacity: 0.5; }
.bank-item .top { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; }
.bank-item .txt { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bank-item .facts { color: var(--ash); font-size: 13px; margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.bank-item .acts { display: flex; gap: 8px; flex: none; align-items: center; }
.bank-item details { margin-top: 12px; }
.bank-item details > summary, .add-box > summary { cursor: pointer; color: var(--ash); font-size: 13.5px; width: max-content; }
.bank-item details > summary:hover, .add-box > summary:hover { color: var(--white); }
.bank-item details[open] > summary, .add-box[open] > summary { margin-bottom: 16px; }
.add-box { border: 1px solid var(--rule-strong); padding: 14px 18px; }
.add-box > summary { font-weight: 600; color: var(--ink); }
.add-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 8px; }

/* piloto automático */
.plan-day { font: 500 26px/1 var(--font-display); margin: 30px 0 4px; }
.plan-day:first-child { margin-top: 0; }
.plan-row { display: grid; grid-template-columns: 56px 130px minmax(0, 1fr) auto; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.plan-row .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-row .what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-row.gap .what { color: var(--orange); white-space: normal; }
.mode-pick { display: grid; gap: 10px; margin-bottom: 18px; }
.mode-pick label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--rule-strong); padding: 14px 16px; cursor: pointer; }
.mode-pick label:hover { border-color: var(--white); }
.mode-pick input { accent-color: var(--orange); margin-top: 3px; }
.mode-pick input:checked ~ span strong { color: var(--orange); }
.mode-pick strong { display: block; }
.mode-pick small { display: block; color: var(--ash); font-size: 13px; margin-top: 2px; }

/* mejores horas */
.heat-wrap { position: relative; overflow-x: auto; padding-bottom: 8px; }  /* position: que el texto oculto de las casillas no ensanche la página */
.heat { border-collapse: separate; border-spacing: 2px; min-width: 780px; width: 100%; table-layout: fixed; }
.heat th { font-weight: 500; color: var(--ash); font-size: 12px; text-align: center; padding: 0 0 4px; font-variant-numeric: tabular-nums; }
.heat th.day { text-align: right; padding: 0 10px 0 0; white-space: nowrap; font-size: 13px; width: 96px; }
.heat td { height: 30px; padding: 0; text-align: center; border: 1px solid var(--rule); font-size: 11px; color: var(--smoke); }
.heat td.l1 { background: rgba(242, 106, 33, 0.22); border-color: transparent; }
.heat td.l2 { background: rgba(242, 106, 33, 0.45); border-color: transparent; }
.heat td.l3 { background: rgba(242, 106, 33, 0.72); border-color: transparent; }
.heat td.l4 { background: var(--orange); border-color: transparent; }
.heat td.few { border-style: dashed; border-color: var(--rule-strong); }
.heat-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 14px; font-size: 13px; color: var(--ash); }
.heat-legend .sw { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend i { display: inline-block; width: 22px; height: 12px; border: 1px solid var(--rule); }
.heat-legend i.l1 { background: rgba(242, 106, 33, 0.22); border-color: transparent; }
.heat-legend i.l2 { background: rgba(242, 106, 33, 0.45); border-color: transparent; }
.heat-legend i.l3 { background: rgba(242, 106, 33, 0.72); border-color: transparent; }
.heat-legend i.l4 { background: var(--orange); border-color: transparent; }
.heat-legend i.few { border: 1px dashed var(--rule-strong); }
.top-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 28px; }
.top-times .t { border-top: 1px solid var(--rule-strong); padding-top: 12px; }
.top-times .when { font: 500 34px/1 var(--font-display); font-variant-numeric: lining-nums; }
.top-times small { display: block; color: var(--ash); font-size: 13px; margin-top: 5px; }
.verdict { max-width: 70ch; margin-top: 12px; }

@media (max-width: 900px) {
  .add-grid { grid-template-columns: 1fr; }
  .plan-row { grid-template-columns: 52px minmax(0, 1fr); }
  .plan-row .slot-name { grid-column: 2; }
  .plan-row .what { grid-column: 2; white-space: normal; }
  .plan-row .tag { grid-column: 2; justify-self: start; }
}
@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; }
  .step .n { font-size: 30px; margin-bottom: 8px; }
  .bank-item .top { flex-direction: column; gap: 10px; }
  .step .remove { margin-left: 0; }
}
