/* Paleta unificada celeste & azul para Al Paso (alineada con el menú lateral) */
:root {
    --ink: #0f172a;
    --muted: #55647a;
    --forest: #2563eb;
    --forest-dark: #1d4ed8;
    --mint: #e8eeff;
    --surface: #f4f7fb;
    --paper: #ffffff;
    --line: #e2e8f0;
    --gold: #b45309;
    --warm: #fef3c7;
}

body.al-paso-theme { background: var(--surface); color: var(--ink); }
:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }

/* Header y marca en gama azul */
.top { border-bottom: 1px solid var(--line); }
.brand { color: #0f172a; }
.brand .brand-icon { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #ffffff; box-shadow: 0 3px 10px #2563eb33; }
.brand-dot { color: #38bdf8; }
.brand small { color: #64748b; }
.demo-chip { background: #e8eeff; border: 1px solid #cfe0ff; color: #1d4ed8; font-weight: 600; }

.top-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-tools .operator { margin-left: 0; }
.operator select { min-width: 155px; max-width: 240px; margin-top: 0; font-weight: 650; border-color: #cbd5e1; }
.operator label { white-space: nowrap; color: var(--muted); font-weight: 600; }

.conn-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eff6ff; border: 1px solid #cfe0ff; color: #1d4ed8; white-space: nowrap; }
.conn-pill i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; }
.conn-pill.offline { background: #fef3c7; border-color: #fcd34d; color: #92400e; }
.conn-pill.offline i { background: #d97706; }

.operator-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; border-radius: 10px; border: 1px solid #dbe4f0; background: #f8faff; color: var(--ink); text-align: left; font-size: 12px; transition: background-color .15s, border-color .15s; }
.operator-chip:hover { background: #e8eeff; border-color: #bfd3ff; }
.operator-chip strong { display: block; line-height: 1.15; font-size: 12px; }
.operator-chip small { display: block; color: #2563eb; font-size: 10.5px; font-weight: 600; }
.operator-chip svg { width: 18px; height: 18px; color: #2563eb; }

/* Menú lateral (submenú + indicadores de alerta) */
.section-nav a { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 11px; border-radius: 9px; text-decoration: none; color: #334155; font-size: 13px; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
.section-nav a:hover { background: #f1f5ff; color: #1d4ed8; }
.section-nav a.selected { background: #e8eeff; color: #1d4ed8; font-weight: 680; }
.section-nav a.selected::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #2563eb; }
.nav-badge { font-size: 11px; font-weight: 700; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: #dbeafe; color: #1d4ed8; }
.nav-badge.warn { background: #fef3c7; color: #b45309; }
.rail-dot { position: absolute; top: 7px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; border: 2px solid #f8faff; }

/* Botones, tablas y superficies en azul */
.primary { background: #2563eb; color: #ffffff; }
.primary:hover { background: #1d4ed8; }
.secondary { background: #ffffff; border-color: #cbd5e1; color: #1e3a8a; }
.secondary:hover { background: #f1f5ff; border-color: #93c5fd; }
.table-card { box-shadow: 0 2px 12px #0f172a0b; border-color: #e2e8f0; }
th { background: #f3f6fc; color: #475569; }
td a { color: #2563eb; }
.zones button { background: #f1f5f9; color: #475569; font-weight: 550; }
.zones button:hover { background: #e8eeff; color: #1d4ed8; }
.zones button.active { background: #e8eeff; color: #1d4ed8; font-weight: 700; box-shadow: inset 0 0 0 1px #c7d9fc; }
.metric-icon.free { background: #e8eeff; color: #1d4ed8; }
.metric-icon.account { background: #eef2f7; color: #475569; }
.metric-icon.occupied { background: #fef3c7; color: #b45309; }
.qty button { border-color: #cbd5e1; color: #1d4ed8; background: #f8faff; }
.qty button:hover { background: #e8eeff; }
.close { background: #eff4fb; color: #1e3a8a; }
.close:hover { background: #dbeafe; }

/* Estado de turno */
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.turn-state { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #fde68a; border-radius: 999px; background: #fffbeb; color: #92400e; text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.turn-state i { width: 7px; height: 7px; border-radius: 50%; background: #d97706; }
.turn-state.open { background: #eef4ff; border-color: #c7d9fc; color: #1e40af; }
.turn-state.open i { background: #16a34a; }

/* POS Nueva venta */
.sale-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 390px); gap: 15px; align-items: start; }
.panel { padding: 17px; }
.panel h2, .section-title { font-size: 18px; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 12px; }
.section-title { margin: 22px 0 10px; }
.section-sub { font-size: 14px; margin: 16px 0 8px; color: #334155; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title h2 { margin: 0; }

.pos-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pos-quick-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.scan-label { font-size: 13px; font-weight: 700; color: #1e293b; }
.scan { display: flex; background: #fff; align-items: center; gap: 9px; padding: 0 12px; border: 1.5px solid #cbd5e1; border-radius: 10px; margin: 4px 0 14px; transition: border-color .15s, box-shadow .15s; }
.scan:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; outline: none; }
.scan > span { display: grid; place-items: center; color: #2563eb; }
.scan > span svg { width: 19px; height: 19px; }
.scan input:not([type=file]) { border: 0; outline: 0; min-width: 0; padding: 11px 0; }
kbd { font: 600 11px/1.3 system-ui, sans-serif; border: 1px solid #cbd5e1; border-radius: 5px; padding: 2px 5px; white-space: nowrap; color: #1e40af; background: #f1f5ff; }
#checkout kbd { color: #fff; background: #ffffff22; border-color: #ffffff52; }
#checkout { min-height: 46px; font-size: 15px; }
.button:disabled, .qty button:disabled { cursor: default; }
.filters { margin-bottom: 14px; }

.product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); gap: 9px; }
.product { display: grid; align-content: space-between; gap: 7px; border: 1px solid #dbe4f0; color: var(--ink); border-radius: 11px; background: #f8fbff; padding: 10px; min-height: 98px; text-align: left; transition: background-color .14s, border-color .14s, transform .14s; }
.product:hover:not(:disabled) { background: #edf3ff; border-color: #93b4f5; transform: translateY(-1px); }
.product:disabled { cursor: default; opacity: .55; }
.product strong { font-size: 13px; color: #0f172a; }
.product small, .buyer, .cart-line small { font-size: 12px; color: var(--muted); }
.product-top, .product-bottom { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.product-bottom { flex-wrap: wrap; }
.product-bottom b { color: #1d4ed8; font-size: 14px; }
.add-symbol { width: 20px; height: 20px; display: grid; place-content: center; background: #e8eeff; border-radius: 6px; color: #1d4ed8; font-weight: 700; }
.weight-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; }

.kbd-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; padding-top: 10px; border-top: 1px solid #eef2f8; font-size: 11.5px; color: var(--muted); }

/* Carrito */
.cart-empty { min-height: 155px; display: grid; justify-items: center; align-content: center; gap: 5px; text-align: center; color: var(--muted); }
.cart-empty strong { color: var(--ink); font-size: 14px; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; background: #e8eeff; color: #1d4ed8; border-radius: 13px; margin-bottom: 4px; }
.empty-icon svg { width: 22px; height: 22px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.cart-line small { display: block; }
.cart-line .qty { display: flex; align-items: center; gap: 6px; }
.line-total { grid-column: 2; text-align: right; color: #0f172a; }
.cart-subtotal, .cart-discount-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--muted); }
.cart-discount-row strong { color: #15803d; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 9px; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.cart-total strong { font-size: 25px; color: #1d4ed8; }
.cart-adjust { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 4px; font-size: 12.5px; }
.link-btn { border: 0; background: none; color: #2563eb; font-weight: 650; padding: 2px 0; font-size: 12.5px; }
.link-btn:hover:not(:disabled) { text-decoration: underline; }

.promo-summary { margin: 8px 0; padding: 8px 10px; border-radius: 9px; background: #ecfdf5; border: 1px solid #bbf7d0; color: #166534; font-size: 12px; display: grid; gap: 3px; }
.fiado-pill { margin: 6px 0 10px; padding: 8px 10px; border-radius: 9px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; font-size: 12px; }
.fiado-pill.warn { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.fiado-pill.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.quick-weights { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pc-result { padding: 14px; border-radius: 10px; background: #f8faff; border: 1px solid #dbe4f0; }
.pc-result .pc-price { font-size: 28px; font-weight: 800; color: #1d4ed8; margin: 6px 0; }
.parked-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* Avisos y píldoras semánticas */
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 13px; padding: 10px 13px; border: 1px solid #c7d9fc; border-radius: 9px; background: #eef4ff; color: #1e3a8a; font-size: 13.5px; }
.notice.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: #eef2f7; color: #475569; }
.pill.ok { background: #dcfce7; color: #166534; }
.pill.info { background: #dbeafe; color: #1d4ed8; }
.pill.warn { background: #fef3c7; color: #92400e; }
.pill.danger { background: #fee2e2; color: #991b1b; }
.text-ok { color: #15803d; }
.text-warn { color: #b45309; }
.text-danger { color: #dc2626; }

/* Fiados */
.fiados-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 15px; align-items: start; }
.limit-bar { width: 130px; height: 7px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin-bottom: 3px; }
.limit-bar span { display: block; height: 100%; border-radius: 999px; background: #2563eb; }
.limit-bar span.ok { background: #2563eb; }
.limit-bar span.warn { background: #f59e0b; }
.limit-bar span.danger { background: #ef4444; }
.row-selected td { background: #f1f5ff; }
.compact-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.compact-form h3 { font-size: 14px; margin: 0 0 8px; }
.inline-submit { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.inline-submit input { margin-top: 0; }
.ledger-list { max-height: 290px; overflow-y: auto; }

/* Promos */
.promo-cards { display: grid; gap: 10px; }
.promo-card { border: 1px solid #dbe4f0; border-radius: 11px; padding: 12px; background: #f8fbff; }
.promo-card.inactive { opacity: .6; background: #f8fafc; }
.promo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.promo-card-head strong { margin-left: 6px; }
.promo-card-body p { margin: 0 0 4px; font-size: 13px; }
.promo-card-body small { color: var(--muted); }

/* Compras y reposición */
.restock-group { margin-bottom: 14px; }
.purchase-lines-wrap { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
#purchase-lines-table td, #purchase-lines-table th { padding: 8px 9px; }
#purchase-lines-table input, #purchase-lines-table select { padding: 6px 8px; font-size: 13px; min-width: 90px; }
#purchase-lines-table .p-art { min-width: 190px; }
.purchase-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 10px 0 14px; }
.purchase-total { display: flex; align-items: baseline; gap: 10px; }
.purchase-total strong { font-size: 22px; color: #1d4ed8; }

/* Arqueo de billetes */
.bill-counter { margin: 12px 0; padding: 10px 12px; border: 1px solid #dbe4f0; border-radius: 10px; background: #f8faff; }
.bill-counter summary { cursor: pointer; font-weight: 650; font-size: 13px; color: #1d4ed8; }
.bill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 10px 0 6px; }
.bill-grid label { margin: 0; font-size: 12px; }

/* Gráfico horario */
.hour-bars { display: grid; gap: 8px; }
.hour-row { display: grid; grid-template-columns: 52px 1fr auto 40px; align-items: center; gap: 10px; font-size: 13px; }
.hour-lbl { font-weight: 650; color: #334155; font-variant-numeric: tabular-nums; }
.hour-track { height: 12px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.hour-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #1d4ed8); }

/* Varios comunes */
.pin-hint { font-size: 12px; padding: 8px 10px; border-radius: 8px; background: #f1f5ff; color: #1e3a8a; margin: 0 0 12px; }
#change-due { margin-top: -5px; }
.field-grid, .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.narrow { max-width: 460px; }
.point-tabs, .filter-bar, .list-toolbar { margin-bottom: 14px; }
.point-tabs { gap: 8px; }
.record-form, .close-shift { margin-top: 15px; }
.filter-bar, .list-toolbar, .row-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.list-toolbar { align-items: center; }
.list-toolbar input { max-width: 310px; }
.filter-bar label { font-size: 13px; }
.filter-bar .check { padding-bottom: 10px; }
label.check { display: flex; align-items: center; gap: 6px; }
label.check input:not([type=file]) { display: inline-block; width: auto; margin: 0; }
td small { display: block; color: var(--muted); }
code { font: 600 12px ui-monospace, Consolas, monospace; background: #eef2f8; padding: 2px 6px; border-radius: 5px; color: #1e3a8a; }

@media (max-width: 1120px) {
    .sale-grid { grid-template-columns: minmax(0, 1fr) minmax(275px, 325px); }
    .fiados-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .operator label, .conn-pill { display: none; }
    .sale-grid { grid-template-columns: 1fr; }
    .product-list { max-height: min(49vh, 380px); overflow-y: auto; padding: 3px; }
}
@media (max-width: 580px) {
    .top { height: auto; min-height: 64px; flex-wrap: wrap; padding-block: 9px; gap: 8px 12px; }
    .venue { display: none; }
    .operator select { min-width: 0; max-width: 165px; }
    .pair, .field-grid, .cash-metrics { grid-template-columns: 1fr; }
    .panel { padding: 12px; }
}
