
* { box-sizing:border-box; } body { margin:0; background:var(--bg); color:var(--text); } button,input,textarea,select { font:inherit; } button { cursor:pointer; } .app-shell { min-height:100vh; display:grid; grid-template-columns:250px minmax(0,1fr); }
.sidebar { background:#12141A; color:var(--on-ink); padding:27px 16px 22px; display:flex; flex-direction:column; gap:26px; overflow-y:auto; min-height:100vh; position:sticky; top:0; height:100vh; border-right:1px solid rgba(255,255,255,.06); } .brand { display:flex; flex-direction:column; align-items:center; gap:14px; font-size:22px; letter-spacing:-.5px; padding:4px 4px 0; text-align:center; } .brand strong { color:var(--on-ink-2); } #brandLabel { font-weight:700; line-height:1.15; overflow-wrap:anywhere; color:#FFFFFF; } .brand-mark { width:100%; max-width:180px; aspect-ratio:1 / 1; display:grid; place-items:center; border-radius:24px; background:#16181F; border:1.5px solid rgba(255,140,50,.35); color:var(--accent); font-family:Georgia,serif; font-weight:800; font-size:78px; overflow:hidden; flex:0 0 auto; box-shadow:0 16px 36px rgba(0,0,0,.45), 0 0 0 3px rgba(255,255,255,.03); padding:8px; } .brand-mark img { width:100%; height:100%; object-fit:contain; }
nav { display:grid; gap:5px; } .nav-link { color:#9CA3AF; background:transparent; border:0; padding:12px 12px; border-radius:8px; text-align:left; font-weight:600; display:flex; align-items:center; gap:11px; } .nav-link:hover { color:#FFFFFF; background:rgba(255,255,255,.05); } .nav-link.active { color:#FFFFFF; background:rgba(255,140,50,.12); } .nav-link span { font-size:18px; width:17px; } .nav-link i { margin-left:auto; background:rgba(255,140,50,.2); color:var(--accent); font-size:11px; font-style:normal; border-radius:10px; padding:2px 7px; font-weight:800; } .side-bottom { margin-top:auto; display:grid; gap:12px; padding:0 10px; color:#9CA3AF; font-size:12px; } .sync-state { display:flex; align-items:center; gap:7px; } .dot { width:7px; height:7px; background:var(--accent); border-radius:50%; box-shadow:0 0 0 3px rgba(255,140,50,.25); } .text-button { border:0; background:transparent; padding:0; text-align:left; color:#9CA3AF; font-size:12px; cursor:pointer; } .text-button:hover { color:#FFFFFF; } .shift-control { border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.04); color:#9CA3AF; padding:8px; text-align:left; border-radius:7px; font-size:11px; font-weight:800; } .shift-control:not(.closed) { border-color:rgba(16,185,129,.4); background:rgba(16,185,129,.15); color:var(--success); } .shift-control.closed { border-color:rgba(255,255,255,.08); background:rgba(255,255,255,.03); color:#9CA3AF; }
main { padding:30px clamp(20px,4vw,58px) 54px; max-width:1580px; width:100%; margin:auto; } .topbar { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:29px; } h1,h2,h3,p { margin:0; } h1 { font-size:28px; letter-spacing:-1px; } h2 { font-size:20px; letter-spacing:-.5px; } h3 { font-size:15px; } .eyebrow { color:var(--accent); font-size:11px; font-weight:800; letter-spacing:1.3px; margin-bottom:6px; } .top-actions { display:flex; align-items:center; gap:10px; } .primary-button,.outline-button { border-radius:8px; border:1px solid transparent; padding:10px 14px; font-weight:700; font-size:13px; } .primary-button { background:var(--accent); color:var(--on-accent); box-shadow:0 4px 14px rgba(255,140,50,.25); } .primary-button:hover { background:var(--accent-strong); } .outline-button { background:var(--surface); border-color:var(--line); color:var(--text); } .outline-button:hover { border-color:var(--accent-line); background:var(--surface); } .avatar { border:0; background:var(--avatar-bg); color:var(--accent-ink); width:36px; height:36px; border-radius:50%; font-size:11px; font-weight:800; }
.view { display:none; } .view.active-view { display:block; } .stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:13px; margin-bottom:34px; } .stat-card,.data-card { background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); } .stat-card { padding:18px 18px 16px; min-height:111px; display:flex; flex-direction:column; } .stat-card span,.stat-card small { color:var(--muted); font-size:12px; } .stat-card strong { font-size:24px; letter-spacing:-1px; margin:9px 0 4px; } .stat-card.accent { background:var(--ink); border-color:var(--text); } .stat-card.accent span,.stat-card.accent small { color:var(--on-ink-2); } .stat-card.accent strong { color:var(--on-ink); }
.section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:17px; } .section-heading p { color:var(--muted); font-size:13px; margin-top:5px; } .section-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; justify-content:flex-end; } .segmented { display:flex; gap:5px; background:var(--surface-2); padding:4px; border-radius:8px; } .segment { background:transparent; border:0; color:var(--muted); padding:6px 10px; border-radius:5px; font-size:12px; font-weight:700; } .segment.active { background:var(--surface); color:var(--text); box-shadow:0 1px 3px rgba(0,0,0,.08); } .custom-orders-heading,.recent-invoices-heading,.history-heading { margin-top:28px; margin-bottom:11px; } .custom-orders-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; } .custom-order-card { text-align:left; border:1px solid var(--line); border-radius:10px; background:var(--surface); padding:13px; box-shadow:var(--shadow); } .custom-order-card:hover { border-color:var(--accent-line); } .custom-order-card strong { display:block; font-size:14px; } .custom-order-card span { color:var(--muted); font-size:12px; display:block; margin-top:4px; } .custom-order-card b { color:var(--accent); font-size:15px; display:block; margin-top:12px; } .recent-invoices,.history-list { display:grid; gap:10px; } .invoice-card,.history-card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:14px; box-shadow:var(--shadow); } .invoice-head,.history-head { display:flex; align-items:start; justify-content:space-between; gap:12px; } .invoice-head strong,.history-head strong { display:block; font-size:13px; } .invoice-head span,.history-head span { color:var(--muted); font-size:11px; display:block; margin-top:3px; } .invoice-head b,.history-head b { font-size:14px; white-space:nowrap; } .invoice-items { padding:9px 0 0; margin:9px 0 0; border-top:1px dashed var(--line); display:grid; gap:4px; } .invoice-item { display:flex; justify-content:space-between; gap:10px; color:var(--muted); font-size:12px; } .history-card { display:grid; gap:7px; } .history-tag { display:inline-block; width:max-content; padding:3px 7px; background:var(--accent-soft); color:var(--accent-ink); font-size:10px; font-weight:800; border-radius:10px; text-transform:uppercase; letter-spacing:.5px; }
.table-grid { display:grid; grid-template-columns:repeat(5,minmax(125px,1fr)); gap:12px; } .table-card { min-height:135px; text-align:left; background:var(--surface); border:1px solid var(--line); padding:15px; border-radius:11px; box-shadow:var(--shadow); transition:transform .12s,border .12s; } .table-card:hover { transform:translateY(-2px); border-color:var(--accent-line); } .table-card.occupied { background:linear-gradient(155deg,rgba(245,158,11,.12),var(--surface) 72%); border-color:rgba(245,158,11,.4); } .table-card.bar { background:var(--surface); } .table-card .table-name { font-weight:800; font-size:15px; display:block; } .table-card .table-zone { color:var(--muted); font-size:11px; margin-top:2px; display:block; } .table-card .table-status { margin-top:26px; color:var(--warn); font-size:12px; font-weight:700; display:block; } .table-card .empty { color:var(--success); font-weight:700; } .table-card .table-amount { margin-top:4px; display:block; font-weight:800; font-size:14px; color:var(--warn); }
.inventory-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:13px; margin-bottom:18px; } .summary-item { padding:17px; background:var(--accent-soft); border-radius:10px; } .summary-item.warning { background:var(--danger-soft); } .summary-item.warning strong,.summary-item.warning span { color:var(--danger); } .summary-item span { color:var(--muted); display:block; font-size:12px; } .summary-item strong { font-size:22px; margin-top:4px; display:block; } .data-card { padding:20px; } table { width:100%; border-collapse:collapse; } th { text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.6px; color:var(--faint); padding:0 0 12px; } td { border-top:1px solid var(--line); padding:13px 0; font-size:13px; } td:nth-child(2),td:nth-child(3) { color:var(--muted); } .status { border-radius:12px; padding:4px 8px; font-size:11px; font-weight:700; } .status.good { color:var(--success); background:var(--success-soft); } .status.low { color:var(--danger); background:var(--danger-soft); } .mini-action { border:0; color:var(--accent); font-weight:700; font-size:12px; background:transparent; }
.report-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; } .report-layout .data-card { min-height:168px; } .report-total { background:var(--ink); color:var(--on-ink); display:flex; flex-direction:column; justify-content:center; } .report-total span,.report-total small { color:var(--on-ink-2); font-size:12px; } .report-total strong { margin:7px 0 3px; font-size:34px; letter-spacing:-1.5px; } .report-list { display:grid; gap:11px; margin-top:14px; } .report-row { display:flex; justify-content:space-between; align-items:center; font-size:13px; } .report-row span { color:var(--muted); } .report-row b { font-size:13px; } .muted { color:var(--muted); font-size:13px; line-height:1.55; } .full { width:100%; margin-top:16px; }
.inline-actions { display:flex; gap:8px; flex-wrap:wrap; } .operations-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; } .operations-grid .data-card { min-height:230px; } .activity-list { margin-top:14px; display:grid; gap:0; } .activity-item { border-top:1px solid var(--line); padding:12px 0; display:grid; grid-template-columns:1fr auto; gap:7px; } .activity-item strong { font-size:13px; } .activity-item span { color:var(--muted); font-size:12px; display:block; margin-top:3px; } .activity-item b { font-size:13px; text-align:right; } .activity-item small { color:var(--muted); text-align:right; font-size:11px; } .two-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; } .three-fields { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; } .small-dialog input,.small-dialog select,.profile-form input { margin-bottom:13px; } .two-fields input,.two-fields select,.three-fields input,.three-fields select { margin-bottom:13px; } .purchase-lines { display:grid; gap:8px; max-height:245px; overflow:auto; padding-right:2px; } .purchase-line { display:grid; grid-template-columns:minmax(0,1fr) 70px 94px 26px; gap:6px; align-items:start; } .purchase-line select,.purchase-line input { margin:0; min-width:0; } .remove-line { border:0; border-radius:5px; width:26px; height:37px; background:var(--danger-soft); color:var(--danger); font-size:18px; } .text-add-button { border:0; background:transparent; color:var(--accent); font-weight:800; font-size:12px; padding:10px 0 2px; } .dialog-total { display:flex; justify-content:space-between; align-items:center; border-top:1px dashed var(--line); margin-top:12px; padding-top:14px; } .dialog-total span { color:var(--muted); font-size:13px; } .dialog-total strong { font-size:20px; } .product-actions { display:flex; justify-content:flex-end; gap:8px; } .delete-action { color:var(--danger); } .bar-chart { margin-top:17px; display:grid; gap:12px; } .chart-row { display:grid; grid-template-columns:minmax(70px,1fr) minmax(100px,2.5fr) auto; align-items:center; gap:8px; font-size:11px; } .chart-row > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); } .chart-track { height:9px; background:var(--surface-2); border-radius:10px; overflow:hidden; } .chart-fill { height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-line)); border-radius:inherit; } .chart-row strong { font-size:11px; } .product-image-input { display:flex; align-items:center; gap:12px; margin-bottom:13px; } .product-image-preview { width:44px; height:44px; border-radius:8px; background:var(--surface-2); display:grid; place-items:center; overflow:hidden; font-size:20px; } .product-image-preview img { width:100%; height:100%; object-fit:cover; } .file-button { display:inline-flex; align-items:center; justify-content:center; cursor:pointer; } .profile-layout { display:grid; grid-template-columns:240px minmax(0,1fr); gap:15px; max-width:760px; } .profile-card { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:13px; } .profile-image-preview { width:112px; height:112px; display:grid; place-items:center; overflow:hidden; border-radius:28px; background:var(--accent-soft); color:var(--accent); font-size:38px; font-weight:800; } .profile-image-preview img { width:100%; height:100%; object-fit:cover; } .profile-form { display:grid; align-content:start; } .profile-form input { width:100%; border:1px solid var(--line); background:var(--surface); padding:9px; border-radius:6px; outline-color:var(--accent-line); font-size:13px; } .close-summary { background:var(--accent-soft); border:1px solid var(--line); padding:12px; border-radius:8px; display:grid; gap:8px; margin:0 0 14px; } .close-summary div { display:flex; justify-content:space-between; gap:12px; font-size:12px; } .close-summary span { color:var(--muted); } .category-list { display:grid; gap:8px; max-height:270px; overflow:auto; margin-bottom:17px; } .category-row { display:grid; grid-template-columns:1fr auto auto; gap:7px; } .category-row input { margin:0; } .category-row button { margin:0!important; padding:8px 10px; font-size:12px; } .add-category { display:grid; grid-template-columns:1fr auto; gap:8px; } .add-category input { margin:0; } .table-management-list { display:grid; gap:8px; max-height:280px; overflow:auto; margin-bottom:17px; } .table-management-row { display:grid; grid-template-columns:1fr 100px auto auto; gap:6px; align-items:start; } .table-management-row input,.table-management-row select { margin:0; } .table-management-row button { margin:0!important; padding:8px 9px; font-size:11px; } .new-table-fields { display:grid; grid-template-columns:1fr 105px auto; gap:7px; } .new-table-fields input,.new-table-fields select { margin:0; }
dialog { border:0; padding:0; color:var(--text); background:var(--surface); box-shadow:0 25px 70px rgba(0,0,0,.22); border-radius:14px; max-width:calc(100vw - 28px); } dialog::backdrop { background:rgba(19,29,24,.56); backdrop-filter:blur(2px); } .wide-dialog { width:min(1100px,94vw); } .small-dialog { width:min(430px,94vw); padding:22px; } .dialog-header { display:flex; align-items:flex-start; justify-content:space-between; padding:22px 24px 17px; border-bottom:1px solid var(--line); } .small-dialog .dialog-header { padding:0 0 17px; margin-bottom:17px; } .icon-button { width:30px; height:30px; border:0; border-radius:7px; background:var(--surface-2); font-size:22px; line-height:1; color:var(--muted); } .order-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(290px,.9fr); min-height:590px; } .catalog-panel { border-right:1px solid var(--line); padding:19px; background:var(--surface); } .search-wrap { position:relative; } .search-wrap input { width:100%; border:1px solid var(--line); background:var(--surface); padding:11px 37px 11px 12px; border-radius:7px; outline-color:var(--accent-line); font-size:13px; } .search-wrap span { position:absolute; right:12px; top:9px; font-size:18px; color:var(--muted); } .category-tabs { display:flex; gap:6px; margin:15px 0; overflow:auto; padding-bottom:2px; } .category-button { white-space:nowrap; padding:7px 10px; background:transparent; color:var(--muted); border:1px solid var(--line); border-radius:20px; font-size:12px; font-weight:700; } .category-button.active { background:var(--accent); border-color:var(--accent); color:white; } .product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; } 
.ticket-panel { padding:20px; display:flex; flex-direction:column; } .ticket-head { display:flex; justify-content:space-between; color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.7px; } .danger-link { color:var(--danger); border:0; background:transparent; font-size:12px; font-weight:700; } .ticket-items { flex:1; margin:15px 0; overflow:auto; max-height:292px; } .empty-ticket { color:var(--faint); text-align:center; margin-top:55px; font-size:13px; } .ticket-item { display:grid; grid-template-columns:1fr auto; gap:5px; padding:11px 0; border-bottom:1px solid var(--line); } .ticket-item strong { font-size:13px; } .ticket-item .item-price { font-size:13px; font-weight:800; text-align:right; } .quantity-control { display:flex; align-items:center; gap:8px; grid-column:1/3; } .quantity-control button { border:1px solid var(--line); background:var(--surface); width:23px; height:23px; border-radius:5px; color:var(--text-2); font-weight:800; } .quantity-control span { min-width:12px; text-align:center; font-size:12px; } .ticket-note { margin-top:6px; } .ticket-note label,.field-label { color:var(--muted); display:block; font-size:11px; font-weight:800; letter-spacing:.6px; margin-bottom:6px; } textarea,select,.small-dialog input { width:100%; border:1px solid var(--line); background:var(--surface); padding:9px; border-radius:6px; resize:vertical; outline-color:var(--accent-line); font-size:13px; } .ticket-total { border-top:1px dashed var(--line); padding-top:14px; display:flex; justify-content:space-between; align-items:center; margin-top:13px; } .ticket-total span { font-size:13px; color:var(--muted); } .ticket-total strong { font-size:22px; letter-spacing:-.5px; } .ticket-actions { display:grid; grid-template-columns:repeat(auto-fit, minmax(100px, 1fr)); gap:8px; margin-top:17px; } 
.payment-options { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-bottom:18px; } .payment-option { text-align:left; padding:10px; border:1px solid var(--line); background:var(--surface); border-radius:7px; color:var(--text-2); font-size:12px; font-weight:700; } .payment-option.active { background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent-ink); } .amount-input { font-size:20px!important; font-weight:800; margin-bottom:7px; } .change-message { min-height:20px; font-size:12px; color:var(--muted); } .change-message.positive { color:var(--success); } .change-message.negative { color:var(--danger); } .center { text-align:center; } .menu-dialog { text-align:center; } .menu-dialog .dialog-header { text-align:left; } .fake-qr { width:158px; height:158px; margin:8px auto 17px; background:repeating-linear-gradient(90deg,var(--ink) 0 7px,var(--surface) 7px 12px,var(--ink) 12px 18px,var(--surface) 18px 22px),repeating-linear-gradient(var(--ink) 0 5px,var(--surface) 5px 10px,var(--ink) 10px 15px,var(--surface) 15px 22px); position:relative; padding:12px; display:grid; grid-template-columns:repeat(3,1fr); gap:7px; } .fake-qr:before,.fake-qr:after { content:""; position:absolute; width:35px; height:35px; border:7px solid var(--line); outline:7px solid var(--accent-line); } .fake-qr:before { top:14px; left:14px; } .fake-qr:after { bottom:14px; right:14px; } .fake-qr span:nth-child(2) { background:white; grid-column:2; }
.toast { position:fixed; z-index:3; bottom:24px; left:50%; transform:translate(-50%,25px); background:var(--ink); color:var(--on-ink); padding:11px 16px; border-radius:7px; font-size:13px; opacity:0; pointer-events:none; transition:all .2s; box-shadow:0 8px 20px rgba(0,0,0,.16); } .toast.visible { opacity:1; transform:translate(-50%,0); }
@media (max-width:960px) { .app-shell { grid-template-columns:76px 1fr; } .sidebar { padding:24px 10px; align-items:center; } .sidebar .brand span:last-child,.sidebar .nav-link:not(.active)::after,.sidebar .nav-link { font-size:0; } .sidebar .brand { padding:0; flex-direction:row; } #brandLabel { display:none; } .sidebar .brand-mark { width:46px; max-width:none; aspect-ratio:auto; height:46px; border-radius:13px; font-size:21px; box-shadow:none; } .sidebar .nav-link { width:44px; height:44px; justify-content:center; padding:0; } .sidebar .nav-link span { font-size:19px; width:auto; } .sidebar .nav-link i { position:absolute; margin:0 0 24px 26px; font-size:10px; } .side-bottom { padding:0; align-items:center; } .side-bottom span,.text-button { font-size:0; } .sync-state { padding:7px; } .table-grid { grid-template-columns:repeat(4,1fr); } .stats-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:680px) { .app-shell { display:block; } .sidebar { display:none; } main { padding:20px 16px 80px; } .topbar { align-items:flex-start; } .top-actions .outline-button,.avatar { display:none; } h1 { font-size:24px; } .stats-grid { gap:8px; margin-bottom:26px; } .stat-card { padding:13px; min-height:97px; } .stat-card strong { font-size:19px; } .table-grid,.custom-orders-list { grid-template-columns:repeat(2,1fr); } .section-heading { align-items:flex-start; flex-direction:column; } .segmented { max-width:100%; overflow:auto; } .report-layout,.operations-grid,.profile-layout { grid-template-columns:1fr; } .inventory-summary { grid-template-columns:1fr; } .two-fields,.three-fields { grid-template-columns:1fr; gap:0; } .purchase-line { grid-template-columns:minmax(0,1fr) 55px 79px 26px; } }

/* Pago dividido */
.split-items { margin-bottom:12px; max-height:260px; overflow:auto; border:1px solid var(--line); border-radius:9px; padding:4px 10px; }
.split-head { display:flex; justify-content:space-between; align-items:center; padding:8px 0; font-size:12px; font-weight:800; color:var(--text-2); }
.split-head small { font-weight:600; color:var(--muted); margin-left:4px; }
.split-link { border:0; background:transparent; color:var(--accent-ink); font-size:12px; font-weight:700; padding:2px 6px; cursor:pointer; }
.split-row { display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:center; padding:9px 0; border-top:1px solid var(--line); opacity:.55; }
.split-row.on { opacity:1; }
.split-name strong { display:block; font-size:13px; }
.split-name small { color:var(--muted); font-size:11px; }
.split-row b { min-width:78px; text-align:right; font-size:13px; }
.split-summary { margin:0 0 12px; font-size:12px; color:var(--muted); }
.paid-note { margin:8px 0 0; padding:7px 10px; border-radius:7px; background:var(--accent-soft); color:var(--accent-ink); font-size:12px; font-weight:700; }

/* Conteo de efectivo por denominación */
#closeDialog { width:min(560px,94vw); max-height:92vh; overflow:auto; }
.cash-counter { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.denom-group h4 { margin:0 0 6px; font-size:12px; letter-spacing:.6px; text-transform:uppercase; color:var(--muted); }
.denom-row { display:grid; grid-template-columns:68px 1fr; grid-template-rows:auto auto; column-gap:8px; align-items:center; padding:6px 0; border-top:1px solid var(--line); }
.denom-label { font-size:13px; font-weight:800; color:var(--text); }
.denom-row input { width:100%; padding:7px 8px; text-align:center; font-size:14px; border:1px solid var(--line); border-radius:7px; background:var(--surface); }
.denom-sub { grid-column:1 / -1; text-align:right; font-size:11px; font-weight:600; color:var(--muted); }
#countedCash[readonly] { background:var(--surface-2); }
@media (max-width:480px) { .cash-counter { grid-template-columns:1fr; } }

/* Filtros de reportes y gráfico diario */
.report-filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:14px; }
.filter-chip { padding:8px 14px; border:1px solid var(--line); background:var(--surface); border-radius:999px; color:var(--text-2); font-size:12px; font-weight:700; cursor:pointer; }
.filter-chip.active { background:var(--accent-soft); border-color:var(--accent-line); color:var(--accent-ink); }
.filter-date { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; color:var(--text-2); }
.filter-date input { padding:7px 9px; border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:12px; }
.filter-date input.active { border-color:var(--accent-line); background:var(--accent-soft); }
.wide-report { grid-column:1 / -1; }
.wide-report[hidden] { display:none; }
.day-chart { display:flex; align-items:flex-end; gap:4px; height:190px; margin:14px 0; }
.day-col { flex:1; min-width:0; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:4px; }
.day-val { font-size:10px; font-weight:700; color:var(--text-2); white-space:nowrap; min-height:12px; }
.day-bar { width:100%; flex:1; display:flex; align-items:flex-end; }
.day-bar i { display:block; width:100%; background:var(--accent-mid); border-radius:4px 4px 0 0; }
.day-label { font-size:10px; color:var(--muted); white-space:nowrap; }
.history-more { text-align:center; padding:12px 0; }
@media (max-width:680px) { .day-chart { gap:2px; } .day-label { font-size:9px; } }

/* ===== Roles, login y sesión ===== */
[hidden] { display:none !important; }
.user-chip { border:0; background:var(--avatar-bg); color:var(--warn-ink); width:38px; height:38px; border-radius:50%; font-size:12px; font-weight:800; cursor:pointer; }
.login-dialog { width:min(400px,94vw); text-align:center; }
.login-dialog::backdrop { background:rgba(25,35,31,.82); }
.login-brand { display:flex; flex-direction:column; align-items:center; gap:4px; margin-bottom:14px; }
.login-brand h2 { margin:6px 0 0; }
.login-users { display:grid; gap:8px; margin-bottom:10px; }
.login-user { display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:12px; align-items:center; text-align:left; padding:10px 14px; border:1px solid var(--line); background:var(--surface); border-radius:10px; cursor:pointer; }
.login-user:hover { border-color:var(--accent-line); background:var(--accent-soft); }
.login-user strong { font-size:14px; } .login-user small { color:var(--muted); font-size:11px; }
.mini-avatar { grid-row:1 / 3; width:38px; height:38px; border-radius:50%; background:var(--avatar-bg); color:var(--warn-ink); display:grid; place-items:center; font-size:12px; font-weight:800; }
.login-who { display:flex; align-items:center; justify-content:space-between; margin:0 0 10px; }
.pin-dots { display:flex; justify-content:center; gap:14px; margin:8px 0; }
.pin-dots i { width:14px; height:14px; border-radius:50%; border:2px solid var(--accent-line); }
.pin-dots i.filled { background:var(--accent); border-color:var(--accent); }
.login-error { min-height:18px; margin:4px 0 10px; color:var(--danger); font-size:12px; font-weight:700; }
.keypad { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; max-width:260px; margin:0 auto 6px; }
.keypad button { padding:14px 0; font-size:20px; font-weight:700; border:1px solid var(--line); background:var(--surface); border-radius:12px; cursor:pointer; }
.keypad button:active { background:var(--accent-soft); }
.stack-buttons { display:grid; gap:10px; }
.check-row { display:flex; align-items:center; gap:8px; margin:12px 0; font-size:13px; font-weight:600; }
.danger-button { border:0; background:var(--danger); color:var(--on-accent); border-radius:8px; padding:12px 14px; font-weight:700; cursor:pointer; }

/* ===== Facturas ===== */
.filter-select, .filter-search { padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); font-size:12px; }
.filter-search { min-width:240px; flex:1; max-width:360px; }
.invoice-actions { display:flex; gap:14px; justify-content:flex-end; margin-top:8px; padding-top:8px; border-top:1px dashed var(--line); }
.badge-edited { display:inline-block; margin-top:4px; padding:2px 8px; border-radius:10px; background:var(--warn-soft); color:var(--warn-ink); font-size:11px; font-weight:700; }
.invoice-dialog { width:min(620px,94vw); max-height:92vh; overflow:auto; }
.invoice-warning { padding:9px 12px; border-radius:8px; background:var(--warn-soft); color:var(--warn-ink); font-size:12px; font-weight:600; }
.invoice-lines { display:grid; gap:6px; margin-bottom:8px; }
.invoice-line { display:grid; grid-template-columns:1fr 64px 92px 90px 28px; gap:8px; align-items:center; font-size:13px; }
.invoice-line input { width:100%; padding:7px 6px; text-align:center; border:1px solid var(--line); border-radius:7px; background:var(--surface); }
.invoice-line b { text-align:right; font-size:12px; }
.invoice-add { display:flex; gap:8px; margin-bottom:10px; } .invoice-add select { flex:1; }
.invoice-delete-summary { display:grid; gap:4px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--surface); margin-bottom:8px; }
@media (max-width:560px) { .invoice-line { grid-template-columns:1fr 54px 78px 28px; } .invoice-line b { display:none; } }

