*{box-sizing:border-box}body{margin:0;background:#f6f7fb;color:#111827;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.app-shell{display:flex;min-height:100vh}.sidebar{width:280px;background:#0f172a;color:white;padding:22px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:20}.brand{display:flex;gap:12px;align-items:center;margin-bottom:30px}.brand img,.brand-mark{width:48px;height:48px;border-radius:16px;object-fit:cover}.brand-mark{display:flex;align-items:center;justify-content:center;background:var(--primary);font-weight:900;font-size:22px}.brand strong{display:block;font-size:16px}.brand span{display:block;color:#94a3b8;font-size:12px;margin-top:2px}.menu{display:grid;gap:8px}.menu a{color:#cbd5e1;text-decoration:none;padding:12px 14px;border-radius:14px;font-weight:700;transition:.16s}.menu a:hover,.menu a.active{background:rgba(255,255,255,.10);color:white}.menu a.active{box-shadow:inset 4px 0 0 var(--primary)}.sidebar-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.12);padding-top:16px;display:grid;gap:4px}.sidebar-footer small{color:#94a3b8}.sidebar-footer a{color:#fca5a5;text-decoration:none;font-size:13px;margin-top:8px}.content{margin-left:280px;min-width:0;flex:1;padding:26px}.topbar{display:flex;align-items:center;gap:14px;margin-bottom:24px}.topbar h1{margin:0;font-size:28px}.topbar p{margin:4px 0 0;color:#6b7280}.mobile-menu{display:none;border:0;background:#111827;color:white;border-radius:12px;padding:10px 12px;font-size:20px}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.card{background:white;border:1px solid #e5e7eb;border-radius:22px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.card-body{padding:20px}.kpi small{display:block;text-transform:uppercase;letter-spacing:.05em;color:#64748b;font-size:11px;font-weight:900}.kpi b{display:block;margin-top:8px;font-size:30px}.kpi.primary{border-left:6px solid var(--primary)}.btn{border:0;border-radius:14px;padding:11px 14px;font-weight:800;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn-primary{background:var(--primary);color:white}.btn-dark{background:#111827;color:white}.btn-light{background:#f1f5f9;color:#111827}.form-control,.form-select{width:100%;border:1px solid #d1d5db;border-radius:14px;padding:12px 13px;font-size:15px;background:white}.form-label{display:block;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#64748b;font-weight:900;margin-bottom:6px}.live-main-layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px}.live-client-form{position:sticky;top:20px}.buyer-list{display:grid;gap:10px;max-height:calc(100vh - 260px);overflow:auto;padding-right:4px}.buyer-card{border:1px solid #e5e7eb;background:white;border-radius:18px;padding:14px;cursor:pointer;transition:.14s}.buyer-card:hover{border-color:var(--primary);transform:translateY(-1px)}.buyer-card.active{box-shadow:0 0 0 3px rgba(22,163,74,.12);border-color:var(--primary)}.buyer-card-top{display:flex;justify-content:space-between;gap:10px}.buyer-card b{font-size:16px}.buyer-card small{color:#64748b}.pill{border-radius:999px;background:#dcfce7;color:#166534;padding:5px 9px;font-size:12px;font-weight:900}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:10px}.product-btn{border:1px solid #e5e7eb;background:#fff;border-radius:18px;min-height:90px;padding:10px;cursor:pointer;display:grid;place-items:center;text-align:center;transition:.14s}.product-btn:hover{background:var(--primary);color:white;border-color:var(--primary)}.product-initials{width:42px;height:42px;border-radius:14px;background:#111827;color:white;display:flex;align-items:center;justify-content:center;font-weight:900;margin:auto}.product-btn:hover .product-initials{background:white;color:var(--primary)}.product-btn span:last-child{font-size:12px;font-weight:800;line-height:1.1}.live-detail{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px}.empty-state{text-align:center;color:#64748b;padding:40px 20px}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:14px;border-bottom:1px solid #e5e7eb;text-align:left}.table th{font-size:12px;text-transform:uppercase;color:#64748b;letter-spacing:.05em}.actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,1fr)}.live-main-layout,.live-detail{grid-template-columns:1fr}.live-client-form{position:static}}@media(max-width:800px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar-open .sidebar{transform:translateX(0)}.content{margin-left:0;padding:16px}.mobile-menu{display:inline-flex}.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.topbar h1{font-size:22px}.product-grid{grid-template-columns:repeat(3,1fr)}.buyer-list{max-height:none}.table-responsive{overflow:auto}}

.live-status-bar{background:white;border:1px solid #e5e7eb;border-radius:22px;padding:16px 18px;margin-bottom:18px;display:flex;justify-content:space-between;align-items:center;gap:16px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.live-status-bar>div:first-child{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.live-status-bar small{color:#64748b}.live-dot{width:12px;height:12px;background:#22c55e;border-radius:999px;box-shadow:0 0 0 6px rgba(34,197,94,.14)}.live-status-kpis{display:flex;gap:10px}.live-status-kpis span{background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:10px 14px;min-width:110px}.live-status-kpis small{display:block;font-size:11px;text-transform:uppercase;font-weight:900}.live-status-kpis b{font-size:20px}.quick-buyer-panel{background:white;border:1px solid #e5e7eb;border-radius:22px;padding:16px;margin-bottom:18px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.quick-buyer-panel form{display:grid;grid-template-columns:minmax(260px,1.4fr) 1fr 1fr auto;gap:12px;align-items:end}.quick-buyer-panel label{display:block;font-size:11px;text-transform:uppercase;color:#64748b;font-weight:900;margin-bottom:6px}.quick-buyer-panel input{width:100%;border:1px solid #d1d5db;border-radius:14px;padding:12px 13px;font-size:15px}.quick-buyer-panel button{border:0;background:var(--primary);color:white;border-radius:14px;padding:13px 18px;font-weight:900;cursor:pointer}.smart-input-wrap{position:relative}.buyer-suggestions{position:absolute;background:white;left:0;right:0;top:72px;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 18px 35px rgba(15,23,42,.12);z-index:10;overflow:hidden}.buyer-suggestions button{display:flex;width:100%;justify-content:space-between;gap:10px;background:white;color:#111827;border-radius:0;text-align:left;border-bottom:1px solid #f1f5f9}.buyer-suggestions button:hover{background:#f8fafc}.buyer-suggestions small{color:#64748b}.live-workspace{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px}.live-buyers-panel,.live-detail-panel{background:white;border:1px solid #e5e7eb;border-radius:22px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.live-detail-panel{padding:18px;position:sticky;top:18px;height:fit-content}.panel-head{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:18px;border-bottom:1px solid #e5e7eb}.panel-head h3,.detail-head h3{margin:0}.panel-head p,.detail-head p{margin:4px 0 0;color:#64748b}.panel-head input{border:1px solid #d1d5db;border-radius:14px;padding:11px 12px;min-width:240px}.buyer-table-wrap{overflow:auto}.buyer-table{width:100%;border-collapse:collapse}.buyer-table th{background:#0f172a;color:white;text-transform:uppercase;font-size:11px;letter-spacing:.05em;padding:12px}.buyer-table td{padding:12px;border-bottom:1px solid #e5e7eb;vertical-align:middle}.buyer-table tr{cursor:pointer}.buyer-table tbody tr:hover,.buyer-table tbody tr.selected-row{background:#f0fdf4}.buyer-name{display:flex;align-items:center;gap:10px}.buyer-name span{width:38px;height:38px;border-radius:13px;background:#111827;color:white;display:flex;align-items:center;justify-content:center;font-weight:900}.buyer-name b{display:block}.buyer-name small{display:block;color:#64748b}.badge-soft{background:#dcfce7;color:#166534;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}.inline-products{display:flex;gap:7px;flex-wrap:wrap;min-width:330px}.inline-products button{width:58px;height:58px;border:1px solid #e5e7eb;background:white;border-radius:14px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;transition:.14s}.inline-products button:hover{background:var(--primary);color:white;border-color:var(--primary)}.inline-products button span{background:#111827;color:white;border-radius:9px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900}.inline-products button:hover span{background:white;color:var(--primary)}.inline-products small{max-width:52px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-weight:900}.mini-btn{display:inline-flex;text-decoration:none;border:0;background:var(--primary);color:white;padding:8px 10px;border-radius:10px;font-weight:900;cursor:pointer}.mini-btn.light{background:#f1f5f9;color:#111827}.empty-cell{text-align:center;color:#64748b;padding:30px!important}.detail-summary{background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:14px;margin:14px 0}.detail-summary>div{display:flex;justify-content:space-between;margin-top:6px;color:#64748b}.empty-detail{color:#64748b;text-align:center;padding:24px}.detail-lines-v2{max-height:360px;overflow:auto}.line-item{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e5e7eb}.line-item small{display:block;color:#64748b}.line-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.line-actions button{border:1px solid #e5e7eb;background:white;border-radius:10px;padding:6px 10px;font-weight:900;cursor:pointer}.line-actions .danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}.detail-total{display:flex;justify-content:space-between;align-items:center;margin:16px 0}.detail-total b{font-size:28px;color:var(--primary)}.detail-actions{display:grid;gap:8px}.detail-actions button{border:0;border-radius:14px;padding:12px;font-weight:900;background:var(--primary);color:white;cursor:pointer}.detail-actions .dark{background:#111827}.detail-actions .danger{background:#dc2626}.pulse-row{animation:pulseV2 .5s ease}@keyframes pulseV2{0%{box-shadow:inset 5px 0 0 var(--primary);background:#ecfdf5}100%{box-shadow:inset 0 0 0 transparent;background:transparent}}#toastContainer{position:fixed;right:22px;top:22px;z-index:9999}.toast-v2{background:white;border-left:5px solid var(--primary);border-radius:14px;box-shadow:0 18px 35px rgba(15,23,42,.18);padding:13px 16px;margin-bottom:10px;min-width:240px;transition:.25s}.toast-v2.bad{border-left-color:#dc2626}.toast-v2.hide{opacity:0;transform:translateY(-8px)}@media(max-width:1100px){.live-workspace{grid-template-columns:1fr}.live-detail-panel{position:static}.quick-buyer-panel form{grid-template-columns:1fr 1fr}.quick-buyer-panel button{grid-column:1/-1}}@media(max-width:760px){.live-status-bar{align-items:flex-start;flex-direction:column}.live-status-kpis{width:100%;display:grid;grid-template-columns:1fr}.quick-buyer-panel form{grid-template-columns:1fr}.panel-head{align-items:flex-start;flex-direction:column}.panel-head input{width:100%;min-width:0}.buyer-table thead{display:none}.buyer-table,.buyer-table tbody,.buyer-table tr,.buyer-table td{display:block;width:100%}.buyer-table tr{border:1px solid #e5e7eb;border-radius:18px;margin:12px;padding:12px}.buyer-table td{border:0;padding:7px}.inline-products{min-width:0;display:grid;grid-template-columns:repeat(4,1fr)}.inline-products button{width:100%}}

.form-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:end}.form-grid.single{grid-template-columns:1fr}.form-grid>div:first-child{grid-column:span 2}.form-grid .form-action{grid-column:auto}.muted{color:#64748b}.success-text{color:#16a34a;font-weight:900}.danger-text{color:#dc2626;font-weight:900}.table-responsive{overflow:auto}.config-preview{display:flex;align-items:center;gap:14px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:18px;padding:16px;margin-bottom:18px}.config-preview img{width:70px;height:70px;border-radius:18px;object-fit:cover}.mini-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.mini-kpis span{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:10px}.mini-kpis small{display:block;color:#64748b;font-size:11px;text-transform:uppercase;font-weight:900}.mini-kpis b{display:block;margin-top:4px}.live-status-bar{background:white;border:1px solid #e5e7eb;border-radius:22px;padding:16px 18px;margin-bottom:18px;display:flex;justify-content:space-between;align-items:center;gap:16px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.live-status-bar>div:first-child{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.live-status-bar small{color:#64748b}.live-dot{width:12px;height:12px;background:#22c55e;border-radius:999px;box-shadow:0 0 0 6px rgba(34,197,94,.14)}.live-status-kpis{display:flex;gap:10px}.live-status-kpis span{background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:10px 14px;min-width:110px}.live-status-kpis small{display:block;font-size:11px;text-transform:uppercase;font-weight:900}.live-status-kpis b{font-size:20px}.quick-buyer-panel{background:white;border:1px solid #e5e7eb;border-radius:22px;padding:16px;margin-bottom:18px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.quick-buyer-panel form{display:grid;grid-template-columns:minmax(260px,1.4fr) 1fr 1fr auto;gap:12px;align-items:end}.quick-buyer-panel label{display:block;font-size:11px;text-transform:uppercase;color:#64748b;font-weight:900;margin-bottom:6px}.quick-buyer-panel input{width:100%;border:1px solid #d1d5db;border-radius:14px;padding:12px 13px;font-size:15px}.quick-buyer-panel button{border:0;background:var(--primary);color:white;border-radius:14px;padding:13px 18px;font-weight:900;cursor:pointer}.smart-input-wrap{position:relative}.buyer-suggestions{position:absolute;background:white;left:0;right:0;top:72px;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 18px 35px rgba(15,23,42,.12);z-index:10;overflow:hidden}.buyer-suggestions button{display:flex;width:100%;justify-content:space-between;gap:10px;background:white;color:#111827;border-radius:0;text-align:left;border-bottom:1px solid #f1f5f9}.buyer-suggestions button:hover{background:#f8fafc}.buyer-suggestions small{color:#64748b}.live-workspace{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px}.live-buyers-panel,.live-detail-panel{background:white;border:1px solid #e5e7eb;border-radius:22px;box-shadow:0 12px 35px rgba(15,23,42,.06)}.live-detail-panel{padding:18px;position:sticky;top:18px;height:fit-content}.panel-head{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:18px;border-bottom:1px solid #e5e7eb}.panel-head h3,.detail-head h3{margin:0}.panel-head p,.detail-head p{margin:4px 0 0;color:#64748b}.panel-head input{border:1px solid #d1d5db;border-radius:14px;padding:11px 12px;min-width:240px}.buyer-table-wrap{overflow:auto}.buyer-table{width:100%;border-collapse:collapse}.buyer-table th{background:#0f172a;color:white;text-transform:uppercase;font-size:11px;letter-spacing:.05em;padding:12px}.buyer-table td{padding:12px;border-bottom:1px solid #e5e7eb;vertical-align:middle}.buyer-table tr{cursor:pointer}.buyer-table tbody tr:hover,.buyer-table tbody tr.selected-row{background:#f0fdf4}.buyer-name{display:flex;align-items:center;gap:10px}.buyer-name span{width:38px;height:38px;border-radius:13px;background:#111827;color:white;display:flex;align-items:center;justify-content:center;font-weight:900}.buyer-name b{display:block}.buyer-name small{display:block;color:#64748b}.badge-soft{background:#dcfce7;color:#166534;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900}.inline-products{display:flex;gap:7px;flex-wrap:wrap;min-width:330px}.inline-products button{width:58px;height:58px;border:1px solid #e5e7eb;background:white;border-radius:14px;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;transition:.14s}.inline-products button:hover{background:var(--primary);color:white;border-color:var(--primary)}.inline-products button span{background:#111827;color:white;border-radius:9px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900}.inline-products button:hover span{background:white;color:var(--primary)}.inline-products small{max-width:52px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;font-weight:900}.mini-btn{display:inline-flex;text-decoration:none;border:0;background:var(--primary);color:white;padding:8px 10px;border-radius:10px;font-weight:900;cursor:pointer}.mini-btn.light{background:#f1f5f9;color:#111827}.empty-cell{text-align:center;color:#64748b;padding:30px!important}.detail-summary{background:#f8fafc;border:1px solid #e5e7eb;border-radius:16px;padding:14px;margin:14px 0}.detail-summary>div{display:flex;justify-content:space-between;margin-top:6px;color:#64748b}.empty-detail{color:#64748b;text-align:center;padding:24px}.detail-lines-v2{max-height:360px;overflow:auto}.line-item{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #e5e7eb}.line-item small{display:block;color:#64748b}.line-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.line-actions button{border:1px solid #e5e7eb;background:white;border-radius:10px;padding:6px 10px;font-weight:900;cursor:pointer}.line-actions .danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}.detail-total{display:flex;justify-content:space-between;align-items:center;margin:16px 0}.detail-total b{font-size:28px;color:var(--primary)}.detail-actions{display:grid;gap:8px}.detail-actions button{border:0;border-radius:14px;padding:12px;font-weight:900;background:var(--primary);color:white;cursor:pointer}.detail-actions .dark{background:#111827}.detail-actions .danger{background:#dc2626}.pulse-row{animation:pulseV2 .5s ease}@keyframes pulseV2{0%{box-shadow:inset 5px 0 0 var(--primary);background:#ecfdf5}100%{box-shadow:inset 0 0 0 transparent;background:transparent}}#toastContainer{position:fixed;right:22px;top:22px;z-index:9999}.toast-v2{background:white;border-left:5px solid var(--primary);border-radius:14px;box-shadow:0 18px 35px rgba(15,23,42,.18);padding:13px 16px;margin-bottom:10px;min-width:240px;transition:.25s}.toast-v2.bad{border-left-color:#dc2626}.toast-v2.hide{opacity:0;transform:translateY(-8px)}@media(max-width:1100px){.live-workspace{grid-template-columns:1fr}.live-detail-panel{position:static}.quick-buyer-panel form{grid-template-columns:1fr 1fr}.quick-buyer-panel button{grid-column:1/-1}.form-grid{grid-template-columns:1fr 1fr}}@media(max-width:760px){.live-status-bar{align-items:flex-start;flex-direction:column}.live-status-kpis{width:100%;display:grid;grid-template-columns:1fr}.quick-buyer-panel form{grid-template-columns:1fr}.panel-head{align-items:flex-start;flex-direction:column}.panel-head input{width:100%;min-width:0}.buyer-table thead{display:none}.buyer-table,.buyer-table tbody,.buyer-table tr,.buyer-table td{display:block;width:100%}.buyer-table tr{border:1px solid #e5e7eb;border-radius:18px;margin:12px;padding:12px}.buyer-table td{border:0;padding:7px}.inline-products{min-width:0;display:grid;grid-template-columns:repeat(4,1fr)}.inline-products button{width:100%}.form-grid{grid-template-columns:1fr}.form-grid>div:first-child{grid-column:auto}}

.page-actions{display:flex;justify-content:flex-end;margin-bottom:14px}.segmented{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:4px;display:flex;gap:4px}.segmented a{text-decoration:none;color:#111827;padding:8px 12px;border-radius:10px;font-weight:900}.segmented a.active{background:var(--primary);color:#fff}.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.kpi.warning{border-left:6px solid #f59e0b}.rank-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #e5e7eb}.module-toolbar{display:flex;gap:12px;align-items:center;margin-bottom:18px}.module-toolbar .form-control{max-width:420px}.grid-clientes{grid-template-columns:minmax(0,1.5fr) 360px}.modal-lite{display:none;position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:9999;align-items:center;justify-content:center;padding:18px}.modal-lite.show{display:flex}.modal-card{background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.25);padding:24px;width:520px;max-width:100%;position:relative}.modal-card.wide{width:820px}.modal-close{position:absolute;top:14px;right:14px;border:0;background:#f1f5f9;border-radius:12px;width:34px;height:34px;font-size:22px;cursor:pointer}.client-purchase{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #e5e7eb}.client-purchase small{display:block;color:#64748b}.check-line{display:flex;gap:8px;align-items:center;font-weight:900}.badge-soft.closed{background:#fee2e2;color:#991b1b}.product-search-panel{background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:16px;margin-bottom:18px;box-shadow:0 12px 35px rgba(15,23,42,.06);display:grid;grid-template-columns:320px minmax(0,1fr);gap:14px;align-items:end}.product-search-panel label{display:block;font-size:11px;text-transform:uppercase;color:#64748b;font-weight:900;margin-bottom:6px}.product-search-panel input{width:100%;border:1px solid #d1d5db;border-radius:14px;padding:12px 13px}.global-product-results{display:flex;gap:8px;flex-wrap:wrap}.global-product-results button{border:1px solid #e5e7eb;background:#f8fafc;border-radius:14px;padding:10px 12px;cursor:pointer}.global-product-results span{display:block;color:var(--primary);font-weight:900}.detail-lines-v2{max-height:260px;overflow-y:auto;padding-right:4px}.bar-chart{height:220px;display:flex;align-items:end;gap:8px;border-left:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;padding:12px}.bar-item{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;min-width:22px}.bar-item div{width:18px;background:var(--primary);border-radius:8px 8px 0 0}.bar-item small{font-size:11px;color:#64748b}@media(max-width:1100px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.grid-clientes,.product-search-panel{grid-template-columns:1fr}}@media(max-width:760px){.kpi-grid{grid-template-columns:1fr}.module-toolbar{flex-direction:column;align-items:stretch}.module-toolbar .form-control{max-width:none}.product-search-panel{grid-template-columns:1fr}}

/* ============ MODERNIZACIÓN V3 ============ */
body{font-family:'Inter',system-ui,sans-serif;}
h1,h2,h3,.brand strong,.kpi b,.detail-total b{font-family:'Sora',system-ui,sans-serif;}
h1,h2,h3{letter-spacing:-.01em;}

/* Transiciones y hover suaves en tarjetas/botones */
.card{transition:box-shadow .2s ease, transform .2s ease;}
.btn,.mini-btn{transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;}
.btn:hover,.mini-btn:hover{transform:translateY(-1px);filter:brightness(1.05);}
.btn:active,.mini-btn:active{transform:translateY(0);}
.menu a{transition:background .15s ease, transform .15s ease;}
.menu a:hover{transform:translateX(2px);}
.buyer-card,.buyer-table tbody tr,.product-btn,[data-sale-row]{transition:background .15s ease, box-shadow .15s ease, transform .1s ease;}

/* Estados de venta con color propio: se leen de un vistazo en medio del live */
.badge-soft.estado-reservando{background:#e0e7ff;color:#3730a3;}
.badge-soft.estado-esperando{background:#fef3c7;color:#92400e;}
.badge-soft.estado-pagada{background:#dcfce7;color:#166534;}
.badge-soft.estado-entregada{background:#d1fae5;color:#065f46;}
.badge-soft.estado-cancelada{background:#fee2e2;color:#991b1b;}

/* Badge "Nueva" para clientas sin compras pagadas previas */
/* badge-nuevo redefinido más abajo, debajo del nombre */

/* Aviso de cliente nueva en el panel de detalle */
.aviso-nueva{background:#fffbeb;border:1px solid #fde68a;color:#92400e;border-radius:14px;padding:12px 14px;font-size:13px;font-weight:700;margin-bottom:12px;line-height:1.4;}

/* Búsquedas con botón de limpiar rápido */
.search-clear-wrap{position:relative;display:flex;align-items:center;}
.search-clear-wrap input{padding-right:36px;}
.search-clear-btn{position:absolute;right:8px;border:0;background:#e5e7eb;color:#4b5563;width:22px;height:22px;border-radius:999px;font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;font-weight:900;}
.search-clear-btn:hover{background:#d1d5db;}

/* Skeleton loading para el panel de detalle mientras carga */
.skeleton-line{height:14px;border-radius:8px;background:linear-gradient(90deg,#e5e7eb 25%,#f3f4f6 37%,#e5e7eb 63%);background-size:400% 100%;animation:skeletonShine 1.2s ease infinite;margin-bottom:10px;}
.skeleton-line.short{width:60%;}
@keyframes skeletonShine{0%{background-position:100% 50%}100%{background-position:0 50%}}

/* Live dot con pulso más vivo */
.live-dot{animation:liveDotPulse 1.6s ease-in-out infinite;}
@keyframes liveDotPulse{0%,100%{box-shadow:0 0 0 6px rgba(34,197,94,.14)}50%{box-shadow:0 0 0 10px rgba(34,197,94,.22)}}

/* KPIs: leve elevación al pasar el mouse para sensación premium */
.kpi:hover{box-shadow:0 16px 40px rgba(15,23,42,.1);transform:translateY(-1px);}

/* Focus visible accesible y prolijo */
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--primary);outline-offset:2px;}

@media (prefers-reduced-motion: reduce){
    *{animation-duration:.001ms !important;transition-duration:.001ms !important;}
}

/* ============ MODERNIZACIÓN V4: pulido real de Live ============ */

/* Badge "Nuevo cliente": mismo formato que los badges de estado (Reservando, etc.) */
.badge-nuevo-cliente{background:#fef3c7;color:#92400e;margin-top:4px;display:inline-block;}

/* Avatar siempre negro sólido, sin degradado de color */
.buyer-name span{background:#111827;}

/* Botones rápidos de producto: más aire, precio visible, más fáciles de tocar */
.inline-products{gap:8px;}
.inline-products button{
    width:auto;min-width:76px;height:auto;padding:10px 8px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    border-radius:16px;border:1px solid #e5e7eb;background:#fff;
}
.inline-products button span{width:30px;height:30px;border-radius:10px;font-size:11px;}
.inline-products button small{font-size:11px;max-width:none;overflow:visible;white-space:normal;text-align:center;line-height:1.15;}
.inline-products button em{font-style:normal;font-size:11px;font-weight:900;color:var(--primary);}
.inline-products button:hover em{color:#fff;}

/* Fila de compradora: más espacio, más aire para respirar */
.buyer-table td{padding:16px 12px;}
.buyer-table tbody tr{border-radius:14px;}

/* Panel de detalle: jerarquía más clara */
.detail-total b{font-size:32px;}
.line-item{align-items:center;}

/* Buscador de producto no destacado: queda claramente asociado a la sección de productos rápidos */
.product-search-panel{border:1px solid var(--primary);border-width:1px 1px 1px 4px;}
.global-product-results button{border-radius:14px;padding:12px 14px;font-weight:700;transition:.14s;}
.global-product-results button:hover{background:var(--primary);border-color:var(--primary);}
.global-product-results button:hover span{color:#fff;}
.global-product-results span{font-weight:900;}

/* Toolbar de búsqueda del panel live: mismo trato visual que el resto */
.panel-head input{transition:border-color .15s ease, box-shadow .15s ease;}
.panel-head input:focus{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);outline:none;}

@media(max-width:1100px){
    .inline-products{grid-template-columns:repeat(2,1fr);display:grid;}
    .inline-products button{width:100%;min-width:0;}
}

/* ============ MODERNIZACIÓN V5: popover de "agregar otro producto" ============ */

/* Otros productos: solo texto plano (nombre + precio), sin ninguna decoración de card */
.otros-wrap{display:flex;align-items:center;gap:8px;min-width:0;flex:1;}
.otros-filter{
    width:70px;flex-shrink:0;border:1px solid #e5e7eb;border-radius:10px;padding:7px 8px;
    font-size:11px;background:#f8fafc;
}
.otros-filter:focus{outline:none;border-color:var(--primary);background:#fff;}
.otros-list{display:none;gap:14px;overflow-x:auto;white-space:nowrap;min-width:0;align-items:center;}
.otros-list.show{display:flex;}
.otros-list button{
    flex-shrink:0;border:0;background:transparent;padding:0;cursor:pointer;
    font-size:12px;color:#374151;font-weight:600;
}
.otros-list button b{color:var(--primary);font-weight:900;margin-left:4px;}
.otros-list button:hover{color:var(--primary);text-decoration:underline;}

/* Search-clear-wrap: asegurar que el botón × siempre quede pegado al input, nunca abajo */
.search-clear-wrap{width:100%;}
.search-clear-wrap input{width:100%;}

/* ================================================================
   V6 — REDISEÑO GENERAL: paleta, modales propios, componentes nuevos
   ================================================================ */

:root{
    --primary-dark: color-mix(in srgb, var(--primary) 80%, black);
    --primary-light: color-mix(in srgb, var(--primary) 12%, white);
    --primary-soft: color-mix(in srgb, var(--primary) 6%, white);
}

body{
    background:
        radial-gradient(1200px 600px at 100% -10%, var(--primary-soft), transparent),
        #f4f6fb;
}

/* Sidebar con degradado propio, no negro plano */
.sidebar{
    background: linear-gradient(165deg, #0b1220 0%, #101a30 55%, color-mix(in srgb, var(--primary) 22%, #0b1220) 100%);
}
.brand-mark{background: linear-gradient(135deg, var(--primary), var(--primary-dark));}
.menu a.active{
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 35%, transparent), transparent);
}

/* Cards: sombra más suave y difusa, radio un poco mayor */
.card{
    border-radius:20px;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 16px 40px rgba(15,23,42,.07);
    border-color:#eceef3;
}
.kpi.primary{border-left-width:5px;background:linear-gradient(180deg,#fff, var(--primary-soft));}

/* Botones con gradiente propio en vez de color plano */
.btn-primary{
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}
.mini-btn{background: linear-gradient(135deg, var(--primary), var(--primary-dark));}
.mini-btn.light{background:#f1f5f9;color:#111827;box-shadow:none;}
.mini-btn.danger{background:linear-gradient(135deg,#ef4444,#b91c1c);}

/* Botón rojo de Finalizar Live, directo en la barra de estado */
.live-status-bar{flex-wrap:wrap;}
.btn-finalizar-live{
    border:0;border-radius:14px;padding:12px 18px;font-weight:900;cursor:pointer;color:#fff;
    background:linear-gradient(135deg,#ef4444,#b91c1c);
    box-shadow:0 10px 24px rgba(220,38,38,.25);
    transition:transform .12s ease, box-shadow .12s ease;
    letter-spacing:.01em;
    text-decoration:none;display:inline-flex;align-items:center;
}
.btn-finalizar-live:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(220,38,38,.32);}

/* Modales existentes (modal-lite): más premium, con blur y animación */
.modal-lite{background:rgba(10,15,30,.55);backdrop-filter:blur(3px);}
.modal-card{
    border-radius:24px;
    transform:scale(.96);opacity:0;transition:transform .18s ease, opacity .18s ease;
}
.modal-lite.show .modal-card{transform:scale(1);opacity:1;}

/* ---------- Modal de confirmación propio (uiConfirm / uiAlert) ---------- */
.ui-confirm-overlay{
    position:fixed;inset:0;background:rgba(10,15,30,.55);backdrop-filter:blur(3px);
    display:flex;align-items:center;justify-content:center;z-index:10000;
    opacity:0;pointer-events:none;transition:opacity .15s ease;
}
.ui-confirm-overlay.show{opacity:1;pointer-events:auto;}
.ui-confirm-card{
    background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.3);
    padding:26px;width:380px;max-width:88vw;
    transform:scale(.94);transition:transform .15s ease;
}
.ui-confirm-overlay.show .ui-confirm-card{transform:scale(1);}
.ui-confirm-message{margin:0 0 20px;font-size:15px;font-weight:600;color:#1f2937;line-height:1.5;}
.ui-confirm-actions{display:flex;gap:10px;justify-content:flex-end;}
.ui-confirm-actions .btn{padding:11px 18px;}

/* Toasts: un poco más presentes */
.toast-v2{border-radius:16px;box-shadow:0 20px 45px rgba(15,23,42,.2);}

/* Historial: columna de acciones */
.acciones-historial{display:flex;gap:8px;flex-wrap:wrap;}

/* Focus visible consistente con la nueva paleta */
input:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible{
    outline:2px solid var(--primary);outline-offset:2px;
}

@media(max-width:760px){
    .live-status-bar{align-items:stretch;}
    .btn-finalizar-live{width:100%;}
}

/* ---------- Modal de confirmación con efecto rebote ---------- */
.ui-confirm-overlay{
    position:fixed;inset:0;background:rgba(10,15,30,.55);backdrop-filter:blur(3px);
    display:flex;align-items:center;justify-content:center;z-index:10000;
    opacity:0;pointer-events:none;transition:opacity .15s ease;
}
.ui-confirm-overlay.show{opacity:1;pointer-events:auto;}
.ui-confirm-card{
    background:#fff;border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.3);
    padding:26px;width:380px;max-width:88vw;
    transform:scale(.7);transition:transform .05s;
}
.ui-confirm-overlay.show .ui-confirm-card{
    animation:uiBounceIn .38s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes uiBounceIn{
    0%{transform:scale(.7);opacity:0;}
    60%{transform:scale(1.04);opacity:1;}
    100%{transform:scale(1);}
}
.ui-confirm-message{margin:0 0 20px;font-size:15px;font-weight:600;color:#1f2937;line-height:1.5;}
.ui-confirm-actions{display:flex;gap:10px;justify-content:flex-end;}
.ui-confirm-actions .btn{padding:11px 18px;}

/* Toast con rebote también, para que combine con el resto de la app */
.toast-v2{
    border-radius:16px;box-shadow:0 20px 45px rgba(15,23,42,.2);
    animation:uiToastBounce .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes uiToastBounce{
    0%{transform:translateX(30px) scale(.85);opacity:0;}
    60%{transform:translateX(-4px) scale(1.02);opacity:1;}
    100%{transform:translateX(0) scale(1);}
}

/* Íconos SVG del menú lateral: alineados con el texto */
.menu a{display:flex;align-items:center;gap:12px;}
.menu a svg{flex-shrink:0;opacity:.85;}
.menu a.active svg,.menu a:hover svg{opacity:1;}

/* Transición suave de carga de página (mitiga el "salto" al navegar entre secciones) */
.content{animation:pageFadeIn .18s ease;}
@keyframes pageFadeIn{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}

/* Filas clicleables en tablas (productos, clientes) deben mostrar la manito */
#productTable tbody tr, #clientTable tbody tr{cursor:pointer;}
#productTable tbody tr:hover, #clientTable tbody tr:hover{background:#f8fafc;}

/* Paginación de tablas */
.table-pager{display:flex;align-items:center;justify-content:center;gap:14px;padding:14px 0 4px;font-size:13px;color:#6b7280;font-weight:700;}
.table-pager button:disabled{opacity:.4;cursor:not-allowed;}

/* Ajuste de tamaños: más profesional, menos denso */
.topbar h1{font-size:24px;}
.kpi b{font-size:26px;}
.card-body{padding:18px;}
.table th{font-size:10.5px;}
.table td{font-size:13.5px;}
.auth-card h1{font-size:22px;}

/* Banner compacto de estado del live en el dashboard */
.live-banner{
    background:#fff;border:1px solid #e5e7eb;border-left:5px solid #22c55e;border-radius:16px;
    padding:14px 18px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;
}
.live-banner.muted-banner{border-left-color:#cbd5e1;}
.live-banner .live-dot{display:inline-block;margin-right:2px;}

/* ================================================================
   V7 LANZAMIENTO — Modo Live rápido, premium y demo-ready
   Objetivo: que live.php se sienta como consola de operación en vivo.
   ================================================================ */
.live-command-center{
    align-items:stretch;
    background:linear-gradient(135deg,#111827 0%,#0f172a 58%, color-mix(in srgb, var(--primary) 32%, #0f172a) 100%);
    color:#fff;
    border:0;
    padding:18px;
    box-shadow:0 18px 45px rgba(15,23,42,.22);
}
.live-command-main{display:flex;align-items:center;gap:14px;min-width:280px;}
.live-command-main b{display:block;font-size:22px;line-height:1.1;}
.live-command-main small{color:#cbd5e1;}
.live-command-main small strong{color:#fff;font-variant-numeric:tabular-nums;}
.live-eyebrow{display:block;color:#fecaca!important;font-weight:900;letter-spacing:.08em;font-size:11px;text-transform:uppercase;margin-bottom:4px;}
.live-dot-red{background:#ef4444;box-shadow:0 0 0 7px rgba(239,68,68,.18)!important;animation:liveRedPulse 1.35s ease-in-out infinite;}
@keyframes liveRedPulse{0%,100%{box-shadow:0 0 0 7px rgba(239,68,68,.18)}50%{box-shadow:0 0 0 13px rgba(239,68,68,.30)}}
.live-scoreboard{margin-left:auto;}
.live-scoreboard span{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.14);color:#fff;min-width:126px;}
.live-scoreboard small{color:#cbd5e1!important;}
.live-scoreboard b{font-size:24px;color:#fff;}
.live-command-center .btn-finalizar-live{align-self:center;background:linear-gradient(135deg,#ef4444,#991b1b);white-space:nowrap;}
.quick-buyer-panel{border:1px solid color-mix(in srgb, var(--primary) 20%, #e5e7eb);}
.quick-buyer-panel form{grid-template-columns:minmax(280px,1.6fr) .85fr .85fr auto;}
.quick-buyer-panel input{font-size:16px;}
.quick-buyer-panel button{min-height:48px;}
.live-workspace{grid-template-columns:minmax(0,1fr) 400px;align-items:start;}
.live-buyers-panel,.live-detail-panel{border-color:#eef0f5;}
.live-detail-panel{top:14px;}
.buyer-table th{background:#111827;font-size:10px;}
.buyer-table td:nth-child(5){min-width:430px;}
.buyer-table tbody tr.selected-row{background:linear-gradient(90deg, color-mix(in srgb, var(--primary) 13%, white), #fff);box-shadow:inset 5px 0 0 var(--primary);}
.buyer-table tbody tr:hover{background:color-mix(in srgb, var(--primary) 6%, white);}
.buyer-name span{text-transform:uppercase;}
.inline-products button{min-width:84px;border-radius:18px;box-shadow:0 1px 0 rgba(15,23,42,.04);}
.inline-products button:active,.speed-product:active{transform:scale(.97);}
.detail-head h3{font-size:26px;line-height:1.1;}
.detail-head p{font-weight:700;}
.selected-product-pad{border:1px solid #e5e7eb;background:#f8fafc;border-radius:18px;padding:14px;margin:14px 0;}
.pad-title{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px;}
.pad-title b{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:#334155;}
.pad-title small{font-size:11px;font-weight:900;color:#64748b;background:#e2e8f0;padding:5px 8px;border-radius:999px;}
.speed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.speed-product{border:1px solid #e5e7eb;background:#fff;border-radius:16px;padding:11px;cursor:pointer;display:grid;grid-template-columns:30px 1fr;gap:3px 8px;text-align:left;align-items:center;transition:.14s;}
.speed-product strong{grid-row:1/3;width:30px;height:30px;border-radius:10px;background:#111827;color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;}
.speed-product span{font-weight:900;font-size:13px;line-height:1.1;}
.speed-product em{font-style:normal;font-size:12px;font-weight:900;color:var(--primary);}
.speed-product:hover{border-color:var(--primary);background:#fff;box-shadow:0 8px 20px color-mix(in srgb, var(--primary) 12%, transparent);transform:translateY(-1px);}
.speed-search{margin-top:10px;position:relative;}
.speed-search input{width:100%;border:1px solid #d1d5db;border-radius:14px;padding:12px;font-weight:700;background:#fff;}
.speed-results{position:absolute;left:0;right:0;top:48px;background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 18px 40px rgba(15,23,42,.16);z-index:25;overflow:hidden;}
.speed-results button{width:100%;border:0;background:#fff;display:flex;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;font-weight:800;}
.speed-results button:hover{background:color-mix(in srgb, var(--primary) 8%, white);}
.detail-summary{font-size:14px;}
.detail-summary>b:first-child{font-size:18px;color:#111827;}
.detail-total{background:#111827;color:#fff;border-radius:18px;padding:14px 16px;margin-top:16px;}
.detail-total span{font-weight:900;text-transform:uppercase;font-size:12px;color:#cbd5e1;}
.detail-total b{color:#fff;font-size:34px;}
.detail-actions{grid-template-columns:1fr;}
.detail-actions button{font-size:15px;min-height:48px;}
.line-item{background:#fff;border:1px solid #eef0f5;border-radius:16px;padding:12px;margin-bottom:8px;}
.line-item:last-child{border-bottom:1px solid #eef0f5;}
.line-actions span{font-weight:900;min-width:22px;text-align:center;}
.aviso-nueva{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:16px;padding:11px 12px;font-size:13px;font-weight:900;margin:12px 0;}
@media(max-width:1200px){.live-workspace{grid-template-columns:1fr}.live-detail-panel{position:static}.buyer-table td:nth-child(5){min-width:360px}}
@media(max-width:760px){.live-command-center{display:grid}.live-scoreboard{display:grid;grid-template-columns:repeat(3,1fr);width:100%;margin-left:0}.live-scoreboard span{min-width:0}.quick-buyer-panel form{grid-template-columns:1fr}.speed-grid{grid-template-columns:1fr}.buyer-table td:nth-child(5){min-width:280px}}

/* Sprint 1.7 — Live Commerce: productos destacados limpios + buscador global por compradora + menú compacto */
.nav-toggle{display:inline-flex!important;align-items:center;justify-content:center;min-width:42px;height:42px;border-radius:13px;background:#111827;color:#fff;border:0;cursor:pointer;font-weight:900}.menu a{display:flex;align-items:center;gap:12px}.menu a svg{flex:0 0 18px}.sidebar-collapsed .sidebar{width:86px;padding:18px 14px;align-items:center}.sidebar-collapsed .content{margin-left:86px}.sidebar-collapsed .brand{justify-content:center;margin-bottom:26px}.sidebar-collapsed .brand img,.sidebar-collapsed .brand-mark{width:46px;height:46px}.sidebar-collapsed .brand-copy,.sidebar-collapsed .menu-label,.sidebar-collapsed .sidebar-footer small,.sidebar-collapsed .sidebar-footer a{display:none}.sidebar-collapsed .menu{width:100%}.sidebar-collapsed .menu a{justify-content:center;padding:14px;border-radius:16px}.sidebar-collapsed .menu a.active{box-shadow:inset 0 0 0 2px var(--primary);background:rgba(255,255,255,.10)}

.live-workspace{grid-template-columns:minmax(0,1fr) 360px}.buyer-table{table-layout:fixed}.buyer-table th:nth-child(1),.buyer-table td:nth-child(1){width:205px}.buyer-table th:nth-child(2),.buyer-table td:nth-child(2){width:130px}.buyer-table th:nth-child(3),.buyer-table td:nth-child(3){width:85px;text-align:center}.buyer-table th:nth-child(4),.buyer-table td:nth-child(4){width:120px}.buyer-table th:nth-child(6),.buyer-table td:nth-child(6){width:90px;text-align:center}.buyer-table th:nth-child(5),.buyer-table td:nth-child(5){width:auto}.buyer-table td{vertical-align:middle}.buyer-table tbody tr.selected-row{background:linear-gradient(90deg,rgba(236,72,153,.14),rgba(255,255,255,.98))!important;box-shadow:inset 5px 0 0 var(--primary)}

.live-row-product-stack{display:grid;gap:8px;min-width:520px;max-width:100%}.row-product-search{position:relative;z-index:2}.row-product-search input{width:100%;border:1px solid #d7dce8;border-radius:14px;padding:10px 42px 10px 14px;background:#fff;font-weight:800;color:#111827;outline:none}.row-product-search input:focus{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 14%,transparent)}.row-product-search>span{position:absolute;right:14px;top:10px;color:#64748b;font-weight:900}.row-product-results{display:none;background:#fff;border:1px solid #e5e7eb;border-radius:14px;margin-top:6px;max-height:190px;overflow:auto;box-shadow:0 16px 30px rgba(15,23,42,.10)}.row-product-search.open .row-product-results{display:block}.row-product-results button{width:100%;border:0;background:#fff;border-bottom:1px solid #f1f5f9;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;cursor:pointer;font-weight:900;color:#111827}.row-product-results button:hover,.row-product-results button:focus{background:#fdf2f8;color:var(--primary)}.row-product-results b{color:var(--primary)}.row-product-empty{padding:12px;color:#64748b;font-weight:800}

.row-product-strip{display:flex;gap:8px;align-items:stretch;overflow-x:auto;overflow-y:hidden;max-width:100%;padding:2px 2px 7px;scrollbar-width:thin}.quick-product-card{flex:0 0 92px;min-height:56px;border:1px solid #dfe5f2;background:#fff;border-radius:14px;padding:8px 8px 9px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:3px;cursor:pointer;box-shadow:inset 0 -3px 0 var(--primary),0 8px 16px rgba(15,23,42,.05);transition:.12s}.quick-product-card:hover{transform:translateY(-1px);border-color:var(--primary);box-shadow:inset 0 -4px 0 var(--primary),0 14px 24px rgba(236,72,153,.14)}.quick-product-card b{font-size:12px;line-height:1.12;color:#111827;max-width:78px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.quick-product-card em{font-style:normal;color:var(--primary);font-size:11px;font-weight:900}.no-featured-products{display:flex;align-items:center;color:#64748b;font-weight:800;padding:8px 10px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc}

.live-detail-panel{max-height:calc(100vh - 135px);overflow:auto}.detail-lines-v2{max-height:390px;overflow:auto}.selected-product-pad{display:none!important}

@media(max-width:1280px){.live-workspace{grid-template-columns:1fr}.live-detail-panel{position:relative;top:auto;max-height:none}.buyer-table-wrap{overflow:auto}.buyer-table{min-width:1040px}.content{padding:20px}.live-status-bar{align-items:flex-start}.quick-buyer-panel form{grid-template-columns:1fr 1fr}.quick-buyer-panel form button{grid-column:1/-1}}
@media(max-width:800px){.sidebar{width:86px;transform:translateX(-100%);padding:18px 14px;align-items:center}.sidebar-open .sidebar{transform:translateX(0)}.sidebar .brand-copy,.sidebar .menu-label,.sidebar .sidebar-footer small,.sidebar .sidebar-footer a{display:none}.sidebar .menu a{justify-content:center}.content{margin-left:0!important;padding:14px}.mobile-menu{display:inline-flex!important}.live-command-center{display:grid!important;grid-template-columns:1fr;gap:12px}.live-scoreboard{width:100%;overflow:auto}.quick-buyer-panel form{grid-template-columns:1fr}.panel-head{display:grid}.panel-head input{min-width:0;width:100%}.buyer-table{min-width:980px}.live-row-product-stack{min-width:460px}}


/* Sprint 1.8 — corrección buscador productos + hamburguesa dentro del menú */
.sidebar{position:fixed}.sidebar-menu-toggle{position:absolute;top:18px;right:14px;width:40px;height:40px;border:0;border-radius:13px;background:rgba(255,255,255,.10);color:#fff;font-size:20px;font-weight:900;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:3}.sidebar-menu-toggle:hover{background:rgba(255,255,255,.18)}.brand{padding-right:48px}.sidebar-collapsed .sidebar-menu-toggle{position:static;margin:0 0 16px 0;width:48px;height:48px;background:rgba(255,255,255,.10)}.sidebar-collapsed .brand{padding-right:0}.topbar .mobile-menu{display:none!important}.row-product-results button:disabled{opacity:.65;cursor:wait}.row-product-results button:first-child{background:#fff;color:#111827}.row-product-results button:first-child:hover{background:#fdf2f8;color:var(--primary)}
@media(max-width:800px){.sidebar-menu-toggle{display:none}.topbar .mobile-menu{display:inline-flex!important}.brand{padding-right:0}}

/* Sprint 1.9: resumen compacto de prendas en panel lateral */
.detail-summary{padding:0!important;background:transparent!important;border:0!important;margin:12px 0!important;}
.detail-summary-toggle{width:100%;border:1px solid #e5e7eb;background:#f8fafc;border-radius:16px;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;text-align:left;color:#111827;}
.detail-summary-toggle span{font-weight:800;}
.detail-summary-toggle span b{font-size:24px;color:#111827;margin-right:4px;}
.detail-summary-toggle em{font-style:normal;font-size:12px;font-weight:900;color:var(--primary);background:#fff;border:1px solid #e5e7eb;border-radius:999px;padding:6px 10px;white-space:nowrap;}
.detail-breakdown{display:none;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 16px 16px;padding:10px 14px;margin-top:-6px;}
.detail-summary.open .detail-summary-toggle{border-radius:16px 16px 10px 10px;background:#fff;}
.detail-summary.open .detail-breakdown{display:block;}
.detail-breakdown div{display:flex;justify-content:space-between;gap:10px;padding:5px 0;color:#64748b;font-size:14px;}
.detail-breakdown div b{color:#111827;}
.detail-breakdown small{color:#64748b;}

/* Sprint 1.10: ocultar realmente el desglose compacto hasta presionar Ver detalle */
.detail-summary > .detail-breakdown{display:none!important;}
.detail-summary.open > .detail-breakdown{display:block!important;}
.detail-summary.open > .detail-breakdown div{display:flex!important;justify-content:space-between;gap:10px;}

/* Sprint 1.11: panel lateral sin doble scroll + lista de prendas controlada */
.live-detail-panel{
    max-height:none!important;
    overflow:visible!important;
}
.detail-lines-v2{
    max-height:286px!important; /* aprox. 3 prendas visibles */
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-right:6px;
    margin-top:10px;
    scrollbar-width:thin;
}
.detail-lines-v2::-webkit-scrollbar{width:8px}
.detail-lines-v2::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px}
.detail-lines-v2::-webkit-scrollbar-track{background:#f8fafc;border-radius:999px}
.line-item{
    display:grid!important;
    grid-template-columns:minmax(78px,1fr) auto;
    align-items:center!important;
    gap:10px!important;
    padding:12px!important;
    margin-bottom:10px!important;
    border:1px solid #e8ecf4!important;
    border-radius:18px!important;
    background:#fff!important;
    box-shadow:0 6px 14px rgba(15,23,42,.035);
}
.line-item > div:first-child{min-width:0;}
.line-item > div:first-child b{
    display:block;
    max-width:120px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:normal;
    line-height:1.12;
}
.line-item small{font-size:13px;line-height:1.15;color:#64748b!important;}
.line-actions{
    display:grid!important;
    grid-template-columns:78px 32px 26px 32px 32px;
    align-items:center!important;
    justify-items:center!important;
    gap:6px!important;
    flex-wrap:nowrap!important;
}
.line-actions b{
    justify-self:end;
    min-width:72px;
    font-size:17px;
    line-height:1;
    color:#111827;
}
.line-actions span{
    min-width:26px!important;
    text-align:center;
    font-size:16px;
    font-weight:900;
    color:#111827;
}
.line-actions button{
    width:32px!important;
    height:32px!important;
    padding:0!important;
    border-radius:12px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:17px!important;
    line-height:1!important;
    font-weight:900!important;
    border:1px solid #dfe5ef!important;
    background:#fff!important;
    color:#111827!important;
}
.line-actions button:hover{border-color:var(--primary)!important;color:var(--primary)!important;box-shadow:0 4px 12px color-mix(in srgb,var(--primary) 14%,transparent)}
.line-actions .danger{
    background:#fee2e2!important;
    color:#dc2626!important;
    border-color:#fecaca!important;
}
.line-actions .danger:hover{background:#fecaca!important;color:#991b1b!important;border-color:#fca5a5!important;}
.detail-total{margin-top:14px!important;}
.detail-actions{gap:10px!important;}

@media(max-width:420px){
    .line-item{grid-template-columns:1fr;align-items:start!important;}
    .line-actions{grid-template-columns:1fr 32px 26px 32px 32px;width:100%;}
    .line-actions b{justify-self:start;}
}

/* Sprint 1.12: acciones compactas + preparación IVA */
.detail-lines-v2{
    max-height:252px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-right:4px!important;
}
.line-item{
    grid-template-columns:minmax(70px,1fr) minmax(178px,auto)!important;
    gap:8px!important;
    padding:10px 9px!important;
    border-radius:16px!important;
}
.line-item > div:first-child b{
    max-width:92px!important;
    font-size:14px!important;
    line-height:1.05!important;
}
.line-item small{
    font-size:11px!important;
    line-height:1.05!important;
}
.line-actions{
    grid-template-columns:64px 28px 20px 28px 28px!important;
    gap:4px!important;
    justify-content:end!important;
}
.line-actions b{
    min-width:60px!important;
    font-size:15px!important;
    letter-spacing:-.02em;
}
.line-actions span{
    min-width:20px!important;
    font-size:14px!important;
}
.line-actions button{
    width:28px!important;
    height:28px!important;
    border-radius:10px!important;
    font-size:14px!important;
}
.line-actions .danger{
    background:#fff1f2!important;
    color:#dc2626!important;
    border-color:#fecdd3!important;
}
.tax-box{
    border:1px solid #e6eaf2;
    background:#f8fafc;
    border-radius:16px;
    padding:11px 12px;
    margin-top:12px;
    display:grid;
    gap:9px;
}
.tax-check{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    cursor:pointer;
    font-weight:900;
    color:#111827;
    font-size:13px;
}
.tax-check input{
    width:18px;
    height:18px;
    accent-color:var(--primary);
    order:2;
}
.tax-check span{display:block;}
.tax-check b{color:var(--primary);}
.tax-preview{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.tax-preview div{
    background:#fff;
    border:1px solid #edf1f7;
    border-radius:13px;
    padding:8px 10px;
}
.tax-preview small{
    display:block;
    text-transform:uppercase;
    color:#64748b;
    font-size:10px;
    font-weight:900;
}
.tax-preview b{
    display:block;
    color:#111827;
    font-size:14px;
    margin-top:2px;
}
@media(max-width:430px){
    .line-item{grid-template-columns:1fr!important;}
    .line-actions{grid-template-columns:64px 28px 20px 28px 28px!important;width:100%;justify-content:start!important;}
}

/* Sprint 1.13 — contador Live centrado y estable por usuario */
.live-command-center{
    display:grid !important;
    grid-template-columns:minmax(230px,1fr) auto minmax(420px,auto) auto;
    align-items:center;
    gap:18px;
}
.live-timer-center{
    min-width:190px;
    text-align:center;
    color:#fff;
    justify-self:center;
    padding:4px 10px 0;
}
.live-timer-center strong{
    display:block;
    font-size:34px;
    line-height:1;
    letter-spacing:.03em;
    font-weight:900;
    color:#fff;
    font-variant-numeric:tabular-nums;
}
.live-timer-center span{
    margin-top:8px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:12px;
    font-size:10px;
    font-weight:900;
    letter-spacing:.08em;
    color:rgba(255,255,255,.86);
}
.live-timer-center em{font-style:normal;}
@media(max-width:1280px){
    .live-command-center{
        grid-template-columns:1fr auto;
    }
    .live-timer-center{order:3;grid-column:1/-1;justify-self:start;text-align:left;}
    .live-status-kpis{order:2;justify-self:end;}
    .btn-finalizar-live{order:4;justify-self:start;}
}
@media(max-width:760px){
    .live-command-center{grid-template-columns:1fr;}
    .live-status-kpis,.live-timer-center,.btn-finalizar-live{justify-self:stretch;width:100%;}
    .live-timer-center{text-align:center;}
}

/* === SPRINT 2.0 / Live command center: timer real centrado y header estable === */
.live-command-center{
    position:relative!important;
    display:grid!important;
    grid-template-columns:minmax(260px,1fr) auto auto!important;
    align-items:center!important;
    gap:14px!important;
    min-height:104px!important;
    padding:18px 20px!important;
    overflow:hidden!important;
}
.live-command-center .live-command-main{
    grid-column:1!important;
    min-width:0!important;
    max-width:420px!important;
    z-index:2!important;
}
.live-command-center .live-status-kpis,
.live-command-center .live-scoreboard{
    grid-column:2!important;
    justify-self:end!important;
    display:grid!important;
    grid-template-columns:repeat(3,124px)!important;
    gap:12px!important;
    z-index:2!important;
}
.live-command-center .live-scoreboard span{
    min-width:0!important;
    width:124px!important;
    height:68px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
}
.live-command-center .live-scoreboard b{
    line-height:1!important;
}
.live-command-center .btn-finalizar-live{
    grid-column:3!important;
    justify-self:end!important;
    z-index:2!important;
    min-height:58px!important;
    padding-inline:22px!important;
}
.live-timer-center{
    position:absolute!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:260px!important;
    text-align:center!important;
    z-index:1!important;
    pointer-events:none!important;
}
.live-timer-center strong{
    display:block!important;
    font-size:38px!important;
    letter-spacing:.06em!important;
    line-height:1!important;
    color:#fff!important;
    font-weight:900!important;
    font-variant-numeric:tabular-nums!important;
    text-shadow:0 8px 22px rgba(0,0,0,.22)!important;
}
.live-timer-center span{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    width:170px!important;
    margin:8px auto 0!important;
    color:#fff!important;
    opacity:.92!important;
    font-size:11px!important;
    font-weight:900!important;
    letter-spacing:.09em!important;
}

/* Panel derecho: sin doble scroll, lista compacta y acciones dentro de card */
.live-detail-panel{
    overflow:visible!important;
    max-height:none!important;
}
.detail-lines-v2{
    max-height:310px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-right:6px!important;
}
.line-item{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
}
.line-item>div:first-child{min-width:0!important;}
.line-item>div:first-child b{font-size:15px!important;line-height:1.05!important;word-break:break-word!important;}
.line-actions{
    display:grid!important;
    grid-template-columns:30px 22px 30px 30px!important;
    gap:5px!important;
    align-items:center!important;
    justify-content:end!important;
    flex-wrap:nowrap!important;
}
.line-actions button{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    padding:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:11px!important;
    font-size:14px!important;
    line-height:1!important;
}
.line-actions .danger{font-size:13px!important;}
.line-actions b,
.line-actions span{
    text-align:center!important;
    font-size:14px!important;
    font-weight:900!important;
}

@media(max-width:1500px){
    .live-command-center{grid-template-columns:minmax(230px,1fr) auto auto!important;}
    .live-command-center .live-scoreboard{grid-template-columns:repeat(3,112px)!important;}
    .live-command-center .live-scoreboard span{width:112px!important;}
    .live-timer-center{width:220px!important;}
    .live-timer-center strong{font-size:32px!important;}
}
@media(max-width:1280px){
    .live-command-center{
        grid-template-columns:1fr!important;
        padding:18px!important;
    }
    .live-timer-center{
        position:static!important;
        transform:none!important;
        width:100%!important;
        order:2!important;
        grid-column:1!important;
        margin:8px 0!important;
    }
    .live-command-center .live-status-kpis,
    .live-command-center .live-scoreboard{
        grid-column:1!important;
        justify-self:stretch!important;
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        width:100%!important;
    }
    .live-command-center .live-scoreboard span{width:auto!important;}
    .live-command-center .btn-finalizar-live{grid-column:1!important;justify-self:stretch!important;width:100%!important;}
}
@media(max-width:760px){
    .live-timer-center strong{font-size:30px!important;}
    .live-command-center .live-scoreboard{grid-template-columns:1fr!important;}
    .detail-lines-v2{max-height:270px!important;}
}

/* === Sprint 2.1: centrado real del contador y restauración del detalle lateral === */
.live-command-center{
    position:relative!important;
    display:grid!important;
    grid-template-columns:minmax(260px,1fr) 300px minmax(430px,1fr)!important;
    align-items:center!important;
    gap:18px!important;
    padding:18px 20px!important;
}
.live-command-center .live-command-main{
    grid-column:1!important;
    min-width:0!important;
    justify-self:start!important;
    z-index:2!important;
}
.live-timer-center{
    position:static!important;
    transform:none!important;
    grid-column:2!important;
    justify-self:center!important;
    align-self:center!important;
    width:300px!important;
    text-align:center!important;
    z-index:2!important;
    pointer-events:none!important;
}
.live-timer-center strong{
    display:block!important;
    font-size:38px!important;
    line-height:.95!important;
    letter-spacing:.075em!important;
    color:#fff!important;
    font-weight:900!important;
    font-variant-numeric:tabular-nums!important;
}
.live-timer-center span{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    width:170px!important;
    margin:8px auto 0!important;
    color:#fff!important;
    opacity:.94!important;
    font-size:11px!important;
    font-weight:900!important;
    letter-spacing:.09em!important;
}
.live-command-center .live-status-kpis,
.live-command-center .live-scoreboard{
    grid-column:3!important;
    justify-self:end!important;
    display:grid!important;
    grid-template-columns:repeat(3,120px)!important;
    gap:12px!important;
    width:auto!important;
    z-index:2!important;
}
.live-command-center .live-scoreboard span{
    min-width:0!important;
    width:120px!important;
    height:64px!important;
    padding:10px 14px!important;
}
.live-command-center .live-scoreboard b{font-size:24px!important;line-height:1.1!important;}
.live-command-center .btn-finalizar-live{
    grid-column:3!important;
    justify-self:end!important;
    margin-left:408px!important;
    z-index:3!important;
    min-width:210px!important;
    height:58px!important;
}
.live-command-center .live-scoreboard + .btn-finalizar-live{margin-left:0!important;}

/* Al estar en la misma columna, posicionamos KPIs y botón juntos sin mover el contador */
.live-command-center .live-scoreboard{margin-right:230px!important;}

/* Detalle lateral: restaurar card compacta y acciones alineadas */
.live-detail-panel{overflow:visible!important;max-height:none!important;}
.detail-lines-v2{
    max-height:318px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding-right:5px!important;
    margin-top:12px!important;
}
.line-item{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
    background:#fff!important;
    border:1px solid #e7ebf2!important;
    border-radius:16px!important;
    padding:11px 10px!important;
    margin:0 0 8px 0!important;
    box-shadow:none!important;
}
.line-item>div:first-child{min-width:0!important;}
.line-item>div:first-child b{
    display:block!important;
    font-size:15px!important;
    line-height:1.08!important;
    word-break:break-word!important;
    color:#111827!important;
}
.line-item small{font-size:12px!important;line-height:1.15!important;color:#64748b!important;}
.line-actions{
    display:grid!important;
    grid-template-columns:76px 30px 20px 30px 30px!important;
    gap:5px!important;
    align-items:center!important;
    justify-content:end!important;
    flex-wrap:nowrap!important;
    min-width:0!important;
}
.line-actions b{
    grid-column:1!important;
    text-align:right!important;
    font-size:17px!important;
    font-weight:900!important;
    color:#111827!important;
    white-space:nowrap!important;
}
.line-actions span{
    grid-column:3!important;
    text-align:center!important;
    font-size:14px!important;
    font-weight:900!important;
    color:#111827!important;
}
.line-actions button{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:11px!important;
    font-size:14px!important;
    line-height:1!important;
    border:1px solid #dbe3ef!important;
    background:#fff!important;
    color:#111827!important;
}
.line-actions button:nth-of-type(1){grid-column:2!important;}
.line-actions button:nth-of-type(2){grid-column:4!important;}
.line-actions .danger{
    grid-column:5!important;
    background:#fee2e2!important;
    color:#dc2626!important;
    border-color:#fecaca!important;
    font-size:14px!important;
}

@media(max-width:1550px){
    .live-command-center{grid-template-columns:minmax(230px,1fr) 260px minmax(390px,1fr)!important;}
    .live-timer-center{width:260px!important;}
    .live-timer-center strong{font-size:34px!important;}
    .live-command-center .live-scoreboard{grid-template-columns:repeat(3,112px)!important;margin-right:220px!important;}
    .live-command-center .live-scoreboard span{width:112px!important;}
    .live-command-center .btn-finalizar-live{min-width:200px!important;}
}
@media(max-width:1280px){
    .live-command-center{grid-template-columns:1fr!important;gap:12px!important;}
    .live-command-center .live-command-main,
    .live-timer-center,
    .live-command-center .live-scoreboard,
    .live-command-center .btn-finalizar-live{grid-column:1!important;justify-self:stretch!important;width:100%!important;margin:0!important;}
    .live-timer-center{text-align:center!important;justify-self:center!important;}
    .live-command-center .live-scoreboard{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
    .live-command-center .live-scoreboard span{width:auto!important;}
}
@media(max-width:420px){
    .line-item{grid-template-columns:1fr!important;}
    .line-actions{grid-template-columns:74px 30px 20px 30px 30px!important;justify-content:start!important;width:100%!important;}
}

/* === Sprint 2.2 FINAL: header limpio, timer centrado absoluto y acciones en una sola línea === */
.live-command-center{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    gap:18px!important;
    min-height:96px!important;
    padding:18px 20px!important;
    border-radius:24px!important;
    overflow:hidden!important;
}
.live-command-center .live-command-main{
    flex:1 1 300px!important;
    min-width:260px!important;
    max-width:430px!important;
    justify-self:auto!important;
    grid-column:auto!important;
    z-index:2!important;
}
.live-command-center .live-command-main b{font-size:22px!important;line-height:1.1!important;}
.live-timer-center{
    position:absolute!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:300px!important;
    text-align:center!important;
    grid-column:auto!important;
    justify-self:auto!important;
    z-index:1!important;
    pointer-events:none!important;
    margin:0!important;
}
.live-timer-center strong{
    display:block!important;
    font-size:38px!important;
    line-height:.95!important;
    letter-spacing:.075em!important;
    color:#fff!important;
    font-weight:900!important;
    font-variant-numeric:tabular-nums!important;
}
.live-timer-center span{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    width:170px!important;
    margin:8px auto 0!important;
    color:#fff!important;
    opacity:.94!important;
    font-size:11px!important;
    font-weight:900!important;
    letter-spacing:.09em!important;
}
.live-command-center .live-status-kpis,
.live-command-center .live-scoreboard{
    flex:0 0 auto!important;
    margin-left:auto!important;
    margin-right:0!important;
    display:grid!important;
    grid-template-columns:repeat(3,118px)!important;
    gap:12px!important;
    width:auto!important;
    grid-column:auto!important;
    justify-self:auto!important;
    z-index:2!important;
}
.live-command-center .live-scoreboard span{
    width:118px!important;
    min-width:0!important;
    height:64px!important;
    padding:10px 14px!important;
}
.live-command-center .live-scoreboard b{font-size:24px!important;line-height:1.1!important;}
.live-command-center .btn-finalizar-live{
    flex:0 0 auto!important;
    grid-column:auto!important;
    justify-self:auto!important;
    margin:0!important;
    min-width:210px!important;
    height:58px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    z-index:2!important;
    white-space:nowrap!important;
}

@media(max-width:1450px){
    .live-command-center .live-command-main{max-width:360px!important;}
    .live-command-center .live-scoreboard{grid-template-columns:repeat(3,108px)!important;gap:10px!important;}
    .live-command-center .live-scoreboard span{width:108px!important;}
    .live-command-center .btn-finalizar-live{min-width:190px!important;}
    .live-timer-center{width:260px!important;}
    .live-timer-center strong{font-size:34px!important;}
}
@media(max-width:1180px){
    .live-command-center{
        display:grid!important;
        grid-template-columns:1fr!important;
        min-height:auto!important;
        gap:12px!important;
    }
    .live-command-center .live-command-main,
    .live-command-center .live-scoreboard,
    .live-command-center .btn-finalizar-live{
        width:100%!important;
        max-width:none!important;
        margin:0!important;
        grid-column:1!important;
    }
    .live-timer-center{
        position:static!important;
        transform:none!important;
        width:100%!important;
        order:2!important;
        grid-column:1!important;
        margin:2px 0!important;
    }
    .live-command-center .live-scoreboard{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
    .live-command-center .live-scoreboard span{width:auto!important;}
}

/* === Sprint 2.3: KPI Total Live inteligente === */
.live-command-center .live-scoreboard{
    grid-template-columns:118px 118px minmax(148px,max-content)!important;
    align-items:stretch!important;
}
.live-command-center .live-scoreboard span{
    width:118px!important;
    min-width:118px!important;
    overflow:visible!important;
}
.live-command-center .live-scoreboard span:nth-child(3){
    width:auto!important;
    min-width:148px!important;
    max-width:none!important;
    padding-left:16px!important;
    padding-right:22px!important;
}
.live-command-center .live-scoreboard span:nth-child(3) b{
    white-space:nowrap!important;
    font-size:24px!important;
    letter-spacing:-.02em!important;
    font-variant-numeric:tabular-nums!important;
}
@media(max-width:1450px){
    .live-command-center .live-scoreboard{
        grid-template-columns:108px 108px minmax(142px,max-content)!important;
    }
    .live-command-center .live-scoreboard span{width:108px!important;min-width:108px!important;}
    .live-command-center .live-scoreboard span:nth-child(3){width:auto!important;min-width:142px!important;}
    .live-command-center .live-scoreboard span:nth-child(3) b{font-size:23px!important;}
}
@media(max-width:1180px){
    .live-command-center .live-scoreboard{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
    .live-command-center .live-scoreboard span,
    .live-command-center .live-scoreboard span:nth-child(3){
        width:auto!important;
        min-width:0!important;
    }
    .live-command-center .live-scoreboard span:nth-child(3) b{font-size:22px!important;}
}
.detail-actions .light-action{background:#f8fafc!important;color:#111827!important;border:1px solid #e5e7eb!important;}
.detail-actions .whatsapp-action{background:#16a34a;color:#fff;}
.detail-actions .whatsapp-action:hover{filter:brightness(.96)}

/* HOTFIX LANZAMIENTO — no tocar Live: solo hamburguesa y modales clientes */
.sidebar-toggle{
    width:44px;height:44px;border:0;border-radius:14px;
    background:rgba(255,255,255,.10);color:#fff;
    display:flex;align-items:center;justify-content:center;
    font-size:21px;font-weight:900;cursor:pointer;
    margin:0 0 18px 0;box-shadow:none;line-height:1;
}
.sidebar-toggle:hover{background:rgba(255,255,255,.18)}
.sidebar-collapsed .sidebar-toggle{width:48px;height:48px;margin-bottom:18px;}
.sidebar:not(.x) .sidebar-toggle + .brand{margin-top:0;}
.topbar .mobile-menu.nav-toggle{display:none!important;}
@media(max-width:800px){
  .topbar .mobile-menu.nav-toggle{display:inline-flex!important;}
  .sidebar-toggle{display:none!important;}
}
/* El modal de edición debe quedar sobre el modal de detalle */
#clienteDetalleModal{z-index:9000;}
#clientModal{z-index:10050;}
#clientModal.show{display:flex!important;}
#clientModal .modal-card{z-index:10060;}
.modal-card .form-grid.single{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.modal-card .form-grid.single div:nth-last-child(2){grid-column:1 / -1;}
.modal-card .form-grid.single button{grid-column:1 / -1;}
@media(max-width:700px){.modal-card .form-grid.single{grid-template-columns:1fr;}}


/* HOTFIX DEMO FINAL: contador a la izquierda, tabla con scroll y sin columna ticket */
.live-command-center{
    grid-template-columns:minmax(260px,1fr) minmax(220px,auto) minmax(380px,auto) auto!important;
    align-items:center!important;
}
.live-timer-center{
    grid-column:2!important;
    justify-self:start!important;
    text-align:left!important;
    width:auto!important;
    margin:0!important;
    transform:none!important;
}
.live-timer-center strong{font-size:34px!important;line-height:1!important;letter-spacing:.06em!important;}
.live-timer-center span{justify-content:flex-start!important;gap:22px!important;}
.live-command-center .live-scoreboard{grid-column:3!important;margin:0!important;justify-self:end!important;}
.live-command-center .btn-finalizar-live{grid-column:4!important;justify-self:end!important;margin:0!important;}

.buyer-table-wrap{
    max-height:690px!important;
    overflow-y:auto!important;
    overflow-x:auto!important;
}
.buyer-table thead th{
    position:sticky!important;
    top:0!important;
    z-index:6!important;
}
.buyer-table th:nth-child(1),.buyer-table td:nth-child(1){width:210px!important;}
.buyer-table th:nth-child(2),.buyer-table td:nth-child(2){width:130px!important;}
.buyer-table th:nth-child(3),.buyer-table td:nth-child(3){width:85px!important;text-align:center!important;}
.buyer-table th:nth-child(4),.buyer-table td:nth-child(4){width:120px!important;}
.buyer-table th:nth-child(5),.buyer-table td:nth-child(5){width:auto!important;min-width:520px!important;}

@media(max-width:1500px){
    .live-command-center{
        grid-template-columns:minmax(220px,1fr) minmax(170px,auto) minmax(330px,auto)!important;
        gap:12px!important;
    }
    .live-timer-center{grid-column:2!important;justify-self:start!important;text-align:left!important;}
    .live-timer-center strong{font-size:28px!important;}
    .live-timer-center span{gap:14px!important;font-size:10px!important;}
    .live-command-center .live-scoreboard{grid-column:3!important;justify-self:end!important;grid-template-columns:repeat(3,102px)!important;gap:8px!important;}
    .live-command-center .live-scoreboard span{width:102px!important;min-width:102px!important;}
    .live-command-center .live-scoreboard span:nth-child(3){width:auto!important;min-width:130px!important;}
    .live-command-center .btn-finalizar-live{grid-column:1 / -1!important;justify-self:end!important;width:auto!important;min-width:190px!important;}
}
@media(max-width:1100px){
    .live-command-center{grid-template-columns:1fr!important;}
    .live-command-center .live-command-main,
    .live-timer-center,
    .live-command-center .live-scoreboard,
    .live-command-center .btn-finalizar-live{grid-column:1!important;justify-self:stretch!important;width:100%!important;margin:0!important;}
    .live-timer-center{text-align:left!important;}
    .live-command-center .live-scoreboard{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
    .live-command-center .live-scoreboard span,.live-command-center .live-scoreboard span:nth-child(3){width:auto!important;min-width:0!important;}
}


/* =========================================================
   HOTFIX FINAL DEMO - contador pequeño al costado izquierdo
   No toca HTML ni JS. Evita que el contador se monte sobre KPIs.
   ========================================================= */
.live-command-center{
    display:flex !important;
    align-items:center !important;
    gap:18px !important;
    min-height:96px !important;
    overflow:hidden !important;
}

.live-command-center .live-command-main{
    flex:0 1 360px !important;
    min-width:240px !important;
    max-width:380px !important;
    margin:0 !important;
    z-index:2 !important;
}

/* Contador: queda al lado izquierdo, pequeño, dentro del flujo normal */
.live-timer-center{
    position:static !important;
    left:auto !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    transform:none !important;
    grid-column:auto !important;
    order:0 !important;

    width:150px !important;
    min-width:150px !important;
    max-width:150px !important;
    margin:0 8px 0 0 !important;
    padding:0 !important;

    text-align:center !important;
    pointer-events:none !important;
    z-index:2 !important;
    flex:0 0 150px !important;
}

.live-timer-center strong{
    font-size:28px !important;
    line-height:1 !important;
    letter-spacing:.04em !important;
    white-space:nowrap !important;
}

.live-timer-center span{
    width:120px !important;
    margin:5px auto 0 !important;
    display:grid !important;
    grid-template-columns:repeat(3,1fr) !important;
    gap:6px !important;
    font-size:8px !important;
    line-height:1 !important;
    letter-spacing:.06em !important;
}

/* KPIs y botón quedan a la derecha sin cruzarse con el contador */
.live-command-center .live-status-kpis,
.live-command-center .live-scoreboard{
    flex:0 0 auto !important;
    margin-left:auto !important;
    margin-right:0 !important;
    display:grid !important;
    grid-template-columns:104px 104px minmax(138px,max-content) !important;
    gap:10px !important;
    width:auto !important;
    z-index:2 !important;
}

.live-command-center .live-scoreboard span{
    width:104px !important;
    min-width:104px !important;
    height:60px !important;
    padding:9px 12px !important;
}

.live-command-center .live-scoreboard span:nth-child(3){
    width:auto !important;
    min-width:138px !important;
    padding-right:18px !important;
}

.live-command-center .live-scoreboard b{
    font-size:22px !important;
    line-height:1.05 !important;
    white-space:nowrap !important;
}

.live-command-center .btn-finalizar-live{
    flex:0 0 auto !important;
    margin:0 !important;
    min-width:190px !important;
    height:56px !important;
    z-index:2 !important;
    white-space:nowrap !important;
}

/* Pantallas más chicas: baja KPIs abajo antes de montar elementos */
@media(max-width:1200px){
    .live-command-center{
        flex-wrap:wrap !important;
        align-items:center !important;
    }

    .live-command-center .live-command-main{
        flex:1 1 auto !important;
        max-width:none !important;
    }

    .live-timer-center{
        width:132px !important;
        min-width:132px !important;
        max-width:132px !important;
        flex-basis:132px !important;
    }

    .live-timer-center strong{
        font-size:24px !important;
    }

    .live-command-center .live-status-kpis,
    .live-command-center .live-scoreboard{
        order:3 !important;
        width:100% !important;
        margin-left:0 !important;
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }

    .live-command-center .live-scoreboard span,
    .live-command-center .live-scoreboard span:nth-child(3){
        width:auto !important;
        min-width:0 !important;
    }

    .live-command-center .btn-finalizar-live{
        order:4 !important;
        width:100% !important;
        min-width:0 !important;
    }
}
