:root{--bg:#edf0f4;--panel:#f8fafc;--blue1:#eaf4ff;--blue2:#b9d6ef;--line:#9fb5cc;--dark:#1f2937;--primary:#2563eb;--danger:#dc2626;--ok:#16a34a;--warn:#f59e0b}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#111827;font-family:Arial,Helvetica,sans-serif}.topbar{display:none}.container{padding:0}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:20px}.card,.hero,.form-card{background:white;border:1px solid #d7dee8;border-radius:4px;padding:20px}.hero{margin:0 20px}.btn{border:1px solid #9fb5cc;border-radius:4px;padding:10px 16px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-block}.primary{background:#3c6df0;color:white}.danger{background:#dc2626;color:white}.page-head{display:flex;align-items:center;justify-content:space-between;padding:18px}.table{width:calc(100% - 36px);margin:0 18px;border-collapse:collapse;background:#fff}.table th,.table td{padding:10px;border:1px solid #cbd5e1;text-align:left}.form-card{margin:18px;display:grid;gap:12px;max-width:900px}.form-card label{display:grid;gap:5px;font-weight:700}.form-card input,.form-card select{padding:8px;border:1px solid #9fb5cc}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.check{display:flex!important;gap:8px;align-items:center}.obpos-shell{height:100vh;display:grid;grid-template-columns:180px 1fr;background:#e8e8e8}.ob-menu{border-right:1px solid #8aa7c1;background:#eef6ff;padding:10px 7px;overflow:auto}.menu-group{border:1px solid #a9c3db;background:#fff;margin-bottom:12px}.menu-title{background:linear-gradient(#e9f5ff,#c6dff6);font-weight:bold;padding:7px;border-bottom:1px solid #a9c3db}.menu-group a{display:block;color:#111;text-decoration:none;padding:6px 8px;font-weight:600;font-size:13px}.menu-group a.active,.menu-group a:hover{background:#dbeafe}.ob-main{display:grid;grid-template-rows:46px 34px 1fr 305px;min-width:0}.ob-top{height:46px;background:#f7f7f7;border-bottom:1px solid #8aa7c1;display:flex;align-items:center;justify-content:space-between;padding:0 12px}.ob-brand{display:flex;gap:14px;align-items:center;margin:auto;font-size:14px}.power{background:#6cc04a;border:2px solid #3e8c26;color:white;border-radius:6px;font-size:24px;line-height:26px;padding:0 4px}.ob-actions{position:absolute;right:12px}.ob-actions button{height:34px;margin-left:8px;background:linear-gradient(#f8fbff,#cfe5fa);border:1px solid #8aa7c1;font-weight:bold}.ob-status{height:34px;display:flex;align-items:center;gap:12px;padding:0 12px;background:#f4f7fb}.badge{border-radius:999px;padding:5px 10px;font-weight:800;color:white}.badge.ok{background:var(--ok)}.badge.warn{background:var(--warn)}.ticket-workspace{display:grid;grid-template-columns:1fr 290px;gap:6px;padding:8px;min-height:0}.ticket-area{border:1px solid #9fb5cc;background:#eee;display:grid;grid-template-rows:43px 1fr 66px;min-width:0}.ob-toolbar{display:flex;gap:6px;padding:5px;background:#e5e7eb;border-bottom:1px solid #9fb5cc}.ob-toolbar input{flex:1;font-size:18px;padding:5px;border:1px solid #8aa7c1}.ob-toolbar button{width:48px;background:linear-gradient(#fff,#cfe5fa);border:1px solid #8aa7c1;font-size:18px}.ticket-table{width:100%;border-collapse:collapse;background:#f3f4f6}.ticket-table th{background:#e5e7eb;border:1px solid #9fb5cc;font-weight:500;padding:4px}.ticket-table td{border-bottom:1px solid #cbd5e1;padding:7px}.ticket-table .empty td{text-align:center;color:#64748b;padding:30px}.ticket-row.selected{background:#dbeafe}.ticket-row td:nth-child(2),.ticket-row td:nth-child(3),.ticket-row td:nth-child(4),.ticket-row td:nth-child(5){text-align:right}.ticket-totals{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:7px 10px;border-top:1px solid #9fb5cc;background:#f5f5f5}.ticket-totals label{font-weight:bold}.ticket-totals input{width:145px;text-align:right;padding:5px;border:1px solid #9fb5cc}.numpad-area{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:54px;gap:5px;align-content:start}.numpad-area button{font-size:25px;font-weight:bold;color:#153e90;background:linear-gradient(#f8fbff,#bdd8f2);border:1px solid #8aa7c1}.numpad-area .orange{color:#f97316}.numpad-area .tall{grid-row:span 2}.numpad-area .zero{grid-column:span 2}.numpad-area .equals{font-size:30px}.numpad-area .ce{color:#0f172a}.numpad-area .barcode{font-size:20px}.product-browser{display:grid;grid-template-columns:190px 1fr;gap:8px;padding:8px;border-top:1px solid #8aa7c1;background:#efefef;min-height:0}.category-list{border:1px solid #9fb5cc;background:white;overflow:auto}.cat-btn{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #cbd5e1;background:#eaf4ff;padding:12px;font-weight:bold;cursor:pointer}.cat-btn.active{background:#c4ddf4}.ob-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:10px;overflow:auto}.product-tile{min-height:82px;border:1px solid #9fb5cc;background:linear-gradient(#fff,#d8ecff);text-align:left;border-radius:2px;padding:9px;cursor:pointer}.product-tile span{display:block;font-weight:bold}.product-tile strong{display:block;font-size:17px;margin-top:5px}.product-tile small{color:#475569;font-size:11px}.modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;z-index:20}.modal.hidden{display:none}.modal-card{background:white;border:1px solid #64748b;border-radius:6px;box-shadow:0 20px 60px #0005;padding:18px}.payment-card{width:560px}.payment-card h2{margin-top:0}.pay-methods{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pay-methods button,.bill-buttons button{background:linear-gradient(#fff,#dbeafe);border:1px solid #8aa7c1;padding:14px;font-weight:bold;cursor:pointer}.pay-methods button.active{background:#1d4ed8;color:white}.pay-summary,.change-box{display:flex;justify-content:space-between;align-items:center;margin:12px 0;font-size:22px}.amount-label{display:grid;font-weight:bold;gap:6px}.amount-label input{font-size:24px;padding:8px;text-align:right;border:1px solid #8aa7c1}.bill-buttons{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:10px}.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.ticket-body{background:white}.ticket{width:300px;margin:20px auto;font-family:monospace}.ticket h2{text-align:center}.ticket-line{display:flex;justify-content:space-between;gap:8px}.ticket-line.total{font-size:18px;font-weight:800}.center{text-align:center}@media(max-width:1000px){.obpos-shell{grid-template-columns:1fr}.ob-menu{display:none}.ob-main{grid-template-rows:46px 34px auto auto}.ticket-workspace{grid-template-columns:1fr}.numpad-area{grid-template-columns:repeat(4,80px);justify-content:center}.product-browser{grid-template-columns:1fr}.category-list{display:flex;overflow:auto}.cat-btn{width:auto;white-space:nowrap}.form-grid{grid-template-columns:1fr}} 

/* v0.3 seguridad/login y correcciones cPanel */
.topbar{display:flex!important;height:64px;background:#111827;color:white;align-items:center;justify-content:space-between;padding:0 22px}.topbar .brand{font-size:24px;font-weight:900}.topbar nav{display:flex;gap:20px;align-items:center}.topbar a{color:white;text-decoration:none}.logout-form{display:inline}.logout-form button{background:#ef4444;color:white;border:0;border-radius:6px;padding:8px 12px;font-weight:800;cursor:pointer}.container{min-height:calc(100vh - 64px)}.obpos-shell{height:calc(100vh - 64px)}
.login-body{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#eaf4ff,#f8fafc);font-family:Arial,Helvetica,sans-serif}.login-card{width:min(420px,92vw);background:white;border:1px solid #cbd5e1;border-radius:12px;padding:28px;box-shadow:0 20px 60px #0002}.login-logo{display:flex;gap:12px;align-items:center;justify-content:center;font-size:24px;margin-bottom:12px}.login-card h1{text-align:center;margin:10px 0}.login-card p{text-align:center;color:#64748b}.login-card form{display:grid;gap:14px;margin-top:18px}.login-card label{display:grid;gap:6px;font-weight:800}.login-card input[type=email],.login-card input[type=password]{border:1px solid #94a3b8;border-radius:6px;padding:12px;font-size:16px}.alert-error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca;border-radius:6px;padding:10px;font-weight:700}.login-card small{display:block;margin-top:16px;color:#64748b;text-align:center}.check{display:flex!important;gap:8px;align-items:center}
@media(max-width:1000px){.topbar{height:auto;min-height:56px;gap:10px;flex-wrap:wrap}.topbar nav{gap:12px;flex-wrap:wrap}.obpos-shell{height:auto;min-height:calc(100vh - 64px)}}

/* v0.4 módulos POS, caja diaria y configuración */
.cash-warning{margin:8px 8px 0 8px;background:#fff7ed;border:1px solid #fb923c;color:#9a3412;padding:10px 12px;font-weight:800;display:flex;justify-content:space-between;align-items:center}.cash-warning a{background:#f97316;color:white;text-decoration:none;padding:7px 12px;border-radius:4px}.pos-locked{opacity:.72}.pos-locked .product-tile{cursor:not-allowed}.ticket-table tbody{display:block;height:100%;overflow:auto}.ticket-table thead,.ticket-table tbody tr{display:table;width:100%;table-layout:fixed}.ticket-table tbody tr{height:44px}.ticket-table .empty{height:56px!important}.ticket-row td{height:44px;vertical-align:middle}.ticket-area{overflow:hidden}.product-tile{height:125px!important;max-height:125px;min-height:125px;overflow:hidden;display:flex!important;flex-direction:column;justify-content:flex-end}.ob-products{grid-template-columns:repeat(auto-fill, minmax(150px,150px));align-content:start}.product-browser{height:305px}.admin-shell{display:grid;grid-template-columns:220px 1fr;min-height:calc(100vh - 64px);background:#eef2f7}.admin-content{padding:20px;overflow:auto}.admin-content.full{min-height:calc(100vh - 64px)}.admin-content h1{margin:0 0 16px}.form-card.wide{max-width:none;margin:0 0 18px;background:#fff}.notice{border-radius:4px;padding:10px 12px;margin:0 0 14px;font-weight:800}.notice.ok{background:#dcfce7;border:1px solid #86efac;color:#166534}.notice.error{background:#fee2e2;border:1px solid #fca5a5;color:#991b1b}.notice.warning{background:#fff7ed;border:1px solid #fdba74;color:#9a3412}.muted{color:#64748b}.permissions-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.permissions-grid div{border:1px solid #cbd5e1;background:#f8fafc;padding:12px;border-radius:4px}.permissions-grid strong{display:block;margin-bottom:5px}.permissions-grid span{color:#475569}.admin-table{width:calc(100% - 36px)}
@media(max-width:1000px){.admin-shell{grid-template-columns:1fr}.admin-menu{display:block}.ob-products{grid-template-columns:repeat(auto-fill,minmax(135px,1fr))}.product-browser{height:auto}.product-tile{height:105px!important;min-height:105px}}

/* v0.5 modernización 2026 con flujo táctil */
:root{
  --bg:#f3f6fb;--surface:#ffffff;--surface2:#f8fbff;--ink:#0f172a;--muted:#64748b;
  --brand:#2563eb;--brand2:#22c55e;--soft-blue:#dbeafe;--stroke:#b7c9dd;--shadow:0 12px 32px rgba(15,23,42,.10)
}
body{background:linear-gradient(135deg,#f6f9ff 0%,#eef4fb 100%);color:var(--ink)}
.topbar{background:linear-gradient(90deg,#0f172a,#111827 58%,#172554);box-shadow:0 8px 24px rgba(15,23,42,.16)}
.topbar .brand{letter-spacing:.4px}.topbar a{opacity:.92}.topbar a:hover{opacity:1;color:#bfdbfe}.logout-form button{box-shadow:0 6px 14px rgba(239,68,68,.25)}
.obpos-shell{background:#eaf1f8}.ob-menu{background:linear-gradient(180deg,#f2f8ff,#e7f0fa);box-shadow:inset -1px 0 0 #c1d3e7}.menu-group{border-color:#bfd0e3;border-radius:10px;overflow:hidden;box-shadow:0 6px 18px rgba(15,23,42,.06)}.menu-title{background:linear-gradient(#eef7ff,#cfe4f8)}.menu-group a{border-radius:6px;margin:2px 5px}.menu-group a.active,.menu-group a:hover{background:#dbeafe;color:#1e3a8a}
.ob-top{background:rgba(255,255,255,.82);backdrop-filter:blur(10px);border-bottom:1px solid #c7d7ea}.ob-status{background:rgba(255,255,255,.72);border-bottom:1px solid #d8e3f0}.badge{box-shadow:0 5px 12px rgba(15,23,42,.12)}
.ticket-workspace{grid-template-columns:minmax(720px,1fr) 300px;gap:10px}.ticket-area{background:var(--surface);border-color:#c1d2e6;border-radius:12px;box-shadow:var(--shadow);overflow:hidden}.ob-toolbar{background:#f8fbff;border-bottom:1px solid #d3e0ef;gap:8px;padding:8px}.ob-toolbar input.scan-input{height:42px;font-size:19px;border:1px solid #9eb9d5;border-radius:9px;padding:7px 12px;box-shadow:inset 0 1px 4px rgba(15,23,42,.06)}.ob-toolbar .qr-wide{width:82px!important;color:#1d4ed8;font-weight:900}.ob-toolbar button{height:42px;border-radius:8px;background:linear-gradient(#fff,#e2efff)}
.ticket-table{background:#eef6ff}.ticket-table th{background:linear-gradient(#f8fbff,#e7f0fb);height:28px;color:#334155;font-weight:800}.ticket-table td{padding:8px 10px}.ticket-table tbody tr{height:42px}.ticket-row.selected{background:#cfe4ff!important;outline:2px solid rgba(37,99,235,.25)}.ticket-table .empty td{background:#f8fbff;color:#64748b}.ticket-totals{background:#f8fbff;border-top:1px solid #d3e0ef}.ticket-totals input{border-radius:7px;background:#fff;font-weight:800;color:#0f172a}
.numpad-area.modern-pad{grid-template-columns:repeat(4,68px);grid-auto-rows:56px;gap:7px;justify-content:center;align-content:start;padding-top:2px}.numpad-area.modern-pad button{border-radius:8px;border:1px solid #9db8d3;background:linear-gradient(180deg,#fafdff,#d8eaff);box-shadow:0 3px 8px rgba(15,23,42,.08);font-size:23px;color:#123d83}.numpad-area.modern-pad button:hover{filter:brightness(.98);transform:translateY(-1px)}.numpad-area.modern-pad .orange{color:#f97316}.numpad-area.modern-pad .zero{grid-column:auto}.numpad-area.modern-pad .equals{background:linear-gradient(180deg,#eaf2ff,#bfd8ff);font-size:28px}.numpad-area.modern-pad .ce{font-size:22px;color:#111827}.numpad-area.modern-pad .barcode{font-size:24px;color:#1d4ed8}
.product-browser{background:#f2f6fb;border-top:1px solid #c2d4e8;grid-template-columns:210px 1fr;gap:12px;padding:10px;height:320px}.category-list{border-color:#c1d2e6;border-radius:12px;overflow:hidden;box-shadow:var(--shadow)}.cat-btn{background:#f8fbff;color:#172554;padding:13px 14px}.cat-btn.active{background:linear-gradient(90deg,#172554,#1d4ed8);color:white}.ob-products{grid-template-columns:repeat(auto-fill, minmax(150px,150px));gap:12px}.product-tile{border-color:#c1d2e6;background:linear-gradient(180deg,#ffffff 0%,#eef7ff 100%);border-radius:13px!important;box-shadow:0 8px 18px rgba(15,23,42,.08);height:124px!important;max-height:124px!important;transition:.12s ease}.product-tile:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(37,99,235,.16)}.product-tile span{font-size:14px;color:#0f172a}.product-tile strong{font-size:18px;color:#0f172a}.product-tile small{color:#3b5b7a}.modal{backdrop-filter:blur(3px)}.modal-card{border:0;border-radius:16px;box-shadow:0 30px 90px rgba(15,23,42,.35)}.payment-card{width:600px}.pay-methods{grid-template-columns:repeat(3,1fr)}.pay-methods button,.bill-buttons button{border-radius:8px;background:linear-gradient(#ffffff,#e8f2ff);border:1px solid #b6cbe2}.pay-methods button.active{background:linear-gradient(135deg,#1d4ed8,#4f46e5);color:#fff;box-shadow:0 8px 18px rgba(37,99,235,.25)}.amount-label input{border-radius:8px}.modal-actions .btn{border-radius:9px}.primary{background:linear-gradient(135deg,#2563eb,#4f46e5);border:0}.danger{background:linear-gradient(135deg,#dc2626,#ef4444);border:0}.notice.warning{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:8px;padding:12px}.muted{color:#64748b}.keyboard-hint{font-size:12px;color:#64748b;margin-top:6px}.settings-section-title{display:flex;align-items:center;gap:8px}
@media(max-width:1100px){.ticket-workspace{grid-template-columns:1fr}.numpad-area.modern-pad{grid-template-columns:repeat(4,minmax(58px,80px))}.product-browser{height:auto}.payment-card{width:min(600px,94vw)}}

/* v0.6 módulos completos POS Colombia */
.module-title{padding:22px 24px 0;margin:0;font-size:28px}.filter-bar{display:flex;gap:10px;margin:0 18px 16px;align-items:center;background:#fff;border:1px solid #d6e3f2;border-radius:12px;padding:12px;box-shadow:0 8px 20px rgba(15,23,42,.05)}.filter-bar input,.filter-bar select{height:40px;border:1px solid #b8cbe0;border-radius:8px;padding:0 12px;min-width:220px}.modern-table{border-collapse:separate;border-spacing:0;border:0;background:transparent}.modern-table th{background:#eaf3ff;color:#172554;border-color:#c2d5ea;font-size:13px}.modern-table td{background:#fff;border-color:#e0e8f2}.modern-table tr:first-child td:first-child,.modern-table tr:first-child th:first-child{border-top-left-radius:10px}.modern-table tr:first-child td:last-child,.modern-table tr:first-child th:last-child{border-top-right-radius:10px}.modern-table small{color:#64748b}.pagination-wrap{padding:16px 18px}.row-warning td{background:#fff7ed!important}.row-muted td{background:#f1f5f9!important;color:#64748b}.pill{display:inline-flex;background:#e0f2fe;border:1px solid #bae6fd;color:#075985;border-radius:999px;padding:3px 8px;margin:2px;font-weight:800;font-size:12px}.modern-form{border-radius:14px;box-shadow:0 14px 36px rgba(15,23,42,.08);border-color:#d6e3f2}.modern-form input,.modern-form select,.modern-form textarea{border-radius:8px;border:1px solid #b8cbe0;padding:10px;background:#fff}.modern-form textarea{resize:vertical}.span-2{grid-column:span 2}.form-actions{display:flex;gap:10px;align-items:center;margin-top:6px}.side-logout{margin:2px 5px}.side-logout button{width:100%;border:0;background:transparent;text-align:left;font-weight:700;padding:6px 8px;cursor:pointer}.side-logout button:hover{background:#dbeafe;color:#1e3a8a;border-radius:6px}.report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:0 18px 24px}.panel{background:#fff;border:1px solid #d6e3f2;border-radius:14px;padding:16px;box-shadow:0 10px 24px rgba(15,23,42,.07)}.panel h2{margin:0 0 12px}.report-line{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #edf2f7;padding:9px 0}.report-line:last-child{border-bottom:0}.report-line small{color:#64748b}.has-cart .ticket-area{box-shadow:0 16px 38px rgba(37,99,235,.12)}.ob-toolbar #suspendSale{color:#92400e}.ob-toolbar #quickCustomer{color:#075985}.ob-toolbar #qrScanBtn{min-width:110px}.ticket-workspace{min-height:0}.ticket-area{min-width:0}.ticket-table td:nth-child(1){width:30%}.ticket-table td:nth-child(2),.ticket-table td:nth-child(3),.ticket-table td:nth-child(4),.ticket-table td:nth-child(5){width:17.5%}.admin-content .cards,.cards{align-items:stretch}.card span{display:block;color:#64748b;margin-bottom:5px}.card strong{font-size:26px}.btn:hover{filter:brightness(.98);transform:translateY(-1px)}
@media(max-width:1100px){.report-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.filter-bar{flex-wrap:wrap}.filter-bar input{min-width:0;width:100%}}

/* v0.7 UX 2026 - modernización con flujo táctil */
:root{--wd-bg:#eef4fb;--wd-surface:#ffffff;--wd-surface-2:#f7fbff;--wd-line:#c9d8ea;--wd-line-2:#a7bfdc;--wd-text:#0f172a;--wd-muted:#64748b;--wd-primary:#3b5bdb;--wd-primary-2:#2746c7;--wd-green:#16a34a;--wd-orange:#f59e0b;--wd-red:#dc2626;--wd-shadow:0 10px 28px rgba(15,23,42,.10);--wd-radius:14px}body{background:linear-gradient(180deg,#f5f8fc 0%,#edf4fb 100%);color:var(--wd-text)}.topbar{height:58px!important;background:#0f172a!important;box-shadow:0 2px 14px rgba(15,23,42,.18);padding:0 18px!important}.topbar .brand{letter-spacing:.4px}.topbar nav{gap:16px!important}.topbar a{opacity:.92}.topbar a:hover{opacity:1;color:#bfdbfe}.logout-form button{border-radius:10px!important;padding:9px 14px!important}.obpos-shell{height:calc(100vh - 58px)!important;grid-template-columns:176px minmax(0,1fr);background:transparent}.ob-menu{background:linear-gradient(180deg,#edf6ff,#e8f1fb);border-right:1px solid var(--wd-line-2);padding:8px 6px}.menu-group{border:1px solid var(--wd-line-2);border-radius:10px;background:rgba(255,255,255,.78);overflow:hidden;box-shadow:0 4px 14px rgba(15,23,42,.04)}.menu-title{background:linear-gradient(180deg,#e9f5ff,#c9def4);padding:8px 9px}.menu-group a,.side-logout button{border-radius:7px;margin:2px 4px;padding:7px 8px!important;font-size:13px}.menu-group a.active,.menu-group a:hover,.side-logout button:hover{background:#dcecff!important}.side-logout button{width:calc(100% - 8px);border:0;text-align:left;background:transparent;font-weight:600;cursor:pointer}.ob-main{grid-template-rows:44px 40px minmax(355px,1fr) 320px!important;min-width:0}.ob-top{height:44px;border-bottom:1px solid var(--wd-line);background:rgba(255,255,255,.85);backdrop-filter:blur(8px);padding:0 12px}.ob-brand{font-size:13px}.power{font-size:20px;line-height:22px;border-radius:8px}.ob-actions button{height:32px;border-radius:4px;background:linear-gradient(180deg,#f8fbff,#dcecff);box-shadow:0 3px 10px rgba(15,23,42,.06)}.ob-status{height:40px;background:rgba(255,255,255,.7);border-bottom:1px solid #dbe7f4;padding:0 12px}.badge{padding:7px 13px;box-shadow:0 4px 12px rgba(0,0,0,.08)}.cash-warning{margin:10px 8px 4px;border-radius:0;background:#fff7ed;border:1px solid #fb923c;min-height:76px;padding:18px 16px;font-size:15px}.cash-warning a{border-radius:8px;padding:10px 16px}.ticket-workspace{gap:14px!important;padding:10px!important;grid-template-columns:minmax(0,1fr) 280px!important}.ticket-area{border:1px solid var(--wd-line);border-radius:12px;background:var(--wd-surface);box-shadow:var(--wd-shadow);overflow:hidden;grid-template-rows:44px minmax(170px,1fr) 58px}.ob-toolbar{background:linear-gradient(180deg,#fff,#f3f8ff);gap:8px;padding:7px;border-bottom:1px solid var(--wd-line)}.ob-toolbar input{height:32px;border-radius:8px;border:1px solid var(--wd-line-2);padding:4px 12px;font-size:17px;background:#fbfdff}.ob-toolbar input:focus{outline:2px solid rgba(59,91,219,.20);border-color:var(--wd-primary)}.ob-toolbar button{height:32px;border-radius:8px;border:1px solid var(--wd-line-2);background:linear-gradient(180deg,#fff,#e7f0fb);font-size:16px}.ob-toolbar .qr-wide{width:112px!important;color:var(--wd-primary);font-weight:900}.ticket-table{background:#f8fbff}.ticket-table th{background:#eef5ff;color:#667085;font-weight:800;padding:6px;border-color:#d4e2f2}.ticket-table td{border-bottom:1px solid #e5eef8;padding:9px 10px}.ticket-table tbody tr{height:52px}.ticket-table .empty td{padding:38px;color:#94a3b8}.ticket-row.selected{background:#d7e8ff}.ticket-row:hover{background:#eaf4ff}.ticket-totals{background:#fff;border-top:1px solid var(--wd-line);gap:14px;padding:9px 14px}.ticket-totals input{border-radius:6px;background:#fbfdff;border:1px solid var(--wd-line-2);font-weight:800}.numpad-area.modern-pad{display:grid!important;grid-template-columns:repeat(4,62px)!important;grid-auto-rows:52px!important;gap:8px!important;align-content:start;justify-content:center;background:rgba(255,255,255,.45);border-radius:12px;padding:0}.numpad-area button{border-radius:10px!important;border:1px solid #b5c9e4!important;background:linear-gradient(180deg,#f8fbff,#d8eafd)!important;box-shadow:0 3px 10px rgba(15,23,42,.05);font-size:22px!important;transition:.12s}.numpad-area button:active{transform:translateY(1px);box-shadow:none}.numpad-area .orange{color:#fb7a21!important}.numpad-area .equals,.numpad-area [data-line-inc]{background:linear-gradient(180deg,#eaf2ff,#cce2fb)!important}.numpad-area .zero{grid-column:span 2}.numpad-area .ce{color:#111827!important;font-size:22px!important}.product-browser{height:320px!important;grid-template-columns:210px minmax(0,1fr)!important;gap:14px!important;padding:10px!important;background:transparent;border-top:1px solid #d9e6f4;min-height:0}.category-list{border:1px solid var(--wd-line);border-radius:12px;background:white;overflow-y:auto;overflow-x:hidden;max-height:300px;box-shadow:var(--wd-shadow)}.category-list::-webkit-scrollbar,.ob-products::-webkit-scrollbar,.ob-menu::-webkit-scrollbar{width:9px;height:9px}.category-list::-webkit-scrollbar-thumb,.ob-products::-webkit-scrollbar-thumb,.ob-menu::-webkit-scrollbar-thumb{background:#b8cce6;border-radius:999px}.cat-btn{padding:13px 14px!important;background:linear-gradient(180deg,#fff,#f3f8ff)!important;border-bottom:1px solid #e2edf8!important;white-space:normal}.cat-btn.active{background:linear-gradient(180deg,#4254d9,#2f3ebc)!important;color:white}.ob-products{display:grid!important;grid-template-columns:repeat(auto-fill, minmax(148px,148px))!important;grid-auto-rows:120px;gap:14px!important;align-content:start;overflow:auto;padding:0 4px 12px 0}.product-tile{width:148px!important;height:120px!important;min-height:120px!important;max-height:120px!important;border:1px solid #cfdded!important;border-radius:13px!important;background:linear-gradient(180deg,#fff,#edf6ff)!important;box-shadow:0 8px 20px rgba(15,23,42,.08)!important;padding:12px!important;display:flex!important;flex-direction:column!important;justify-content:flex-end!important;gap:3px;transition:.14s}.product-tile:hover{transform:translateY(-2px);box-shadow:0 14px 28px rgba(15,23,42,.13)!important;border-color:#8eaee0!important}.product-tile span{font-size:13px;line-height:1.12;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.product-tile strong{font-size:16px!important}.product-tile small{font-size:10px;color:#52708f}.modal{background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}.modal-card{border:0;border-radius:16px;box-shadow:0 30px 90px rgba(0,0,0,.35);padding:20px}.payment-card{width:min(600px,94vw)}.payment-card h2{font-size:25px}.pay-methods{gap:10px}.pay-methods button,.bill-buttons button{border-radius:0;border:1px solid #b7cbe6;background:linear-gradient(180deg,#fff,#edf5ff);padding:14px 10px}.pay-methods button.active{background:linear-gradient(135deg,#4358df,#2f46d1)}.amount-label input{border-radius:8px;border:1px solid #9db5d5}.btn{border-radius:10px;border:1px solid #c5d4e8}.btn.primary,.primary{background:linear-gradient(135deg,#4c6ef5,#3651d4)!important;color:#fff!important}.btn.danger,.danger{background:linear-gradient(135deg,#ef4444,#d32f2f)!important}.page-head{padding:22px 24px 12px}.page-head h1{margin:0}.filter-bar{display:flex;gap:10px;margin:0 24px 16px;background:white;border:1px solid var(--wd-line);border-radius:14px;padding:12px;box-shadow:var(--wd-shadow)}.filter-bar input,.filter-bar select{border:1px solid var(--wd-line-2);border-radius:10px;padding:10px;min-width:220px}.table.modern-table,.table{width:calc(100% - 48px)!important;margin:0 24px 18px!important;border-collapse:separate!important;border-spacing:0;background:white;border:1px solid var(--wd-line);border-radius:14px;overflow:hidden;box-shadow:var(--wd-shadow)}.table th{background:#f1f7ff;color:#475569;font-size:13px;text-transform:uppercase;letter-spacing:.03em}.table th,.table td{border:0!important;border-bottom:1px solid #e4edf7!important;padding:12px!important}.table tbody tr:hover{background:#f8fbff}.row-warning{background:#fff7ed}.row-muted{opacity:.62}.pill{display:inline-block;border:1px solid #c7d7ec;background:#f3f8ff;border-radius:999px;padding:4px 8px;margin:2px;font-size:12px;font-weight:800}.pagination-wrap{margin:12px 24px}.cards{gap:18px!important}.card,.hero,.form-card,.panel{border-radius:16px!important;border:1px solid var(--wd-line)!important;box-shadow:var(--wd-shadow)!important}.admin-shell{background:transparent}.admin-content{padding:24px}.form-card{gap:14px}.form-card input,.form-card select,.form-card textarea{border:1px solid var(--wd-line-2)!important;border-radius:10px!important;padding:10px!important}.notice{margin:0 24px 14px;border-radius:12px!important;padding:12px 14px!important}.notice.ok{background:#ecfdf5;border:1px solid #86efac;color:#166534}.notice.error{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}.notice.warning{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412}.report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:0 24px 24px}.panel{background:white;padding:18px}.report-line{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e5edf7;padding:10px 0}.cash-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px;margin:0}.cash-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.metric-card{background:white;border:1px solid var(--wd-line);border-radius:16px;padding:16px;box-shadow:var(--wd-shadow)}.metric-card span{display:block;color:var(--wd-muted);font-size:13px}.metric-card strong{font-size:24px}.section-card{background:white;border:1px solid var(--wd-line);border-radius:16px;box-shadow:var(--wd-shadow);padding:18px;margin-bottom:18px}.section-card h2{margin:0 0 14px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.two-col label,.stack label{display:grid;gap:6px;font-weight:800}.two-col input,.two-col select,.stack input,.stack select,.stack textarea{border:1px solid var(--wd-line-2);border-radius:10px;padding:10px}.cash-history{max-height:320px;overflow:auto}.login-card small.demo-hint{display:none!important}.login-card form input[value='admin@wdpos.local']{color:inherit}@media(max-width:1100px){.obpos-shell{grid-template-columns:1fr}.ob-menu{display:none}.ob-main{height:auto;grid-template-rows:auto!important}.ticket-workspace{grid-template-columns:1fr!important}.numpad-area.modern-pad{grid-template-columns:repeat(4,70px)!important}.product-browser{grid-template-columns:1fr!important;height:auto!important}.category-list{display:flex;max-height:none;overflow-x:auto}.cat-btn{min-width:145px}.report-grid,.cash-grid{grid-template-columns:1fr}.cash-summary-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr!important}.filter-bar{flex-wrap:wrap}}


/* v0.8 pantalla completa, header moderno y POS responsive sin scroll en PC */
html, body { height:100%; }
body { overflow:hidden; background:#eef4fb; }
.pos-topbar{height:56px!important;min-height:56px!important;background:linear-gradient(90deg,#07111f,#101a2f)!important;padding:0 14px!important;box-shadow:0 8px 28px rgba(15,23,42,.16);display:grid!important;grid-template-columns:240px 1fr auto;gap:14px;position:relative;z-index:30}.brand-link{color:white;text-decoration:none;display:flex;align-items:center;gap:10px}.brand-logo{display:inline-flex;width:34px;height:34px;border-radius:10px;align-items:center;justify-content:center;background:linear-gradient(135deg,#4ade80,#2563eb);box-shadow:inset 0 0 0 2px #ffffff55}.brand-name{font-size:23px;font-weight:950;letter-spacing:.4px}.top-center{display:flex;justify-content:center;align-items:center;min-width:0}.live-clock{color:#dbeafe;font-weight:800;font-size:14px;white-space:nowrap;background:#ffffff10;border:1px solid #ffffff1c;border-radius:999px;padding:8px 14px}.top-actions{display:flex!important;gap:10px!important;align-items:center!important}.user-chip{color:#e5edff!important;text-decoration:none;background:#ffffff12;border:1px solid #ffffff20;border-radius:999px;padding:8px 12px;font-weight:800;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-menu{position:relative}.nav-menu summary{list-style:none;cursor:pointer;color:white;background:#2563eb;border-radius:10px;padding:9px 13px;font-weight:900}.nav-menu summary::-webkit-details-marker{display:none}.nav-menu-panel{position:absolute;right:0;top:44px;min-width:220px;background:white;border:1px solid #d7e3f5;border-radius:14px;box-shadow:0 24px 80px #0003;padding:8px;display:grid;gap:4px}.nav-menu-panel a{color:#14213d!important;padding:10px 12px!important;border-radius:10px;text-decoration:none!important;font-weight:800}.nav-menu-panel a:hover{background:#eef6ff}.logout-form button{border-radius:10px!important;padding:10px 14px!important;background:#ef4444!important}.container{height:calc(100vh - 56px)!important;min-height:0!important;overflow:hidden}.obpos-shell{height:calc(100vh - 56px)!important;min-height:0!important;overflow:hidden;display:grid;grid-template-columns:170px minmax(0,1fr);background:linear-gradient(180deg,#f8fbff,#eaf2fb)}.ob-menu{overflow:hidden auto}.ob-main{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important}.ob-top{height:38px!important;min-height:38px!important;flex:0 0 38px;background:rgba(255,255,255,.82);backdrop-filter:blur(10px);border-bottom:1px solid #d3e2f3}.ob-status{height:42px!important;min-height:42px!important;flex:0 0 42px;background:#f8fbff;border-bottom:1px solid #dbe8f8;padding:0 12px!important}.ob-actions button{height:30px!important;border-radius:8px;background:#f3f8ff}.cash-warning{flex:0 0 auto;margin:8px 10px!important;min-height:54px;border-radius:14px!important;border:1px solid #fed7aa!important;background:#fff7ed!important;box-shadow:0 10px 30px #fdba7425}.ticket-workspace{flex:1 1 auto;min-height:0!important;display:grid;grid-template-columns:minmax(0,1fr) 286px!important;gap:10px!important;padding:0 10px 8px!important}.ticket-area{min-height:0!important;border-radius:16px;overflow:hidden;border:1px solid #c8d9ed!important;background:#f8fbff;box-shadow:0 14px 34px rgba(37,99,235,.08);grid-template-rows:44px minmax(0,1fr) 58px!important}.ob-toolbar{height:44px}.ob-toolbar input{font-size:18px!important;border-radius:10px!important;border:1px solid #c7d9ee!important;background:white!important}.qr-wide{width:112px!important;color:#4f46e5!important;font-weight:950!important}.ticket-table tbody{height:100%!important;min-height:0!important}.ticket-table th{background:#eff6ff!important;color:#667085;font-weight:900!important}.ticket-table .empty td{padding:26px 12px!important;color:#94a3b8!important}.ticket-totals{height:58px;background:#f8fbff!important;border-top:1px solid #dbe8f8!important}.ticket-totals input{border-radius:9px!important;background:white!important}.numpad-area.modern-pad{grid-template-columns:repeat(4,1fr)!important;grid-auto-rows:minmax(46px,1fr)!important;gap:7px!important;align-content:stretch!important;min-height:0}.numpad-area button{border-radius:12px!important;border:1px solid #c2d4eb!important;background:linear-gradient(#f8fbff,#dcecff)!important;box-shadow:0 4px 10px #1d4ed812;color:#234b8b!important}.numpad-area button:hover,.product-tile:hover{transform:translateY(-1px)}.product-browser{flex:0 0 154px!important;height:154px!important;min-height:154px!important;display:grid;grid-template-columns:190px minmax(0,1fr)!important;gap:10px!important;padding:8px 10px 10px!important;border-top:1px solid #dbe8f8!important;background:#edf5ff!important;overflow:hidden}.category-list{max-height:136px!important;overflow-y:auto!important;border-radius:14px;border:1px solid #c7d9ee!important;background:white}.cat-btn{padding:10px 12px!important;background:#fff!important}.cat-btn.active{background:linear-gradient(135deg,#3b4de3,#5b4ee6)!important;color:white!important}.ob-products{display:flex!important;flex-wrap:nowrap!important;gap:12px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0 2px 4px!important;align-items:stretch}.product-tile{flex:0 0 150px!important;width:150px!important;height:126px!important;min-height:126px!important;border-radius:14px!important;border:1px solid #c7d9ee!important;background:linear-gradient(180deg,#ffffff,#edf7ff)!important;box-shadow:0 12px 28px rgba(15,23,42,.08);transition:.15s ease}.product-tile strong{font-size:17px!important}.product-tile small{word-break:break-all}.payment-card{border-radius:18px!important;border:1px solid #dbe8f8!important;box-shadow:0 30px 90px #0005!important}.pay-methods button,.bill-buttons button{border-radius:10px!important}.admin-content{height:100%;overflow:auto}.side-logout button{background:none;border:0;padding:6px 8px;font-weight:700;cursor:pointer}.notice.setup-error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca;border-radius:12px;padding:14px;margin:0 0 16px;font-weight:800}
@media(max-width:1100px){body{overflow:auto}.pos-topbar{height:auto!important;grid-template-columns:1fr;gap:8px;padding:10px!important}.top-center{justify-content:flex-start}.top-actions{flex-wrap:wrap}.container{height:auto!important;overflow:visible}.obpos-shell{height:auto!important;min-height:calc(100vh - 100px)!important;grid-template-columns:1fr!important;overflow:visible}.ob-main{overflow:visible!important}.ticket-workspace{grid-template-columns:1fr!important}.product-browser{height:auto!important;min-height:180px!important;grid-template-columns:1fr!important}.category-list{display:flex!important;max-height:none!important;overflow-x:auto!important}.cat-btn{min-width:145px}.ob-products{flex-wrap:wrap!important;overflow:visible!important}.product-tile{flex:1 1 145px!important;max-width:180px}.live-clock{font-size:12px}.nav-menu-panel{right:auto;left:0}}
@media(max-width:640px){.ticket-totals{display:grid!important;height:auto!important;grid-template-columns:1fr}.ticket-totals label{display:flex;justify-content:space-between}.numpad-area.modern-pad{grid-auto-rows:54px!important}.payment-card{width:min(96vw,560px)!important}.pay-methods,.bill-buttons{grid-template-columns:repeat(2,1fr)!important}}

/* v1.0 lógica POS + ajuste visual 2026 */
:root{--wd-surface:#ffffff;--wd-soft:#f4f8ff;--wd-accent:#2563eb;--wd-accent2:#22c55e;--wd-text:#0f172a;--wd-muted:#64748b;--wd-border:#cddcf0;--wd-shadow-soft:0 14px 34px rgba(37,99,235,.10)}
.ob-main{background:linear-gradient(180deg,#f8fbff 0%,#eaf3ff 100%)}
.cash-warning{min-height:48px!important;margin:6px 10px!important;padding:14px 16px!important;display:flex;align-items:center;justify-content:space-between;gap:14px}
.ticket-workspace{flex:1 1 auto!important;padding-top:0!important;grid-template-columns:minmax(0,1fr) 330px!important;gap:12px!important}
.ticket-area{box-shadow:var(--wd-shadow-soft)!important;background:rgba(255,255,255,.76)!important;backdrop-filter:blur(12px)}
.ticket-table tbody{background:#f7fbff!important}.ticket-table th:nth-child(5)::after{content:''}.product-browser{flex:0 0 176px!important;height:176px!important;min-height:176px!important;padding-top:6px!important}.category-list{max-height:158px!important}.ob-products{gap:14px!important}.product-tile{flex:0 0 162px!important;width:162px!important;height:142px!important;min-height:142px!important;padding:14px!important;position:relative;overflow:hidden}.product-tile span{line-height:1.15}.product-tile em{font-style:normal;font-size:11px;color:#64748b;margin-top:5px}.product-tile.out-of-stock{opacity:.48;filter:grayscale(.5);cursor:not-allowed}.product-tile.out-of-stock::before{content:'AGOTADO';position:absolute;right:-28px;top:16px;transform:rotate(38deg);background:#dc2626;color:white;font-weight:900;font-size:11px;padding:3px 28px}.ob-pad-v2{grid-template-columns:repeat(5,1fr)!important;grid-template-rows:repeat(4,1fr)!important;gap:8px!important}.ob-pad-v2 button{min-width:0;font-size:25px!important;font-weight:950!important}.ob-pad-v2 .orange{color:#f97316!important}.ob-pad-v2 .equals{background:linear-gradient(135deg,#22c55e,#2563eb)!important;color:white!important}.ob-pad-v2 .ce{color:#111827!important}.ob-pad-v2 .key-hit{transform:translateY(1px) scale(.96)!important;box-shadow:inset 0 4px 12px rgba(37,99,235,.30)!important;background:linear-gradient(#bfdbfe,#93c5fd)!important}.scan-input{height:38px!important}.ob-toolbar{grid-template-columns:minmax(0,1fr) 118px 46px 46px 46px 46px 46px!important}.notif-menu{position:relative}.notif-menu summary{list-style:none;cursor:pointer;color:#0f172a;background:#f8fafc;border:1px solid #33415522;border-radius:12px;padding:9px 11px;font-weight:900}.notif-menu summary::-webkit-details-marker{display:none}.notif-menu summary span{display:inline-flex;align-items:center;justify-content:center;background:#ef4444;color:white;border-radius:999px;min-width:18px;height:18px;font-size:11px;margin-left:2px}.notif-panel{position:absolute;right:0;top:45px;width:340px;max-width:90vw;background:white;border:1px solid #d7e3f5;border-radius:16px;box-shadow:0 26px 90px rgba(15,23,42,.25);padding:12px;z-index:80}.notif-panel strong{display:block;margin-bottom:8px}.notif-item{display:grid;gap:2px;text-decoration:none;color:#0f172a;border-radius:12px;padding:10px;border:1px solid #e5edf7;margin-bottom:7px;background:#f8fbff}.notif-item small{color:#64748b;line-height:1.25}.notif-item.warning{border-color:#fed7aa;background:#fff7ed}.notif-item.critical{border-color:#fecaca;background:#fef2f2}.notif-empty{color:#64748b;padding:10px}.notif-all{display:block;text-align:center;text-decoration:none;font-weight:900;color:#2563eb;padding:8px}.top-actions{position:relative}.brand-link:hover .brand-name{text-decoration:underline;text-underline-offset:4px}@media(max-width:1100px){.ticket-workspace{grid-template-columns:1fr!important}.ob-pad-v2{grid-template-columns:repeat(5,minmax(54px,1fr))!important;grid-auto-rows:58px!important}.product-browser{height:auto!important;min-height:210px!important}.product-tile{flex:1 1 150px!important}.notif-panel{left:auto;right:0}}@media(max-width:640px){.ob-pad-v2{grid-template-columns:repeat(5,1fr)!important}.ob-pad-v2 button{font-size:20px!important}.ticket-workspace{padding:6px!important}.product-browser{padding:6px!important}.product-tile{flex:1 1 45%!important;height:122px!important}.ob-toolbar{grid-template-columns:1fr 80px!important;grid-auto-flow:row}.ob-toolbar button:not(.qr-wide){display:none}.cash-warning{align-items:flex-start;flex-direction:column}.notif-panel{right:-70px}}

/* v1.2 unificación visual, POS sin desorden y catálogo más alto */
body{font-family:Inter,Arial,Helvetica,sans-serif;background:#eef5ff;color:#07172f}a{color:#2437a8}.brand-logo{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#67e8f9,#4f46e5);box-shadow:0 8px 20px #1d4ed840;color:#fff}.brand-name{letter-spacing:.2px}.topbar.pos-topbar{height:58px!important;background:#081225!important;box-shadow:0 12px 34px rgba(7,23,47,.18);padding:0 14px!important}.live-clock{border-radius:999px;background:#111d34!important;border:1px solid rgba(255,255,255,.16)!important;color:#fff!important}.user-chip{border-radius:999px;background:#14213d!important;border:1px solid rgba(255,255,255,.14);padding:10px 14px}.nav-menu summary{border-radius:12px;background:#3655f4!important;color:#fff!important;box-shadow:0 12px 28px rgba(54,85,244,.32)}.grouped-menu{width:285px!important;max-height:calc(100vh - 86px);overflow:auto}.menu-section-title{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;padding:9px 10px 4px;font-weight:950}.nav-menu-panel a{font-size:15px}.logout-form button{background:linear-gradient(135deg,#ef4444,#dc2626)!important;box-shadow:0 10px 24px #dc262640}.container{height:calc(100vh - 58px)!important}.obpos-shell{height:calc(100vh - 58px)!important;grid-template-columns:176px minmax(0,1fr)!important;background:#edf5ff!important}.ob-menu{background:#e9f3ff!important;border-right:1px solid #b7cbe5!important;padding:8px 6px!important}.menu-group{border-radius:10px!important;overflow:hidden;border:1px solid #b7cbe5!important;box-shadow:0 7px 18px rgba(15,23,42,.04)}.menu-title{background:linear-gradient(180deg,#e8f5ff,#cde3fa)!important;color:#0f172a!important}.menu-group a,.side-logout button{font-size:13px!important;border-radius:8px;margin:2px 4px}.menu-group a.active{background:#dbeafe!important;color:#2437a8}.ob-top{height:34px!important;min-height:34px!important}.ob-brand{font-size:13px!important}.power{font-size:19px!important;line-height:20px!important;border-radius:8px!important}.ob-status{height:38px!important;min-height:38px!important}.badge{padding:7px 14px!important;box-shadow:0 8px 16px rgba(15,23,42,.10)}.cash-warning{min-height:58px!important;margin:6px 10px 6px!important}.ticket-workspace{flex:1 1 auto!important;grid-template-columns:minmax(0,1fr) 258px!important;gap:10px!important;padding:0 10px 6px!important;min-height:310px}.ticket-area{grid-template-rows:40px minmax(0,1fr) 50px!important}.ob-toolbar{height:40px!important;padding:4px!important}.ob-toolbar button{height:31px!important;border-radius:9px!important}.scan-input{height:32px!important;font-size:16px!important}.qr-wide{width:120px!important}.ticket-table th{height:29px!important}.ticket-table tbody tr{height:40px!important}.ticket-table td{padding:6px 8px!important}.ticket-totals{height:50px!important;padding:6px 10px!important}.ticket-totals input{height:31px!important;width:140px!important}.ob-pad-classic{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(5,1fr)!important;gap:7px!important;align-content:stretch!important}.ob-pad-classic button{min-height:0!important;border-radius:10px!important;font-size:23px!important}.ob-pad-classic .tall{grid-row:span 2}.ob-pad-classic .zero{grid-column:span 2}.ob-pad-classic .op-key{color:#12377a!important}.ob-pad-classic .equals{background:linear-gradient(135deg,#59c173,#2563eb)!important;color:#fff!important}.ob-pad-classic .barcode{font-size:22px!important}.ob-pad-classic .key-hit,.ob-toolbar .key-hit{animation:wdKeyHit .18s ease;filter:brightness(.92)}@keyframes wdKeyHit{0%{transform:scale(1)}50%{transform:scale(.94);box-shadow:inset 0 0 0 999px rgba(37,99,235,.14)}100%{transform:scale(1)}}.product-browser{flex:0 0 246px!important;height:246px!important;min-height:246px!important;grid-template-columns:188px minmax(0,1fr)!important;padding:8px 10px 10px!important;background:#eaf4ff!important}.category-list{max-height:228px!important;border-radius:12px!important}.cat-btn{min-height:38px!important;padding:9px 12px!important}.ob-products{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(140px,150px))!important;gap:12px!important;overflow:auto!important;align-content:start!important}.product-tile{width:auto!important;flex:initial!important;height:112px!important;min-height:112px!important;border-radius:14px!important;padding:10px!important;display:grid!important;grid-template-columns:auto 1fr;grid-template-rows:auto auto auto;column-gap:8px;align-content:end}.product-tile .tile-img{grid-row:1 / span 3;width:38px;height:38px;border-radius:10px;object-fit:cover;align-self:end;border:1px solid #dbe8f8}.product-tile span{font-size:13px!important;align-self:end}.product-tile strong{font-size:15px!important;margin:0!important}.product-tile small,.product-tile em{font-size:10.5px!important;color:#5f6f86}.modal-card{border-radius:18px!important}.pay-summary strong,.change-box strong{font-size:26px}.admin-page{min-height:calc(100vh - 58px);padding:22px;background:linear-gradient(180deg,#f8fbff,#eaf3ff)}.page-head{padding:0 0 16px!important}.page-head h1{font-size:30px;margin:0;color:#07172f}.panel-card,.product-form-card,.clean-form,.form-card.wide{background:rgba(255,255,255,.92)!important;border:1px solid #d2e0f3!important;border-radius:18px!important;box-shadow:0 18px 46px rgba(37,99,235,.09)!important}.panel-card{padding:0;overflow:hidden}.table.fit{width:100%!important;margin:0!important}.modern-table th{background:#f1f6ff!important;color:#334155;text-transform:uppercase;font-size:12px;letter-spacing:.04em}.modern-table td{border-color:#e3edf8!important}.product-form-card{display:grid;grid-template-columns:260px 1fr;gap:22px;padding:18px;margin:0 0 22px}.product-photo-card{border:1px dashed #b9ccea;border-radius:18px;background:#f8fbff;padding:14px;display:flex;flex-direction:column;gap:12px;align-self:start}.photo-preview{height:190px;border-radius:14px;background:linear-gradient(180deg,#fff,#edf5ff);display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e1ebf8}.photo-preview img{width:100%;height:100%;object-fit:cover}.photo-placeholder{font-size:50px;opacity:.7}.upload-box{display:grid!important;gap:8px;font-weight:900}.upload-box input{border:1px solid #c7d9ee!important;border-radius:10px!important;background:white!important;padding:9px!important}.product-photo-card small{color:#64748b}.stock-mini{display:flex;justify-content:space-between;align-items:center;border-radius:12px;background:#eaf4ff;padding:12px;font-weight:800}.stock-mini span{color:#64748b}.stock-mini strong{font-size:24px}.btn.full{text-align:center}.product-form-main{display:grid;gap:14px}.section-title{font-weight:950;color:#2437a8;border-bottom:1px solid #e2ebf7;padding-bottom:8px;margin-top:4px}.form-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.form-grid label,.clean-form label,.product-form-main label{font-weight:850;color:#0f172a}.form-grid input,.form-grid select,.form-grid textarea,.clean-form input,.clean-form select,.product-form-main input,.product-form-main select,.product-form-main textarea{border:1px solid #c3d5ed!important;border-radius:11px!important;background:white!important;padding:11px 12px!important;min-height:42px}.form-grid small{color:#64748b;font-weight:700}.span-2{grid-column:span 2}.form-switches{display:flex;flex-wrap:wrap;gap:16px;padding:12px;border-radius:14px;background:#f8fbff}.form-actions{display:flex;gap:10px;align-items:center}.product-cell{display:flex;align-items:center;gap:10px}.product-cell img,.product-mini-photo{width:42px;height:42px;border-radius:12px;object-fit:cover;background:#eef6ff;display:inline-flex;align-items:center;justify-content:center;border:1px solid #dbe8f8}.grouped-head{gap:14px;align-items:center}.head-actions{display:flex;gap:8px;flex-wrap:wrap}.filter-bar{margin:0 0 16px!important;background:white;border:1px solid #d2e0f3;border-radius:16px;padding:12px;display:flex;gap:8px}.filter-bar input{border:1px solid #c3d5ed!important;border-radius:10px!important;padding:10px 12px!important}.cards{padding:0 0 18px!important}.card{border-radius:18px!important;border:1px solid #d2e0f3!important;box-shadow:0 14px 34px rgba(37,99,235,.08)!important}.hero{border-radius:18px!important;border:1px solid #d2e0f3!important;box-shadow:0 14px 34px rgba(37,99,235,.08)!important;margin:0!important}.row-warning{background:#fff7ed!important}.notice.ok{background:#dcfce7;color:#166534;border:1px solid #86efac;border-radius:12px;padding:12px;margin:0 0 14px;font-weight:850}.ticket-body .ticket-line strong,.ticket-body strong{white-space:nowrap}
@media(max-width:1200px){.ticket-workspace{grid-template-columns:minmax(0,1fr) 230px!important}.product-browser{flex-basis:230px!important;height:230px!important;min-height:230px!important}.ob-pad-classic button{font-size:20px!important}.form-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.product-form-card{grid-template-columns:220px 1fr}.top-actions{gap:8px!important}.user-chip{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(max-width:900px){body{overflow:auto}.container{height:auto!important;overflow:visible!important}.obpos-shell{height:auto!important;grid-template-columns:1fr!important}.ob-menu{display:none}.ticket-workspace{grid-template-columns:1fr!important}.ob-pad-classic{grid-template-columns:repeat(4,1fr)!important;grid-auto-rows:60px!important}.product-browser{height:auto!important;min-height:260px!important;grid-template-columns:1fr!important}.category-list{display:flex!important;max-height:none!important;overflow-x:auto!important}.cat-btn{min-width:150px}.ob-products{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important}.product-form-card{grid-template-columns:1fr}.product-photo-card{max-width:360px}.form-grid.compact{grid-template-columns:1fr}.span-2{grid-column:auto}.topbar.pos-topbar{height:auto!important;min-height:58px;flex-wrap:wrap;padding:9px!important}.container{min-height:calc(100vh - 90px)}.admin-page{min-height:calc(100vh - 90px);padding:14px}.nav-menu-panel{right:0!important;left:auto!important}.page-head{flex-direction:column;align-items:flex-start!important}}
@media(max-width:560px){.ticket-totals{grid-template-columns:1fr!important;display:grid!important;height:auto!important}.ticket-totals label{display:flex;justify-content:space-between}.ob-pad-classic button{font-size:18px!important}.product-tile{height:105px!important}.payment-card{width:min(96vw,560px)!important}.pay-methods,.bill-buttons{grid-template-columns:repeat(2,1fr)!important}.cards{grid-template-columns:1fr!important}.live-clock{font-size:11px}.user-chip{display:none}.grouped-menu{width:min(92vw,300px)!important}}

/* v1.3 - ajustes POS, multiempresa y vistas administrativas */
@media(min-width:901px){body{overflow:hidden}.container{overflow:hidden}.ob-main{display:flex!important;flex-direction:column!important}.ticket-workspace{flex:1 1 auto!important;min-height:250px!important}.product-browser{flex:0 0 300px!important;height:300px!important;min-height:300px!important;margin-top:0!important;align-items:stretch}.category-list{max-height:282px!important}.ob-products{max-height:282px!important}}
.brand-img{width:34px;height:34px;border-radius:10px;object-fit:cover;background:#fff;border:1px solid rgba(255,255,255,.35)}
.ob-pad-classic{grid-template-columns:repeat(4,1fr)!important;grid-template-rows:repeat(5,1fr)!important;grid-template-areas:"ce star minus n7" "n8 n9 plus n4" "n5 n6 plus n1" "n2 n3 eq n0" "dot barcode eq blank";gap:7px!important}
.ob-pad-classic [data-key="Escape"]{grid-area:ce}.ob-pad-classic [data-key="*"]{grid-area:star}.ob-pad-classic [data-key="-"]{grid-area:minus}.ob-pad-classic [data-key="7"]{grid-area:n7}.ob-pad-classic [data-key="8"]{grid-area:n8}.ob-pad-classic [data-key="9"]{grid-area:n9}.ob-pad-classic [data-key="+"]{grid-area:plus}.ob-pad-classic [data-key="4"]{grid-area:n4}.ob-pad-classic [data-key="5"]{grid-area:n5}.ob-pad-classic [data-key="6"]{grid-area:n6}.ob-pad-classic [data-key="1"]{grid-area:n1}.ob-pad-classic [data-key="2"]{grid-area:n2}.ob-pad-classic [data-key="3"]{grid-area:n3}.ob-pad-classic [data-key="Enter"]{grid-area:eq}.ob-pad-classic [data-key="0"]{grid-area:n0;grid-column:auto!important}.ob-pad-classic [data-key="."]{grid-area:dot}.ob-pad-classic [data-key="QR"]{grid-area:barcode}.ob-pad-classic button{width:100%!important;height:100%!important}.ob-pad-classic .tall,.ob-pad-classic .zero{grid-row:auto!important;grid-column:auto!important}.ob-pad-classic .equals{grid-row:auto!important;grid-column:auto!important}
.product-browser{border-top:1px solid #d7e5f7!important}.product-grid.ob-products{grid-template-columns:repeat(auto-fill,minmax(164px,176px))!important;gap:12px!important;padding:0 4px 8px 4px}.product-tile{height:126px!important;min-height:126px!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:flex-end!important;gap:9px!important;padding:10px!important}.product-tile .tile-photo{width:44px;height:44px;border-radius:12px;background:#eef6ff;border:1px solid #dbe8f8;display:flex;align-items:center;justify-content:center;flex:0 0 auto;overflow:hidden}.product-tile .tile-img{width:100%!important;height:100%!important;border:0!important;border-radius:12px!important;object-fit:cover}.product-tile .tile-info{min-width:0;display:grid;gap:1px;line-height:1.08}.product-tile .tile-info span{font-size:13px!important;line-height:1.06;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.product-tile .tile-info strong{font-size:15px!important;line-height:1.1;white-space:nowrap}.product-tile .tile-info small{font-size:10.5px!important;overflow:hidden;text-overflow:ellipsis}.product-tile .tile-cat{color:#2563eb!important;font-weight:800}.product-tile .tile-info em{font-size:10.5px!important;color:#475569;font-style:normal}.product-tile[style*="display: none"]{display:none!important}.cat-btn{display:flex!important;align-items:center;gap:7px}.cat-btn.active{background:linear-gradient(135deg,#4f46e5,#2563eb)!important;color:white!important}.scan-input{box-shadow:inset 0 0 0 1px #dbe8f8}.admin-shell{display:block!important;min-height:calc(100vh - 58px)!important;background:linear-gradient(180deg,#f8fbff,#eaf3ff)!important}.admin-shell>.admin-content{max-width:100%!important;padding:24px!important}.admin-content.full{padding:24px!important;background:linear-gradient(180deg,#f8fbff,#eaf3ff)}.table.modern-table{width:100%!important;margin:0!important;border-radius:16px;overflow:hidden;display:table;box-shadow:0 14px 34px rgba(37,99,235,.08)}.notifications-page .notifications-grid{display:grid;gap:12px}.notification-card{background:white;border:1px solid #d2e0f3;border-radius:16px;box-shadow:0 14px 34px rgba(37,99,235,.08);padding:14px;display:grid;grid-template-columns:150px 110px 1fr auto;gap:14px;align-items:start}.notification-card .level{font-weight:950;text-transform:uppercase}.notification-card.critical{border-left:6px solid #dc2626}.notification-card.warning{border-left:6px solid #f59e0b}.notification-card.info{border-left:6px solid #2563eb}.notification-card small{color:#64748b}.notification-card p{margin:4px 0 0}.muted{color:#64748b}.modern-card{background:white;border:1px solid #d2e0f3;border-radius:16px;padding:14px;margin:0 0 14px;box-shadow:0 14px 34px rgba(37,99,235,.06)}
@media(max-width:900px){body{overflow:auto}.ob-pad-classic{grid-template-areas:"ce star minus n7" "n8 n9 plus n4" "n5 n6 plus n1" "n2 n3 eq n0" "dot barcode eq blank"}.product-browser{flex-basis:auto!important;height:auto!important}.notification-card{grid-template-columns:1fr}.admin-shell>.admin-content{padding:14px!important}.product-grid.ob-products{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important}}
/* teclado final tipo Openbravo: operadores a la derecha */
.ob-pad-classic{grid-template-areas:"ce star minus ." "n7 n8 n9 plus" "n4 n5 n6 plus" "n1 n2 n3 eq" "n0 dot barcode eq"!important}

/* v1.3.1 hotfix: vista POS, teclado clásico y notificaciones */
@media(min-width:901px){
  .ob-main{grid-template-rows:42px 34px minmax(360px, 1fr) 265px!important;}
  .ticket-workspace{flex:0 1 auto!important;min-height:360px!important;max-height:calc(100vh - 455px)!important;padding-bottom:4px!important;}
  .product-browser{flex:0 0 265px!important;height:265px!important;min-height:265px!important;padding-top:8px!important;}
  .category-list{max-height:247px!important;}
  .ob-products{max-height:247px!important;}
}
.ob-pad-classic{display:grid!important;grid-template-columns:repeat(4,70px)!important;grid-template-areas:
  "ce star minus del"
  "n7 n8 n9 plus"
  "n4 n5 n6 plus"
  "n1 n2 n3 eq"
  "n0 n0 dot barcode"!important;grid-auto-rows:56px!important;gap:7px!important;align-content:start!important;justify-content:center!important;}
.ob-pad-classic [data-key="Escape"]{grid-area:ce!important}.ob-pad-classic [data-key="*"]{grid-area:star!important}.ob-pad-classic [data-key="-"]{grid-area:minus!important}.ob-pad-classic [data-key="Delete"]{grid-area:del!important}.ob-pad-classic [data-key="7"]{grid-area:n7!important}.ob-pad-classic [data-key="8"]{grid-area:n8!important}.ob-pad-classic [data-key="9"]{grid-area:n9!important}.ob-pad-classic [data-key="+"]{grid-area:plus!important}.ob-pad-classic [data-key="4"]{grid-area:n4!important}.ob-pad-classic [data-key="5"]{grid-area:n5!important}.ob-pad-classic [data-key="6"]{grid-area:n6!important}.ob-pad-classic [data-key="1"]{grid-area:n1!important}.ob-pad-classic [data-key="2"]{grid-area:n2!important}.ob-pad-classic [data-key="3"]{grid-area:n3!important}.ob-pad-classic [data-key="Enter"]{grid-area:eq!important}.ob-pad-classic [data-key="0"]{grid-area:n0!important}.ob-pad-classic [data-key="."]{grid-area:dot!important}.ob-pad-classic [data-key="QR"]{grid-area:barcode!important}.ob-pad-classic .tall,.ob-pad-classic .zero,.ob-pad-classic .equals{grid-row:auto!important;grid-column:auto!important}.ob-pad-classic button{width:100%!important;height:100%!important;min-width:0!important;}
.product-grid.ob-products{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(168px,178px))!important;gap:14px!important;align-content:start!important;align-items:start!important;padding:0 6px 10px!important;}
.product-tile{height:118px!important;min-height:118px!important;max-height:118px!important;border-radius:14px!important;display:grid!important;grid-template-columns:44px 1fr!important;align-items:end!important;gap:10px!important;}
.product-tile .tile-info{min-width:0!important}.product-tile .tile-info strong{font-size:14px!important}.product-tile .tile-info span{font-size:13px!important}.product-tile .tile-info small,.product-tile .tile-info em{font-size:10.5px!important;}
.admin-page.notifications-page{min-height:calc(100vh - 58px);padding:24px;background:linear-gradient(180deg,#f8fbff,#eaf3ff)}
.notifications-page .clean-head{padding:0;margin:0 0 16px;align-items:center}.notifications-list{display:grid;gap:12px;max-width:1180px}.notification-card{background:white;border:1px solid #d2e0f3;border-radius:18px;box-shadow:0 14px 34px rgba(37,99,235,.08);padding:16px;display:grid;grid-template-columns:150px 110px minmax(0,1fr) auto;gap:16px;align-items:center}.notification-card small{display:block;color:#64748b;font-weight:800;text-transform:uppercase;font-size:11px}.notification-card h3{margin:2px 0 4px;font-size:17px}.notification-card p{margin:0;color:#334155}.notification-level span{font-weight:950}.notification-card.critical{border-left:7px solid #dc2626}.notification-card.warning{border-left:7px solid #f59e0b}.notification-card.info{border-left:7px solid #2563eb}.pagination-wrap{margin-top:14px}.key-hit{transform:translateY(1px) scale(.98)!important;box-shadow:inset 0 0 0 3px rgba(37,99,235,.35)!important;filter:brightness(.96)!important;}
@media(max-width:900px){.ob-pad-classic{grid-template-columns:repeat(4,1fr)!important;grid-template-areas:"ce star minus del" "n7 n8 n9 plus" "n4 n5 n6 plus" "n1 n2 n3 eq" "n0 n0 dot barcode"!important}.notification-card{grid-template-columns:1fr!important}.admin-page.notifications-page{padding:14px}}

/* v1.3.2 - ajuste fino POS sin regresiones */
@media(min-width:901px){
  body{overflow:hidden!important;}
  .container{height:calc(100vh - 58px)!important;overflow:hidden!important;}
  .obpos-shell{height:calc(100vh - 58px)!important;}
  .ob-main{display:flex!important;flex-direction:column!important;min-height:0!important;}
  .ob-top{flex:0 0 34px!important;height:34px!important;}
  .ob-status{flex:0 0 34px!important;height:34px!important;}
  .cash-warning{flex:0 0 auto!important;margin:6px 8px!important;padding:10px 12px!important;}
  .ticket-workspace{flex:1 1 auto!important;min-height:330px!important;max-height:none!important;display:grid!important;grid-template-columns:minmax(0,1fr) 292px!important;gap:8px!important;padding:6px 8px 6px!important;}
  .ticket-area{min-height:0!important;display:grid!important;grid-template-rows:42px minmax(0,1fr) 58px!important;}
  .product-browser{flex:0 0 282px!important;height:282px!important;min-height:282px!important;margin-top:0!important;padding:8px!important;display:grid!important;grid-template-columns:184px minmax(0,1fr)!important;gap:10px!important;}
  .category-list{max-height:264px!important;overflow:auto!important;}
  .ob-products{max-height:264px!important;overflow:auto!important;}
}
.ticket-table{table-layout:fixed!important;}
.ticket-table th:nth-child(1),.ticket-table td:nth-child(1){width:30%!important;text-align:left!important;}
.ticket-table th:nth-child(2),.ticket-table td:nth-child(2){width:20%!important;text-align:right!important;}
.ticket-table th:nth-child(3),.ticket-table td:nth-child(3){width:18%!important;text-align:right!important;}
.ticket-table th:nth-child(4),.ticket-table td:nth-child(4){width:18%!important;text-align:right!important;}
.ticket-table th:nth-child(5),.ticket-table td:nth-child(5){width:20%!important;text-align:right!important;}
.ticket-table th{font-weight:900!important;color:#667085!important;font-size:15px!important;}
.ticket-row td{vertical-align:middle!important;padding:8px 10px!important;}

/* Teclado final: mismo orden clásico POS/Openbravo, sin solapamientos */
.numpad-area.ob-pad-classic{width:100%!important;max-width:292px!important;min-width:0!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(5,minmax(54px,1fr))!important;grid-template-areas:
  "ce star minus del"
  "n7 n8 n9 plus"
  "n4 n5 n6 plus"
  "n1 n2 n3 eq"
  "n0 dot barcode eq"!important;gap:7px!important;align-content:stretch!important;justify-content:stretch!important;overflow:hidden!important;}
.numpad-area.ob-pad-classic button{width:100%!important;height:100%!important;min-width:0!important;min-height:54px!important;border-radius:10px!important;font-size:22px!important;line-height:1!important;display:flex!important;align-items:center!important;justify-content:center!important;}
.numpad-area.ob-pad-classic .equals{background:linear-gradient(135deg,#5bd18b,#3968ee)!important;color:#fff!important;font-size:24px!important;}
.numpad-area.ob-pad-classic [data-key="+"]{grid-area:plus!important;}
.numpad-area.ob-pad-classic [data-key="Enter"]{grid-area:eq!important;}
.numpad-area.ob-pad-classic [data-key="0"]{grid-area:n0!important;}
.numpad-area.ob-pad-classic [data-key="QR"]{grid-area:barcode!important;}
.numpad-area.ob-pad-classic [data-key="Delete"]{grid-area:del!important;}
.numpad-area.ob-pad-classic [data-key="Escape"]{grid-area:ce!important;}
.numpad-area.ob-pad-classic [data-key="*"]{grid-area:star!important;}
.numpad-area.ob-pad-classic [data-key="-"]{grid-area:minus!important;}
.numpad-area.ob-pad-classic [data-key="7"]{grid-area:n7!important;}
.numpad-area.ob-pad-classic [data-key="8"]{grid-area:n8!important;}
.numpad-area.ob-pad-classic [data-key="9"]{grid-area:n9!important;}
.numpad-area.ob-pad-classic [data-key="4"]{grid-area:n4!important;}
.numpad-area.ob-pad-classic [data-key="5"]{grid-area:n5!important;}
.numpad-area.ob-pad-classic [data-key="6"]{grid-area:n6!important;}
.numpad-area.ob-pad-classic [data-key="1"]{grid-area:n1!important;}
.numpad-area.ob-pad-classic [data-key="2"]{grid-area:n2!important;}
.numpad-area.ob-pad-classic [data-key="3"]{grid-area:n3!important;}
.numpad-area.ob-pad-classic [data-key="."]{grid-area:dot!important;}

/* Catálogo y tarjetas mejor alineadas */
.product-grid.ob-products{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(170px,180px))!important;gap:14px!important;align-content:start!important;align-items:start!important;padding:0 6px 10px!important;}
.product-tile{height:124px!important;min-height:124px!important;max-height:124px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:center!important;gap:10px!important;padding:10px!important;border-radius:14px!important;}
.product-tile .tile-photo{align-self:center!important;margin:0!important;}
.product-tile .tile-info{height:100%!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:flex-start!important;gap:1px!important;line-height:1.05!important;overflow:hidden!important;}
.product-tile .tile-info span{width:100%!important;min-height:24px!important;font-size:13px!important;font-weight:900!important;line-height:1.05!important;}
.product-tile .tile-info strong{width:100%!important;font-size:14px!important;margin:0!important;white-space:normal!important;line-height:1.05!important;}
.product-tile .tile-info small,.product-tile .tile-info em{width:100%!important;font-size:10.5px!important;line-height:1.08!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.product-tile .tile-cat{color:#2563eb!important;font-weight:900!important;}

/* Notificaciones centradas y legibles */
.admin-page.notifications-page{padding:24px!important;min-height:calc(100vh - 58px)!important;background:linear-gradient(180deg,#f8fbff,#eaf3ff)!important;}
.notifications-page .clean-head{max-width:1180px!important;margin:0 auto 16px!important;padding:0!important;display:flex!important;justify-content:space-between!important;align-items:center!important;gap:16px!important;}
.notifications-list{max-width:1180px!important;margin:0 auto!important;display:grid!important;gap:12px!important;}
.notification-card{width:100%!important;display:grid!important;grid-template-columns:160px 120px minmax(0,1fr) 120px!important;gap:16px!important;align-items:center!important;background:#fff!important;border-radius:18px!important;padding:16px!important;box-shadow:0 14px 34px rgba(37,99,235,.08)!important;}
.pagination-wrap{max-width:1180px!important;margin:14px auto 0!important;}
@media(max-width:900px){
  .ticket-workspace{grid-template-columns:1fr!important;}
  .numpad-area.ob-pad-classic{max-width:none!important;grid-template-rows:repeat(5,56px)!important;}
  .product-browser{grid-template-columns:1fr!important;height:auto!important;min-height:0!important;}
  .category-list{display:flex!important;max-height:none!important;overflow:auto!important;}
  .product-grid.ob-products{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important;}
  .notification-card{grid-template-columns:1fr!important;}
  .notifications-page .clean-head{display:block!important;}
}

/* v1.4 - estabilidad multiempresa, responsive y alineación general */
:root{--radius:14px;--brand:#2563eb;--ink:#08142b;--muted:#64748b;--panel:#ffffff;--line:#c8d8ec;--bg2:#eaf3ff}
body{background:#edf5ff;color:var(--ink)}
.topbar.pos-topbar{height:58px!important;padding:0 12px!important;gap:10px!important;overflow:hidden}.brand-link{min-width:0;max-width:360px;display:flex!important;align-items:center;gap:10px}.brand-name{display:block;max-width:300px;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;font-size:22px!important;line-height:1!important}.brand-img{height:34px;max-width:120px;object-fit:contain}.brand-logo{flex:0 0 34px}.top-center{position:absolute;left:50%;transform:translateX(-50%)}
@media(max-width:800px){.top-center{display:none}.brand-name{max-width:170px;font-size:18px!important}.top-actions{gap:6px!important}.user-chip{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logout-form button{padding:8px 10px!important}}

/* POS: una sola pantalla en PC, catálogo visible y tabla alineada */
@media(min-width:901px){
  .obpos-shell{height:calc(100vh - 58px)!important;grid-template-columns:174px minmax(0,1fr)!important;overflow:hidden!important}.ob-menu{height:100%;overflow:auto}.ob-main{height:100%;display:flex!important;flex-direction:column!important;overflow:hidden!important}.ob-top{height:32px!important;flex:0 0 32px!important}.ob-status{height:34px!important;flex:0 0 34px!important}.cash-warning{margin:6px 8px!important;padding:9px 12px!important;flex:0 0 auto!important}.ticket-workspace{flex:1 1 55%!important;min-height:280px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 292px!important;gap:8px!important;padding:6px 8px!important}.ticket-area{height:100%!important;min-height:0!important;display:grid!important;grid-template-rows:42px minmax(0,1fr) 58px!important}.product-browser{flex:0 0 250px!important;height:250px!important;min-height:250px!important;margin-top:0!important;padding:8px!important;grid-template-columns:184px minmax(0,1fr)!important}.category-list{height:232px!important;max-height:232px!important;overflow:auto!important}.product-grid.ob-products{height:232px!important;max-height:232px!important;overflow:auto!important;grid-template-columns:repeat(auto-fill,minmax(170px,180px))!important;gap:14px!important;align-content:start!important}.container{overflow:hidden!important}.admin-content.settings-content{height:calc(100vh - 58px);overflow:auto;padding-bottom:70px!important}
}
.ticket-table{table-layout:fixed!important;width:100%!important}.ticket-table thead,.ticket-table tbody tr{display:table!important;width:100%!important;table-layout:fixed!important}.ticket-table tbody{display:block!important;overflow:auto!important}.ticket-table th,.ticket-table td{box-sizing:border-box!important;vertical-align:middle!important}.ticket-table th:nth-child(1),.ticket-table td:nth-child(1){width:30%!important;text-align:left!important}.ticket-table th:nth-child(2),.ticket-table td:nth-child(2){width:18%!important;text-align:right!important}.ticket-table th:nth-child(3),.ticket-table td:nth-child(3){width:18%!important;text-align:center!important}.ticket-table th:nth-child(4),.ticket-table td:nth-child(4){width:17%!important;text-align:right!important}.ticket-table th:nth-child(5),.ticket-table td:nth-child(5){width:17%!important;text-align:right!important}.ticket-row td{padding:8px 10px!important}.ticket-row .item-name{font-weight:900}.ticket-row .item-code{display:block;color:#334155;font-size:12px;margin-top:2px}

/* Teclado tipo Openbravo: estable, sin solapes */
.numpad-area.ob-pad-classic{display:grid!important;width:100%!important;max-width:292px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(5,minmax(54px,1fr))!important;grid-template-areas:"ce star minus del" "n7 n8 n9 plus" "n4 n5 n6 plus" "n1 n2 n3 eq" "n0 dot barcode eq"!important;gap:7px!important;align-content:stretch!important}.numpad-area.ob-pad-classic button{min-width:0!important;width:100%!important;height:100%!important;border-radius:10px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:22px!important}.ob-pad-classic [data-key="Escape"]{grid-area:ce!important}.ob-pad-classic [data-key="*"]{grid-area:star!important}.ob-pad-classic [data-key="-"]{grid-area:minus!important}.ob-pad-classic [data-key="Delete"]{grid-area:del!important}.ob-pad-classic [data-key="7"]{grid-area:n7!important}.ob-pad-classic [data-key="8"]{grid-area:n8!important}.ob-pad-classic [data-key="9"]{grid-area:n9!important}.ob-pad-classic [data-key="+"]{grid-area:plus!important}.ob-pad-classic [data-key="4"]{grid-area:n4!important}.ob-pad-classic [data-key="5"]{grid-area:n5!important}.ob-pad-classic [data-key="6"]{grid-area:n6!important}.ob-pad-classic [data-key="1"]{grid-area:n1!important}.ob-pad-classic [data-key="2"]{grid-area:n2!important}.ob-pad-classic [data-key="3"]{grid-area:n3!important}.ob-pad-classic [data-key="Enter"]{grid-area:eq!important}.ob-pad-classic [data-key="0"]{grid-area:n0!important}.ob-pad-classic [data-key="."]{grid-area:dot!important}.ob-pad-classic [data-key="QR"]{grid-area:barcode!important}.numpad-area.ob-pad-classic .equals{background:linear-gradient(135deg,#22c55e,#3b82f6)!important;color:white!important}.key-hit{transform:scale(.96)!important;box-shadow:inset 0 0 0 3px rgba(37,99,235,.35)!important}

/* Productos compactos, legibles y ordenados */
.product-tile{height:120px!important;min-height:120px!important;max-height:120px!important;border-radius:13px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;padding:10px!important}.product-tile .tile-photo{width:38px!important;height:38px!important;border-radius:10px!important;background:#eff6ff;border:1px solid #d8e6f7;display:flex;align-items:center;justify-content:center;overflow:hidden}.product-tile .tile-photo img{width:100%;height:100%;object-fit:cover}.product-tile .tile-info{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:1px!important;min-width:0!important;line-height:1.05!important}.product-tile .tile-info span{font-size:13px!important;font-weight:900!important;line-height:1.05!important;min-height:22px!important;max-height:28px!important;overflow:hidden!important}.product-tile .tile-info strong{font-size:14px!important;margin:0!important;line-height:1.05!important}.product-tile .tile-info small,.product-tile .tile-info em{font-size:10.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.product-tile.out-of-stock{opacity:.55;filter:grayscale(.2)}

/* Notificaciones: centradas, contrastadas y accionables */
.admin-page.notifications-page{padding:24px!important;min-height:calc(100vh - 58px)!important;background:linear-gradient(180deg,#f8fbff,#eaf3ff)!important}.notifications-page .clean-head,.notifications-list,.pagination-wrap{max-width:1180px!important;margin-left:auto!important;margin-right:auto!important}.notifications-page .clean-head{display:flex!important;align-items:center!important;justify-content:space-between!important;margin-bottom:16px!important}.notification-card{background:#fff!important;color:#0f172a!important;border:1px solid #cbd5e1!important;border-radius:16px!important;padding:16px!important;display:grid!important;grid-template-columns:155px 115px minmax(0,1fr) 130px!important;gap:16px!important;align-items:center!important;box-shadow:0 12px 28px rgba(15,23,42,.08)!important}.notification-card.critical{border-left:8px solid #dc2626!important;background:#fff7f7!important}.notification-card.warning{border-left:8px solid #f59e0b!important;background:#fffbeb!important}.notification-card.info{border-left:8px solid #2563eb!important}.notification-card h3{margin:2px 0 4px!important}.notification-card p{margin:0!important;color:#334155!important}.notification-card small{color:#475569!important;font-weight:900!important;text-transform:uppercase;font-size:11px!important}.notification-level span{font-weight:950;color:#111827!important}.notif-panel{color:#111827!important}.notif-item{color:#111827!important}.notif-item.critical{background:#fee2e2!important;border-color:#fecaca!important}.notif-item.warning{background:#fef3c7!important;border-color:#fde68a!important}

/* Admin, settings, forms */
.admin-page{padding:20px}.modern-card,.table-card,.clean-card,.form-card.wide{border-radius:16px!important;border:1px solid #cfdded!important;box-shadow:0 12px 28px rgba(15,23,42,.06)!important;background:#fff}.form-grid.modern-form,.form-grid{align-items:end}.settings-content{padding-bottom:80px!important}.admin-shell{height:calc(100vh - 58px);overflow:hidden}.admin-content{overflow:auto!important}.table-card{margin:18px}.clean-table input{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:8px}.dashboard-page .cards{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.dashboard-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px;padding:0 20px 20px}.chart-card canvas{width:100%;max-height:260px}.branch-sales-list{display:grid;gap:10px;margin:12px 0}.branch-sales-list div{display:flex;justify-content:space-between;border-bottom:1px solid #e2e8f0;padding:8px 0}

.app-footer{position:fixed;left:0;right:0;bottom:0;height:24px;background:#0f172a;color:#e2e8f0;display:flex;align-items:center;justify-content:center;font-size:12px;z-index:15}
@media(max-width:900px){body{overflow:auto!important}.container{height:auto!important;overflow:visible!important}.obpos-shell{height:auto!important;display:block!important}.ob-menu{display:none!important}.ob-main{display:block!important}.ticket-workspace{display:block!important}.numpad-area.ob-pad-classic{max-width:none!important;grid-template-rows:repeat(5,58px)!important;margin-top:8px}.product-browser{display:block!important;height:auto!important}.category-list{height:auto!important;display:flex!important;overflow:auto!important;margin-bottom:8px}.cat-btn{min-width:140px}.product-grid.ob-products{height:auto!important;display:grid!important;grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important}.admin-shell{display:block;height:auto;overflow:visible}.admin-menu{display:block!important}.admin-content{height:auto!important;overflow:visible!important}.form-grid{grid-template-columns:1fr!important}.dashboard-grid{grid-template-columns:1fr;padding:0 12px 20px}.notification-card{grid-template-columns:1fr!important}.notifications-page .clean-head{display:block!important}.app-footer{position:static}}

/* v1.5 - ajustes finales POS, stock, BI y responsive */
.pos-topbar{display:grid!important;grid-template-columns:minmax(180px,360px) minmax(160px,1fr) auto!important;align-items:center!important;gap:12px!important;}
.top-actions{justify-self:end!important;margin-left:auto!important;display:flex!important;align-items:center!important;gap:10px!important;}
.top-center{justify-self:center!important;position:static!important;transform:none!important;}
.brand-link{min-width:0!important;max-width:360px!important;overflow:hidden!important;}
.brand-name{max-width:310px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}

/* POS de una sola pantalla */
@media(min-width:901px){
  body{overflow:hidden!important;}
  .container{height:calc(100vh - 56px)!important;overflow:hidden!important;}
  .obpos-shell{height:calc(100vh - 56px)!important;overflow:hidden!important;}
  .ob-main{display:flex!important;flex-direction:column!important;overflow:hidden!important;}
  .ticket-workspace{flex:1 1 auto!important;min-height:300px!important;max-height:none!important;padding:0 10px 6px!important;}
  .product-browser{flex:0 0 216px!important;height:216px!important;min-height:216px!important;padding:8px 10px 28px!important;margin-top:0!important;grid-template-columns:190px minmax(0,1fr)!important;}
  .category-list{height:174px!important;max-height:174px!important;overflow-y:auto!important;}
  .ob-products{height:174px!important;max-height:174px!important;overflow-x:auto!important;overflow-y:hidden!important;align-items:start!important;padding-bottom:6px!important;}
  .app-footer{height:22px!important;}
}

/* Tabla de venta alineada por columnas */
.ticket-table{table-layout:fixed!important;}
.ticket-table th,.ticket-table td{vertical-align:middle!important;}
.ticket-table th:nth-child(1),.ticket-table td:nth-child(1){width:38%!important;text-align:left!important;}
.ticket-table th:nth-child(2),.ticket-table td:nth-child(2){width:16%!important;text-align:right!important;}
.ticket-table th:nth-child(3),.ticket-table td:nth-child(3){width:14%!important;text-align:center!important;}
.ticket-table th:nth-child(4),.ticket-table td:nth-child(4){width:16%!important;text-align:right!important;}
.ticket-table th:nth-child(5),.ticket-table td:nth-child(5){width:16%!important;text-align:right!important;}
.ticket-row td{font-size:14px!important;line-height:1.15!important;}
.ticket-row td strong{font-size:14px!important;display:block!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ticket-row td small{display:block!important;color:#334155!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* Teclado igual al patrón clásico: números a la izquierda y operadores a la derecha */
.numpad-area.ob-pad-classic{display:grid!important;width:100%!important;max-width:292px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(5,minmax(52px,1fr))!important;grid-template-areas:
  "ce star minus del"
  "n7 n8 n9 plus"
  "n4 n5 n6 plus"
  "n1 n2 n3 eq"
  "n0 dot barcode eq"!important;gap:7px!important;align-content:stretch!important;justify-content:center!important;}
.numpad-area.ob-pad-classic button{width:100%!important;height:100%!important;min-width:0!important;min-height:52px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:12px!important;font-size:22px!important;line-height:1!important;}
.numpad-area.ob-pad-classic [data-key="Escape"]{grid-area:ce!important}.numpad-area.ob-pad-classic [data-key="*"]{grid-area:star!important}.numpad-area.ob-pad-classic [data-key="-"]{grid-area:minus!important}.numpad-area.ob-pad-classic [data-key="Delete"]{grid-area:del!important}.numpad-area.ob-pad-classic [data-key="7"]{grid-area:n7!important}.numpad-area.ob-pad-classic [data-key="8"]{grid-area:n8!important}.numpad-area.ob-pad-classic [data-key="9"]{grid-area:n9!important}.numpad-area.ob-pad-classic [data-key="+"]{grid-area:plus!important}.numpad-area.ob-pad-classic [data-key="4"]{grid-area:n4!important}.numpad-area.ob-pad-classic [data-key="5"]{grid-area:n5!important}.numpad-area.ob-pad-classic [data-key="6"]{grid-area:n6!important}.numpad-area.ob-pad-classic [data-key="1"]{grid-area:n1!important}.numpad-area.ob-pad-classic [data-key="2"]{grid-area:n2!important}.numpad-area.ob-pad-classic [data-key="3"]{grid-area:n3!important}.numpad-area.ob-pad-classic [data-key="Enter"]{grid-area:eq!important}.numpad-area.ob-pad-classic [data-key="0"]{grid-area:n0!important}.numpad-area.ob-pad-classic [data-key="."]{grid-area:dot!important}.numpad-area.ob-pad-classic [data-key="QR"]{grid-area:barcode!important}.numpad-area.ob-pad-classic .equals{background:linear-gradient(135deg,#22c55e,#2563eb)!important;color:#fff!important;font-size:24px!important;}

/* Catálogo y cards de productos */
.product-grid.ob-products{display:flex!important;flex-wrap:nowrap!important;gap:14px!important;}
.product-tile{position:relative!important;flex:0 0 166px!important;width:166px!important;height:124px!important;min-height:124px!important;display:grid!important;grid-template-columns:42px 1fr!important;gap:8px!important;align-items:center!important;padding:10px!important;overflow:hidden!important;}
.product-tile .tile-photo{width:38px!important;height:38px!important;border-radius:11px!important;align-self:center!important;}
.product-tile .tile-info{display:flex!important;flex-direction:column!important;justify-content:center!important;gap:1px!important;min-width:0!important;line-height:1.08!important;}
.product-tile .tile-info span{font-size:13px!important;line-height:1.05!important;font-weight:900!important;min-height:26px!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;}
.product-tile .tile-info strong{font-size:14px!important;line-height:1.05!important;white-space:nowrap!important;margin:0!important;}
.product-tile .tile-info small,.product-tile .tile-info em{font-size:10.5px!important;line-height:1.05!important;margin:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.product-tile.out-of-stock{opacity:.62!important;filter:grayscale(.25)!important;background:linear-gradient(180deg,#fff7f7,#fee2e2)!important;border-color:#fecaca!important;}
.product-tile.out-of-stock::after{content:'SIN EXISTENCIAS';position:absolute;left:8px;right:8px;bottom:6px;background:#dc2626;color:white;border-radius:999px;text-align:center;font-size:9px;font-weight:950;padding:3px 4px;letter-spacing:.03em;}
.product-tile.out-of-stock .tile-info em{color:#b91c1c!important;font-weight:900!important;}

/* Notificaciones legibles */
.notifications-page{padding:22px!important;}
.notifications-list{display:grid!important;gap:12px!important;max-width:1180px!important;}
.notification-card{width:100%!important;display:grid!important;grid-template-columns:150px 110px minmax(0,1fr) 110px!important;gap:14px!important;align-items:center!important;background:#fff!important;color:#0f172a!important;border:1px solid #d2e0f3!important;border-left-width:6px!important;border-radius:16px!important;box-shadow:0 14px 34px rgba(37,99,235,.08)!important;}
.notification-card.critical{background:#fff1f2!important;border-left-color:#dc2626!important;}
.notification-card.warning{background:#fff7ed!important;border-left-color:#f59e0b!important;}
.notification-card.info{background:#eef6ff!important;border-left-color:#2563eb!important;}
.notification-card h3{margin:2px 0!important;font-size:17px!important;}
.notification-card p{margin:0!important;color:#334155!important;}
.notification-card small{display:block;color:#64748b!important;font-weight:800;text-transform:none!important;}
.notification-level span{font-weight:950!important;color:#0f172a!important;}

/* Dashboard BI */
.dashboard-page{overflow:auto!important;height:calc(100vh - 56px)!important;}
.bi-cards{grid-template-columns:repeat(5,minmax(0,1fr))!important;}
.dashboard-grid{display:grid!important;grid-template-columns:2fr 1fr!important;gap:16px!important;padding:0 20px 18px!important;}
.bi-grid-extra{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:0 20px 18px;}
.bi-list{display:grid;gap:9px}.bi-list-row{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #e5edf7}.chart-card canvas{width:100%!important;max-width:100%;}

@media(max-width:900px){
  .pos-topbar{grid-template-columns:1fr!important;height:auto!important;min-height:56px!important;}
  .top-actions{justify-self:start!important;flex-wrap:wrap!important;}
  .top-center{justify-self:start!important;}
  .product-browser{margin-bottom:0!important;}
  .product-grid.ob-products{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important;overflow:visible!important;}
  .product-tile{width:auto!important;flex:auto!important;height:122px!important;}
  .notification-card{grid-template-columns:1fr!important;}
  .bi-cards,.dashboard-grid,.bi-grid-extra{grid-template-columns:1fr!important;padding:0 12px 14px!important;}
  .dashboard-page{height:auto!important;overflow:visible!important;}
}
.pos-toast{position:fixed;right:18px;top:78px;z-index:200;background:#111827;color:#fff;border-radius:14px;padding:14px 18px;box-shadow:0 24px 70px rgba(15,23,42,.28);font-weight:900;max-width:min(440px,90vw);transform:translateY(-12px);opacity:0;pointer-events:none;transition:.18s ease}.pos-toast.show{transform:translateY(0);opacity:1}.pos-toast.warning{background:#92400e}.pos-toast.danger{background:#b91c1c}.pos-toast.ok{background:#166534}

/* v1.6 - hotfix sin regresiones: POS clásico, BI compacto, menús y textos */
.pos-topbar{grid-template-columns:minmax(170px,360px) 1fr auto!important;position:relative!important;z-index:3000!important;}
.top-actions{justify-self:end!important;margin-left:auto!important;order:3!important;}
.top-center{justify-self:center!important;order:2!important;}
.brand-link{order:1!important;}
.nav-menu{position:relative!important;z-index:6000!important;}
.nav-menu[open] .nav-menu-panel{position:fixed!important;right:84px!important;top:52px!important;z-index:9000!important;max-height:calc(100vh - 74px)!important;overflow-y:auto!important;box-shadow:0 28px 80px rgba(15,23,42,.34)!important;}
.notif-menu{position:relative!important;z-index:6000!important;}
.notif-menu[open] .notif-panel{position:fixed!important;right:250px!important;top:52px!important;z-index:9000!important;}

@media(min-width:901px){
  .container{height:calc(100vh - 56px)!important;overflow:hidden!important;}
  .obpos-shell{height:calc(100vh - 56px)!important;overflow:hidden!important;}
  .ob-main{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important;}
  .ticket-workspace{flex:1 1 auto!important;min-height:300px!important;max-height:none!important;display:grid!important;grid-template-columns:minmax(0,1fr) 296px!important;gap:8px!important;padding:0 8px 6px!important;overflow:hidden!important;}
  .ticket-area{min-width:0!important;max-width:100%!important;overflow:hidden!important;grid-template-rows:42px minmax(0,1fr) 58px!important;}
  .ticket-table{width:100%!important;max-width:100%!important;table-layout:fixed!important;}
  .numpad-area.ob-pad-classic{width:296px!important;max-width:296px!important;min-width:296px!important;align-self:stretch!important;z-index:2!important;grid-template-columns:repeat(4,1fr)!important;grid-template-rows:repeat(5,minmax(52px,1fr))!important;grid-template-areas:
    "ce star minus del"
    "n7 n8 n9 plus"
    "n4 n5 n6 plus"
    "n1 n2 n3 eq"
    "n0 dot barcode eq"!important;}
  .product-browser{flex:0 0 238px!important;height:238px!important;min-height:238px!important;margin-top:0!important;padding:8px 10px 24px!important;grid-template-columns:190px minmax(0,1fr)!important;overflow:hidden!important;}
  .category-list{height:198px!important;max-height:198px!important;overflow-y:auto!important;}
  .product-grid.ob-products{height:198px!important;max-height:198px!important;overflow-x:auto!important;overflow-y:hidden!important;align-items:start!important;padding:0 8px 8px!important;}
  .app-footer{position:fixed!important;left:0;right:0;bottom:0;height:22px!important;z-index:2500!important;}
}

.numpad-area.ob-pad-classic button{border-radius:10px!important;background:linear-gradient(180deg,#f8fbff,#d9ebff)!important;color:#173f87!important;border:1px solid #b7cdea!important;box-shadow:inset 0 1px 0 #fff,0 1px 2px rgba(15,23,42,.07)!important;font-size:24px!important;font-weight:950!important;}
.numpad-area.ob-pad-classic .equals{background:linear-gradient(135deg,#40bd78,#356fec)!important;color:#fff!important;}
.numpad-area.ob-pad-classic [data-key="+"]{font-size:26px!important;}
.numpad-area.ob-pad-classic [data-key="Delete"]{font-size:20px!important;}
.ticket-row td{padding:7px 8px!important;}
.ticket-row td:nth-child(2),.ticket-row td:nth-child(4),.ticket-row td:nth-child(5){font-variant-numeric:tabular-nums!important;white-space:nowrap!important;}
.ticket-table th{font-weight:900!important;color:#64748b!important;}
.ticket-table .empty td{text-align:left!important;color:#94a3b8!important;padding-left:12px!important;}

.product-tile{flex:0 0 168px!important;width:168px!important;height:120px!important;min-height:120px!important;max-height:120px!important;align-items:center!important;}
.product-tile .tile-info{align-self:center!important;justify-content:center!important;text-align:left!important;}
.product-tile .tile-info span{min-height:24px!important;margin:0!important;}
.product-tile .tile-info strong{font-size:14px!important;margin:0!important;}
.product-tile .tile-info small,.product-tile .tile-info em{font-size:10.25px!important;}
.product-tile.out-of-stock{opacity:.75!important;cursor:pointer!important;}
.product-tile.out-of-stock::after{content:'SIN EXISTENCIAS'!important;bottom:5px!important;}

.dashboard-page{height:calc(100vh - 56px)!important;overflow:hidden!important;padding:14px 18px 28px!important;}
.dashboard-page .grouped-head{padding:0 0 8px!important;margin:0!important;}
.dashboard-page .grouped-head h1{font-size:26px!important;margin:0 0 4px!important;}
.dashboard-page .grouped-head p{margin:0!important;font-size:13px!important;}
.dashboard-page .cards{padding:6px 0 10px!important;gap:12px!important;}
.dashboard-page .card{padding:14px 16px!important;min-height:74px!important;}
.dashboard-page .card strong{font-size:24px!important;}
.dashboard-grid{padding:0!important;gap:12px!important;grid-template-columns:2fr 1fr!important;}
.bi-grid-extra{padding:12px 0 0!important;gap:12px!important;}
.dashboard-page .modern-card{padding:12px!important;margin:0!important;}
.dashboard-page .modern-card h2{font-size:20px!important;margin:0 0 8px!important;}
.dashboard-page canvas{height:105px!important;max-height:105px!important;}
.bi-list-row{font-size:13px!important;padding:7px 0!important;}

.admin-content,.admin-page{padding-bottom:48px!important;}
.table.modern-table th,.table.modern-table td{vertical-align:middle!important;}
.pill{text-transform:none!important;}

@media(max-width:900px){
  body{overflow:auto!important;}
  .pos-topbar{grid-template-columns:1fr!important;gap:8px!important;padding:8px 10px!important;}
  .top-actions{justify-self:stretch!important;justify-content:flex-end!important;order:3!important;}
  .top-center{justify-self:center!important;order:2!important;}
  .brand-link{order:1!important;}
  .nav-menu[open] .nav-menu-panel{right:8px!important;left:8px!important;top:104px!important;max-height:calc(100vh - 120px)!important;}
  .notif-menu[open] .notif-panel{right:8px!important;left:8px!important;top:104px!important;}
  .container,.obpos-shell{height:auto!important;min-height:calc(100vh - 56px)!important;overflow:visible!important;}
  .ticket-workspace{grid-template-columns:1fr!important;overflow:visible!important;}
  .numpad-area.ob-pad-classic{width:100%!important;min-width:0!important;max-width:none!important;grid-template-columns:repeat(4,minmax(58px,1fr))!important;}
  .product-browser{height:auto!important;min-height:0!important;overflow:visible!important;padding-bottom:16px!important;}
  .category-list{height:auto!important;max-height:180px!important;}
  .product-grid.ob-products{height:auto!important;max-height:none!important;display:grid!important;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important;overflow:visible!important;}
  .product-tile{width:auto!important;flex:auto!important;}
  .dashboard-page{height:auto!important;overflow:visible!important;padding:12px 12px 36px!important;}
  .dashboard-grid,.bi-grid-extra{grid-template-columns:1fr!important;}
}

/* v1.7 - ajuste POS solicitado: teclado clásico, 2 filas de catálogo y estado de caja fijo */
.pos-status-strip{display:grid!important;grid-template-columns:minmax(280px,430px) minmax(0,1fr)!important;gap:12px!important;overflow:hidden!important;white-space:nowrap!important;padding:0 12px!important;background:#f7fbff!important;border-bottom:1px solid #d7e5f5!important;}
.cash-fixed{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important;overflow:hidden!important;}
.cash-dot{width:14px!important;height:14px!important;border-radius:999px!important;box-shadow:0 0 0 2px #fff,0 0 0 3px #b9c9de!important;flex:0 0 14px!important;}
.cash-dot.open{background:#22c55e!important}.cash-dot.expired{background:#f59e0b!important}.cash-dot.closed{background:#ef4444!important}
.cash-fixed strong{font-size:14px!important;color:#0f172a!important;white-space:nowrap!important;}.cash-opened{font-size:12px!important;color:#475569!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.pos-marquee{min-width:0!important;overflow:hidden!important;display:flex!important;align-items:center!important;height:100%!important;mask-image:linear-gradient(90deg,transparent 0,#000 24px,#000 calc(100% - 24px),transparent 100%);}
.pos-marquee-track{display:inline-flex!important;align-items:center!important;gap:22px!important;min-width:max-content!important;animation:wdpos-marquee 26s linear infinite!important;font-size:14px!important;}
.pos-marquee:hover .pos-marquee-track{animation-play-state:paused!important;}
@keyframes wdpos-marquee{0%{transform:translateX(100%)}100%{transform:translateX(-100%)}}

@media(min-width:901px){
  .ob-main{min-height:0!important;}
  .ob-status.pos-status-strip{height:36px!important;flex:0 0 36px!important;}
  .ticket-workspace{flex:1 1 auto!important;min-height:285px!important;grid-template-columns:minmax(0,1fr) 296px!important;padding:0 8px 6px!important;}
  .product-browser{flex:0 0 260px!important;height:260px!important;min-height:260px!important;padding:8px 10px 18px!important;grid-template-columns:190px minmax(0,1fr)!important;}
  .category-list{height:234px!important;max-height:234px!important;}
  .product-grid.ob-products{height:234px!important;max-height:234px!important;overflow-y:auto!important;overflow-x:hidden!important;display:grid!important;grid-template-columns:repeat(auto-fill,minmax(170px,1fr))!important;grid-auto-rows:108px!important;gap:10px!important;padding:0 8px 8px!important;align-content:start!important;}
  .product-tile{width:auto!important;flex:auto!important;height:108px!important;min-height:108px!important;max-height:108px!important;}
  .product-tile .tile-info span{min-height:20px!important;max-height:26px!important;}
  .numpad-area.ob-pad-classic{grid-template-areas:
    "ce star del del"
    "n7 n8 n9 minus"
    "n4 n5 n6 plus"
    "n1 n2 n3 eq"
    "n0 dot barcode eq"!important;}
}

@media(max-width:900px){
  .pos-status-strip{grid-template-columns:1fr!important;height:auto!important;gap:4px!important;padding:8px 10px!important;white-space:normal!important;}
  .pos-marquee-track{animation:none!important;white-space:normal!important;min-width:0!important;}
}

/* WD POS v1.8 - consistencia de inventario, clientes y responsive */
.pos-brand-logo{width:25px;height:25px;object-fit:contain;border-radius:6px}.ob-brand strong{font-size:13px}.ob-brand span:last-child{font-size:11px}
.product-tile.out-of-stock{opacity:.62;filter:grayscale(.45);cursor:not-allowed!important;position:relative}.stock-badge{position:absolute;top:6px;right:6px;background:#dc2626;color:#fff;border-radius:999px;padding:3px 7px;font-size:9px;letter-spacing:.04em;z-index:2}.product-tile .tile-info span{font-size:12px!important;line-height:1.05!important;display:block!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:break-word}.category-list{padding-bottom:10px!important}.product-browser{margin-bottom:24px!important}
.selected-customer{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #e2e8f0}.selected-customer strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.selected-customer button{border:0;background:#eef2ff;color:#3730a3;border-radius:8px;padding:7px 10px;font-weight:700;cursor:pointer}
.modal-card{border-radius:18px!important;box-shadow:0 28px 80px rgba(15,23,42,.35)!important;border:1px solid rgba(255,255,255,.7);animation:wdModalIn .18s ease-out}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.icon-close{border:0;background:#eef2f7;border-radius:50%;width:34px;height:34px;font-size:22px;cursor:pointer}.customer-card{width:min(720px,94vw)!important}.compact-dialog{width:min(480px,92vw)!important}.customer-search-row{display:grid;grid-template-columns:1fr auto;gap:8px;margin:12px 0}.customer-search-row input,.customer-form-grid input,.customer-form-grid select,.compact-dialog input{width:100%;padding:11px;border:1px solid #b8c8dc;border-radius:10px}.customer-results{display:grid;gap:6px;max-height:180px;overflow:auto;margin-bottom:12px}.customer-result,.suspended-row{display:grid;grid-template-columns:1fr auto;gap:3px;text-align:left;padding:10px 12px;border:1px solid #d6e2f1;border-radius:10px;background:#fff;cursor:pointer}.customer-result:hover,.suspended-row:hover{background:#eff6ff;border-color:#93c5fd}.customer-result small,.suspended-row small{grid-column:1/-1;color:#64748b}.customer-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.suspended-list{display:grid;gap:8px;max-height:390px;overflow:auto}.pos-toast.info{background:#2563eb}.pos-toast.success{background:#15803d}@keyframes wdModalIn{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}
@media(min-width:901px){.product-browser{transform:translateY(-4px)!important;padding-bottom:34px!important;margin-bottom:22px!important}.category-list,.product-grid.ob-products{max-height:220px!important;height:220px!important}.app-footer{z-index:3000!important}}
@media(max-width:900px){body{padding-bottom:0!important}.ob-main{padding-bottom:18px}.ob-top{display:flex!important;flex-wrap:wrap!important;height:auto!important;gap:6px}.ob-brand{min-width:0;flex:1}.ob-brand span:last-child{display:none}.ob-actions{display:flex;gap:5px}.pos-status-strip{display:block!important;height:auto!important}.cash-fixed{padding:7px}.pos-marquee{height:28px}.ticket-workspace{padding:6px!important}.ticket-area{min-height:420px}.ob-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) repeat(4,44px)!important;height:auto!important}.ob-toolbar .qr-wide{grid-column:auto!important;width:44px!important;font-size:0}.ob-toolbar .qr-wide:after{content:'QR';font-size:12px}.numpad-area.ob-pad-classic{width:100%!important}.product-browser{margin:8px 6px 20px!important}.category-list{display:flex!important;gap:6px;padding-bottom:8px!important}.product-grid.ob-products{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.product-tile{width:auto!important;min-width:0!important}.customer-form-grid{grid-template-columns:1fr}.payment-card{width:min(96vw,560px)!important}.pay-methods{grid-template-columns:repeat(2,1fr)!important}}
@media(max-width:560px){.ob-toolbar{grid-template-columns:minmax(0,1fr) repeat(2,42px)!important}.ob-toolbar button:nth-of-type(n+3){display:none}.ticket-table th:nth-child(4),.ticket-table td:nth-child(4){display:none}.ticket-table th,.ticket-table td{font-size:11px;padding:6px}.ticket-totals{display:grid!important;grid-template-columns:1fr!important;height:auto!important}.product-grid.ob-products{grid-template-columns:1fr 1fr!important}.product-tile{height:118px!important;padding:8px!important}.numpad-area.ob-pad-classic{grid-template-rows:repeat(5,54px)!important}.modal-actions{display:grid!important;grid-template-columns:1fr!important}}
/* WD POS v1.9 production fixes */
.brand-name{max-width:none!important;overflow:visible!important;text-overflow:clip!important;font-size:clamp(13px,1.25vw,22px)!important;white-space:nowrap!important}
.product-browser{margin-bottom:22px!important;height:238px!important;min-height:238px!important;padding-bottom:14px!important}
.category-list{max-height:214px!important;margin-bottom:8px!important}
.product-tile{position:relative!important}
.product-tile.out-of-stock{opacity:.68!important;filter:grayscale(.35);cursor:not-allowed!important;background:#f3f4f6!important}
.stock-badge{position:absolute;top:6px;right:6px;background:#dc2626;color:#fff;border-radius:999px;padding:3px 7px;font-size:9px;z-index:3;box-shadow:0 3px 8px #0002}
.app-shell-global{display:grid;grid-template-columns:176px minmax(0,1fr);min-height:calc(100vh - 58px)}
.app-sidebar{background:#e9f3ff;border-right:1px solid #b7cbe5;padding:8px 6px;min-height:calc(100vh - 58px)}
.app-sidebar .menu-group{margin-bottom:10px}.app-sidebar a{display:block;padding:8px 10px;text-decoration:none;color:#111827;font-size:13px;border-radius:8px}.app-sidebar a:hover{background:#dbeafe}.app-content-global{height:auto!important;min-width:0}.app-shell-global>.container{width:auto!important;max-width:none!important}
@media(max-width:900px){.app-shell-global{grid-template-columns:1fr}.app-sidebar{display:flex;gap:8px;overflow-x:auto;min-height:auto;border-right:0;border-bottom:1px solid #b7cbe5}.app-sidebar .menu-group{min-width:210px}.brand-name{font-size:14px!important}.product-browser{margin-bottom:26px!important}}
/* WD POS v1.9 production fixes */
.brand-name{max-width:none!important;overflow:visible!important;text-overflow:clip!important;font-size:clamp(13px,1.25vw,22px)!important;white-space:nowrap!important}
.product-browser{margin-bottom:22px!important;height:238px!important;min-height:238px!important;padding-bottom:14px!important}
.category-list{max-height:214px!important;margin-bottom:8px!important}
.product-tile{position:relative!important}.product-tile.out-of-stock{opacity:.68!important;filter:grayscale(.35);cursor:not-allowed!important;background:#f3f4f6!important}
.stock-badge{position:absolute;top:6px;right:6px;background:#dc2626;color:#fff;border-radius:999px;padding:3px 7px;font-size:9px;z-index:3;box-shadow:0 3px 8px #0002}
.app-shell-global{display:grid;grid-template-columns:176px minmax(0,1fr);min-height:calc(100vh - 58px)}.app-sidebar{background:#e9f3ff;border-right:1px solid #b7cbe5;padding:8px 6px;min-height:calc(100vh - 58px)}.app-sidebar .menu-group{margin-bottom:10px}.app-sidebar a{display:block;padding:8px 10px;text-decoration:none;color:#111827;font-size:13px;border-radius:8px}.app-sidebar a:hover{background:#dbeafe}.app-content-global{height:auto!important;min-width:0}.app-shell-global>.container{width:auto!important;max-width:none!important}
@media(max-width:900px){.app-shell-global{grid-template-columns:1fr}.app-sidebar{display:flex;gap:8px;overflow-x:auto;min-height:auto;border-right:0;border-bottom:1px solid #b7cbe5}.app-sidebar .menu-group{min-width:210px}.brand-name{font-size:14px!important}.product-browser{margin-bottom:26px!important}}

/* WD POS v2.0 UI and tenant hardening */
.brand{min-width:0;max-width:min(36vw,520px)}.brand-name{display:block;min-width:0;max-width:100%;white-space:nowrap;overflow:visible;text-overflow:clip;line-height:1.05}.tenant-switcher{display:flex;align-items:center;gap:6px}.tenant-switcher label{font-size:11px;color:#cbd5e1}.tenant-switcher select{max-width:180px;border:1px solid #41516e;border-radius:9px;background:#17233a;color:#fff;padding:7px 9px;font-weight:700}
.category-list{min-height:232px;padding-bottom:10px;align-self:start}.category-list .cat-btn{min-height:42px}.product-browser{padding-bottom:28px;margin-bottom:18px}.ob-products{padding-bottom:18px}.app-footer{position:fixed;bottom:0;left:0;right:0;z-index:20;height:22px}.obpos-shell{padding-bottom:22px}.product-tile.out-of-stock{opacity:.62;filter:grayscale(.45);cursor:not-allowed;position:relative}.product-tile.out-of-stock .stock-badge{display:inline-flex!important;position:absolute;top:6px;right:6px;z-index:3;background:#dc2626;color:#fff;border-radius:999px;padding:3px 7px;font-size:10px;letter-spacing:.03em}.product-tile.out-of-stock:after{content:'AGOTADO';position:absolute;inset:auto 8px 8px 8px;background:#fee2e2;color:#991b1b;border:1px solid #fecaca;border-radius:6px;font-size:10px;font-weight:900;padding:3px;text-align:center}
.product-form-card{display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;align-items:start;margin:0 18px 28px;background:#fff;border:1px solid #cbd5e1;border-radius:16px;padding:18px}.product-form-main{min-width:0}.product-form-main .form-grid.compact{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:14px 18px}.product-form-main label{display:flex;flex-direction:column;gap:6px;min-width:0;font-weight:700}.product-form-main input,.product-form-main select,.product-form-main textarea{width:100%;min-height:42px;border:1px solid #b8c7dc;border-radius:9px;padding:9px 11px;background:#fff}.product-form-main textarea{min-height:72px}.product-photo-card{position:sticky;top:78px}.form-switches{display:flex;flex-wrap:wrap;gap:16px;margin-top:18px;padding:16px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0}.form-switches .check{flex-direction:row;align-items:center}.section-title{margin:14px 0 12px;padding-bottom:8px;border-bottom:1px solid #dbe4f0;font-size:17px}.page-subtitle{margin:5px 0 0;color:#64748b;font-size:14px}.cash-page{padding:18px}.cash-page .page-head{padding:0 0 18px}.report-daily{margin:18px}.table-scroll{overflow:auto}.filter-bar input{min-height:42px;border-radius:9px}
@media(max-width:1100px){.product-form-card{grid-template-columns:1fr}.product-photo-card{position:static;display:grid;grid-template-columns:180px 1fr;gap:14px}.product-form-main .form-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.tenant-switcher label{display:none}.tenant-switcher select{max-width:130px}}
@media(max-width:720px){.brand{max-width:42vw}.tenant-switcher{display:none}.product-form-card{margin:8px;padding:12px}.product-photo-card{display:block}.product-form-main .form-grid.compact{grid-template-columns:1fr}.category-list{min-height:auto}.product-browser{padding-bottom:38px}.top-actions{gap:5px}.brand-name{font-size:14px!important}}

/* WD POS 2.1 - correcciones de consistencia visual */
.pos-topbar{grid-template-columns:minmax(220px,36vw) minmax(180px,1fr) auto!important}
.brand-link{width:100%!important;min-width:0!important;max-width:none!important;overflow:hidden!important}
.brand-name{flex:1 1 auto!important;display:block!important;min-width:0!important;max-width:none!important;width:auto;overflow:visible!important;text-overflow:clip!important;white-space:nowrap!important;font-size:22px;line-height:1.05}
.product-tile.out-of-stock::before,.product-tile.out-of-stock::after{display:none!important;content:none!important}
.product-tile.out-of-stock .stock-badge{display:inline-flex!important}
.aligned-fields label{display:flex!important;flex-direction:column!important;gap:7px!important;min-width:0!important}
.aligned-fields input,.aligned-fields select,.aligned-fields textarea{width:100%!important;min-height:42px!important;border:1px solid #b8cbe0!important;border-radius:10px!important;padding:10px 12px!important;background:#fff!important}
.cash-grid{display:grid!important;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)!important;gap:18px!important;align-items:start!important}
.cash-grid>div{display:grid!important;gap:18px!important;min-width:0!important}
.cash-page .section-card{margin:0!important}
.cash-page .two-col{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;align-items:end!important}
.cash-page .stack{display:grid!important;gap:12px!important}
.cash-page .stack>.btn{justify-self:start!important}
.cash-history,.table-scroll{overflow:auto!important}
.branch-create-card{max-width:none!important;margin:0 18px 18px!important}
.branch-form{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px 16px!important;align-items:end!important}
.branch-form label{display:flex!important;flex-direction:column!important;gap:7px!important}
.branch-form input{width:100%!important;min-height:42px!important;border:1px solid #b8cbe0!important;border-radius:10px!important;padding:10px 12px!important}
.branch-active{grid-column:1/2!important;align-self:center!important;flex-direction:row!important}
.branch-submit{grid-column:2/4!important}
.branch-submit .btn{width:100%!important;min-height:42px!important}
.branch-table-card{margin:0 18px 24px!important;background:#fff;border:1px solid #d6e3f2;border-radius:16px;padding:14px;box-shadow:0 12px 30px rgba(15,23,42,.06)}
.branch-table{width:100%!important;margin:0!important;table-layout:fixed!important}
.branch-table th,.branch-table td{vertical-align:middle!important;padding:10px!important}
.branch-table input{width:100%!important;min-height:38px!important;border:1px solid #c7d7ea!important;border-radius:8px!important;padding:8px 10px!important}
.branch-table th:nth-child(1){width:23%}.branch-table th:nth-child(2){width:23%}.branch-table th:nth-child(3){width:18%}.branch-table th:nth-child(4){width:15%}.branch-table th:nth-child(5){width:8%}.branch-table th:nth-child(6){width:13%}
.center-cell{text-align:center!important}
.product-form-card{align-items:stretch!important}
.product-form-main .form-grid.compact>label{align-self:start!important}
.product-form-main .form-grid.compact input,.product-form-main .form-grid.compact select,.product-form-main .form-grid.compact textarea{height:42px!important}
.product-form-main .form-grid.compact textarea{height:74px!important}
.form-switches{align-items:center!important}
.panel-card,.table-card,.section-card,.form-card,.panel{overflow:hidden}
.cop-input{text-align:right!important;font-weight:800!important}
@media(max-width:1100px){.pos-topbar{grid-template-columns:minmax(180px,32vw) 1fr auto!important}.cash-grid{grid-template-columns:1fr!important}.branch-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.branch-submit{grid-column:auto!important}.branch-active{grid-column:auto!important}}
@media(max-width:720px){.pos-topbar{grid-template-columns:minmax(130px,42vw) 1fr auto!important}.brand-name{font-size:16px}.branch-form{grid-template-columns:1fr!important}.branch-table{min-width:900px}.cash-page .two-col{grid-template-columns:1fr!important}}

/* WD POS 2.2 - auditoría visual, formularios y espaciados */
html,body{min-height:100%;overflow-x:hidden}
.app-content-global,.admin-content{padding:18px 22px 38px!important;min-width:0}
.admin-page,.responsive-page{width:100%;max-width:100%;margin:0 auto}
.page-head{padding:0 0 16px!important;margin:0!important;gap:16px}
.page-head h1{margin:0!important;line-height:1.15}
.form-card,.panel,.card,.section-card,.table-card,.hero{border-radius:14px!important}
.form-card,.panel,.section-card,.table-card{margin-left:0!important;margin-right:0!important}
input,select,textarea,button{font:inherit}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea{min-height:42px;border:1px solid #b8cbe0;border-radius:9px;padding:9px 11px;background:#fff}
textarea{resize:vertical}
label{min-width:0}
.check input[type=checkbox],input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;flex:0 0 18px!important;accent-color:#2563eb}
.table-scroll{max-width:100%;overflow:auto;border-radius:12px}
.table.fit{width:100%!important;margin:0!important}

/* Formulario de productos: scroll, alineación y carga de imagen */
.product-page{height:calc(100vh - 82px);overflow-y:auto;overflow-x:hidden;padding-right:4px;padding-bottom:36px}
.product-form-card{margin:0!important;grid-template-columns:220px minmax(0,1fr)!important;gap:22px!important;padding:18px!important;min-height:max-content}
.product-photo-card{position:sticky!important;top:0!important;min-width:0;overflow:hidden}
.photo-preview{width:100%;aspect-ratio:1/1;max-height:190px}
.upload-box{display:grid!important;gap:7px!important;width:100%;overflow:hidden}
.upload-box>span{font-weight:800}
.file-input{display:block;width:100%!important;max-width:100%!important;min-width:0!important;padding:6px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid #b8cbe0;border-radius:9px;background:#fff}
.file-input::file-selector-button{margin-right:8px;border:1px solid #9fb5cc;border-radius:7px;background:#eef5ff;padding:7px 10px;font-weight:700;cursor:pointer}
.product-form-main{overflow:visible!important}
.product-form-main .form-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:start!important}
.product-form-main .span-2{grid-column:span 2}
.product-form-main input,.product-form-main select,.product-form-main textarea{max-width:100%}
.product-form-main small{min-height:18px;color:#64748b}
.product-form-main .cop-input{text-align:right!important;font-weight:800!important}
.form-actions{position:sticky;bottom:0;background:linear-gradient(to top,#fff 75%,rgba(255,255,255,0));padding:16px 0 4px;z-index:3}

/* Reportes: márgenes, tarjetas y grilla uniforme */
.report-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important;margin:0!important;padding:0!important}
.report-grid>.panel{margin:0!important;padding:18px!important;min-height:220px;box-shadow:0 10px 26px rgba(15,23,42,.06)}
.report-grid h2{margin:0 0 14px}
.report-line{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:11px 0;border-bottom:1px solid #e2e8f0}
.report-line:last-child{border-bottom:0}
.report-line span{min-width:0;overflow-wrap:anywhere}.report-line strong{white-space:nowrap}
.report-daily{margin:16px 0 0!important;padding:18px!important}
.cards{padding:0!important;margin:0 0 16px!important;gap:16px!important}
.cards>.card{margin:0!important;min-height:98px;display:flex;flex-direction:column;justify-content:center;gap:5px}
.cards>.card strong{font-size:24px}
.filter-bar{margin:0 0 16px!important;flex-wrap:wrap}

/* Sucursales: controles normales y tabla estable */
.branch-create-card{margin:0 0 18px!important;padding:20px!important}
.branch-form .check,.branch-table .check{display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important}
.branch-active{justify-self:start!important}
.branch-table-card{margin:0 0 24px!important}
.branch-table input[type=checkbox]{width:18px!important;height:18px!important}
.branch-table td{vertical-align:middle!important}

/* POS: botones superiores con aire y ancho coherente al teclado */
.ob-top{padding:4px 10px!important;min-height:44px!important;height:auto!important}
.ob-actions{display:flex;gap:8px;right:8px!important;top:auto!important;align-items:center}
.ob-actions button{min-width:112px!important;height:34px!important;margin:0!important;padding:0 14px!important;border-radius:8px!important;white-space:nowrap}
.ticket-workspace{padding-top:7px!important;padding-bottom:7px!important}
.numpad-area{padding-top:0!important;padding-bottom:0!important}

/* Consistencia global de importes */
.money,.currency,.cop-value,.cop-input{text-align:right}

@media(max-width:1200px){
 .product-form-card{grid-template-columns:190px minmax(0,1fr)!important}
 .product-form-main .form-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .report-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .report-grid>.panel:last-child{grid-column:1/-1}
}
@media(max-width:850px){
 .app-content-global,.admin-content{padding:12px 12px 34px!important}
 .product-page{height:auto;overflow:visible}
 .product-form-card{grid-template-columns:1fr!important;padding:13px!important}
 .product-photo-card{position:static!important;display:grid!important;grid-template-columns:160px minmax(0,1fr)!important;align-items:start}
 .product-form-main .form-grid.compact{grid-template-columns:1fr!important}
 .product-form-main .span-2{grid-column:auto}
 .report-grid{grid-template-columns:1fr!important}.report-grid>.panel:last-child{grid-column:auto}
 .cards{grid-template-columns:1fr!important}
 .ob-actions button{min-width:96px!important;padding:0 8px!important}
}
@media(max-width:560px){
 .product-photo-card{display:block!important}
 .filter-bar input,.filter-bar select,.filter-bar .btn{width:100%;min-width:0}
 .page-head{align-items:flex-start;flex-wrap:wrap}
}