/* ===== Inventario: mermas y conteo ===== */
.stock-log-card, .suppliers-card { margin-top:18px; overflow-x:auto; }
.count-dialog { width:min(620px,94vw); max-height:92vh; overflow:auto; }
.count-table-wrap { max-height:340px; overflow:auto; border:1px solid var(--line); border-radius:9px; margin-bottom:10px; }
.count-table-wrap input { width:90px; padding:6px 8px; text-align:center; border:1px solid var(--line); border-radius:7px; }
.count-diff { font-weight:700; font-size:12px; } .count-diff.ok { color:var(--accent); } .count-diff.neg { color:var(--danger); } .count-diff.pos { color:var(--info); }

/* ===== Reportes: comparativo, horas, semana ===== */
.compare-table { width:100%; border-collapse:collapse; font-size:13px; }
.compare-table th { text-align:right; font-size:11px; letter-spacing:.4px; text-transform:uppercase; color:var(--muted); padding:6px 8px; }
.compare-table td { text-align:right; padding:8px; border-top:1px solid var(--line); }
.compare-table th:first-child, .compare-table td:first-child { text-align:left; font-weight:600; }
.delta { font-weight:800; font-size:12px; white-space:nowrap; } .delta.up { color:var(--accent); } .delta.down { color:var(--danger); } .delta.flat { color:var(--muted); }
.day-col.peak .day-bar i { background:var(--orange); }
.hour-chart { gap:3px; } .hour-chart .day-val { font-size:9px; } .hour-chart .day-label { font-size:10px; }
.weekday-chart { max-width:620px; } .weekday-chart .day-val { font-size:11px; }
.report-actions { flex-wrap:wrap; justify-content:flex-end; }
.print-header { display:none; }

