/* ED Agencia · Dashboard · lima sobre casi negro */
:root {
  --bg: #0B0C0A; --sup: #131510; --sup2: #1B1E16; --borde: #282C21; --txt: #F1F3EA; --mut: #9BA18D;
  --lima: #C4F04A; --lima-osc: #202C0A; --rojo: #FF6B5E; --ambar: #FFC24B; --azul: #6FB7FF;
  --r: 14px; --fd: "Sora", system-ui, sans-serif; --fb: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--txt); font: 15px/1.45 var(--fb); min-height: 100dvh; }
h1, h2, h3 { font-family: var(--fd); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; } h2 { font-size: 16px; font-weight: 700; } h3 { font-size: 15px; font-weight: 600; font-family: var(--fb); }
a { color: var(--lima); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.mut { color: var(--mut); } .peq { font-size: 13px; } .nowrap { white-space: nowrap; }
.fila { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .crece { flex: 1; min-width: 0; }
.corta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* estructura */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100dvh; }
.lado { background: var(--sup); border-right: 1px solid var(--borde); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; }
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font: 800 18px var(--fd); }
.marca b { background: var(--lima); color: #0B0C0A; border-radius: 9px; padding: 3px 9px; font-size: 17px; }
.nav { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--mut); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-weight: 500; }
.nav:hover { background: var(--sup2); color: var(--txt); }
.nav.on { background: var(--lima-osc); color: var(--lima); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .cuenta { margin-left: auto; background: var(--lima); color: #0B0C0A; border-radius: 99px; font-size: 12px; font-weight: 700; padding: 0 7px; }
.lado .pie { margin-top: auto; padding: 10px 12px; font-size: 13px; color: var(--mut); }
main { padding: 26px 28px 60px; min-width: 0; max-width: 1280px; width: 100%; }
.cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cab h1 { margin-right: auto; }

/* piezas de interfaz */
.btn { border: 1px solid var(--borde); background: var(--sup2); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 7px; min-height: 38px; }
.btn:hover { border-color: #3a4030; } .btn:disabled { opacity: .5; cursor: default; }
.btn.pri { background: var(--lima); color: #0B0C0A; border-color: var(--lima); font-weight: 600; } .btn.pri:hover { filter: brightness(1.07); }
.btn.rojo { color: var(--rojo); } .btn.chico { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn.plano { background: none; border-color: transparent; color: var(--mut); } .btn.plano:hover { color: var(--txt); }
input, select, textarea { background: var(--bg); border: 1px solid var(--borde); border-radius: 10px; padding: 9px 11px; width: 100%; min-height: 40px; }
textarea { resize: vertical; min-height: 90px; line-height: 1.45; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .nav:focus-visible { outline: 2px solid var(--lima); outline-offset: 1px; }
select.linea, input.linea { width: auto; min-height: 36px; padding: 6px 10px; }
label { display: block; font-size: 13px; color: var(--mut); margin-bottom: 5px; }
.campo { margin-bottom: 14px; } .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--r); padding: 18px; }
.panel > h2 { margin-bottom: 14px; }
.rejilla { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tarj { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--r); padding: 16px; cursor: pointer; text-align: left; width: 100%; }
.tarj:hover { border-color: #3a4030; }
.num { font: 800 30px/1 var(--fd); } .num.lima { color: var(--lima); } .num.rojo { color: var(--rojo); }
.punto { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; background: var(--mut); }
.etq { display: inline-block; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--sup2); color: var(--mut); white-space: nowrap; }
.etq.lima { background: var(--lima-osc); color: var(--lima); } .etq.rojo { background: #33130f; color: var(--rojo); }
.etq.ambar { background: #33270a; color: var(--ambar); } .etq.azul { background: #0e2438; color: var(--azul); }
.lista { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--borde); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; }
.item:first-child { border-top: 0; } .item:hover { background: var(--sup2); }
.vacio { color: var(--mut); padding: 18px 4px; }
.barra { height: 7px; background: var(--sup2); border-radius: 99px; overflow: hidden; } .barra i { display: block; height: 100%; background: var(--lima); border-radius: 99px; }
.aviso-caja { background: #33270a; border: 1px solid #5a4410; color: var(--ambar); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.pest { display: flex; gap: 4px; border-bottom: 1px solid var(--borde); margin-bottom: 18px; overflow-x: auto; }
.pest button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; color: var(--mut); cursor: pointer; white-space: nowrap; font-weight: 500; }
.pest button.on { color: var(--lima); border-bottom-color: var(--lima); }
dl.datos { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; margin: 0; } dl.datos dt { color: var(--mut); font-size: 13px; } dl.datos dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }

/* calendario */
.cal-dias, .cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dias div { padding: 6px 8px; font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.cal { border: 1px solid var(--borde); border-radius: var(--r); overflow: hidden; background: var(--borde); gap: 1px; }
.dia { background: var(--sup); min-height: 116px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.dia.fuera { background: #0f100d; } .dia.fuera .dnum { opacity: .4; }
.dia.sobre { outline: 2px solid var(--lima); outline-offset: -2px; }
.dnum { font-size: 13px; color: var(--mut); font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.dia.hoy .dnum { background: var(--lima); color: #0B0C0A; }
.chip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c, var(--mut)); background: var(--sup2); border-radius: 6px; padding: 3px 6px; font-size: 12px; line-height: 1.3; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { background: #24281d; } .chip b { font-weight: 600; }
.chip.grab { background: none; border: 1px dashed var(--c, var(--mut)); color: var(--mut); }
.chip.hecha { opacity: .55; } .chip.idea { background: none; border: 1px dotted #3a4030; border-left: 3px dotted var(--c, var(--mut)); color: var(--mut); }
.bandeja { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; } .chip.tarde { box-shadow: inset 0 0 0 1px var(--rojo); }
.mas { font-size: 12px; color: var(--mut); padding-left: 4px; }
.puntos { display: none; gap: 3px; flex-wrap: wrap; }
.cal.semana .dia { min-height: 320px; } .cal.semana .chip { white-space: normal; }

/* cola de video */
.vid { display: grid; grid-template-columns: 150px 1fr; gap: 16px; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--r); padding: 14px; }
.vid-img { aspect-ratio: 9 / 16; background: var(--sup2); border-radius: 10px; overflow: hidden; display: grid; place-items: center; color: var(--mut); font-size: 12px; text-align: center; padding: 8px; }
.vid-img.con { padding: 0; } .vid-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
button.vid-img.ver { border: 1px dashed var(--borde); cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; width: 100%; }
button.vid-img.ver:hover { border-color: var(--lima); color: var(--lima); } button.vid-img.ver span { font-size: 26px; }
.cine { display: grid; place-items: center; background: #000; border-radius: 12px; overflow: hidden; } .cine video { max-height: 68dvh; max-width: 100%; display: block; }
.mini { width: 110px; border-radius: 8px; overflow: hidden; flex: none; } .mini video, img.mini { width: 110px; display: block; border-radius: 8px; background: #000; }
.vid-cuerpo { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.vid textarea { min-height: 150px; }
.ruta { font: 12px/1.4 ui-monospace, Menlo, monospace; color: var(--mut); overflow-wrap: anywhere; }
.nota { background: var(--sup2); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.nota.cambio { border-left: 3px solid var(--ambar); } .nota.pedido { border-left: 3px solid var(--azul); color: var(--azul); background: #0e2438; }

/* clientes */
.cli { display: flex; flex-direction: column; gap: 8px; }
.cli .nombre { font: 700 16px var(--fd); }
.cuadros { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.muestra { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--borde); vertical-align: middle; }

/* modal, avisos, acceso */
dialog { background: var(--sup); color: var(--txt); border: 1px solid var(--borde); border-radius: 18px; padding: 0; width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
.m-cab { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--borde); position: sticky; top: 0; background: var(--sup); z-index: 1; }
.m-cab h2 { margin-right: auto; } .m-cuerpo { padding: 18px 20px; } .m-pie { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--borde); position: sticky; bottom: 0; background: var(--sup); }
.m-pie .izq { margin-right: auto; }
.grupo { font: 700 12px var(--fb); text-transform: uppercase; letter-spacing: .08em; color: var(--lima); margin: 20px 0 10px; } .grupo:first-child { margin-top: 0; }
#aviso { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--lima); color: #0B0C0A; padding: 10px 16px; border-radius: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; max-width: calc(100vw - 32px); }
#aviso.ver { opacity: 1; } #aviso.mal { background: var(--rojo); }
.acceso { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.acceso form { width: min(380px, 100%); } .acceso .marca { padding: 0 0 22px; font-size: 22px; }
.check { display: flex; align-items: center; gap: 9px; color: var(--txt); font-size: 14px; } .check input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--lima); }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .lado { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--borde); z-index: 20; gap: 2px; }
  .lado .marca, .lado .pie { display: none; }
  .nav { flex-direction: column; gap: 2px; font-size: 11px; padding: 7px 2px; justify-content: center; text-align: center; position: relative; }
  .nav .cuenta { position: absolute; top: 2px; right: calc(50% - 22px); margin: 0; }
  main { padding: 18px 14px 110px; }
  h1 { font-size: 21px; }
  .cab h1 { flex-basis: 100%; } .solo-pc { display: none; } select.linea { flex: 1; min-width: 0; }
  .g2, .g4 { grid-template-columns: 1fr; } .g4.cifras { grid-template-columns: 1fr 1fr; }
  .dos { grid-template-columns: 1fr; }
  .dia { min-height: 62px; padding: 4px; align-items: center; }
  .cal:not(.semana) .chip, .cal:not(.semana) .mas { display: none; }
  .cal:not(.semana) .puntos { display: flex; justify-content: center; } .puntos i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--mut)); }
  .cal.semana, .cal-dias.semana { grid-template-columns: 1fr; } .cal-dias.semana { display: none; }
  .cal.semana .dia { min-height: 0; align-items: stretch; flex-direction: column; } .cal.semana .dnum { width: auto; justify-content: start; }
  .vid { grid-template-columns: 92px 1fr; gap: 12px; }
  dl.datos { grid-template-columns: 1fr; gap: 2px; } dl.datos dd { margin-bottom: 10px; }
  #aviso { bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
