/* ADSDESK — hoja única. Móvil primero: el jefe y el buyer lo abren del móvil.
 *
 * Rediseño 2026-08-21: misma piel que GranizShu (papel crema, tinta berenjena,
 * frambuesa de acento, trazo de 2px y sombra dura desplazada). Antes era un panel
 * oscuro cálido con ámbar. Las clases no cambian: esto sustituye al CSS anterior.
 *
 * En un panel el color es información, no decoración: la frambuesa marca lo
 * accionable, el verde y el rojo dicen "va bien / va mal" y el mango avisa. */

@font-face {
  font-family: 'Bricolage';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('fonts/bricolage-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url('fonts/bricolage-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'InstrumentSans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/instrument-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'InstrumentSans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/instrument-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #fff3e4;
  --bg-soft: #ffe7cd;
  --surface: #ffffff;
  --surface-2: #fff8ef;
  --ink: #241019;
  --line: #241019;
  --line-soft: #e3cdbc;
  --txt: #241019;
  --txt-dim: #7c5a66;
  --txt-faint: #94737f;
  --accent: #f2356b;
  --accent-dim: #c81450;
  --accent-soft: #ffe0e9;
  --good: #2f9e6e;
  --bad: #d93a34;
  --warn: #b57500;
  --mango: #ffb01f;
  --ice: #21c1e2;

  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;

  /* La firma del estilo: trazo y sombra dura, sin difuminar. */
  --stroke: 2px solid var(--ink);
  --stroke-thin: 1.5px solid var(--ink);
  --shadow: 3px 4px 0 var(--ink);
  --shadow-lift: 5px 6px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);

  --font: 'InstrumentSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage', 'Trebuchet MS', -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, 'Cascadia Mono', monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: .92em; }

/* ───────── layout ───────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 18px 72px; position: relative; z-index: 2; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: var(--stroke);
}
.topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 11px 18px;
  display: flex; align-items: center; gap: 14px;
}
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; letter-spacing: -.04em; font-size: 17px; }
.logo-mark {
  width: 29px; height: 29px; border-radius: 9px; flex: none;
  background: var(--accent); color: #fff;
  border: var(--stroke);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.logo-mark svg { width: 15px; height: 15px; display: block; }
.spacer { flex: 1; }

.nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 6px 13px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--txt-dim); white-space: nowrap;
  border: 2px solid transparent;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a.on { color: var(--ink); background: var(--mango); border-color: var(--ink); box-shadow: var(--shadow-sm); }

.who { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--txt-dim); font-weight: 600; }
.who:hover { color: var(--ink); }
.avatar {
  width: 31px; height: 31px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); border: var(--stroke-thin);
  font-family: var(--display); font-size: 12.5px; font-weight: 800; color: var(--ink);
}

/* ───────── cabeceras ───────── */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 30px 0 20px; }
h1 { font-family: var(--display); font-size: 34px; letter-spacing: -.04em; margin: 0; font-weight: 800; line-height: 1.02; text-wrap: balance; }
h2 { font-family: var(--display); font-size: 17px; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 700; }
.sub { color: var(--txt-dim); font-size: 13.5px; margin: 6px 0 0; max-width: 62ch; text-wrap: pretty; }

/* Selector de rango: pastillas con trazo, la activa en mango */
.segmented { display: inline-flex; background: var(--surface); border: var(--stroke); border-radius: 999px; padding: 3px; gap: 3px; box-shadow: var(--shadow-sm); }
.segmented button {
  border: 0; background: none; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  color: var(--txt-dim); font-size: 13px; font-weight: 600;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.segmented button:hover { color: var(--ink); }
.segmented button.on { background: var(--ink); color: var(--bg); }

/* ───────── KPIs ───────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 11px; }
.kpi {
  background: var(--surface);
  border: var(--stroke); border-radius: var(--r-lg); padding: 14px 16px 13px;
  box-shadow: var(--shadow);
  position: relative;
}
.kpi .k { display: block; color: var(--txt-dim); font-size: 12.5px; font-weight: 600; }
.kpi .v {
  display: block; font-family: var(--display); font-size: 27px; font-weight: 800; letter-spacing: -.045em; margin-top: 6px;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.kpi .h { display: block; color: var(--txt-faint); font-size: 12px; margin-top: 5px; }
/* El KPI destacado va en frambuesa: es el número que se mira primero. */
.kpi.hero { background: var(--accent); border-color: var(--ink); }
.kpi.hero .k, .kpi.hero .h { color: rgba(255, 255, 255, .92); }
.kpi.hero .v { color: #fff; }

.grid { display: grid; gap: 14px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }

/* ───────── tarjetas ───────── */
.card {
  background: var(--surface); border: var(--stroke); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow);
}
.card.link { cursor: pointer; transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
.card.link:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lift); }
.card.link:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--ink); }