@media print {
  .sidebar, .topbar, .report-filters, .report-actions, .toast, dialog { display:none !important; }
  .app-shell { display:block !important; } main { padding:0 !important; margin:0 !important; }
  .view { display:none !important; } #reports { display:block !important; }
  .print-header { display:block; font-weight:800; font-size:14px; margin:0 0 12px; }
  .data-card, .report-total { box-shadow:none !important; break-inside:avoid; }
  body { background:var(--surface) !important; }
}

@media (min-width:961px) and (max-height:780px) { .brand-mark { max-width:140px; font-size:56px; border-radius:22px; } .sidebar { gap:18px; } }

/* ===== Respaldos y almacenamiento ===== */
.backup-card { margin-top:18px; max-width:760px; }
.backup-status { padding:12px 14px; border-radius:10px; font-size:13px; margin-bottom:12px; }
.backup-status.fresh { background:var(--accent-soft); color:var(--accent-ink); } .backup-status.stale { background:var(--warn-soft); color:var(--warn-ink); }
.backup-options { display:grid; gap:2px; margin:6px 0 12px; }
.backup-actions { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.storage-info { font-size:12px; color:var(--muted); line-height:1.5; margin-top:12px; overflow-wrap:anywhere; }
.warn-text { color:var(--warn-ink); }
.fatal-error { position:fixed; inset:0 0 auto 0; z-index:99; padding:18px 22px; background:var(--danger); color:var(--on-accent); font-size:14px; }

/* ===== Catálogo y Modal de Comanda (Nuevo Pedido / Mesas) ===== */
.wide-dialog {
  width: min(1140px, 95vw);
  max-height: 90vh;
}
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.95fr);
  height: calc(90vh - 75px);
  max-height: 720px;
  min-height: 520px;
  overflow: hidden;
}
.catalog-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
  padding: 16px 18px;
  background: var(--surface);
  min-width: 0;
}
.catalog-panel .search-wrap {
  flex-shrink: 0;
  margin-bottom: 2px;
}
.category-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0 12px 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  flex-shrink: 0;
}
.category-tabs::-webkit-scrollbar {
  height: 4px;
}
.category-tabs::-webkit-scrollbar-thumb {
  background: var(--line-strong, #3a4843);
  border-radius: 4px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
  padding-bottom: 12px;
  align-content: start;
}
.product-grid::-webkit-scrollbar {
  width: 6px;
}
.product-grid::-webkit-scrollbar-thumb {
  background: var(--line-strong, #3a4843);
  border-radius: 6px;
}
/* Tarjeta de producto del POS: foto arriba, categoría, nombre (2 líneas), divisoria, precio y existencias.
   Todo es un solo <button data-product>: tocar cualquier parte agrega el producto. */
.product,
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 236px;
  padding: 12px 10px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.product:hover,
.product-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.product:active,
.product-card:active {
  transform: scale(0.97);
  box-shadow: none;
}
.product:focus-visible,
.product-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.product-media {
  width: 100%;
  height: 108px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  font-size: 2.8rem;
  line-height: 1;
}
.product-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  pointer-events: none;
}
.product-category-chip {
  max-width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  min-height: 2.5em;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.product-divider {
  width: 100%;
  height: 1px;
  margin-top: auto;
  background: var(--line);
}
.product-price {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
}
.product-stock-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.product-stock-tag.stock-available {
  background: var(--success-soft);
  color: var(--success);
}
.product-stock-tag.stock-out {
  background: var(--danger-soft);
  color: var(--danger);
}
.product.is-out-of-stock .product-media,
.product-card.is-out-of-stock .product-media {
  opacity: 0.55;
  filter: grayscale(0.6);
}

/* ===== Menú móvil (hamburguesa + cajón lateral) ===== */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
  z-index: 100;
}
.mobile-overlay.open { display: block; }
.mobile-drawer,
.mobile-menu,
.drawer-content {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 85%;
  max-width: 320px;
  padding: 24px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #12141A;
  color: var(--on-ink);
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-drawer.open,
.mobile-menu.open,
.drawer-content.open {
  transform: translateX(0);
}
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.mobile-drawer-header span {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.5px;
}
.mobile-drawer-close {
  border: 0;
  background: transparent;
  color: #9CA3AF;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-drawer-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0;
  margin: 0;
}
.mobile-nav .nav-link,
.mobile-drawer .nav-link,
.mobile-menu .nav-link,
.drawer-content .nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap; /* Evitar que el texto se quiebre en múltiples líneas */
  transition: background-color 0.2s ease, color 0.2s ease;
  box-sizing: border-box;
  color: #9CA3AF;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  height: auto;
}
.mobile-nav .nav-link:hover,
.mobile-drawer .nav-link:hover,
.mobile-menu .nav-link:hover,
.drawer-content .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.mobile-nav .nav-link.active,
.mobile-drawer .nav-link.active,
.mobile-menu .nav-link.active,
.drawer-content .nav-link.active {
  color: #fff;
  background: rgba(255, 140, 50, 0.14);
  font-weight: 600;
}
.mobile-nav .nav-link span,
.mobile-drawer .nav-link span,
.mobile-menu .nav-link span,
.drawer-content .nav-link span,
.mobile-nav .nav-link .ico,
.mobile-nav .nav-link svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  height: 24px;
  font-size: 18px;
  flex-shrink: 0; /* Asegurar que el icono no se deforme ni se aplaste */
  line-height: 1;
}
.mobile-shift-bar {
  margin-top: auto;
  width: 100%;
  padding: 12px 14px;
  text-align: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #9CA3AF;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
}
.mobile-shift-bar:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.mobile-shift-bar:not(.closed) {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.15);
  color: var(--success, #10b981);
}
.mobile-shift-bar.closed {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #9CA3AF;
}

