/* ============================================================
   QUANTIC · CRM — Sistema de diseño (grafito + índigo)
   Estética Apple: limpio, aire, sombras suaves, esquinas redondeadas
   ============================================================ */

:root {
  /* Neutros grafito / pizarra */
  --bg:      #F4F6FA;
  --panel:   #FFFFFF;
  --panel-2: #F8FAFC;
  --line:    rgba(15, 23, 42, .09);
  --line-2:  rgba(15, 23, 42, .05);

  /* Sidebar oscuro */
  --side:    #141B2D;
  --side-2:  #1C2540;
  --side-line: rgba(255, 255, 255, .08);
  --side-ink:  rgba(255, 255, 255, .62);
  --side-ink-strong: #FFFFFF;

  /* Tinta */
  --ink:   #0F172A;
  --ink-2: #475569;
  --ink-3: #94A3B8;

  /* Acento índigo (CRM) + cian de marca (guiño) */
  --acc:      #5A57E8;
  --acc-deep: #4A46D6;
  --acc-soft: #ECECFD;
  --brand:    #0E80B6;
  --brand-soft: #E3F2F9;

  /* Semánticos */
  --ok:   #16A34A;  --ok-soft:   #DCFCE7;
  --warn: #D97706;  --warn-soft: #FEF3C7;
  --bad:  #DC2626;  --bad-soft:  #FEE2E2;

  /* Geometría */
  --r-lg: 16px;
  --r:    12px;
  --r-sm: 9px;
  --sb-w: 264px;
  --top-h: 66px;

  --sh-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --sh:    0 10px 30px -14px rgba(15,23,42,.22);
  --sh-lg: 0 24px 50px -24px rgba(15,23,42,.32);

  --ease: cubic-bezier(.32,.72,0,1);
  --f-ui: 'Instrument Sans', system-ui, sans-serif;
  --f-num: 'Fraunces', Georgia, serif;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-ui); font-size: 14.5px; line-height: 1.5;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
::selection { background: var(--acc); color: #fff; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sb-w) 1fr; min-height: 100vh; }
.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: clamp(1.1rem, 2.5vw, 2rem); max-width: 1360px; width: 100%; margin-inline: auto; min-width: 0; }
/* Evita que tablas (min-width) desborden en móvil: los contenedores deben poder encogerse */
.stack, .card, .side-cards, .dash-grid, .edit-grid, .kpis { min-width: 0; }
.stack > *, .dash-grid > *, .edit-grid > * { min-width: 0; }