.store-head { display: flex; align-items: flex-start; gap: 12px; }
.store-title { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; font-size: 19px; }
.store-sub { color: var(--txt-dim); font-size: 12.5px; margin-top: 3px; }

/* Estado: punto de color + texto, en caja con trazo fino */
.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 12px; font-weight: 700; color: var(--txt-dim);
  padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface-2); border: var(--stroke-thin);
  white-space: nowrap;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--good); background: #e4f6ed; }
.pill.live::before { box-shadow: 0 0 0 3px rgba(47, 158, 110, .18); }
.pill.testing { color: var(--warn); background: #fff0d0; }
.pill.paused { color: var(--txt-dim); }
.pill.off { color: var(--bad); background: #ffe3e1; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--txt-dim);
  border: var(--stroke-thin); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px;
  background: var(--surface-2);
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.stat { background: var(--bg); border: var(--stroke-thin); border-radius: var(--r-sm); padding: 9px 10px; }
.stat .k { color: var(--txt-dim); font-size: 11.5px; font-weight: 600; }
.stat .v { font-family: var(--display); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -.035em; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); } .dim { color: var(--txt-dim); }

/* ───────── gráfico ───────── */
.spark { display: flex; align-items: flex-end; gap: 3px; margin-top: 16px; border-bottom: var(--stroke); }
.spark .col { flex: 1; min-width: 0; height: 100%; }
.spark .pair { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.spark .b { flex: 1; border-radius: 4px 4px 0 0; border: 1.5px solid var(--ink); border-bottom: 0; transition: opacity .18s; }
.spark:hover .b { opacity: .5; }
.spark .col:hover .b { opacity: 1; }
.spark-empty {
  margin-top: 16px; padding-top: 12px; border-top: 2px dashed var(--line-soft);
  font-size: 12.5px; color: var(--txt-dim);
}
.bars-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--txt-dim); margin-top: 8px; flex-wrap: wrap; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 3px; border: 1.5px solid var(--ink); display: inline-block; margin-right: 6px; vertical-align: -1px; }

.budget-bar { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-top: 14px; border: var(--stroke-thin); }
.budget-bar i { display: block; height: 100%; background: var(--accent); transition: width .5s var(--ease); }
.budget-bar.over i { background: var(--bad); }

/* ───────── formularios ───────── */
label.f { display: block; margin-bottom: 13px; }
label.f > span { display: block; font-size: 12.5px; color: var(--txt-dim); margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; background: var(--surface); border: var(--stroke); border-radius: var(--r-sm);
  padding: 10px 12px; outline: none; transition: box-shadow .18s var(--ease);
}
input::placeholder, textarea::placeholder { color: #b39aa3; }
input:focus, select:focus, textarea:focus { box-shadow: 3px 3px 0 var(--accent); outline: none; }
textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }

label.check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 14px; cursor: pointer; }
label.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex: none; }
label.check span { font-size: 13.5px; }
label.check i { display: block; font-style: normal; color: var(--txt-dim); font-size: 12.5px; margin-top: 2px; }

/* Botones: rectangulares con trazo; se hunden al pulsar, como en la tienda. */
.btn {
  border: var(--stroke); border-radius: 12px; padding: 10px 18px;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: -.01em;
  cursor: pointer; background: var(--accent); color: #fff; display: inline-flex;
  align-items: center; gap: 7px; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .18s var(--ease);
}
.btn:hover { background: #ff4a7c; transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.danger:hover { background: #e8504a; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: var(--shadow-sm); transform: none; }
.btn svg { width: 15px; height: 15px; }

/* ───────── tablas ───────── */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; color: var(--txt-dim); font-size: 12px; font-weight: 700;
  padding: 9px 10px; border-bottom: var(--stroke);
  text-transform: uppercase; letter-spacing: .06em;
}
.table td { padding: 11px 10px; border-bottom: 1.5px dashed var(--line-soft); font-variant-numeric: tabular-nums; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }

