/* Estilo admin de Shopify (Polaris): barra superior oscura, menú lateral, tarjetas blancas sobre gris, badges suaves. Un solo tema claro, como el admin. */
:root{
  --bg:#F1F1F1; --side:#EBEBEB; --surface:#FFFFFF; --surface-2:#F7F7F7; --hover:#FAFAFA;
  --ink:#303030; --muted:#616161; --line:#E3E3E3; --line-2:#EBEBEB; --input:#8A8A8A;
  --top:#1A1A1A; --link:#005BD3; --focus:#005BD3;
  --accent:#8E1F0B; --accent-soft:#FEDAD9; --accent-ink:#FFFFFF;
  --tofu:#00527C; --tofu-soft:#E0F0FF; --mofu:#4F4700; --mofu-soft:#FFEF9D; --bofu:#0C5132; --bofu-soft:#CDFEE1;
  --win:#CDFEE1; --win-ink:#0C5132; --win-bar:#29845A;
  --good:#29845A; --bad:#C70A24;
  --card-shadow:0 1px 0 0 rgba(26,26,26,.07),inset 0 1px 0 0 rgba(208,208,208,.4),inset 0 -1px 0 0 rgba(204,204,204,.5),inset -1px 0 0 0 rgba(204,204,204,.5),inset 1px 0 0 0 rgba(204,204,204,.5);
  --shadow:var(--card-shadow);
  --display:"Inter",-apple-system,BlinkMacSystemFont,"San Francisco","Segoe UI",Roboto,sans-serif;
  --body:"Inter",-apple-system,BlinkMacSystemFont,"San Francisco","Segoe UI",Roboto,sans-serif;
  --mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--bg);color:var(--ink);font:14px/1.45 var(--body);-webkit-font-smoothing:antialiased;font-feature-settings:"cv11"}
