:root{color:#172033;background:#f4f6f8;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:#f4f6f8}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.58}.login-shell{align-items:center;display:flex;min-height:100vh;justify-content:center;padding:24px}.login-panel{background:#fff;border:1px solid #d9e0e8;border-radius:8px;box-shadow:0 18px 55px #19263f1f;max-width:420px;padding:32px;width:100%}.brand-mark{align-items:center;background:#0f766e;border-radius:8px;color:#fff;display:flex;height:48px;justify-content:center;margin-bottom:22px;width:48px}.login-panel h1{font-size:26px;line-height:1.15;margin:0 0 24px}form,.filters-bar{display:grid;gap:14px}label{color:#475569;display:grid;font-size:13px;gap:6px}input,select{background:#fff;border:1px solid #cbd5e1;border-radius:6px;color:#172033;min-height:40px;padding:9px 10px}input:focus,select:focus{border-color:#2563eb;outline:2px solid rgba(37,99,235,.14)}.primary-button,.icon-button{align-items:center;border:0;border-radius:6px;display:inline-flex;font-weight:700;gap:8px;justify-content:center;min-height:40px;padding:9px 14px;white-space:nowrap}.primary-button{background:#0f766e;color:#fff;margin-top:6px;width:100%}.icon-button{background:#fff;border:1px solid #cbd5e1;color:#172033}.icon-button.compact{min-height:34px;padding:7px 10px}.form-error,.error-banner,.warning-banner{background:#fee2e2;border:1px solid #fecaca;border-radius:6px;color:#991b1b;margin:0;padding:10px 12px}.warning-banner{background:#fffbeb;border-color:#fde68a;color:#92400e;font-weight:700;margin-bottom:14px}.app-shell{margin:0 auto;max-width:1480px;padding:24px}.topbar,.panel-heading,.topbar-actions{align-items:center;display:flex}.topbar{justify-content:space-between;gap:18px;margin-bottom:18px}.topbar p{color:#64748b;font-size:13px;font-weight:700;margin:0 0 4px;text-transform:uppercase}.topbar h1{font-size:30px;line-height:1.15;margin:0}.topbar-actions{flex-wrap:wrap;gap:10px;justify-content:flex-end}.user-chip,.source-chip{background:#e7edf5;border-radius:999px;color:#334155;font-size:13px;font-weight:700;padding:9px 12px}.source-chip.odoo{background:#dcfce7;color:#166534}.source-chip.demo,.source-chip.mixed,.source-chip.empty{background:#fef3c7;color:#92400e}.filters-bar{background:#fff;border:1px solid #d9e0e8;border-radius:8px;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));margin-bottom:14px;padding:14px}.filters-bar input,.filters-bar select{width:100%}.alert-strip{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin-bottom:14px}.alert-strip.is-empty{background:#ecfdf5;border:1px solid #a7f3d0;border-radius:8px;color:#047857;font-weight:700;padding:12px 14px}.alert-item{align-items:flex-start;background:#fff;border:1px solid #d9e0e8;border-left:4px solid #2563eb;border-radius:8px;display:grid;gap:4px 8px;grid-template-columns:18px 1fr;padding:12px}.alert-item.warning{border-left-color:#d97706}.alert-item.critical{border-left-color:#dc2626}.alert-item span{font-weight:800}.alert-item p{color:#475569;grid-column:2;margin:0}.kpi-grid{display:grid;gap:14px;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px}.kpi-card,.panel,.table-section{background:#fff;border:1px solid #d9e0e8;border-radius:8px}.kpi-card{min-height:146px;padding:16px}.kpi-topline{align-items:center;color:#64748b;display:flex;font-size:13px;font-weight:800;justify-content:space-between;margin-bottom:16px;text-transform:uppercase}.kpi-card strong{display:block;font-size:28px;line-height:1.1;overflow-wrap:anywhere}.kpi-card footer{align-items:center;color:#64748b;display:flex;gap:8px;justify-content:space-between;margin-top:16px}.kpi-card em{align-items:center;border-radius:999px;display:inline-flex;font-size:13px;font-style:normal;font-weight:800;gap:4px;padding:4px 8px}.delta-positive{background:#dcfce7;color:#166534}.delta-negative,.amount-negative{color:#b91c1c}.delta-negative{background:#fee2e2}.content-grid{display:grid;gap:14px;grid-template-columns:minmax(0,1.35fr) minmax(320px,.8fr);margin-bottom:14px}.panel{min-height:360px;padding:16px}.panel-wide{grid-row:span 2}.panel-heading{gap:12px;justify-content:space-between;margin-bottom:12px}.panel-heading h2{font-size:17px;line-height:1.2;margin:0}.panel-heading span{color:#64748b;font-size:13px;font-weight:700}.chart{height:292px;min-width:0;width:100%}.segmented{background:#e7edf5;border-radius:6px;display:inline-grid;grid-template-columns:1fr 1fr;padding:3px}.segmented button{background:transparent;border:0;border-radius:5px;color:#475569;font-size:13px;font-weight:800;min-height:30px;padding:4px 10px}.segmented button.active{background:#fff;color:#0f766e}.ranking-list{display:grid;gap:8px}.ranking-row{align-items:center;border-bottom:1px solid #e2e8f0;display:grid;gap:10px;grid-template-columns:minmax(0,1fr) auto;min-height:48px;padding:8px 0}.ranking-row strong,.ranking-row span{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking-row span{color:#64748b;font-size:12px;margin-top:2px}.ranking-row em{font-style:normal;font-weight:800}.insight-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;min-height:274px;padding:14px}.insight-box p{line-height:1.48;margin:0 0 12px}.insight-box h3{font-size:14px;margin:16px 0 8px}.insight-box ul{margin:0;padding-left:18px}.insight-box li{margin-bottom:7px}.insight-box span{color:#64748b;display:inline-block;font-size:12px;font-weight:800;margin-top:14px;text-transform:uppercase}.table-section{padding:16px}.table-wrap{max-height:420px;overflow:auto}table{border-collapse:collapse;min-width:880px;width:100%}th,td{border-bottom:1px solid #e2e8f0;font-size:13px;padding:10px 8px;text-align:left;white-space:nowrap}th{background:#f8fafc;color:#475569;font-weight:900;position:sticky;top:0;z-index:1}td:nth-child(n+4),th:nth-child(n+4){text-align:right}@media(max-width:1180px){.filters-bar,.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-grid{grid-template-columns:1fr}.panel-wide{grid-row:auto}}@media(max-width:680px){.app-shell{padding:14px}.topbar{align-items:flex-start;flex-direction:column}.topbar-actions{justify-content:flex-start;width:100%}.filters-bar,.kpi-grid{grid-template-columns:1fr}.kpi-card strong{font-size:24px}.panel{min-height:auto}.chart{height:260px}.icon-button{flex:1 1 140px}}.tab-navigation{display:flex;gap:8px;border-bottom:2px solid #cbd5e1;margin-bottom:20px;padding-bottom:0;overflow-x:auto}.tab-button{background:transparent;border:0;border-bottom:3px solid transparent;color:#64748b;cursor:pointer;font-weight:700;font-size:15px;padding:12px 18px;transition:all .2s ease;white-space:nowrap}.tab-button:hover{color:#0f766e}.tab-button.active{border-bottom-color:#0f766e;color:#0f766e}.layout-shell{display:flex;min-height:100vh}.sidebar{width:280px;background:#0f172a;color:#f8fafc;display:flex;flex-direction:column;border-right:1px solid #1e293b;flex-shrink:0;padding:24px 16px}.main-content{flex-grow:1;background:#f8fafc;overflow-y:auto;height:100vh}.sidebar-brand{display:flex;align-items:center;gap:12px;margin-bottom:32px;padding:0 8px}.brand-icon{color:#0d9488}.sidebar-brand h2{font-size:18px;font-weight:800;margin:0;color:#fff}.sidebar-brand span{font-size:11px;color:#64748b;text-transform:uppercase;letter-spacing:.05em}.sidebar-nav{display:flex;flex-direction:column;gap:8px;flex-grow:1}.sidebar-nav-item{display:flex;align-items:center;gap:12px;background:transparent;border:0;border-radius:6px;color:#94a3b8;font-weight:700;font-size:14px;padding:12px 14px;text-align:left;transition:all .2s ease;width:100%}.sidebar-nav-item:hover{background:#1e293b;color:#f8fafc}.sidebar-nav-item.active{background:#0f766e;color:#fff}.sidebar-footer{border-top:1px solid #1e293b;padding-top:16px;display:flex;flex-direction:column;gap:12px}.user-profile{display:flex;flex-direction:column;padding:0 8px}.user-profile strong{color:#fff;font-size:14px}.role-tag{font-size:10px;color:#38bdf8;font-weight:800;margin-top:2px}.system-status{padding:0 8px}.source-status{font-size:11px;padding:4px 8px;border-radius:4px;font-weight:700}.source-status.odoo{background:#064e3b;color:#6ee7b7}.source-status.demo,.source-status.mixed,.source-status.empty{background:#78350f;color:#fde047}.sidebar-actions{display:flex;flex-direction:column;gap:8px}.action-btn{display:flex;align-items:center;gap:8px;background:#1e293b;border:0;border-radius:6px;color:#f8fafc;font-size:13px;font-weight:700;padding:10px;justify-content:center;transition:all .2s ease}.action-btn:hover{background:#334155}.logout-btn{background:#3a1c1c;color:#fca5a5}.logout-btn:hover{background:#991b1b;color:#fff}.spin{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.module-content{padding:24px}.module-header{margin-bottom:24px}.module-header p{color:#0f766e;font-weight:800;text-transform:uppercase;font-size:12px;margin:0 0 4px}.module-header h1{font-size:28px;margin:0}.crm-selector-bar{background:#fff;border:1px solid #d9e0e8;border-radius:8px;display:flex;gap:24px;margin-bottom:20px;padding:16px;align-items:center}.selector-group{display:flex;flex-direction:column;gap:6px;min-width:240px}.selector-group label{font-size:12px;font-weight:800;color:#475569}.selector-group select{padding:8px 12px;border-radius:6px;border:1px solid #cbd5e1;font-weight:600}.query-description-box{flex-grow:1;border-left:2px solid #0f766e;padding-left:16px}.query-description-box h3{margin:0 0 4px;font-size:15px;font-weight:800;color:#0f172a}.query-description-box p{margin:0;font-size:13px;color:#64748b}.crm-results-container{display:flex;flex-direction:column;gap:20px}.crm-chart-section{width:100%}.chart-wrap{height:320px;width:100%}.table-header-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:12px}.search-box{position:relative;display:flex;align-items:center}.search-box svg{position:absolute;left:12px;color:#64748b;pointer-events:none}.search-box input{padding-left:36px;min-height:38px;border-radius:6px;border:1px solid #cbd5e1;width:260px;font-size:13px}.search-box input:focus{border-color:#0f766e;outline:2px solid rgba(15,118,110,.15)}.table-pagination{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:14px;font-size:13px;font-weight:700;color:#475569}.table-pagination button{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:6px 12px;transition:all .2s ease;font-weight:700;font-size:13px}.table-pagination button:hover:not(:disabled){border-color:#0f766e;color:#0f766e;background:#f0fdfa}.loading-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 24px;color:#64748b;gap:14px}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}@media(max-width:960px){.layout-shell{flex-direction:column}.sidebar{width:100%;border-right:0;border-bottom:1px solid #1e293b;padding:16px;height:auto}.sidebar-brand{margin-bottom:16px}.sidebar-nav{flex-direction:row;overflow-x:auto;gap:8px;padding-bottom:8px}.sidebar-nav-item{width:auto;padding:8px 12px;white-space:nowrap}.sidebar-footer{display:none}.main-content{height:auto}}.advanced-filters-panel{background:#fff;border:1px solid #d9e0e8;border-radius:8px;padding:16px;display:flex;flex-wrap:wrap;gap:16px;margin-bottom:20px}.advanced-filters-panel .filter-item{display:flex;flex-direction:column;gap:6px;flex:1 1 200px}.advanced-filters-panel .filter-item label{font-size:12px;font-weight:800;color:#475569}.advanced-filters-panel .filter-item select,.advanced-filters-panel .filter-item input[type=range]{width:100%}.slider-container{display:flex;align-items:center;gap:10px}.slider-value{font-weight:700;color:#0f766e;min-width:60px}.clickable-row{cursor:pointer;transition:background-color .15s ease}.clickable-row:hover{background-color:#f0fdfa!important}.clickable-row.selected-row{background-color:#ccfbf1!important}.timeline-container{scrollbar-width:thin;scrollbar-color:#cbd5e1 #f1f5f9}.timeline-container::-webkit-scrollbar{height:6px}.timeline-container::-webkit-scrollbar-track{background:#f1f5f9}.timeline-container::-webkit-scrollbar-thumb{background-color:#cbd5e1;border-radius:3px}.timeline-step{transition:transform .2s ease}.timeline-step:hover{transform:translateY(-2px)}
