:root{--bg:#0a1220;--surface:#0f1a2e;--surface-2:#152238;--border:#1e3a5f;--text:#eef4fc;--text-muted:#8fafd4;--primary:#3b82f6;--primary-hover:#2563eb;--primary-muted:#1d4ed8;--primary-light:#3b82f629;--primary-subtle:#3b82f614;--on-primary:#fff;--success:#38bdf8;--warning:#fbbf24;--danger:#f87171;--accent-text:#93c5fd;--sidebar-end:#0c1628;--login-glow:#152238;--shadow:#0f172a8c;--radius:8px;--sidebar-w:240px}html[data-theme=merceria]{--bg:#f8f5fc;--surface:#fff;--surface-2:#f3eefb;--border:#e4d4f4;--text:#2a1848;--text-muted:#6d528c;--primary:#7c3aed;--primary-hover:#6d28d9;--primary-muted:#5b21b6;--primary-light:#7c3aed24;--primary-subtle:#7c3aed14;--on-primary:#fff;--success:#8b5cf6;--warning:#d97706;--danger:#dc2626;--accent-text:#6d28d9;--sidebar-end:#f3e8ff;--login-glow:#f3e8ff;--shadow:#6d28d91f}html[data-theme=comercializadora]{--bg:#f8fafc;--surface:#fff;--surface-2:#f1f5f9;--border:#dbe7f3;--text:#0f2744;--text-muted:#5a7a9a;--primary:#2563eb;--primary-hover:#1d4ed8;--primary-muted:#1e40af;--primary-light:#2563eb24;--primary-subtle:#2563eb14;--on-primary:#fff;--success:#0ea5e9;--warning:#f97316;--danger:#dc2626;--accent-text:#ea580c;--sidebar-end:#fff7ed;--login-glow:#eff6ff;--shadow:#2563eb1f}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{min-height:100%}body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1.5;overflow-x:hidden}img,svg,video{max-width:100%;height:auto}a{color:inherit;text-decoration:none}.app-layout{min-width:0;min-height:100vh;display:flex}.topbar,.sidebar-backdrop{display:none}.sidebar{width:var(--sidebar-w);background:linear-gradient(180deg, var(--surface) 0%, var(--sidebar-end) 100%);border-right:1px solid var(--border);flex-direction:column;padding:1.25rem 0;display:flex;position:fixed;top:0;bottom:0;left:0;overflow-y:auto}.sidebar-brand{border-bottom:1px solid var(--border);margin-bottom:.75rem;padding:0 1.25rem 1.25rem}.sidebar-brand-row{align-items:center;gap:.65rem;margin-bottom:.85rem;display:flex}.sidebar-brand-name{letter-spacing:-.03em;font-size:1.5rem;font-weight:700;line-height:1}.brand-logo{object-fit:contain;width:auto;max-width:160px;height:auto;max-height:36px;display:block}.brand-logo-sidebar{max-width:180px;max-height:48px}.stockea-logo{object-fit:contain;width:auto;height:auto;display:block}.stockea-logo--login{width:min(160px,55vw);margin:0 auto .75rem}.stockea-logo--brand{max-width:100px;max-height:28px}.stockea-logo-sidebar{max-width:110px;max-height:36px}.platform-brand{align-items:center;gap:.65rem;min-width:0;display:flex}.brand-logo-org{opacity:.95;max-width:100px;max-height:28px}.brand-stock{color:var(--text)}.brand-ea{color:var(--primary)}.sidebar-brand-meta{color:var(--text-muted);margin-top:.2rem;font-size:.78rem;line-height:1.45}.sidebar-brand-meta strong{color:var(--text);font-weight:600}.sidebar-brand-date{text-transform:capitalize;margin-top:.35rem;font-size:.72rem}.org-selector{background:var(--surface-2);border:1px solid var(--border);width:100%;color:var(--text);border-radius:6px;margin-top:.6rem;padding:.4rem .5rem;font-size:.8rem}.nav-link{color:var(--text-muted);align-items:center;gap:.6rem;padding:.65rem 1.25rem;font-size:.9rem;transition:all .15s;display:flex}.nav-link:hover{background:var(--primary-subtle);color:var(--text)}.nav-link.active{background:var(--primary-light);color:var(--accent-text);border-right:3px solid var(--primary)}.main-content{margin-left:var(--sidebar-w);flex:1;width:100%;min-width:0;max-width:1400px;padding:1.5rem 2rem}.org-logo-banner{border-radius:var(--radius);border:1px solid var(--border);background:linear-gradient(180deg, #f973161a 0%, transparent 55%), var(--surface);justify-content:center;align-items:center;width:100%;min-height:110px;max-height:180px;margin:-.25rem 0 1.25rem;padding:1rem 1.5rem;display:flex;overflow:hidden}.org-logo-banner-img{object-fit:contain;width:auto;max-width:min(100%,520px);height:auto;max-height:140px;display:block}.page-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:1.25rem;display:flex}.page-header h2{font-size:1.4rem;font-weight:600}.page-subtitle{color:var(--text-muted);margin-top:.25rem;font-size:.85rem}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:1.25rem;overflow:hidden}.panel-header{border-bottom:1px solid var(--border);gap:.5rem;padding:.85rem 1.25rem;font-size:.9rem;font-weight:600}.config-logo-panel{max-width:560px;padding:1.25rem}.config-logo-help{color:var(--text-muted);margin:0 0 1rem;font-size:.875rem;line-height:1.45}.config-logo-preview{background:var(--surface-2);border:1px dashed var(--border);border-radius:8px;justify-content:center;align-items:center;min-height:120px;padding:1rem;display:flex}.config-logo-img{object-fit:contain;max-width:240px;max-height:120px}.config-logo-placeholder{color:var(--text-muted);font-size:.9rem}.config-logo-actions{flex-wrap:wrap;gap:.5rem;margin-top:1rem;display:flex}.report-panel-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;display:flex}.report-actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.report-filters{background:linear-gradient(#f9731638 0%,#f973161f 100%);border-bottom:2px solid #f97316;align-items:stretch;gap:.55rem;padding:.75rem 1rem}.report-filters .form-field{flex:none;gap:.25rem;width:148px;min-width:132px;max-width:160px}.report-filters .form-field label{color:#ea580c;letter-spacing:.02em;text-transform:uppercase;font-size:.72rem;font-weight:700}.report-filters .form-field select,.report-filters .form-field input[type=date],.report-filters .form-field input[type=month]{appearance:none;background-color:var(--surface);width:100%;min-width:0;color:var(--text);cursor:pointer;background-image:linear-gradient(45deg,#0000 50%,#ea580c 50%),linear-gradient(135deg,#ea580c 50%,#0000 50%),linear-gradient(90deg,#f9731640,#f9731640);background-position:calc(100% - 16px) calc(50% - 3px),calc(100% - 11px) calc(50% - 3px),100% 0;background-repeat:no-repeat;background-size:5px 5px,5px 5px,28px 100%;border:1.5px solid #f97316;border-radius:6px;flex:none;padding:.4rem 2rem .4rem .55rem;font-size:.82rem;font-weight:600}.report-filters .form-field input[type=date],.report-filters .form-field input[type=month]{background-image:none;padding-right:.45rem}.report-filters .form-field select:focus,.report-filters .form-field input[type=date]:focus,.report-filters .form-field input[type=month]:focus{outline-offset:1px;border-color:#ea580c;outline:2px solid #ea580c}.report-filters .form-field select option{font-weight:500}html[data-theme=merceria] .report-filters,html[data-theme=comercializadora] .report-filters{background:linear-gradient(#fff7ed 0%,#ffedd5 100%)}html[data-theme=merceria] .report-filters .form-field label,html[data-theme=comercializadora] .report-filters .form-field label{color:#c2410c}html[data-theme=merceria] .report-filters .form-field select,html[data-theme=merceria] .report-filters .form-field input[type=date],html[data-theme=merceria] .report-filters .form-field input[type=month],html[data-theme=comercializadora] .report-filters .form-field select,html[data-theme=comercializadora] .report-filters .form-field input[type=date],html[data-theme=comercializadora] .report-filters .form-field input[type=month]{color:#9a3412;background-color:#fff;border-color:#fb923c}.report-period-label{color:var(--text-muted);margin:0 1rem .25rem;font-size:.9rem}.report-section-title{margin:0 0 .5rem;font-size:.95rem}.report-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:0;display:grid}@media (width<=860px){.report-grid{grid-template-columns:1fr}.report-filters .form-field{flex:140px;width:100%;min-width:0;max-width:100%}}.filter-bar{border-bottom:1px solid var(--border);background:var(--surface-2);flex-wrap:wrap;gap:.75rem;padding:1rem 1.25rem;display:flex}.filter-bar input,.filter-bar select{flex:160px;min-width:0}input,select,textarea{background:var(--bg);border:1px solid var(--border);color:var(--text);border-radius:6px;max-width:100%;padding:.5rem .75rem;font-family:inherit;font-size:.875rem}input:focus,select:focus,textarea:focus{outline:2px solid var(--primary);outline-offset:1px}.btn{cursor:pointer;border:none;border-radius:6px;padding:.5rem 1rem;font-family:inherit;font-size:.875rem;font-weight:600;transition:background .15s}.btn-primary{background:var(--primary);color:var(--on-primary)}.btn-primary:hover{background:var(--primary-hover)}.btn-secondary{background:var(--surface-2);color:var(--text);border:1px solid var(--border)}.btn-secondary:hover{background:var(--border)}.btn-danger{background:var(--danger);color:#fff}.btn-sm{padding:.3rem .65rem;font-size:.8rem}.data-table{border-collapse:collapse;width:100%;min-width:640px}.data-table th,.data-table td{text-align:left;border-bottom:1px solid var(--border);padding:.7rem 1.25rem;font-size:.875rem}.data-table th{background:var(--surface-2);color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:.75rem;font-weight:600}.data-table tr:hover td{background:var(--primary-subtle)}.data-table-wrap{-webkit-overflow-scrolling:touch;overflow-x:auto}.badge{border-radius:4px;padding:.15rem .5rem;font-size:.75rem;font-weight:600;display:inline-block}.badge-ok{background:var(--primary-light);color:var(--accent-text)}.badge-bajo{color:var(--warning);background:#fbbf2426}.badge-critico{color:var(--danger);background:#f8717126}.modal-overlay{z-index:1000;background:#0009;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.modal{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);width:100%;max-width:560px;max-height:90vh;overflow-y:auto}.modal-lg{max-width:720px}.modal-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:1rem 1.25rem;display:flex}.modal-header h3{font-size:1.05rem}.modal-body{padding:1.25rem}.modal-footer{border-top:1px solid var(--border);flex-wrap:wrap;justify-content:flex-end;gap:.5rem;padding:1rem 1.25rem;display:flex}.form-grid{grid-template-columns:1fr 1fr;gap:1rem;display:grid}.form-field{flex-direction:column;gap:.35rem;display:flex}.form-field.full{grid-column:1/-1}.form-field label{color:var(--text-muted);font-size:.8rem;font-weight:500}.form-field input,.form-field select,.form-field textarea{width:100%}.form-section-label{text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);margin:0 0 .75rem;font-size:.8rem;font-weight:600}.form-section-label.full{grid-column:1/-1;margin-top:.25rem}.form-section-label.full:first-child{margin-top:0}.check-line{cursor:pointer;align-items:center;gap:.5rem;font-weight:500;display:flex}.check-line input[type=checkbox]{width:auto;accent-color:var(--primary);margin:0}.form-hint{color:var(--text-muted);margin-top:.75rem;font-size:.75rem;display:block}.alert{border-radius:6px;margin-bottom:1rem;padding:.75rem 1rem;font-size:.875rem}.alert-error{color:var(--danger);border:1px solid var(--danger);background:#f871711f}.alert-success,.alert-info{background:var(--primary-light);color:var(--accent-text);border:1px solid var(--primary)}.maintenance-banner{border:1px solid var(--danger);color:#dc2626;background:#f871711a;font-size:.95rem;font-weight:700;line-height:1.45}.maintenance-banner-active{background:#dc262624}.maintenance-banner-sub{margin-top:.35rem;font-size:.85rem;font-weight:600}.access-banner{margin-bottom:1rem}.empty{text-align:center;color:var(--text-muted);padding:2.5rem}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1rem;margin-bottom:1.25rem;display:grid}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem 1.25rem}.stat-label{color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:.75rem}.stat-value{color:var(--accent-text);margin-top:.25rem;font-size:1.75rem;font-weight:700}.dashboard-grid{grid-template-columns:1fr;gap:1.25rem;display:grid}@media (width>=1100px){.dashboard-grid{grid-template-columns:1fr 1fr}.dashboard-grid .panel:first-child{grid-column:1/-1}}.pos-panel .panel-header{border-bottom:1px solid var(--border)}.pos-layout{grid-template-columns:1fr 1fr;gap:1.25rem;padding:1rem;display:grid}@media (width<=900px){.pos-layout{grid-template-columns:1fr}}.pos-catalog-list{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.5rem;max-height:420px;padding-right:.25rem;display:grid;overflow-y:auto}.pos-product-card{text-align:left;background:var(--surface-2,#ffffff08);border:1px solid var(--border);cursor:pointer;color:inherit;font:inherit;border-radius:8px;flex-direction:column;gap:.25rem;padding:.65rem .75rem;display:flex}.pos-product-card:hover:not(:disabled){border-color:var(--primary)}.pos-product-card:disabled,.pos-product-agotado{opacity:.55;cursor:not-allowed}.pos-product-sku{font-size:.75rem}.pos-product-name{font-size:.9rem;font-weight:600}.pos-product-meta{color:var(--text-muted);justify-content:space-between;font-size:.8rem;display:flex}.text-warn{color:var(--warning)}.pos-cart-lines{flex-direction:column;gap:.65rem;margin-top:.75rem;display:flex}.pos-cart-line{border-bottom:1px solid var(--border);grid-template-columns:1fr auto;gap:.35rem .75rem;padding-bottom:.65rem;display:grid}.pos-cart-controls{align-items:center;gap:.35rem;display:flex}.pos-cart-controls input{width:4.5rem;padding:.35rem .5rem}.pos-line-total{text-align:right;grid-column:2;font-weight:600}.pos-totals{text-align:right;margin-top:1rem;line-height:1.7}.pos-total-main{font-size:1.1rem;font-weight:700}.close-btn{color:var(--text-muted);cursor:pointer;background:0 0;border:none;font-size:1.25rem;line-height:1}.actions{flex-wrap:wrap;gap:.35rem;display:flex}.text-muted{color:var(--text-muted)}.sidebar-user{border-top:1px solid var(--border);margin-top:auto;padding:1rem 1.25rem}.logout-btn{width:100%}.login-page{background:radial-gradient(circle at top, var(--login-glow) 0%, var(--bg) 55%);justify-content:center;align-items:center;min-height:100vh;padding:1rem;display:flex}.login-card{background:var(--surface);border:1px solid var(--border);width:100%;max-width:400px;box-shadow:0 8px 32px var(--shadow), 0 0 0 1px var(--primary-subtle);border-radius:12px;padding:2rem}.login-brand{text-align:center;margin-bottom:1.5rem}.login-brand h1,.login-brand-title{letter-spacing:-.02em;margin-bottom:.25rem;font-size:1.75rem;font-weight:700}.login-brand-title{color:var(--text)}.login-brand-title .brand-ea,.login-brand h1 .brand-ea{color:var(--primary)}.login-brand h1 .brand-stock{color:var(--text)}.login-brand p{color:var(--text-muted);font-size:.9rem}.login-card form{flex-direction:column;gap:1rem;display:flex}.login-card input{width:100%}.login-btn{width:100%;margin-top:.5rem;padding:.75rem}.login-hint{text-align:center;color:var(--text-muted);margin-top:1.25rem;font-size:.8rem}.login-hint code{background:var(--surface-2);border-radius:3px;padding:.1rem .35rem}@media (width<=960px){body.nav-open{overflow:hidden}.app-layout{flex-direction:column}.sidebar-brand-desktop{display:none}.topbar{z-index:900;background:var(--surface);border-bottom:1px solid var(--border);align-items:center;gap:.75rem;height:56px;padding:0 .85rem;display:flex;position:sticky;top:0}.menu-toggle{border:1px solid var(--border);background:var(--surface-2);width:40px;height:40px;color:var(--text);cursor:pointer;border-radius:8px;flex-shrink:0;font-size:1.2rem}.topbar-title{flex-direction:column;min-width:0;line-height:1.2;display:flex}.topbar-title .login-brand-title{margin:0;font-size:1rem}.topbar-title .brand-logo,.topbar-title .stockea-logo--brand,.topbar-title .brand-logo-org{max-width:80px;max-height:22px}.topbar-org{color:var(--text-muted);white-space:nowrap;text-overflow:ellipsis;font-size:.72rem;overflow:hidden}.sidebar-backdrop{z-index:1000;cursor:pointer;background:#0000008c;border:none;padding:0;display:block;position:fixed;inset:0}.sidebar{z-index:1001;width:min(280px,86vw);transition:transform .2s;transform:translate(-100%)}.sidebar.is-open{transform:translate(0)}.main-content{margin-left:0;padding:1rem}.org-logo-banner{min-height:88px;max-height:140px;margin-bottom:1rem;padding:.75rem 1rem}.org-logo-banner-img{max-width:min(100%,360px);max-height:100px}.page-header{align-items:stretch}.page-header .btn,.page-header a.btn{text-align:center;width:100%}.form-grid{grid-template-columns:1fr}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-value{font-size:1.35rem}.data-table{min-width:560px}.data-table th,.data-table td{white-space:nowrap;padding:.55rem .75rem}.modal{max-height:min(90vh,100dvh)}.modal-overlay{align-items:flex-end;padding:.5rem}.modal-footer{justify-content:stretch}.modal-footer .btn{flex:1}.pos-layout{padding:.75rem}.pos-catalog-list{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));max-height:280px}.login-card{padding:1.25rem}input,select,textarea{font-size:16px}}@media (width<=560px){.stats-grid{grid-template-columns:1fr}.page-header h2{font-size:1.2rem}.sidebar-brand-date{display:none}.pos-cart-line{grid-template-columns:1fr}.pos-line-total{text-align:left;grid-column:1}.empty{padding:1.5rem 1rem}}