/* ===== Modal de comanda móvil (pestañas + barra flotante) ===== */
.order-tabs-mobile {
  display: none;
}
.order-tab-btn {
  flex: 1;
  padding: 11px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.order-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.order-tab-btn .badge {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
}
.mobile-order-bar {
  display: none;
}

@media (max-width: 768px) {
  /* Ocultar sidebar fijo, mostrar hamburguesa */
  .app-shell { display: block; }
  .sidebar { display: none !important; }
  .mobile-menu-btn { display: inline-flex; }

  /* Topbar compacto */
  main { padding: 18px 14px 96px; }
  .topbar { flex-wrap: wrap; gap: 10px; }

  /* Tabs de categoría en comanda -> auto-scroll con columnas responsive */
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .product, .product-card { min-height: 224px; padding: 10px 8px; }
  .product-media { height: 100px; }

  /* Modal de comanda: fluida de 1 columna con pestañas y barra flotante */
  .wide-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
  }
  .dialog-header { padding: 12px 16px; }

  .order-tabs-mobile {
    display: flex;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
    background: var(--surface);
  }
  .order-layout {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 58px);
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }
  .catalog-panel {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 0;
    border-bottom: 0;
    padding: 12px 14px 8px;
    min-width: 0;
  }
  .catalog-panel.tab-hidden { display: none; }

  .ticket-panel {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 14px 16px;
    border-top: 0;
  }
  .ticket-panel.tab-visible { display: flex; }
  .ticket-panel .ticket-items {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    margin: 10px 0;
  }
  .ticket-actions { margin-top: auto; }

  /* Barra flotante inferior en el modal (tab Productos) */
  .mobile-order-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -4px 16px rgba(0,0,0,0.18);
    flex-shrink: 0;
  }
  .mobile-order-bar.tab-hidden { display: none; }
  .mobile-order-bar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    min-width: 0;
  }
  .mobile-order-bar-count {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
  }
  .mobile-order-bar-total {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -.3px;
  }
  .mobile-order-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .mobile-order-bar-expand {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
  }
  .mobile-order-bar-charge {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
  }
}