/* ---------- Sidebar ---------- */
.side {
  background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; gap: .2rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 1rem .8rem 1.2rem;
}
.side::-webkit-scrollbar { width: 6px; } .side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.side__brand { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem 1rem; }
.side__brand img { height: 26px; width: auto; }
.side__brand b { font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.side__sec { font-size: .62rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.32); padding: 1rem .8rem .35rem; }
.nav-i {
  display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-radius: var(--r-sm);
  color: var(--side-ink); font-weight: 500; font-size: .92rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-i:hover { background: var(--side-2); color: var(--side-ink-strong); }
.nav-i svg { width: 1.15rem; height: 1.15rem; flex: none; opacity: .85; }
.nav-i.is-active { background: linear-gradient(90deg, var(--acc), var(--acc-deep)); color: #fff; box-shadow: 0 8px 20px -10px var(--acc); }
.nav-i.is-active svg { opacity: 1; }
.nav-i__badge { margin-left: auto; background: rgba(255,255,255,.16); color: #fff; font-size: .68rem; font-weight: 700; padding: .1em .5em; border-radius: 99px; }
.nav-i.is-active .nav-i__badge { background: rgba(255,255,255,.25); }
.side__foot { margin-top: auto; padding-top: 1rem; }
.side__user { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--r-sm); background: rgba(255,255,255,.05); }
.side__user .ava { width: 2rem; height: 2rem; border-radius: 50%; background: linear-gradient(135deg,var(--acc),var(--brand)); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: .8rem; flex: none; }
.side__user b { font-size: .82rem; color: #fff; display: block; line-height: 1.2; }
.side__user span { font-size: .72rem; color: rgba(255,255,255,.45); }

/* ---------- Topbar ---------- */
.top {
  height: var(--top-h); position: sticky; top: 0; z-index: 20;
  background: rgba(244,246,250,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem; padding: 0 clamp(1.1rem, 2.5vw, 2rem);
}
.top__burger { display: none; width: 2.4rem; height: 2.4rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); align-items: center; justify-content: center; }
.top__burger svg { width: 1.2rem; height: 1.2rem; }
.top__title { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.top__search { margin-left: auto; position: relative; width: min(22rem, 34vw); }
.top__search input { width: 100%; font: inherit; font-size: .9rem; padding: .55rem .9rem .55rem 2.3rem; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.top__search input::placeholder { color: var(--ink-3); }
.top__search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); width: 1.05rem; height: 1.05rem; color: var(--ink-3); }
@media (max-width: 62em) { .top__search { display: none; } }
.top__btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; position: relative; color: var(--ink-2); transition: background .2s; }
.top__btn:hover { background: var(--panel-2); }
.top__btn svg { width: 1.2rem; height: 1.2rem; }
.top__btn .dot { position: absolute; top: .45rem; right: .5rem; width: .5rem; height: .5rem; background: var(--acc); border-radius: 50%; border: 2px solid var(--bg); }
.top__country { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-size: .85rem; font-weight: 500; }
.top__country .flag { width: 1.1rem; height: .8rem; border-radius: 2px; overflow: hidden; display: inline-block; }
.top__country svg { width: 1rem; height: 1rem; color: var(--ink-3); flex: none; }
@media (max-width: 48em) { .top__country span { display: none; } }

/* ---------- Encabezado de página ---------- */
.phead { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.phead h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; letter-spacing: -.02em; }
.phead .crumb { font-size: .8rem; color: var(--ink-3); margin-bottom: .3rem; }
.phead .crumb a:hover { color: var(--ink-2); }
.phead__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; font-size: .9rem; padding: .6rem 1.1rem; border-radius: var(--r-sm); border: 1px solid transparent; background: var(--acc); color: #fff; box-shadow: 0 10px 22px -12px var(--acc); transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s; }
.btn:hover { background: var(--acc-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05rem; height: 1.05rem; }
.btn--ghost { background: var(--panel); color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--panel-2); border-color: rgba(15,23,42,.16); }
.btn--soft { background: var(--acc-soft); color: var(--acc-deep); box-shadow: none; }
.btn--soft:hover { background: #e0e0fb; }
.btn--sm { padding: .4rem .75rem; font-size: .82rem; }
.btn--danger-ghost { background: transparent; color: var(--bad); border-color: transparent; box-shadow: none; }
.btn--danger-ghost:hover { background: var(--bad-soft); }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.card__h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line-2); }
.card__h h2 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.card__h .sub { font-size: .8rem; color: var(--ink-3); }
.card__b { padding: 1.2rem; }
.card__b--flush { padding: 0; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
@media (max-width: 68em) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 34em) { .kpis { grid-template-columns: 1fr; } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.2rem; box-shadow: var(--sh-sm); position: relative; overflow: hidden; }
.kpi__ico { width: 2.2rem; height: 2.2rem; border-radius: 10px; display: grid; place-items: center; margin-bottom: .8rem; }
.kpi__ico svg { width: 1.2rem; height: 1.2rem; }
.kpi__ico--acc { background: var(--acc-soft); color: var(--acc-deep); }
.kpi__ico--brand { background: var(--brand-soft); color: var(--brand); }
.kpi__ico--ok { background: var(--ok-soft); color: var(--ok); }
.kpi__ico--warn { background: var(--warn-soft); color: var(--warn); }
.kpi__label { font-size: .78rem; color: var(--ink-3); font-weight: 500; }
.kpi__val { font-family: var(--f-num); font-weight: 560; font-size: 1.9rem; letter-spacing: -.02em; line-height: 1.1; margin-top: .15rem; }
.kpi__trend { font-size: .78rem; font-weight: 600; margin-top: .4rem; display: inline-flex; align-items: center; gap: .25em; white-space: nowrap; }
.kpi__trend svg { width: .9rem; height: .9rem; flex: none; }
.kpi__trend.up { color: var(--ok); } .kpi__trend.down { color: var(--bad); }

/* ---------- Grid dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 68em) { .dash-grid { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 1rem; }

/* ---------- Tabla ---------- */
.tablewrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 640px; }
.tbl th { text-align: left; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: .8rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .85rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl .prodcell { display: flex; align-items: center; gap: .8rem; }
.tbl .prodcell img { width: 2.6rem; height: 2.6rem; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; flex: none; }
.tbl .prodcell b { font-weight: 600; display: block; }
.tbl .prodcell span { font-size: .76rem; color: var(--ink-3); }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .rowact { display: inline-flex; gap: .3rem; }
.iconbtn { width: 2rem; height: 2rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--ink-2); }
.iconbtn:hover { background: var(--panel-2); color: var(--ink); }
.iconbtn svg { width: 1rem; height: 1rem; }
.checkcell { width: 1px; }
.chk { width: 1.05rem; height: 1.05rem; border-radius: 5px; border: 1.5px solid var(--line); accent-color: var(--acc); }