h1,h2,h3{font-family:var(--display);text-wrap:balance;margin:0;line-height:1.25;font-weight:650;letter-spacing:-.005em}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--focus);outline-offset:1px}
img,video{max-width:100%;display:block}
/* Marco */
.topbar{height:56px;background:var(--top);color:#E3E3E3;display:flex;align-items:center;justify-content:space-between;padding:0 16px;position:sticky;top:0;z-index:10}
.logo{display:flex;align-items:center;gap:14px}
.logo b{color:#fff;font-size:17px;font-weight:700;letter-spacing:-.02em}
.logo-img{display:flex;align-items:center;height:40px;border-radius:6px;padding:2px 0;cursor:pointer;position:relative}
.logo-img img{height:100%;width:auto;max-width:160px;object-fit:contain}
.logo-img:focus-within{outline:2px solid #fff;outline-offset:2px}
.logo-up{font-size:12px;font-weight:550;color:#E3E3E3;background:#303030;border-radius:8px;padding:5px 10px;cursor:pointer;position:relative;white-space:nowrap}
.logo-up:hover{background:#4A4A4A}
.logo-up:focus-within{outline:2px solid #fff;outline-offset:2px}
.logo span{font-size:12px;font-weight:550;background:#303030;color:#E3E3E3;padding:3px 8px;border-radius:8px}
.avatar{width:30px;height:30px;border-radius:8px;background:#36FBA1;color:#0C5132;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.layout{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:calc(100% - 56px)}
.side{background:var(--side);padding:12px 8px;display:flex;flex-direction:column;gap:2px;border-right:1px solid var(--line)}
.tab{display:flex;align-items:center;gap:8px;width:100%;background:none;border:0;border-radius:8px;padding:6px 8px;font-size:13px;font-weight:550;color:var(--ink);cursor:pointer;text-align:left;white-space:nowrap}
.tab svg{width:20px;height:20px;flex-shrink:0;fill:#4A4A4A}
.tab:hover{background:rgba(0,0,0,.05)}
.tab[aria-selected="true"]{background:var(--surface);box-shadow:0 1px 0 rgba(0,0,0,.08),0 0 0 1px rgba(0,0,0,.04);font-weight:650}
.tab[aria-selected="true"] svg{fill:var(--ink)}
.tab .count{margin-left:auto;font-size:12px;font-weight:550;color:var(--muted);font-variant-numeric:tabular-nums}
.wrap{max-width:1000px;width:100%;margin:0 auto;padding:20px 24px 80px;display:flex;flex-direction:column;gap:16px}
.top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.brand{display:flex;flex-direction:column;gap:2px}
.brand h1{font-size:20px;font-weight:700}
.brand small{font-size:13px;color:var(--muted)}
/* Botones */
.btn{border:0;background:var(--surface);border-radius:8px;padding:6px 12px;font-size:13px;font-weight:550;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;color:var(--ink);
  box-shadow:inset 0 -1px 0 0 #B5B5B5,inset 0 0 0 1px rgba(0,0,0,.1),inset 0 .5px 0 1.5px #fff}
.btn:hover{background:var(--hover)}
.btn:active{box-shadow:inset 0 2px 1px rgba(26,26,26,.2)}
.btn.primary{background:linear-gradient(180deg,#3C3C3C,#303030);color:#fff;box-shadow:inset 0 -1px 0 1px rgba(0,0,0,.8),inset 0 0 0 1px #303030,inset 0 .5px 0 1.5px rgba(255,255,255,.25)}
.btn.primary:hover{background:#1A1A1A}
.btn.ghost{background:transparent;box-shadow:none}
.btn.ghost:hover{background:rgba(0,0,0,.05)}
.btn.danger{background:transparent;color:#C70A24;box-shadow:none}
.btn.danger:hover{background:#FEE9E8}
.btn.small{padding:4px 10px;font-size:12px}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.banner{background:#EAF4FF;color:#00527C;border-radius:12px;padding:10px 14px;font-size:13px;box-shadow:inset 0 0 0 1px #C3DEFF}
/* Resumen por estado */
.pipe{display:grid;grid-template-columns:repeat(7,minmax(100px,1fr));gap:0;overflow-x:auto;background:var(--surface);border-radius:12px;box-shadow:var(--card-shadow)}
.pipe button{background:none;border:0;border-right:1px solid var(--line-2);padding:10px 12px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:2px}
.pipe button:last-child{border-right:0}
.pipe button:hover{background:var(--hover)}
.pipe button[aria-pressed="true"]{background:var(--surface-2);box-shadow:inset 0 -2px 0 var(--ink)}
.pipe .k{font-size:12px;color:var(--muted);font-weight:550}
.pipe .v{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.filters input,.filters select{background:var(--surface);border:1px solid var(--input);border-radius:8px;padding:6px 10px;min-width:0;font-size:13px}
.filters input{flex:1 1 220px;width:auto}
.filters select{width:auto;flex:0 1 200px}
.stack{min-width:0}
/* Tarjetas de creativos */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}
.card{position:relative;text-align:left;background:var(--surface);border:0;border-radius:12px;padding:14px;cursor:pointer;display:flex;flex-direction:column;gap:8px;box-shadow:var(--card-shadow)}
.card:hover{background:var(--hover)}
.card.is-win{box-shadow:var(--card-shadow),inset 0 3px 0 0 var(--win-bar)}
.st-TOFU{--stage:var(--tofu);--stage-soft:var(--tofu-soft)}
.st-MOFU{--stage:var(--mofu);--stage-soft:var(--mofu-soft)}
.st-BOFU{--stage:var(--bofu);--stage-soft:var(--bofu-soft)}
.card h3{font-size:14px;font-weight:650}
.row{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.chip,.pill,.tier,.tag-ej{display:inline-flex;align-items:center;font-size:12px;font-weight:550;padding:2px 8px;border-radius:8px;line-height:16px;white-space:nowrap}
.chip{background:var(--stage-soft,rgba(0,0,0,.06));color:var(--stage,var(--muted))}
.pill{background:rgba(0,0,0,.06);color:#4A4A4A}
.pill.on{background:#E0F0FF;color:#00527C}
.tag-ej{background:#FFF1E3;color:#5E4200}
.meta{font-size:13px;color:var(--muted)}
.thumb{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:var(--surface-2)}
.foot{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);border-top:1px solid var(--line-2);padding-top:8px}
.empty{background:var(--surface);border-radius:12px;box-shadow:var(--card-shadow);padding:32px;text-align:center;color:var(--muted);display:flex;flex-direction:column;gap:12px;align-items:center}
.empty p{margin:0;max-width:50ch}
/* Banco */
.bank{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
.bcard{background:var(--surface);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--card-shadow)}
.bcard .bm{aspect-ratio:4/5;background:var(--surface-2);display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px;text-align:center;border-bottom:1px solid var(--line-2)}
.bcard .bm img,.bcard .bm video{width:100%;height:100%;object-fit:cover}
.bcard .bb{padding:12px;display:flex;flex-direction:column;gap:8px;flex:1}
.bcard .bb p{margin:0;font-size:13px}
.bcard .acts{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}
.link{color:var(--link);font-size:13px;word-break:break-all;text-decoration:none;font-weight:550}
.link:hover{text-decoration:underline}
/* Tarjetas de sección y tablas */
.fun{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.panel-card,.block,.tbl-wrap{min-width:0;max-width:100%}
.panel-card{background:var(--surface);border-radius:12px;padding:16px;box-shadow:var(--card-shadow);display:flex;flex-direction:column;gap:12px}
.panel-card h2{font-size:14px;font-weight:650}
.panel-card > p{margin:-6px 0 0;color:var(--muted);font-size:13px;max-width:70ch}
.tbl-wrap{overflow-x:auto;margin:0 -16px;border-top:1px solid var(--line-2)}
table{border-collapse:collapse;width:100%;min-width:520px;font-variant-numeric:tabular-nums;font-size:13px}
th,td{padding:8px 16px;border-bottom:1px solid var(--line-2);text-align:left;vertical-align:middle}
thead th{background:var(--surface-2);font-size:12px;color:var(--muted);font-weight:550}
tbody tr:hover{background:var(--hover)}
tbody tr:last-child td{border-bottom:0}
td .cell{display:flex;gap:8px;align-items:baseline}
td .n{font-weight:650;font-size:14px}
td .pct{font-size:12px;color:var(--muted)}
.bar{height:6px;background:var(--line-2);border-radius:3px;overflow:hidden;margin-top:4px}
.bar i{display:block;height:100%;background:var(--stage,var(--ink))}
.st-TOFU .bar i{background:#4AA5F0}.st-MOFU .bar i{background:#E8C800}.st-BOFU .bar i{background:#29845A}
tr.total td{font-weight:650;background:var(--surface-2)}
.legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.legend div{background:var(--stage-soft);color:var(--stage);border-radius:8px;padding:10px 12px;font-size:13px}
.legend b{display:block;font-size:13px;font-weight:650}
/* Ficha lateral */
.sheet-bg{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:20}
.panel{position:fixed;top:0;right:0;bottom:0;width:min(760px,100%);background:var(--bg);z-index:21;display:flex;flex-direction:column;box-shadow:0 0 0 1px rgba(0,0,0,.08),-12px 0 32px rgba(0,0,0,.18)}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);background:var(--surface)}
.panel-head h2{font-size:16px;font-weight:650;overflow-wrap:anywhere}
.eyebrow{margin:0;font-size:12px;color:var(--muted)}
.head-actions{display:flex;gap:8px;flex-shrink:0}
.panel-body{flex:1;overflow-y:auto;padding:16px;-webkit-overflow-scrolling:touch}
.panel-body fieldset{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:16px}
.panel-foot{display:flex;justify-content:space-between;gap:8px;padding:12px 16px;border-top:1px solid var(--line);background:var(--surface);flex-wrap:wrap}
.panel-foot .r{display:flex;gap:8px;margin-left:auto}
.block{background:var(--surface);border-radius:12px;padding:16px;box-shadow:var(--card-shadow);display:flex;flex-direction:column;gap:12px}
.block h3{font-size:14px;font-weight:650;display:flex;align-items:center;gap:8px}
.block h3 .num{font-size:11px;font-weight:650;width:20px;height:20px;border-radius:6px;background:rgba(0,0,0,.06);color:var(--muted);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.block > .hint{margin:-6px 0 0}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.fld{display:flex;flex-direction:column;gap:4px;min-width:0}
.fld.full{grid-column:1/-1}
.fld label,.lbl{font-size:13px;font-weight:450;color:var(--ink)}
.hint{margin:0;font-size:12px;color:var(--muted)}
input[type=text],input[type=url],input[type=date],input:not([type]),select,textarea{width:100%;background:var(--surface);border:1px solid var(--input);border-radius:8px;padding:6px 10px;min-width:0;font-size:13px;min-height:32px}
input:hover,select:hover,textarea:hover{background:var(--hover)}
input:focus,select:focus,textarea:focus{outline:2px solid var(--focus);outline-offset:1px;border-color:var(--ink)}
input[disabled],select[disabled],textarea[disabled]{background:var(--surface-2);border-color:var(--line);color:var(--muted)}
textarea{resize:vertical;line-height:1.45}
input.mono{font-family:var(--mono);font-size:12px}
.readout{background:var(--surface-2);border-radius:8px;padding:6px 10px;font-weight:650}
.scene,.ref-edit{display:grid;grid-template-columns:28px 1fr 32px;gap:10px;align-items:start;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--surface-2)}
.scene-n{font-weight:700;font-size:15px;color:var(--muted);text-align:center;padding-top:22px}
.scene-f{display:grid;grid-template-columns:100px 1fr 1fr;gap:8px}
.icon-btn{width:28px;height:28px;border-radius:8px;border:0;background:transparent;cursor:pointer;font-size:18px;line-height:1;color:var(--muted)}
.icon-btn:hover{background:var(--accent-soft);color:var(--accent)}
.ref-edit{grid-template-columns:140px 1fr 28px}
.ref-media{display:flex;flex-direction:column;gap:6px}
.ref-img{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:8px;background:var(--surface)}
.ref-ph{aspect-ratio:4/5;border:1px dashed var(--input);border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--muted);text-align:center;padding:6px;background:var(--surface)}
.ref-f{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.file{position:relative}
.file:focus-within{outline:2px solid var(--focus);outline-offset:1px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.stack{display:flex;flex-direction:column;gap:12px}
.stage-pick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stage-pick label{position:relative;border:1px solid var(--line);border-radius:10px;padding:8px 10px;cursor:pointer;display:flex;flex-direction:column;gap:2px;background:var(--surface)}
.stage-pick label:hover{background:var(--hover)}
.stage-pick label b{font-size:13px;font-weight:650}
.stage-pick label span{font-size:12px;color:var(--muted);line-height:1.3}
.stage-pick input{position:absolute;opacity:0}
.stage-pick label:has(input:checked){border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink);background:var(--stage-soft)}
.stage-pick label:focus-within{outline:2px solid var(--focus);outline-offset:1px}
/* Diálogo y aviso */
.dlg-bg{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:40;display:flex;align-items:center;justify-content:center;padding:16px}
.dlg{background:var(--surface);border-radius:12px;padding:16px;max-width:400px;width:100%;display:flex;flex-direction:column;gap:16px;box-shadow:0 20px 40px rgba(0,0,0,.25)}
.dlg p{margin:0}
.dlg .r{display:flex;justify-content:flex-end;gap:8px}
.dlg .btn.primary{background:linear-gradient(180deg,#E51C00,#C70A24);box-shadow:inset 0 -1px 0 1px #8E1F0B}
#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#1A1A1A;color:#fff;padding:10px 16px;border-radius:10px;font-size:13px;font-weight:550;z-index:50;opacity:0;pointer-events:none;transition:opacity .2s;max-width:calc(100% - 32px)}
#toast.show{opacity:1}
/* Ganadores */
.t-ganador{background:var(--win);color:var(--win-ink)}
.t-prometedor{background:#E0F0FF;color:#00527C}
.t-prueba{background:rgba(0,0,0,.06);color:#4A4A4A}
.t-fatiga{background:#FFEF9D;color:#4F4700}
.t-perdedor{background:#FEDAD9;color:#8E1F0B}
.tiers{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));overflow-x:auto;background:var(--surface);border-radius:12px;box-shadow:var(--card-shadow)}
.tiers div{background:none;color:var(--ink);padding:10px 12px;border-right:1px solid var(--line-2);display:flex;flex-direction:column;gap:2px}
.tiers div:last-child{border-right:0}
.tiers .k{font-size:12px;font-weight:550;color:var(--muted);display:flex;align-items:center;gap:6px}
.tiers .k::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.tiers .t-ganador .k::before{background:#29845A}.tiers .t-fatiga .k::before{background:#E8C800}.tiers .t-prometedor .k::before{background:#4AA5F0}.tiers .t-perdedor .k::before{background:#E51C00}.tiers .t-prueba .k::before{background:#B5B5B5}
.tiers .v{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.cfg{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}
.cfg .fld{width:160px}
.rules{margin:0;padding-left:18px;font-size:13px;color:var(--muted);display:flex;flex-direction:column;gap:4px;max-width:75ch}
.rules b{color:var(--ink);font-weight:650}
.wtbl td,.wtbl th{white-space:nowrap}
.wtbl td.name{white-space:normal;min-width:200px}
.lnk{background:none;border:0;padding:0;font-weight:650;cursor:pointer;text-align:left;color:var(--ink);font-size:13px}
.lnk:hover{color:var(--link);text-decoration:underline}
.idtxt{display:block;font-size:12px;color:var(--muted)}
.wtbl .idtxt{font-family:var(--mono);font-size:11px}
.good{color:var(--good);font-weight:650}
.bad{color:var(--bad);font-weight:650}
.patterns{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px}
.patterns h3{font-size:13px;font-weight:650;margin-bottom:8px}
.mini{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.mini li{display:grid;grid-template-columns:minmax(0,1fr) 70px 22px;gap:8px;align-items:center;font-size:13px}
.mini .bar{margin:0}
.mini .bar i{background:var(--win-bar)}
.mini .c{font-size:12px;text-align:right;color:var(--muted);font-variant-numeric:tabular-nums}
.learn{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.learn li{border-left:3px solid var(--win-bar);padding:2px 0 2px 12px}
.learn b{display:block;font-weight:650}
.learn p{margin:2px 0 0;font-size:13px;color:var(--muted)}
.win-box{border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:6px;background:var(--surface-2);border:1px solid var(--line)}
.win-box .why{margin:0;font-size:13px;color:var(--muted)}
.block .tbl-wrap{margin:0;border:1px solid var(--line);border-radius:10px}
.vt{min-width:600px}
.vt td,.vt th{padding:6px 8px}
.vt input{min-width:72px}
.tags{display:flex;flex-wrap:wrap;gap:6px}
.tags label{position:relative;border:1px solid var(--line);border-radius:8px;padding:4px 10px;font-size:13px;font-weight:550;cursor:pointer;background:var(--surface)}
.tags label:hover{background:var(--hover)}
.tags input{position:absolute;opacity:0;pointer-events:none}
.tags label:has(input:checked){background:#303030;color:#fff;border-color:#303030}
.tags label:focus-within{outline:2px solid var(--focus);outline-offset:1px}

/* Candado con clave */
.lock{position:fixed;inset:0;overflow-y:auto;z-index:30;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:var(--top)}
.lock-card{background:var(--surface);border-radius:16px;padding:28px 24px;width:100%;max-width:360px;display:flex;flex-direction:column;gap:16px;align-items:stretch;box-shadow:0 20px 50px rgba(0,0,0,.4)}
.lock-card img{height:44px;width:auto;align-self:center;filter:invert(1)}
.lock-card h1{font-size:18px;text-align:center}
.lock-card p{margin:0;text-align:center;color:var(--muted);font-size:13px}
.lock-card input{text-align:center;font-size:22px;letter-spacing:.4em;min-height:48px}
.lock-card .btn{min-height:40px;font-size:14px}
.lock-err{color:var(--bad)!important;font-weight:550;min-height:18px}
.lock-btn{background:#303030;border:0;color:#E3E3E3;border-radius:8px;height:30px;padding:0 10px;font-size:12px;font-weight:550;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.lock-btn:hover{background:#4A4A4A}
.lock-btn svg{width:16px;height:16px;fill:currentColor}
.top-r{display:flex;align-items:center;gap:10px}
.set-form{display:flex;flex-direction:column;gap:12px;max-width:360px}
.set-form .r{display:flex;gap:8px;flex-wrap:wrap}
.status{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:550}
.status::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--st,#B5B5B5)}
/* Mis tareas */
.role{font-size:12px;font-weight:550;background:#303030;color:#E3E3E3;padding:3px 8px;border-radius:8px}
.tasks{display:flex;flex-direction:column;gap:16px}
.tgroup{background:var(--surface);border-radius:12px;box-shadow:var(--card-shadow);overflow:hidden}
.tgroup h2{font-size:13px;font-weight:650;padding:12px 16px;background:var(--surface-2);border-bottom:1px solid var(--line-2);display:flex;justify-content:space-between}
.tgroup h2 span{color:var(--muted);font-weight:550}
.tgroup.late h2{background:#FEE9E8;color:#8E1F0B}
.trow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid var(--line-2);padding:12px 16px;cursor:pointer}
.trow:last-child{border-bottom:0}
.trow:hover{background:var(--hover)}
.trow b{display:block;font-size:14px;font-weight:650}
.trow .meta{font-size:12px}
.trow .when{font-size:12px;font-weight:550;color:var(--muted);text-align:right;white-space:nowrap}
.trow .when.late{color:var(--bad)}
.steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:13px}
.steps li{display:grid;grid-template-columns:22px 1fr;gap:8px}
.steps b{display:inline-flex;width:22px;height:22px;border-radius:6px;background:rgba(0,0,0,.06);font-size:11px;align-items:center;justify-content:center}
@media (max-width:860px){
  .layout{grid-template-columns:minmax(0,1fr)}
  .side{flex-direction:row;overflow-x:auto;padding:8px;border-right:0;border-bottom:1px solid var(--line);position:sticky;top:56px;z-index:9}
  .tab{width:auto}
  .tab .count{margin-left:4px}
  .wrap{padding:16px 16px 80px}
}
@media (max-width:640px){
  .fields,.ref-f{grid-template-columns:1fr}
  .scene-f{grid-template-columns:1fr}
  .scene-n{padding-top:0}
  .ref-edit{grid-template-columns:1fr 28px}
  .ref-edit .ref-media{grid-column:1/-1;flex-direction:row;align-items:center}
  .ref-edit .ref-img,.ref-edit .ref-ph{width:90px;flex-shrink:0}
  .ref-edit .ref-f{grid-column:1}
  .head-actions .ghost{display:none}
  .stage-pick span{display:none}
  .logo span{display:none}
}
@media (prefers-reduced-motion:reduce){#toast{transition:none}}

/* ===== Web propia: acceso, equipo y brief ===== */
.logo-top{height:38px;width:auto;display:block}
button.avatar{border:0;cursor:pointer}
.lock-card img{height:44px;width:auto;align-self:center;filter:invert(1)}
.auth-form{display:flex;flex-direction:column;gap:12px;text-align:left}
.auth-form input{font-size:15px;min-height:42px;text-align:left;letter-spacing:normal}
.auth-form .btn{min-height:42px;font-size:14px}
.lock-card .lock-err{text-align:left;margin:0}
.lock-card p{margin:0}
.linkbtn{background:none;border:0;color:var(--link);font-size:13px;font-weight:550;cursor:pointer;padding:4px;align-self:center}
.linkbtn:hover{text-decoration:underline}
.howto{background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:13px;color:var(--muted)}
.howto b{color:var(--ink);font-weight:650}
.panel-card table input,.panel-card table select{min-width:130px}
.brief-link{border:1px solid var(--line);border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--surface-2)}
.switch{display:inline-flex;align-items:center;gap:10px;font-size:13px;font-weight:650;cursor:pointer;position:relative}
.switch input{position:absolute;opacity:0;width:36px;height:20px;margin:0;cursor:pointer}
.switch span::before{content:"";display:inline-block;vertical-align:middle;width:36px;height:20px;border-radius:999px;background:#B5B5B5;margin-right:10px;transition:background .15s;box-shadow:inset 0 0 0 2px #B5B5B5}
.switch input:checked + span::before{background:#29845A;box-shadow:inset 0 0 0 2px #29845A, inset 18px 0 0 2px #29845A, inset -2px 0 0 14px #fff}
.switch input:not(:checked) + span::before{box-shadow:inset 0 0 0 2px #B5B5B5, inset -18px 0 0 2px #B5B5B5, inset 2px 0 0 14px #fff}
.switch:focus-within span::before{outline:2px solid var(--focus);outline-offset:2px}
.linkrow{display:flex;gap:6px;align-items:center}
.linkrow input{flex:1;font-family:var(--mono);font-size:12px;background:var(--surface)}
.linkrow a.btn{text-decoration:none}