/* ───────── pestañas ───────── */
.tabs { display: flex; gap: 4px; border-bottom: var(--stroke); margin: 22px 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--txt-dim);
  font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: -.02em;
  border-bottom: 4px solid transparent; margin-bottom: -2px;
  white-space: nowrap; transition: color .18s var(--ease), border-color .18s var(--ease);
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }

/* ───────── hilo y peticiones ───────── */
.msg { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1.5px dashed var(--line-soft); }
.msg:last-child { border-bottom: 0; }
.msg .who-n { font-family: var(--display); font-size: 13.5px; font-weight: 800; }
.msg .when { font-size: 11.5px; color: var(--txt-faint); }
.msg .body { font-size: 14px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; max-width: 62ch; }

.req { display: flex; gap: 13px; align-items: flex-start; padding: 13px 0; border-bottom: 1.5px dashed var(--line-soft); }
.req:last-child { border-bottom: 0; }
.req input[type=checkbox] { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; cursor: pointer; }
.req.done .req-title { text-decoration: line-through; color: var(--txt-faint); }
.req-title { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
.req-meta { font-size: 12px; color: var(--txt-dim); margin-top: 4px; }
.req-body { font-size: 13.5px; color: var(--txt-dim); margin-top: 7px; white-space: pre-wrap; max-width: 62ch; }
.req-actions { display: flex; gap: 6px; }

.banner {
  border-radius: var(--r-md); padding: 12px 15px; font-size: 13.5px; display: flex; gap: 11px;
  align-items: flex-start; margin-bottom: 14px; border: var(--stroke); box-shadow: var(--shadow-sm);
}
.banner svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.banner.warn { background: #fff0d0; color: var(--ink); }
.banner.info { background: var(--accent-soft); color: var(--ink); }
.banner a { text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }

.empty { text-align: center; padding: 48px 20px; color: var(--txt-dim); }
.empty svg { width: 34px; height: 34px; opacity: .45; margin-bottom: 14px; }
.empty h3 { font-family: var(--display); color: var(--ink); font-size: 18px; margin: 0 0 7px; font-weight: 800; letter-spacing: -.03em; }
.empty p { margin: 0 auto; max-width: 42ch; font-size: 13.5px; }

/* ───────── carga ───────── */
.skeleton { border-radius: var(--r-lg); background: var(--bg-soft); border: var(--stroke); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  animation: sweep 1.4s infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }

/* Entrada escalonada: transform + opacity, nada de animar layout. */
.rise { animation: rise .42s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ───────── modal ───────── */
.modal-bg {
  position: fixed; inset: 0; background: rgba(36, 16, 25, .55);
  display: grid; place-items: center; padding: 16px; z-index: 80; overflow-y: auto;
  animation: fade .18s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--surface); border: var(--stroke); border-radius: 20px; padding: 22px;
  width: min(560px, 100%); box-shadow: 8px 10px 0 var(--ink); max-height: 92vh; overflow-y: auto;
  animation: rise .28s var(--ease) both;
}
.modal h2 { margin-bottom: 18px; font-size: 21px; letter-spacing: -.035em; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); border: 2px solid var(--ink); border-radius: 12px;
  padding: 11px 18px; font-size: 13.5px; font-weight: 600;
  box-shadow: 4px 5px 0 var(--accent); animation: pop .22s var(--ease);
}
.toast.err { background: var(--bad); color: #fff; border-color: var(--ink); box-shadow: 4px 5px 0 var(--ink); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ───────── entrar ───────── */
.login-wrap {
  min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  position: relative; z-index: 2; overflow: hidden;
}
/* Manchas de color detrás de la tarjeta, como en la tienda */
.login-wrap::before, .login-wrap::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; pointer-events: none;
}
.login-wrap::before { width: 60vw; max-width: 480px; aspect-ratio: 1; background: #ffb9cd; opacity: .55; top: -12%; left: -14%; }
.login-wrap::after { width: 50vw; max-width: 400px; aspect-ratio: 1; background: #a9e8f8; opacity: .5; bottom: -14%; right: -12%; }
.login-card { width: min(392px, 100%); }
.login-card .card { padding: 26px; box-shadow: var(--shadow-lift); }
.login-head { text-align: center; margin-bottom: 22px; }
.login-head .logo { justify-content: center; font-size: 22px; }
.login-head p { color: var(--txt-dim); font-size: 13.5px; margin: 12px 0 0; }
.err { color: var(--bad); font-size: 13px; margin-top: 11px; min-height: 18px; font-weight: 600; }

@media (max-width: 720px) { .hide-sm { display: none; } }
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .kpi .v { font-size: 23px; }
  .grid.cards { grid-template-columns: 1fr; }
  .row3 { grid-template-columns: 1fr 1fr; }
  .topbar-in { flex-wrap: wrap; row-gap: 9px; }
  .nav { order: 3; width: 100%; }
  .wrap { padding: 0 14px 72px; }
  .scroll-x { margin: 0 -14px; padding: 0 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  /* En móvil el modal sube desde abajo como una hoja, no flota en el centro. */
  .modal-bg { place-items: end center; padding: 0; }
  .modal { border-radius: 20px 20px 0 0; max-height: 94dvh; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: none; border-bottom: 0; }
  @keyframes rise { from { opacity: 0; transform: translateY(26px); } }
}
@media (prefers-reduced-motion: reduce) { *, *::after { animation: none !important; transition: none !important; } }

/* Salto al contenido para quien navega con teclado. */
.skip {
  position: absolute; left: -9999px; top: 10px; z-index: 100;
  background: var(--surface); border: var(--stroke); border-radius: var(--r-sm);
  padding: 9px 14px; font-size: 13.5px; font-weight: 600;
}
.skip:focus { left: 18px; }

/* ───────── presupuesto en la tarjeta ───────── */
.budget { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.budget-txt { flex: 1; min-width: 0; font-size: 12.5px; color: var(--txt); }
.budget-txt b { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.budget-bar { margin-top: 8px; }
.icon-btn {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
  background: var(--mango); border: var(--stroke); border-radius: 9px; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.icon-btn svg { width: 15px; height: 15px; }
h1 .icon-btn { vertical-align: middle; margin-left: 6px; }

/* ───────── menú de acciones ───────── */
.menu {
  position: absolute; z-index: 90; width: 236px; padding: 6px;
  background: var(--surface); border: var(--stroke); border-radius: var(--r-md);
  box-shadow: var(--shadow-lift); animation: rise .16s var(--ease) both;
}
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer; padding: 9px 10px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--ink); transition: background .15s var(--ease);
}
.menu button:hover { background: var(--bg-soft); }
.menu button.danger { color: var(--bad); }
.menu button.danger:hover { background: #ffe3e1; }
.menu button svg { width: 16px; height: 16px; flex: none; opacity: .85; }

/* ───────── plataformas y reparto ───────── */
.plats { display: flex; gap: 8px; margin-top: 14px; }
.plat {
  display: inline-flex; align-items: center; gap: 7px; flex: 1; justify-content: center;
  padding: 8px 10px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700;
  background: var(--surface-2); border: var(--stroke-thin); color: var(--txt-dim);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease), transform .12s var(--ease), box-shadow .12s var(--ease);
}
button.plat { cursor: pointer; }
button.plat:hover { color: var(--ink); }
button.plat:active { transform: translate(2px, 2px); box-shadow: none; }
.plat svg { width: 17px; height: 17px; flex: none; }
.plat .tt-duo path, .plat .tt-duo2 path { fill: transparent; }

/* Encendidas: cada una con su color de marca, con trazo para que "se vea pulsada". */
.plat.meta.on { color: var(--ink); border: var(--stroke); background: #dceaff; box-shadow: var(--shadow-sm); }
.plat.tiktok.on { color: var(--ink); border: var(--stroke); background: #ffe0e7; box-shadow: var(--shadow-sm); }
.plat.tiktok.on .tt-duo path { fill: #25f4ee; }
.plat.tiktok.on .tt-duo2 path { fill: #fe2c55; }

.split-bar {
  display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin-top: 10px;
  background: var(--bg); border: var(--stroke-thin);
}
.split-bar i { display: block; transition: width .25s var(--ease); }
.split-bar .m { background: #0866ff; }
.split-bar .t { background: #fe2c55; }
.split-legend { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--txt-dim); margin-top: 7px; flex-wrap: wrap; font-weight: 600; }

/* El mando del reparto. Pista bicolor para que se entienda sin leer. */
.split-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin-top: 4px;
  background: transparent; cursor: pointer;
}
.split-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; border: 1.5px solid var(--ink); background: linear-gradient(90deg, #0866ff, #fe2c55); }
.split-range::-moz-range-track { height: 6px; border-radius: 999px; border: 1.5px solid var(--ink); background: linear-gradient(90deg, #0866ff, #fe2c55); }
.split-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); margin-top: -8px;
}
.split-range::-moz-range-thumb {
  width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.split-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 999px; }