/* ---------- Chips / badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .35em; font-size: .74rem; font-weight: 600; padding: .25em .7em; border-radius: 99px; }
.badge i { width: .45em; height: .45em; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--ok); background: var(--ok-soft); }
.badge--warn { color: var(--warn); background: var(--warn-soft); }
.badge--bad { color: var(--bad); background: var(--bad-soft); }
.badge--muted { color: var(--ink-2); background: rgba(15,23,42,.06); }
.badge--acc { color: var(--acc-deep); background: var(--acc-soft); }
.chip { display: inline-flex; align-items: center; gap: .35em; font-size: .74rem; font-weight: 600; padding: .2em .6em; border-radius: 6px; background: rgba(15,23,42,.05); color: var(--ink-2); }
.chip i { width: .5em; height: .5em; border-radius: 50%; }
.chip--salud i { background: var(--brand); } .chip--recovery i { background: #DE4B2C; } .chip--pet i { background: #3E8E6E; }
.flag { width: 1.15rem; height: .82rem; border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; box-shadow: 0 0 0 1px var(--line); }

/* ---------- Toolbar de filtros ---------- */
.toolbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line-2); }
.toolbar .field-inline { position: relative; }
.toolbar .field-inline svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--ink-3); }
.toolbar input, .toolbar select { font: inherit; font-size: .85rem; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); }
.toolbar input[type=search] { padding-left: 2.1rem; min-width: 15rem; }
.toolbar .spacer { margin-left: auto; }
.tablefoot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.2rem; border-top: 1px solid var(--line-2); font-size: .82rem; color: var(--ink-3); flex-wrap: wrap; }
.pager { display: inline-flex; gap: .3rem; }
.pager a { min-width: 2rem; height: 2rem; padding: 0 .5rem; border-radius: 8px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; color: var(--ink-2); background: var(--panel); }
.pager a.is-active { background: var(--acc); color: #fff; border-color: var(--acc); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field:last-child { margin-bottom: 0; }
.field > label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .75rem; color: var(--ink-3); }
.inp, .sel, .ta { font: inherit; font-size: .92rem; width: 100%; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
.inp:focus, .sel:focus, .ta:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.ta { min-height: 7rem; resize: vertical; line-height: 1.6; }
.sel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 1.05em; padding-right: 2.4rem; }
.inp-group { display: flex; align-items: stretch; }
.inp-group .addon { display: inline-flex; align-items: center; padding: 0 .8rem; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-3); font-size: .88rem; font-weight: 600; }
.inp-group .addon:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); border-right: 0; }
.inp-group .addon:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: 0; }
.inp-group .inp { border-radius: 0; }
.inp-group .inp:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.inp-group .inp:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 42em) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Editor de texto (mock) */
.rte__bar { display: flex; flex-wrap: wrap; gap: .15rem; padding: .4rem; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-sm) var(--r-sm) 0 0; background: var(--panel-2); }
.rte__bar button { width: 2rem; height: 2rem; border-radius: 6px; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; font-weight: 700; }
.rte__bar button:hover { background: #fff; color: var(--ink); }
.rte__bar .sep { width: 1px; background: var(--line); margin: .3rem .2rem; }
.rte__area { border-radius: 0 0 var(--r-sm) var(--r-sm); min-height: 9rem; }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 2.4rem; height: 1.4rem; border-radius: 99px; background: rgba(15,23,42,.16); transition: background .25s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--acc); }
.switch input:checked + .track::after { transform: translateX(1rem); }
.switch .lbl { font-size: .86rem; font-weight: 500; }

