/* ============================================================
   Victorix · app/styles-add.css
   Componentes nuevos del sistema robusto. Se suma a ../styles.css
   (mismo sistema de diseño cálido "comanda/parrilla").
   ============================================================ */

/* ---------- Inputs / botones extra ---------- */
.vx-input, .vx-select, .vx-textarea {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; color: var(--text); font-family: var(--font); font-size: 14px; outline: none;
}
.vx-input:focus, .vx-textarea:focus, .vx-select:focus { border-color: var(--fire); }
.btn-danger { background: var(--tomato); border: none; color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-ghost { background: none; border: 1px solid var(--line-2); }

/* ---------- Login ---------- */
.login-wrap { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 0%, #20160e, var(--bg)); padding: 20px; }
.login-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; width: 380px; max-width: 100%; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.login-brand .brand-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.login-brand .brand-sub { font-size: 12px; color: var(--text-3); }
.login-hint { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.login-users { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-user { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 16px 10px; background: var(--bg-3); border: 1px solid var(--line); border-radius: var(--radius); transition: .14s; }
.login-user:hover { border-color: var(--fire); transform: translateY(-2px); }
.login-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.login-av.rol-dueno { background: var(--fire-soft); color: var(--fire); }
.login-av.rol-cajero { background: rgba(90,169,230,.16); color: var(--info); }
.login-av.rol-cocina { background: var(--guac-soft); color: var(--guac); }
.login-uname { font-weight: 600; font-size: 13.5px; }
.login-urol { font-size: 11px; color: var(--text-3); }
.login-pin { text-align: center; }
.login-pin.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }
.login-back { background: none; border: none; color: var(--text-3); font-size: 20px; float: left; }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 6px 0 20px; }
.pin-dots span { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.pin-dots span.on { background: var(--fire); border-color: var(--fire); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pin-key { padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-3); font-size: 20px; font-weight: 600; transition: .12s; }
.pin-key:hover { background: var(--bg-hover); }
.pin-key:active { transform: scale(.95); }
.pin-ok { background: linear-gradient(145deg, var(--fire), var(--ember)); border: none; color: #2a1606; }
.pin-clear { color: var(--text-3); }
.pin-err { color: var(--tomato); font-size: 12.5px; min-height: 18px; margin-top: 12px; }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 100; padding: 20px; transition: opacity .18s; }
.modal-card { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg); width: 460px; max-width: 100%; max-height: 88vh; overflow: auto; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.modal-x { margin-left: auto; background: none; border: none; color: var(--text-3); font-size: 18px; }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 1fr 380px; gap: 0; height: 100%; }
.pos-menu { padding: 16px; overflow-y: auto; }
.pos-cats { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pos-cat { font-size: 12.5px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text-2); }
.pos-cat.on { background: var(--fire-soft); color: var(--fire); border-color: rgba(245,165,36,.3); }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pos-prod { text-align: left; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); transition: .12s; position: relative; }
.pos-prod:hover { border-color: var(--fire); transform: translateY(-2px); }
.pos-prod.agotado { opacity: .45; pointer-events: none; }
.pos-prod .pn { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.25; }
.pos-prod .pp { font-family: var(--font-mono); font-size: 13px; color: var(--fire); }
.pos-prod .p86 { position: absolute; top: 7px; right: 7px; font-size: 9px; background: var(--ember); color: #fff; padding: 1px 6px; border-radius: 5px; }
.pos-cart { background: var(--bg-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.pos-cart-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.pos-lines { flex: 1; overflow-y: auto; padding: 10px 14px; }
.pos-line { display: grid; grid-template-columns: 1fr auto; gap: 4px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.pos-line .ln { font-size: 13px; font-weight: 500; }
.pos-line .lsub { font-family: var(--font-mono); font-size: 13px; }
.pos-line .qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pos-line .qbtn { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-3); font-size: 14px; }
.pos-totals { padding: 14px 16px; border-top: 1px solid var(--line); }
.pos-totals .row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--text-2); }
.pos-totals .row.big { font-size: 18px; font-weight: 700; color: var(--text); font-family: var(--font-display); margin-top: 6px; }

/* ---------- Tablas densas / arqueo ---------- */
.stat-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.stat-line .v { font-family: var(--font-mono); }
.stat-line.total { border-bottom: none; font-weight: 700; font-size: 15px; }
.descuadre-ok { color: var(--guac); } .descuadre-bad { color: var(--tomato); }
.denom-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.denom-row { display: grid; grid-template-columns: 72px 1fr 70px; align-items: center; gap: 8px; font-size: 12.5px; }

/* ---------- Misc ---------- */
.role-pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--fire-soft); color: var(--fire); }
.placeholder-view { display: grid; place-items: center; height: 60vh; color: var(--text-3); text-align: center; gap: 10px; }
.placeholder-view .ti { font-size: 40px; opacity: .5; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-btn { font-size: 12.5px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); }
.filter-btn.on { background: var(--fire-soft); color: var(--fire); border-color: rgba(245,165,36,.3); }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); }
.user-chip .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--fire-soft); color: var(--fire); }

/* ---- Costeo: chips de indicadores (editor) + tabla de márgenes ---- */
.cost-chip { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); display: inline-flex; align-items: center; }
.cost-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.cost-dot.ok { background: var(--guac); }
.cost-dot.warn { background: var(--warn); }
.cost-dot.bad { background: var(--tomato); }
.tbl td .cost-pct { font-family: var(--font-mono); font-weight: 600; }
.cost-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }

/* ---- Pipeline de leads (kanban) ---- */
.lead-demo-badge { font-size: 11.5px; color: var(--text-2); background: var(--bg-3); border: 1px dashed var(--line); border-radius: 8px; padding: 7px 12px; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.lead-demo-badge .ti { color: var(--warn); }
.lead-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.lead-col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 120px; }
.lead-col-head { display: flex; align-items: center; gap: 7px; padding: 11px 13px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.lead-col-head .count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); background: var(--bg-3); padding: 1px 8px; border-radius: 10px; }
.lead-col-head .lead-recur { margin-left: 6px; font-size: 10px; color: var(--fire); font-weight: 700; }
.lead-col-body { padding: 9px; display: flex; flex-direction: column; gap: 9px; min-height: 60px; transition: background .12s; }
.lead-col-body.drop-on { background: var(--fire-soft); border-radius: 8px; }
.lead-card { background: var(--bg-3); border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; cursor: pointer; transition: .12s; }
.lead-card:hover { border-color: var(--fire); }
.lead-card.dragging { opacity: .45; }
.lead-card[draggable="true"] { cursor: grab; }
.lead-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13.5px; }
.lead-meta { font-size: 11px; margin: 3px 0; }
.lead-src { font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.lead-inten { font-size: 11.5px; color: var(--text-2); margin-bottom: 7px; line-height: 1.3; }
.lead-foot { display: flex; align-items: center; justify-content: space-between; }
.lead-val { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.lead-score { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fff; padding: 1px 8px; border-radius: 999px; }
.lead-flag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; }
.lead-flag.tibio { background: rgba(230,180,80,.18); color: var(--warn); }
.lead-flag.frio { background: rgba(90,169,230,.18); color: var(--info); }
.lead-perdidos { margin-top: 14px; }
@media (max-width: 1100px){ .lead-board { grid-template-columns: repeat(2, 1fr); } }