/* ---------- Media (fotos y vídeos) ---------- */
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .8rem; }
.media__item { position: relative; aspect-ratio: 1/1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.media__item img { width: 100%; height: 100%; object-fit: cover; }
.media__item .tagv { position: absolute; left: .4rem; top: .4rem; background: rgba(15,23,42,.8); color: #fff; font-size: .62rem; font-weight: 700; padding: .15em .5em; border-radius: 5px; display: inline-flex; align-items: center; gap: .25em; }
.media__item .rm { position: absolute; right: .35rem; top: .35rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: rgba(15,23,42,.7); color: #fff; border: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.media__item:hover .rm { opacity: 1; }
.media__item .rm svg { width: .8rem; height: .8rem; }
.media__item.is-cover::after { content: "Portada"; position: absolute; bottom: .4rem; left: .4rem; background: var(--acc); color: #fff; font-size: .6rem; font-weight: 700; padding: .15em .5em; border-radius: 5px; }
.media__vid { display: grid; place-items: center; }
.media__vid::after { content: ""; position: absolute; inset: 0; margin: auto; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230F172A'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E") center/1rem no-repeat; }
.dropzone { aspect-ratio: 1/1; border: 2px dashed rgba(90,87,232,.4); border-radius: var(--r); background: var(--acc-soft); display: grid; place-content: center; justify-items: center; gap: .4rem; text-align: center; color: var(--acc-deep); padding: .8rem; transition: background .2s, border-color .2s; }
.dropzone:hover { background: #e6e6fc; border-color: var(--acc); }
.dropzone svg { width: 1.6rem; height: 1.6rem; }
.dropzone b { font-size: .82rem; } .dropzone span { font-size: .7rem; color: var(--ink-3); }

/* ---------- Tabs (datos del producto) ---------- */
.tabs { display: flex; gap: .2rem; padding: .3rem; background: var(--panel-2); border-radius: var(--r); border: 1px solid var(--line-2); overflow-x: auto; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: .5em; padding: .55rem .9rem; border: 0; background: transparent; border-radius: var(--r-sm); font-weight: 600; font-size: .86rem; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s; }
.tabs button svg { width: 1rem; height: 1rem; }
.tabs button:hover { color: var(--ink); }
.tabs button.is-active { background: var(--panel); color: var(--acc-deep); box-shadow: var(--sh-sm); }
.tabpane { display: none; padding-top: 1.3rem; }
.tabpane.is-active { display: block; }

/* Tabla de precios por país */
.ctable { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ctable th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; padding: .5rem .6rem; }
.ctable td { padding: .5rem .6rem; border-top: 1px solid var(--line-2); vertical-align: middle; }
.ctable .cname { display: flex; align-items: center; gap: .55rem; font-weight: 600; white-space: nowrap; }
.ctable .inp { padding: .45rem .6rem; }
.ctable .inp-group .addon { padding: 0 .6rem; }

/* ---------- Editor layout ---------- */
.edit-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.2rem; align-items: start; }
@media (max-width: 70em) { .edit-grid { grid-template-columns: 1fr; } }
.side-cards { display: grid; gap: 1rem; position: sticky; top: calc(var(--top-h) + 1rem); }
@media (max-width: 70em) { .side-cards { position: static; } }
.checklist { display: grid; gap: .6rem; }
.checkline { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.checkline input { width: 1.05rem; height: 1.05rem; accent-color: var(--acc); }
.pubrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .88rem; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.pubrow:last-of-type { border-bottom: 0; }
.pubrow .k { color: var(--ink-2); display: inline-flex; align-items: center; gap: .45em; }
.pubrow .k svg { width: 1rem; height: 1rem; color: var(--ink-3); }
.feat-img { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: #fff; }
.feat-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
@media (max-width: 60em) { .login { grid-template-columns: 1fr; } .login__brand { display: none; } }
.login__brand { position: relative; overflow: hidden; color: #fff; padding: clamp(2rem,5vw,4rem); display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(40rem 30rem at 80% -10%, rgba(90,87,232,.5), transparent 60%), radial-gradient(34rem 26rem at 0% 110%, rgba(14,128,182,.4), transparent 60%), var(--side); }
.login__brand img { height: 34px; width: auto; align-self: flex-start; }
.login__brand h2 { font-family: var(--f-num); font-weight: 420; font-size: clamp(1.8rem,3.5vw,2.8rem); line-height: 1.15; letter-spacing: -.02em; max-width: 12em; }
.login__brand p { color: rgba(255,255,255,.6); max-width: 30em; margin-top: 1rem; }
.login__brand .pill { display: inline-flex; align-items: center; gap: .5em; font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: .4em 1em; border-radius: 99px; width: max-content; }
.login__form { display: grid; place-items: center; padding: 2rem; }
.login__card { width: min(24rem, 100%); }
.login__card h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; }
.login__card > p { color: var(--ink-3); font-size: .9rem; margin: .3rem 0 1.6rem; }
.login__card .btn { width: 100%; justify-content: center; margin-top: .4rem; padding: .7rem; }
.login__meta { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; margin: -.4rem 0 1rem; }
.login__meta a { color: var(--acc-deep); font-weight: 600; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 1.4rem; left: 50%; transform: translate(-50%, 2rem); z-index: 90; background: var(--side); color: #fff; border-radius: 99px; padding: .75rem 1.4rem; font-size: .9rem; font-weight: 500; display: inline-flex; align-items: center; gap: .6rem; box-shadow: var(--sh-lg); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s .35s; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.toast svg { width: 1.1rem; height: 1.1rem; color: #6ee7a8; }

/* ---------- Scrim móvil sidebar ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 29; opacity: 0; visibility: hidden; transition: opacity .3s; }

/* ---------- Responsive sidebar ---------- */
@media (max-width: 62em) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; z-index: 40; width: var(--sb-w); transform: translateX(-100%); transition: transform .3s var(--ease); }
  body.side-open .side { transform: none; }
  body.side-open .scrim { opacity: 1; visibility: visible; }
  .top__burger { display: inline-flex; }
}

/* Utilidades */
.muted { color: var(--ink-3); }
.mt { margin-top: 1rem; } .mt2 { margin-top: 1.5rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stat-list { display: grid; gap: .1rem; }
.stat-row { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
.stat-row:last-child { border-bottom: 0; }
.stat-row img { width: 2.4rem; height: 2.4rem; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.stat-row .g { flex: 1; min-width: 0; } .stat-row b { font-weight: 600; font-size: .88rem; display: block; } .stat-row span { font-size: .76rem; color: var(--ink-3); }
.mini-bar { height: 6px; border-radius: 99px; background: rgba(15,23,42,.08); overflow: hidden; margin-top: .35rem; }
.mini-bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg,var(--acc),var(--brand)); }
