
/* === UI POLISH: sparklines, animations, card shadows === */
@keyframes thinkDot { 0%,80%,100%{opacity:0.2} 40%{opacity:1} }
@keyframes fadeInMsg { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }

/* Card polish — shadows and hover lifts */
.module-card, [class*="card"], .kpi-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}
.module-card:hover, .kpi-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
  transform: translateY(-2px) !important;
}
.main-content .card, .content-area [class*="card"],
[style*="background:#fff"][style*="border-radius"],
[style*="background: #fff"][style*="border-radius"] {
  box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04) !important;
}
button:not([disabled]):not(.role-pill):not(.sidebar-btn):active {
  transform: scale(0.97) !important;
  transition: transform 0.1s ease !important;
}
a, button { transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease; }
/* Chat message fade-in */
.msg.assistant .msg-bubble { animation: fadeInMsg 0.3s ease-out; }
/* end UI polish */

* { margin:0; padding:0; box-sizing:border-box; } *, *::before, *::after { -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
:root {
  color-scheme: light;
  --bg: #ffffff; --surface: #ffffff; --surface2: #f8f6f0;
  --border: #e8dcc8; --text: #1a1a1a; --text2: #5a5a5a;
  --accent: #8b6a2a; --accent2: #a5795a; --accent-bg: rgba(139,106,42,0.08);
  --green: #16a34a; --red: #dc2626;
  --brand-gold: #8b6a2a; --brand-gold-light: #a5795a; --brand-silver: #5a5a5a;
  --sidebar-bg: #f8f6f0; --sidebar-text: #1a1a1a; --sidebar-active: #e8dcc8;
  --sidebar-accent: #8b6a2a;
}
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; background: #ffffff; color: #1a1a1a; line-height: 1.5; }
input:not([type=checkbox]):not([type=radio]):not([type=range]),
textarea, select { color: #1a1a1a; background-color: #ffffff; caret-color: #1a1a1a; -webkit-text-fill-color: #1a1a1a; color-scheme: light; }
/* Reinforce readable inputs inside modals/overlays */
#_ncm-overlay input, #_ncm-overlay textarea, #_ncm-overlay select,
#desk-overlay input, #desk-overlay textarea, #desk-overlay select,
#inbox-overlay input, #inbox-overlay textarea { color: #1a1a1a !important; background-color: #ffffff !important; -webkit-text-fill-color: #1a1a1a !important; }
/* Fix dark text on dark/colored backgrounds for inline-styled buttons */
button[style*="background:#0d1b2e"], button[style*="background: #0d1b2e"],
button[style*="background:#0a0f1e"],
button[style*="background:#16a34a"], button[style*="background: #16a34a"],
button[style*="background:#059669"],
button[style*="background:#8b6a2a"],
button[style*="background:linear-gradient(135deg,#059669"],
button[style*="background:linear-gradient(135deg,#0d1b2e"],
a[href][style*="background:#16a34a"], a[href][style*="background:#0d1b2e"],
span[style*="background:#16a34a"], span[style*="background:#059669"],
span[style*="background:#0d1b2e"], span[style*="background:#8b6a2a"] { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }


/* Cross-Sell Dashboard */
#cs-dashboard { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background: #ffffff; z-index:300; overflow-y:auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
#cs-dashboard.active { display:block; }
.cs-header { background: #ffffff; border-bottom:1px solid #e2e8f0 !important; padding:20px 28px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid rgba(255,255,255,0.1); position:sticky; top:0; z-index:10; }
.cs-header h1 { color:#8b6a2a; font-size:20px; font-weight:700; display:flex; align-items:center; gap:10px; }
.cs-header-right { display:flex; align-items:center; gap:12px; }
.cs-period-badge { background:#e8edf3; color:#8b6a2a; padding:6px 14px; border-radius:20px; font-size:13px; font-weight:600; }
.cs-upload-btn { background:#8b6a2a; color:#ffffff; border:none; padding:8px 16px; border-radius:8px; font-size:13px; font-weight:600; cursor:pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.cs-upload-btn:hover { opacity:0.85; }
.cs-close-btn { background:none; border:1px solid #e2e8f0; color:#64748b; border:none; width:36px; height:36px; border-radius:8px; font-size:18px; cursor:pointer; }
.cs-body { padding:24px 28px; max-width:1400px; margin:0 auto; }
.cs-section-title { color:#8b6a2a; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:1px; margin:24px 0 12px; }
.cs-kpi-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-bottom:8px; }
.cs-kpi { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:16px 20px; }
.cs-kpi .label { color:#64748b; font-size:12px; font-weight:500; margin-bottom:4px; }
.cs-kpi .value { color:#0d1b2e; font-size:26px; font-weight:700; line-height:1.1; }
.cs-kpi .sub { color:#64748b; font-size:12px; margin-top:4px; }
.cs-kpi.highlight { border-color:#8b6a2a; background:rgba(139,106,42,0.08); }
.cs-kpi.warn { border-color:#ef4444; background:rgba(239,68,68,0.1); }
.cs-kpi.good { border-color:#10b981; background:rgba(16,185,129,0.1); }
.cs-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.cs-grid3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }
.cs-card { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:20px; }
.cs-card h3 { color:#0d1b2e; font-size:14px; font-weight:600; margin-bottom:14px; }
.cs-rank-row { display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px solid #e8edf3; }
.cs-rank-row:last-child { border-bottom:none; }
.cs-rank-num { width:24px; height:24px; border-radius:50%; background:#e8edf3; color:#64748b; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.cs-rank-num.you { background:#8b6a2a; color:#ffffff; }
.cs-rank-name { flex:1; color:#0d1b2e; font-size:13px; font-weight:500; }
.cs-rank-units { color:#8b6a2a; font-size:13px; font-weight:700; }
.cs-rank-share { color:#64748b; font-size:12px; width:45px; text-align:right; }
.cs-bar-row { display:flex; align-items:center; gap:8px; padding:5px 0; }
.cs-bar-label { color:#0d1b2e; font-size:12px; width:160px; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cs-bar-wrap { flex:1; background:#e8edf3; border-radius:4px; height:8px; }
.cs-bar-fill { height:8px; border-radius:4px; background:linear-gradient(90deg,#8b6a2a,#a5795a); }
.cs-bar-fill.you { background:linear-gradient(90deg,#8b6a2a,#a5795a); }
.cs-bar-fill.competitor { background:linear-gradient(90deg,#ef4444,#f87171); }
.cs-bar-val { color:#64748b; font-size:12px; width:35px; text-align:right; }
.cs-segment-pill { display:inline-flex; align-items:center; gap:6px; background:#e8edf3; border-radius:8px; padding:8px 12px; margin:4px; }
.cs-segment-pill .seg-name { color:#0d1b2e; font-size:12px; }
.cs-segment-pill .seg-pct { color:#8b6a2a; font-size:12px; font-weight:700; }
.cs-lender-row { display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px solid #e8edf3; }
.cs-lender-row:last-child { border-bottom:none; }
.cs-lender-name { color:#0d1b2e; font-size:13px; }
.cs-lender-share { color:#8b6a2a; font-size:13px; font-weight:700; }
.cs-insight-box { background:rgba(124,58,237,0.1); border:1px solid rgba(124,58,237,0.3); border-radius:10px; padding:14px 16px; margin-bottom:10px; }
.cs-insight-box .insight-title { color:#8b6a2a; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:4px; }
.cs-insight-box .insight-text { color:#d1d5db; font-size:13px; line-height:1.5; }
.cs-upload-modal { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.7); z-index:200; align-items:center; justify-content:center; }
.cs-upload-modal.active { display:flex; }
.cs-upload-box { background: #ffffff; border:1px solid #e2e8f0; border-radius:16px; padding:32px; width:480px; }
.cs-upload-box h2 { color:#0d1b2e; font-size:18px; margin-bottom:8px; }
.cs-upload-box p { color:#64748b; font-size:14px; margin-bottom:20px; line-height:1.5; }
.cs-drop-zone { border:2px dashed #e2e8f0; border-radius:10px; padding:32px; text-align:center; color:#64748b; font-size:14px; cursor:pointer; transition:background 0.2s,box-shadow 0.2s,transform 0.2s; }
.cs-drop-zone:hover { border-color:#8b6a2a; background:rgba(139,106,42,0.04); }
.cs-drop-zone input { display:none; }
.cs-modal-close { float:right; background:none; border:none; color:#64748b; font-size:20px; cursor:pointer; margin-top:-4px; }

/* Login */
#login-screen { display:flex; align-items:center; justify-content:center; height:100vh; background: #ffffff; position:relative; overflow:hidden; }
#login-screen::before { content:''; position:absolute; top:-50%; left:-50%; width:200%; height:200%; background:radial-gradient(circle at 30% 40%, rgba(139,106,42,0.12) 0%, transparent 50%), radial-gradient(circle at 70% 60%, rgba(139,106,42,0.08) 0%, transparent 50%); animation:loginPulse 12s ease-in-out infinite alternate; }
@keyframes loginPulse { 0%{transform:scale(1) rotate(0deg)} 100%{transform:scale(1.05) rotate(2deg)} }
.login-box { width:400px; background: #ffffff; border:1px solid rgba(139,106,42,0.25); border-radius:16px; padding:48px 40px; box-shadow:0 8px 40px rgba(26,34,52,0.12); position:relative; z-index:1; }
.login-logo { font-size:28px; font-weight:800; color: #1a1a1a; text-align:center; margin-bottom:2px; letter-spacing:-1px; text-transform:uppercase; }
.login-sub { font-size:15px; color:#64748b; text-align:center; margin-bottom:32px; }
.login-box input { width:100%; padding:14px 16px; background:#f8f9fb; border:1.5px solid #e2e8f0; border-radius:10px; color: #1a1a1a; font-size:15px; margin-bottom:14px; outline:none; transition:background 0.2s,box-shadow 0.2s,transform 0.2s; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.login-box input:focus { border-color:#8b6a2a; background: #ffffff; box-shadow:0 0 0 3px rgba(139,106,42,0.25); }
.login-box input::placeholder { color:#8c9bab; }
.login-btn { width:100%; padding:14px; background:#8b6a2a; border:none; border-radius:10px; color:#ffffff; font-size:15px; font-weight:700; cursor:pointer; letter-spacing:0.3px; text-transform:uppercase; transition:background 0.2s,box-shadow 0.2s,transform 0.2s; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin-top:4px; }
.login-btn:hover { background:#a5795a; transform:translateY(-1px); box-shadow:0 6px 20px rgba(139,106,42,0.35); }
.login-error { color:#dc3545; font-size:14px; text-align:center; margin-top:8px; min-height:18px; }

/* App layout */
#app { display:none; height:100vh; }
.layout { display:flex; height:100%; }

/* Sidebar */
.sidebar { width:260px; background: #0d1b2e; border-right:none; box-shadow:2px 0 12px rgba(0,0,0,0.25); display:flex; flex-direction:column; flex-shrink:0; position:relative; z-index:250; transition:width .2s ease; overflow:hidden; }
body.sb-collapsed .sidebar { width:0; min-width:0; box-shadow:none; }
#sb-collapse-btn { background:transparent; border:none; color:rgba(200,205,216,0.5); cursor:pointer; font-size:15px; padding:3px 5px; border-radius:5px; line-height:1; flex-shrink:0; }
#sb-collapse-btn:hover { color: #ffffff; background: rgba(255,255,255,0.12); }
#sb-expand-btn { display:none; position:fixed; left:0; top:50%; transform:translateY(-50%); z-index:300; background: #ffffff; border:1px solid rgba(255,255,255,0.15); border-left:none; border-radius:0 8px 8px 0; width:18px; height:48px; cursor:pointer; color:#c8cdd8; font-size:11px; align-items:center; justify-content:center; transition:background .15s; }
#sb-expand-btn:hover { background:#e8dcc8; color: #1a1a1a; }
body.sb-collapsed #sb-expand-btn { display:flex; }
.sidebar-header { padding:14px 16px; border-bottom:1px solid rgba(255,255,255,0.08); display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:5; background: #0d1b2e; }
.sidebar-brand { font-size:19px; font-weight:800; color: #ffffff; letter-spacing:-0.5px; text-transform:uppercase; }
.new-chat-btn { background:#8b6a2a; border:none; color:#ffffff; width:30px; height:30px; min-width:44px; min-height:44px; border-radius:8px; cursor:pointer; font-size:17px; display:flex; align-items:center; justify-content:center; box-shadow:0 1px 4px rgba(139,106,42,0.3); font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.new-chat-btn:hover { background:#a5795a; box-shadow:0 2px 8px rgba(139,106,42,0.35); }
.convo-list { max-height:160px; overflow-y:auto; padding:6px 8px; border-bottom:1px solid rgba(255,255,255,0.08); }
.convo-item { padding:11px 14px; border-radius:8px; cursor:pointer; font-size:15px; color:#b0bccb; display:flex; justify-content:space-between; align-items:center; margin-bottom:1px; }
.convo-item:hover { background: rgba(255,255,255,0.08); color:#e2e8f0; }
.convo-item.active { background:rgba(139,106,42,0.12); color:#8b6a2a; }
.convo-item .del { opacity:0; background:none; border:none; color:var(--red); cursor:pointer; font-size:14px; padding:2px 6px; }
.convo-item:hover .del { opacity:0.6; }
.convo-item .del:hover { opacity:1; }
.sidebar-footer { padding:12px 16px; border-top:1px solid rgba(255,255,255,0.08); font-size:15.5px; color:#94a3b8; display:flex; justify-content:space-between; align-items:center; overflow:hidden; }
.sidebar-footer > div { overflow:hidden; min-width:0; }
#header-search-btn { min-height: 44px; }
.logout-btn { background:none; border:none; color:#94a3b8; cursor:pointer; min-width:44px; font-size:15.5px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.logout-btn:hover { color:#dc3545; }

/* Chat area */
.chat-area { flex:1; display:flex; flex-direction:column; min-width:0; position:relative; z-index:1; }
.chat-header { padding:9px 20px; border-bottom:1px solid #e2e8f0; font-size:14px; font-weight:700; color:#0d1b2e; background: #ffffff; min-height:40px; display:flex; align-items:center; letter-spacing:-0.1px; }
.messages { flex:1; overflow-y:auto; padding:20px 14px; }
.messages::-webkit-scrollbar { width:5px; }
.messages::-webkit-scrollbar-thumb { background:#e2e8f0; border-radius:6px; } .messages::-webkit-scrollbar-track { background:transparent; }

.msg { margin-bottom:18px; max-width:100%; }
.msg.user { margin-left:auto; }
.msg.assistant { margin-right:auto; }
.msg-bubble { padding:14px 20px; border-radius:14px; font-size:15.5px; line-height:1.75; word-wrap:break-word; color:#0d1b2e; }
.msg.user .msg-bubble { background: #ffffff; color: #1a1a1a; border-bottom-right-radius:4px; box-shadow:0 2px 8px rgba(0,0,0,0.25); max-width:82%; margin-left:auto; }
.msg.assistant .msg-bubble { background:#f8f9fb; color: #1a1a1a; border-bottom-left-radius:4px; border:1px solid #e8ecf1; box-shadow:none; max-width:98%; }
.msg-bubble pre { background:#f0f3f8; padding:14px 16px; border-radius:10px; overflow-x:auto; margin:10px 0; font-size:13.5px; border:1px solid #d4dce8; line-height:1.6; }
.msg-bubble code { font-family: 'IBM Plex Mono','Fira Code','Cascadia Code',monospace; font-size:13.5px; color:#8b6a2a; background:rgba(139,106,42,0.10); padding:1px 5px; border-radius:4px; } .msg-bubble pre code { background:none; padding:0; border-radius:0; color:#0d1b2e; font-size:13.5px; }
.msg-bubble table { border-collapse:collapse; margin:10px 0; width:100%; font-size:13px; border-radius:8px; overflow:hidden; }
.msg-bubble th, .msg-bubble td { border:1px solid #dce4ef; padding:8px 12px; text-align:left; color:#0d1b2e; font-size:13px; }
.msg-bubble th { background:#f8f9fb; color:#64748b; font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:0.5px; border-bottom:2px solid #e2e8f0; }
.msg-bubble strong { color: #1a1a1a; font-weight:700; }
.chat-ad-img { max-width:100%; border-radius:10px; margin:12px 0; display:block; box-shadow:0 2px 12px rgba(0,0,0,0.15); cursor:pointer; }
.chat-ad-img:hover { box-shadow:0 4px 20px rgba(0,0,0,0.25); }
.chat-video { max-width:100%; border-radius:10px; margin:12px 0; display:block; box-shadow:0 2px 12px rgba(0,0,0,0.15); background:#1a1a1a; }
.chat-video:hover { box-shadow:0 4px 20px rgba(0,0,0,0.25); }
.msg-time { font-size:12px; color:#8c9bab; margin-top:4px; padding:0 4px; }
.msg.user .msg-time { text-align:right; }

.file-badge { display:inline-flex; align-items:center; gap:6px; background:rgba(139,106,42,0.08); border:1px solid #8b6a2a; border-radius:6px; padding:6px 12px; font-size:14px; color:#8b6a2a; margin-bottom:6px; }

/* Tour narration — constrained, clearly Louie's voice, not a full-width bleed */
.tour-narration { max-width:640px !important; width:100%; }
.tour-narration .msg-bubble { max-width:100% !important; }

/* Empty state */
.empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; color:var(--text2); }
.empty-state .logo { font-size:52px; font-weight:800; color:#8b6a2a; margin-bottom:8px; letter-spacing:-1px; }
.empty-state p { font-size:17px; max-width:460px; text-align:center; line-height:1.65; color:#6a7f9a; }

/* Input area */
.input-area { padding:12px 16px 16px; border-top:1px solid #dce4ef; background: #ffffff; box-shadow:0 -2px 12px rgba(0,20,50,0.04); }
.input-row { display:flex; gap:10px; align-items:flex-end; }
.input-wrap { flex:1; position:relative; }
.input-wrap textarea { width:100%; padding:14px 18px; padding-right:80px; background:#f8f6f0; border:1.5px solid #d4dce8; border-radius:14px; color:#0d1b2e; font-size:15px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; resize:none; outline:none; min-height:80px; max-height:400px; line-height:1.55; transition:border-color 0.15s, min-height 0.18s ease, background-color 0.15s; }
.input-wrap textarea:focus { border-color:#8b6a2a; background: #ffffff; box-shadow:0 0 0 3px rgba(139,106,42,0.18); min-height:200px; }
.input-wrap textarea::placeholder { color:#8c9bab; }
.file-btn { position:absolute; right:10px; bottom:10px; background:none; border:none; color:#8c9bab; cursor:pointer; font-size:20px; padding:2px; }
.file-btn:hover { color:#8b6a2a; }
.send-btn { background:#8b6a2a; border:none; color:#ffffff; width:48px; height:48px; border-radius:12px; align-self:flex-end; cursor:pointer; font-size:20px; flex-shrink:0; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 10px rgba(139,106,42,0.3); transition:background 0.15s,color 0.15s,border-color 0.15s; font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.send-btn:hover { background:#a5795a; transform:translateY(-1px); box-shadow:0 4px 14px rgba(139,106,42,0.3); }
.send-btn:active { background:#6d522a; transform:translateY(0); }
.send-btn:disabled { opacity:0.4; cursor:not-allowed; }
.file-preview { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.file-tag { display:flex; align-items:center; gap:6px; background:rgba(139,106,42,0.08); border:1px solid #8b6a2a; border-radius:6px; padding:6px 12px; font-size:14px; color:#8b6a2a; }
.file-tag .remove { cursor:pointer; color:var(--red); font-weight:700; }
.typing-indicator { padding:8px 0; color:#8c9bab; font-size:14px; font-style:italic; display:flex; align-items:center; gap:8px; }

/* Mobile */
@media(max-width:768px) {
  .sidebar { display:none; }
  .msg { max-width:95%; }
  .input-area { padding:12px; }
}
/* Markdown rendering */
.msg-bubble h1,.msg-bubble h2,.msg-bubble h3 { color:#8b6a2a; margin:14px 0 8px; font-weight:700; }
.msg-bubble h1 { font-size:24px; } .msg-bubble h2 { font-size:21px; } .msg-bubble h3 { font-size:19px; }
.msg-bubble ul,.msg-bubble ol { margin:6px 0 6px 20px; }
.msg-bubble li { margin-bottom:6px; color:#0d1b2e; }
.msg-bubble p { margin-bottom:8px; }
.msg-bubble p:last-child { margin-bottom:0; }
.msg-bubble blockquote { border-left:3px solid #8b6a2a; padding-left:12px; color:#64748b; margin:8px 0; }

/* Admin Modal */
.modal-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,20,50,0.6); z-index:400; display:flex; align-items:center; justify-content:center; }
.modal { background: #ffffff; border:1px solid #e2e8f0; border-radius:16px; width:560px; max-height:80vh; overflow-y:auto; box-shadow:0 8px 32px rgba(0,29,69,0.15); }
.modal-header { padding:20px 24px; border-bottom:1px solid #e2e8f0; display:flex; justify-content:space-between; align-items:center; }
.modal-header h2 { font-size:18px; color:#8b6a2a; }
.modal-close { background:none; border:none; color:var(--text2); font-size:24px; cursor:pointer; }
.modal-close:hover { color:var(--text); }
.modal-body { padding:20px 24px; }
.user-row { display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--border); }
.user-row:last-child { border-bottom:none; }
.user-info { flex:1; }
.user-info .email { font-size:14px; color:#0d1b2e; font-weight:500; }
.user-info .meta { font-size:12px; color:#64748b; margin-top:2px; }
.user-actions { display:flex; gap:8px; }
.user-actions button { background:none; border: 1px solid #e0e0e0; color:var(--text2); padding:4px 10px; border-radius:6px; cursor:pointer; font-size:12px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.user-actions button:hover { border-color:var(--accent); color:var(--accent); }
.user-actions button.del-btn:hover { border-color:var(--red); color:var(--red); }
.badge { display:inline-block; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:600; }
.badge.admin { background:rgba(139,106,42,0.12); color:#8b6a2a; }
.badge.user { background:rgba(0,0,0,0.04); color:#64748b; }
.add-user-form { margin-top:16px; padding:16px; background: #ffffff; border-radius:10px; }
.add-user-form input, .add-user-form select { width:100%; padding:10px 12px; background: #ffffff; border:1px solid #e2e8f0; border-radius:8px; color:#0d1b2e; font-size:13px; margin-bottom:8px; outline:none; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.add-user-form input:focus, .add-user-form select:focus { border-color:var(--accent); }
.add-user-form input::placeholder { color:var(--text2); }
.form-row { display:flex; gap:8px; }
.form-row > * { flex:1; }
.add-user-btn { width:100%; padding:10px; background:#8b6a2a; border:none; border-radius:8px; color:#ffffff; font-size:14px; font-weight:600; cursor:pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin-top:4px; }
.add-user-btn:hover { background:#a5795a; }
.admin-trigger { background:none; border:none; color:#64748b; cursor:pointer; font-size:14px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; display:flex; align-items:center; gap:6px; padding:8px 16px; width:100%; }
.admin-trigger:hover { color:#8b6a2a; }
.form-error { color:var(--red); font-size:12px; margin-top:4px; min-height:16px; }


.msg-actions { margin-top:8px; display:flex; gap:8px; }
.report-btn { background:none; border:1.5px solid #d4dce8; color:#64748b; padding:4px 11px; border-radius:8px; cursor:pointer; font-size:11.5px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; display:inline-flex; align-items:center; gap:5px; transition:background 0.15s,color 0.15s,border-color 0.15s; font-weight:500; }
.report-btn:hover { border-color:#8b6a2a; color:#8b6a2a; background:rgba(139,106,42,0.08); }
.report-btn.loading { opacity:0.5; pointer-events:none; }


.mfa-section { display:none; margin-top:12px; }
.mfa-section.active { display:block; }
.mfa-input { text-align:center; font-size:24px !important; letter-spacing:12px; font-weight:700; }
.mfa-msg { font-size:13px; color:#64748b; text-align:center; margin-bottom:12px; }
.back-link { font-size:12px; color:#64748b; text-align:center; display:block; margin-top:12px; cursor:pointer; }
.back-link:hover { color:#8b6a2a; }
.session-warning { display:none; position:fixed; top:20px; right:20px; background: #ffffff; border:1px solid #e2e8f0; border-radius:10px; padding:14px 20px; box-shadow:0 4px 16px rgba(0,0,0,0.1); z-index:500; font-size:13px; color:#0d1b2e; }
.session-warning button { background:#8b6a2a; color:#ffffff; border:none; padding:6px 14px; border-radius:6px; cursor:pointer; font-size:12px; margin-left:10px; }


/* Quick Action Toolbar */
.quick-actions { display:flex; gap:3px; padding:0 0 2px 0; flex-wrap:nowrap; overflow-x:auto; }
.quick-actions button { background: #ffffff; border:1.5px solid #d4dce8; color:#0d1b2e; padding:5px 11px; border-radius:20px; cursor:pointer; font-size:12px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; display:flex; align-items:center; gap:5px; transition:background 0.15s,color 0.15s,border-color 0.15s; white-space:nowrap; font-weight:600; box-shadow:0 1px 3px rgba(0,20,50,0.06); }
.quick-actions button:hover { background:#f1f5f9; color: #1a1a1a; border-color:#cbd5e1; transform:none; box-shadow:none; } .quick-actions button:active { transform:translateY(0); box-shadow:none; }
.quick-actions button .qa-icon { font-size:13px; display:flex; align-items:center; }
.quick-actions .qa-more { position:relative; }
.quick-actions .qa-dropdown { display:none; position:fixed; bottom:auto; left:auto; background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:6px; box-shadow:0 8px 32px rgba(0,0,0,0.18); z-index:9999; min-width:200px; max-height:60vh; overflow-y:auto; }
.quick-actions .qa-dropdown.open { display:flex; flex-direction:column; gap:4px; }
.quick-actions .qa-dropdown button { width:100%; justify-content:flex-start; border-radius:8px; }
@media(max-width:600px){ .quick-actions button { padding:5px 9px; font-size:12px; } .quick-actions { gap:4px; } }
/* Mobile sidebar */
.mob-menu-btn { display:none; background:none; border:none; color:#64748b; font-size:22px; cursor:pointer; padding:0 10px 0 0; line-height:1; }
@media(max-width:768px) {
  .mob-menu-btn { display:inline-block; }
  .sidebar { position:fixed; top:0; left:-260px; height:100vh; z-index:200; transition:left 0.25s ease; box-shadow:4px 0 24px rgba(0,0,0,0.2); }
  .sidebar.mob-open { left:0; }
  .chat-header { display:flex; align-items:center; }
}
.mob-overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.45); z-index:199; }
.mob-overlay.active { display:block; }

/* Home Dashboard */
.home-dash { padding:12px 16px; max-width:1200px; margin:0 auto; overflow-y:auto; max-height:none; }
.home-welcome { font-size:22px; font-weight:700; color:#8b6a2a; margin-bottom:2px; }
.home-sub { font-size:13px; color:#64748b; margin-bottom:20px; }
.home-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:18px; }
.home-kpi { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:18px 20px; box-shadow:0 2px 8px rgba(0,0,0,0.06); transition:background 0.2s,box-shadow 0.2s,transform 0.2s; border-left:4px solid #8b6a2a; }
.home-kpi .hk-lbl { font-size:10px; color:#64748b; text-transform:uppercase; letter-spacing:0.8px; font-weight:600; margin-bottom:6px; }
.home-kpi .hk-val { font-size:28px; font-weight:800; color: #1a1a1a; line-height:1.1; letter-spacing:-1px; }
.home-kpi .hk-sub { font-size:11px; color:#64748b; margin-top:3px; }
.home-kpi.red-kpi { border-left-color:#e53e3e; background: #ffffff; }
.home-kpi.red-kpi .hk-val { color:#dc3545; }
.home-kpi.grn-kpi { border-left-color:#38a169; background: #ffffff; }
.home-kpi.grn-kpi .hk-val { color:#28a745; }
.home-alerts { margin-bottom:16px; }
.home-alert { display:flex; align-items:center; gap:10px; border-radius:8px; padding:9px 14px; margin-bottom:7px; font-size:13px; }
.home-alert.critical { background:rgba(220,53,69,0.07); border:1px solid rgba(220,53,69,0.3); color:#c0392b; }
.home-alert.warning { background:rgba(255,193,7,0.1); border:1px solid rgba(255,193,7,0.4); color:#856404; }
.home-alert.good { background:rgba(40,167,69,0.07); border:1px solid rgba(40,167,69,0.3); color:#2d6b3f; }
.home-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
@media(max-width:900px){ .home-grid { grid-template-columns:1fr; } }
.home-card { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:20px 22px; box-shadow:0 2px 8px rgba(0,0,0,0.05); transition:background 0.2s,box-shadow 0.2s,transform 0.2s; } .home-card:hover { box-shadow:0 6px 20px rgba(0,0,0,0.1); transform:translateY(-1px); }
.home-card-title { font-size:12px; font-weight:700; color:#64748b; margin-bottom:12px; display:flex; align-items:center; gap:6px; text-transform:uppercase; letter-spacing:0.8px; }
.home-srow { display:flex; align-items:center; gap:8px; padding:5px 0; border-bottom:1px solid #e8edf3; }
.home-srow:last-child { border-bottom:none; }
.home-sname { width:88px; font-size:12px; color:#64748b; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.home-sbar { flex:1; height:16px; background: #ffffff; border-radius:3px; overflow:hidden; }
.home-sfill { height:100%; border-radius:3px; transition:width 0.5s ease; }
.home-sval { font-size:11px; font-weight:600; width:48px; text-align:right; flex-shrink:0; }
.home-chips { display:flex; flex-wrap:wrap; gap:7px; }
.home-chip { background: #ffffff; border:1px solid #e2e8f0; color:#8b6a2a; padding:6px 13px; border-radius:20px; cursor:pointer; font-size:12px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; transition:background 0.15s,color 0.15s,border-color 0.15s; white-space:nowrap; }
.home-chip:hover { background:#8b6a2a; color:#ffffff; border-color:#8b6a2a; }
.home-loading { display:flex; align-items:center; gap:12px; color:#64748b; font-size:14px; padding:60px; justify-content:center; }
.home-spin { width:20px; height:20px; border:2px solid #e2e8f0; border-top-color:#8b6a2a; border-radius:50%; animation:invspin 0.8s linear infinite; flex-shrink:0; }



/* Missed Trades Dashboard */
#mt-dashboard { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background: #ffffff; z-index:300; overflow-y:auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
#mt-dashboard.active { display:block; }
.mt-header { background: #ffffff; color: #1a1a1a; border-bottom:2px solid rgba(139,106,42,0.25); padding:16px 24px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:10; }
.mt-header h1 { font-size:20px; font-weight:700; margin:0; }
.mt-header-right { display:flex; align-items:center; gap:10px; }
.mt-close-btn { background:none; border:1px solid rgba(255,255,255,0.35); color: #1a1a1a; width:34px; height:34px; border-radius:8px; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.mt-close-btn:hover { background: rgba(255,255,255,0.98); }
.mt-body { padding:20px 24px; max-width:1400px; margin:0 auto; }
.mt-kpi-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
.mt-kpi { background: #ffffff; border-radius:12px; padding:16px 18px; border-left:4px solid #8b6a2a; box-shadow:0 1px 4px rgba(0,0,0,0.07); }
.mt-kpi .kpi-label { font-size:11px; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:6px; }
.mt-kpi .kpi-val { font-size:26px; font-weight:800; color:#0d1b2e; font-family:'Inter Tight',-apple-system,sans-serif; }
.mt-kpi .kpi-sub { font-size:12px; color:#64748b; margin-top:3px; }
.mt-filters { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; align-items:center; }
.mt-filters select, .mt-filters input { padding:7px 12px; border:1.5px solid #d4dce8; border-radius:8px; font-size:13px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #ffffff; color:#0d1b2e; }
.mt-filters select:focus, .mt-filters input:focus { outline:none; border-color:#8b6a2a; }
.mt-table-wrap { background: #ffffff; border-radius:12px; box-shadow:0 1px 4px rgba(0,0,0,0.07); overflow:hidden; }
.mt-table { width:100%; border-collapse:collapse; font-size:13px; }
.mt-table th { text-align:left; padding:10px 12px; color:#8b6a2a; font-weight:700; border-bottom:2px solid #e8edf3; font-size:11px; text-transform:uppercase; letter-spacing:0.4px; cursor:pointer; white-space:nowrap; }
.mt-table th:hover { color:#8b6a2a; }
.mt-table td { padding:9px 12px; border-bottom:1px solid #f0f3f7; color:#0d1b2e; vertical-align:middle; }
.mt-table tr:hover td { background: #ffffff; }
.mt-table tr:last-child td { border-bottom:none; }
.mt-gap-pill { padding:3px 9px; border-radius:20px; font-size:12px; font-weight:700; display:inline-block; }
.mt-gap-neg { background: #ffffff1f0; color:#c0392b; }
.mt-gap-pos { background:#f0fdf4; color:#16a34a; }
.mt-dealer-badge { padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; background:rgba(139,106,42,0.10); color:#8b6a2a; white-space:nowrap; }
.mt-appraiser-badge { padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; background:#f8f0ff; color:#8b6a2a; white-space:nowrap; }
@media(max-width:768px){ .mt-kpi-row{grid-template-columns:1fr 1fr;} .mt-body{padding:12px;} }

/* Inventory Dashboard */
.inv-trigger { background:none; border:none; color:#cbd5e1; cursor:pointer; font-size:14.5px; font-weight:500; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; display:flex; align-items:center; gap:8px; padding:9px 14px; width:100%; min-height:44px; border-radius:6px; transition:background .12s,color .12s; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.inv-trigger svg { flex-shrink:0; opacity:0.7; }
.inv-trigger:hover svg { opacity:1; }
.nav-section-label { font-size:10px; font-weight:700; color:rgba(255,255,255,0.35); text-transform:uppercase; letter-spacing:1px; padding:12px 12px 4px; }
.inv-trigger:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
#inv-dashboard { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background: #ffffff; z-index:300; overflow-y:auto; }
#inv-dashboard.active { display:block; }
/* Skip layout work for class-toggled panels while hidden — eliminates 286 zero-size SVG renders */
#cs-dashboard:not(.active), #inv-dashboard:not(.active), #brain-command-overlay:not(.active) { content-visibility: hidden; }
/* Ensure trailing badges in sidebar buttons aren't squeezed out by overflow */
.inv-trigger > span[style*="margin-left:auto"], .inv-trigger > span:last-of-type { flex-shrink: 0; }
.inv-topbar { position:sticky; top:0; z-index:10; background: #ffffff; border-bottom:1px solid #e2e8f0; padding:14px 28px; display:flex; align-items:center; justify-content:space-between; }
.inv-topbar-left { display:flex; align-items:center; gap:14px; }
.inv-topbar .inv-brand { font-size:18px; font-weight:700; color:#8b6a2a; }
.inv-topbar .inv-title { font-size:15px; color:#64748b; }
.inv-close { background:none; border:1px solid #e2e8f0; color:#64748b; width:36px; height:36px; border-radius:8px; cursor:pointer; font-size:20px; display:flex; align-items:center; justify-content:center; }
.inv-close:hover { border-color:#8b6a2a; color:#8b6a2a; }
.inv-topbar-actions { display:flex; gap:8px; align-items:center; }
.inv-refresh { background:#8b6a2a; border:none; color:#ffffff; padding:8px 16px; border-radius:8px; cursor:pointer; font-size:13px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-weight:600; display:flex; align-items:center; gap:6px; }
.inv-refresh:hover { background:#a5795a; }
.inv-refresh:disabled { opacity:0.5; cursor:not-allowed; }
.inv-updated { font-size:12px; color:#8c9bab; }
.inv-body { padding:24px 28px; max-width:1400px; margin:0 auto; }
.inv-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:14px; margin-bottom:24px; }
.inv-kpi { background: #ffffff; border:1px solid #e8ecf1; border-radius:10px; padding:18px 20px; box-shadow:0 1px 3px rgba(0,0,0,0.04); border-left:3px solid #8b6a2a; }
.inv-kpi-label { font-size:12px; color:#8c9bab; text-transform:uppercase; letter-spacing:0.5px; font-weight:600; margin-bottom:6px; }
.inv-kpi-val { font-size:28px; font-weight:700; color:#0d1b2e; line-height:1.2; }
.inv-kpi-sub { font-size:13px; color:#64748b; margin-top:4px; }
.inv-kpi.alert .inv-kpi-val { color:#dc3545; }
.inv-kpi.green .inv-kpi-val { color:#28a745; }
.inv-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:24px; }
@media(max-width:900px) { .inv-grid { grid-template-columns:1fr; } }
.inv-card { background: #ffffff; border:1px solid #e8ecf1; border-radius:10px; padding:20px 24px; box-shadow:0 1px 3px rgba(0,0,0,0.04); transition:box-shadow 0.2s; } .inv-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.08); }
.inv-card-title { font-size:15px; font-weight:700; color:#8b6a2a; margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.inv-card.full { grid-column:1/-1; }
.aging-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.aging-label { width:80px; font-size:13px; color:#64748b; text-align:right; flex-shrink:0; }
.aging-track { flex:1; height:28px; background: #ffffff; border-radius:6px; overflow:hidden; position:relative; }
.aging-fill { height:100%; border-radius:6px; display:flex; align-items:center; padding:0 10px; font-size:12px; font-weight:600; color: #1a1a1a; min-width:fit-content; transition:width 0.6s ease; }
.aging-count { font-size:13px; color:#0d1b2e; font-weight:600; width:40px; text-align:right; flex-shrink:0; }
.hbar-row { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.hbar-label { width:120px; font-size:13px; color:#64748b; text-align:right; flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hbar-track { flex:1; height:24px; background: #ffffff; border-radius:5px; overflow:hidden; }
.hbar-fill { height:100%; border-radius:5px; transition:width 0.6s ease; }
.hbar-val { font-size:12px; color:#0d1b2e; font-weight:600; width:50px; flex-shrink:0; }
.donut-wrap { display:flex; align-items:center; gap:24px; justify-content:center; flex-wrap:wrap; }
.donut-legend { display:flex; flex-direction:column; gap:6px; }
.donut-legend-item { display:flex; align-items:center; gap:8px; font-size:13px; color:#0d1b2e; }
.donut-legend-dot { width:12px; height:12px; border-radius:3px; flex-shrink:0; }
.price-bars { display:flex; align-items:flex-end; gap:6px; height:140px; padding-top:10px; }
.price-col { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; height:100%; justify-content:flex-end; }
.price-bar { width:100%; border-radius:4px 4px 0 0; transition:height 0.6s ease; min-height:2px; }
.price-label { font-size:10px; color:#8c9bab; text-align:center; white-space:nowrap; }
.price-count { font-size:11px; color:#0d1b2e; font-weight:600; }
.inv-alert { background:linear-gradient(135deg, #dc354515, #dc354508); border:1px solid #dc354540; border-radius:10px; padding:14px 20px; margin-bottom:20px; display:flex; align-items:center; gap:12px; }
.inv-alert-icon { font-size:24px; }
.inv-alert-text { font-size:14px; color:#0d1b2e; line-height:1.5; }
.inv-alert-text strong { color:#dc3545; }
.inv-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; height:60vh; color:#64748b; gap:16px; }
.inv-loading .spinner { width:40px; height:40px; border:3px solid #e2e8f0; border-top-color:#8b6a2a; border-radius:50%; animation:invspin 0.8s linear infinite; }
@keyframes invspin { to { transform:rotate(360deg); } }
.inv-table { width:100%; border-collapse:collapse; font-size:13px; }
.inv-table th { text-align:left; padding:8px 10px; color:#8b6a2a; font-weight:600; border-bottom:2px solid #e2e8f0; font-size:12px; text-transform:uppercase; letter-spacing:0.3px; }
.inv-table td { padding:8px 10px; border-bottom:1px solid #e8edf3; color:#0d1b2e; }
.inv-table tr:hover td { background: #ffffff; }
.inv-table .num { text-align:right; font-variant-numeric:tabular-nums; }

/* SVG icon fix */
.qa-icon svg,.file-btn svg,.send-btn svg,.mob-menu-btn svg,.new-chat-btn svg { display:block; flex-shrink:0; }

    .convo-date-group { padding: 6px 16px 3px; font-size: 10px; font-weight: 700; color: #b0bccb; text-transform: uppercase; letter-spacing: 0.6px; }
    #convo-search:focus { border-color: #8b6a2a; }
    .inv-trigger { background:none; border:none; color:#cbd5e1; cursor:pointer; font-size:14.5px; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; display:flex; align-items:center; gap:8px; padding:10px 18px; width:100%; border-radius:8px; transition:background 0.15s, color 0.15s; }
    .inv-trigger:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
    /* 2026-04-21: ensure sidebar bottom clears mobile toolbars / iOS safe-area insets. */
    .sidebar { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
    @media(max-width:768px){
      .sidebar { padding-bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px)); }
    }

  
/* ============ MOBILE RESPONSIVE ============ */
@media(max-width:768px){
  .main-area{padding:0}.header-bar{padding:10px 14px}.header-bar h2{font-size:15px}
  .chat-area{padding:10px 8px calc(120px + env(safe-area-inset-bottom)) 8px}.msg{max-width:100%;padding:12px 14px;font-size:14px;line-height:1.55}
  .messages{padding-bottom:calc(40px + env(safe-area-inset-bottom))}
  .input-area{padding:8px 10px}.input-area textarea{font-size:16px;padding:10px 12px}
  .quick-actions{padding:6px 8px;gap:4px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .quick-actions::-webkit-scrollbar{display:none}
  .quick-actions button{white-space:nowrap;flex-shrink:0;padding:6px 10px;font-size:12px}
  .home-grid{grid-template-columns:1fr!important}.home-kpi{padding:12px 14px}.home-kpi .value{font-size:22px}
  #inv-dashboard .inv-grid{grid-template-columns:1fr!important}
  .inv-kpi-row{grid-template-columns:repeat(2,1fr)!important;gap:8px}.inv-kpi{padding:12px}.inv-kpi .value{font-size:20px}
  #sd-overlay .sd-kpi-row{grid-template-columns:repeat(2,1fr)!important}
  .cs-kpi-row{grid-template-columns:repeat(2,1fr)!important}.cs-grid2,.cs-grid3{grid-template-columns:1fr!important}
  .login-box{width:92%;padding:28px 24px}.login-logo{font-size:26px}
  .sidebar-conv{font-size:13px;padding:10px 14px}
}
@media(max-width:480px){
  .msg{max-width:100%;border-radius:12px}.header-bar{padding:8px 10px}
  .quick-actions button .qa-icon{display:none}.inv-kpi-row{grid-template-columns:1fr!important}
  .chat-area{padding:8px 4px 110px 4px}
}
@media(hover:none){
  .quick-actions button{min-height:36px}.sidebar-conv{min-height:44px;display:flex;align-items:center}
  button,a,input,select,textarea{font-size:16px}
}
.typing-dots{display:inline-flex;gap:3px;padding:4px 0}
.typing-dots span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#8c9bab;animation:typingBounce 1.2s infinite}
.typing-dots span:nth-child(2){animation-delay:.15s}.typing-dots span:nth-child(3){animation-delay:.3s}
@keyframes typingBounce{0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-6px);opacity:1}}
.briefing-banner{background: #ffffff;color: #1a1a1a;border:1px solid rgba(139,106,42,0.3);border-radius:10px;padding:10px 16px;margin:0 16px 12px;cursor:pointer;transition:transform .15s}
.briefing-banner:hover{transform:translateY(-1px);box-shadow:0 4px 16px rgba(139,106,42,.15);border-color:rgba(139,106,42,0.5)}
.briefing-banner h2{margin:0 0 4px;font-size:15px;font-weight:700}.briefing-banner p{margin:0;font-size:13px;opacity:.85}

/* Stip Checker */
.stip-overlay { position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:20000;display:flex;align-items:center;justify-content:center; }
.stip-box { background: #ffffff;border-radius:16px;padding:32px;max-width:520px;width:92%;box-shadow:0 8px 32px rgba(0,0,0,0.2); }
.stip-box h3 { color:#8b6a2a;font-size:18px;margin:0 0 6px;font-weight:700; }
.stip-box p { color:#64748b;font-size:13px;margin:0 0 16px;line-height:1.5; }
.stip-drop { border:2px dashed #8b6a2a;border-radius:10px;padding:32px;text-align:center;cursor:pointer;transition:background 0.2s,box-shadow 0.2s,transform 0.2s; }
.stip-drop:hover { background:rgba(139,106,42,0.06); }
.stip-drop.dragover { background:rgba(139,106,42,0.08);border-color:var(--color-gold); }
.stip-drop .drop-icon { font-size:32px;margin-bottom:8px; }
.stip-drop .drop-text { color: #1a1a1a;font-weight:600;font-size:14px; }
.stip-drop .drop-sub { color:#8c9bab;font-size:12px;margin-top:4px; }
.stip-status { margin-top:14px;font-size:13px;min-height:20px; }
.stip-close { margin-top:12px;padding:8px 20px;border:1px solid #d4dce8;border-radius:8px;background: #ffffff;cursor:pointer;color:#64748b;font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-size:13px; }
.stip-close:hover { background: #ffffff; }
.stip-badges { display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap; }
.stip-badge { background: #ffffff;border:1px solid #d4dce8;border-radius:6px;padding:4px 10px;font-size:11px;color:#64748b; }

/* ============ END MOBILE ============ */


/* Subtle scrollbar */
::-webkit-scrollbar { width:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#cbd5e1; border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:#64748b; }

/* ── Goals Dashboard ── */
#goals-dashboard { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background: #ffffff; z-index:300; overflow-y:auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
#goals-dashboard.active { display:block; }
.gl-header { background:var(--color-dark-1); color: #1a1a1a; padding:16px 28px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:10; }
.gl-header h1 { font-size:20px; font-weight:700; margin:0; display:flex; align-items:center; gap:10px; }
.gl-header-right { display:flex; align-items:center; gap:10px; }
.gl-month-badge { background: rgba(255,255,255,0.98); padding:5px 14px; border-radius:20px; font-size:13px; font-weight:600; }
.gl-close-btn { background:none; border:1px solid rgba(255,255,255,0.35); color: #1a1a1a; width:34px; height:34px; border-radius:8px; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.gl-close-btn:hover { background: rgba(255,255,255,0.98); }
.gl-body { padding:24px 28px; max-width:1400px; margin:0 auto; }
.gl-group-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:24px; }
.gl-kpi { background: #ffffff; border-radius:12px; padding:16px 20px; border-left:4px solid var(--color-gold); box-shadow:0 1px 4px rgba(0,0,0,0.06); }
.gl-kpi .kl { font-size:10px; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:0.8px; margin-bottom:6px; }
.gl-kpi .kv { font-size:26px; font-weight:800; color: #1a1a1a; letter-spacing:-0.5px; }
.gl-kpi .ks { font-size:12px; color:#64748b; margin-top:3px; }
.gl-stores { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; margin-bottom:24px; }
@media(max-width:1100px){ .gl-stores { grid-template-columns:1fr 1fr 1fr; } }
.gl-store { background: #ffffff; border-radius:12px; padding:20px; box-shadow:0 2px 8px rgba(0,0,0,0.06); border-top:4px solid var(--color-gold); }
.gl-store-name { font-size:13px; font-weight:700; color: #1a1a1a; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:14px; }
.gl-metric { margin-bottom:14px; }
.gl-metric-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:5px; }
.gl-metric-label { font-size:11px; color:#64748b; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; }
.gl-metric-vals { font-size:12px; color: #1a1a1a; font-weight:700; }
.gl-bar-bg { background:#f1f5f9; border-radius:6px; height:10px; overflow:hidden; }
.gl-bar-fill { height:10px; border-radius:6px; transition:width 0.6s ease; }
.gl-bar-pct { font-size:11px; color:#64748b; margin-top:3px; text-align:right; }
.gl-edit-btn { width:100%; margin-top:14px; padding:7px; background:none; border:1.5px solid #d4dce8; border-radius:8px; color:#64748b; font-size:12px; font-weight:600; cursor:pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; transition:background 0.15s,color 0.15s,border-color 0.15s; }
.gl-edit-btn:hover { border-color:var(--color-gold); color:var(--color-dark-1); background:rgba(139,106,42,0.07); }
.gl-modal-overlay { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:200; align-items:center; justify-content:center; }
.gl-modal-overlay.active { display:flex; }
.gl-modal { background: #ffffff; border-radius:16px; width:440px; padding:28px 32px; box-shadow:0 8px 40px rgba(0,0,0,0.18); }
.gl-modal h2 { font-size:18px; color:var(--color-dark-1); font-weight:700; margin-bottom:4px; }
.gl-modal .gl-modal-sub { font-size:13px; color:#64748b; margin-bottom:20px; }
.gl-modal label { display:block; font-size:12px; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:5px; margin-top:14px; }
.gl-modal input { width:100%; padding:10px 14px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:14px; color: #1a1a1a; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; outline:none; box-sizing:border-box; }
.gl-modal input:focus { border-color:var(--color-gold); box-shadow:0 0 0 3px rgba(139,106,42,0.12); }
.gl-modal-btns { display:flex; gap:10px; margin-top:20px; }
.gl-modal-save { flex:1; padding:11px; background:var(--color-dark-1); color: #1a1a1a; border:none; border-radius:8px; font-size:14px; font-weight:700; cursor:pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.gl-modal-save:hover { background:#8b6a2a; }
.gl-modal-cancel { padding:11px 18px; background:none; border:1.5px solid #e2e8f0; border-radius:8px; color:#64748b; font-size:14px; cursor:pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ── Market Intelligence Dashboard ── */
#mi-dashboard { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background: #ffffff; z-index:300; overflow-y:auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
#mi-dashboard.active { display:block; }
.mi-header { background:var(--color-dark-1); color: #1a1a1a; padding:16px 28px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:10; }
.mi-header h1 { font-size:20px; font-weight:700; margin:0; display:flex; align-items:center; gap:10px; }
.mi-header-right { display:flex; align-items:center; gap:10px; }
.mi-close-btn { background:none; border:1px solid rgba(255,255,255,0.35); color: #1a1a1a; width:34px; height:34px; border-radius:8px; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.mi-close-btn:hover { background: rgba(255,255,255,0.98); }
.mi-refresh-btn { background: rgba(255,255,255,0.98); border:1px solid rgba(255,255,255,0.3); color: #1a1a1a; padding:7px 16px; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.mi-refresh-btn:hover { background: rgba(255,255,255,0.98); }
.mi-body { padding:24px 28px; max-width:1500px; margin:0 auto; }
.mi-scan-status { background: #ffffff; border-radius:10px; padding:12px 18px; margin-bottom:18px; display:flex; align-items:center; gap:10px; font-size:12px; color:#64748b; border:1px solid #e2e8f0; }
.mi-scan-status .mi-dot { width:8px; height:8px; border-radius:50%; background:#22c55e; flex-shrink:0; }
.mi-scan-status .mi-dot.stale { background:#8b6a2a; }
.mi-scan-status .mi-dot.loading { background:#3b82f6; animation:pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.mi-filter-bar { display:flex; gap:10px; margin-bottom:18px; flex-wrap:wrap; align-items:center; }
.mi-filter-bar select, .mi-filter-bar input { padding:8px 12px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:13px; color: #1a1a1a; background: #ffffff; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.mi-filter-bar select:focus, .mi-filter-bar input:focus { border-color:var(--color-gold); outline:none; }
.mi-view-tabs { display:flex; gap:6px; margin-left:auto; }
.mi-tab { padding:8px 16px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; background: #ffffff; color:#64748b; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; transition:background 0.15s,color 0.15s,border-color 0.15s; }
.mi-tab.active { background:var(--color-dark-1); color: #1a1a1a; border-color:var(--color-dark-1); border-bottom:2px solid var(--color-gold); }
.mi-overview-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:16px; }
.mi-model-card { background: #ffffff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.06); overflow:hidden; }
.mi-model-card-header { padding:14px 18px; border-bottom:1px solid #f1f5f9; display:flex; align-items:center; justify-content:space-between; }
.mi-model-name { font-size:15px; font-weight:700; color: #1a1a1a; }
.mi-market-size { font-size:12px; color:#64748b; font-weight:600; }
.mi-model-card-body { padding:16px 18px; }
.mi-compare-row { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.mi-compare-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:#64748b; width:80px; flex-shrink:0; }
.mi-compare-bars { flex:1; }
.mi-bar-louie { background:#8b6a2a; height:10px; border-radius:4px; margin-bottom:3px; position:relative; min-width:4px; }
.mi-bar-market { background:#e2e8f0; height:10px; border-radius:4px; position:relative; min-width:4px; }
.mi-bar-market-fill { background:#64748b; height:10px; border-radius:4px; }
.mi-bar-vals { display:flex; justify-content:space-between; margin-top:4px; }
.mi-bar-val { font-size:11px; font-weight:700; }
.mi-badge-better { background:#dcfce7; color:#166534; font-size:10px; font-weight:700; padding:3px 8px; border-radius:10px; }
.mi-badge-worse { background:#fee2e2; color:#991b1b; font-size:10px; font-weight:700; padding:3px 8px; border-radius:10px; }
.mi-badge-neutral { background:#f1f5f9; color:#64748b; font-size:10px; font-weight:700; padding:3px 8px; border-radius:10px; }
.mi-listings-table-wrap { background: #ffffff; border-radius:12px; box-shadow:0 1px 4px rgba(0,0,0,0.07); overflow:hidden; margin-top:16px; }
.mi-listings-table { width:100%; border-collapse:collapse; font-size:12.5px; }
.mi-listings-table th { text-align:left; padding:10px 12px; color: #1a1a1a; font-weight:700; border-bottom:2px solid #e8edf3; font-size:11px; text-transform:uppercase; letter-spacing:0.4px; cursor:pointer; white-space:nowrap; background: #ffffff; }
.mi-listings-table th:hover { color:var(--color-gold); }
.mi-listings-table td { padding:8px 12px; border-bottom:1px solid #f0f3f7; color:#0d1b2e; vertical-align:middle; }
.mi-listings-table tr:hover td { background: #ffffff; }
.mi-price-below { color:#0f7b3c; font-weight:700; }
.mi-price-above { color:#dc2626; font-weight:700; }
.mi-days-hot { color:#dc2626; font-weight:700; }
.mi-listing-type { font-size:10px; font-weight:700; padding:2px 7px; border-radius:6px; text-transform:uppercase; }
.mi-listing-type.NEW { background:#dbeafe; color:#1e40af; }
.mi-listing-type.USED { background:#f1f5f9; color:#64748b; }
.mi-listing-type.CERTIFIED { background:#dcfce7; color:#166534; }
.mi-loading-overlay { position:absolute; inset:0; background:rgba(244,246,249,0.85); display:flex; align-items:center; justify-content:center; z-index:5; border-radius:12px; font-size:14px; color:var(--color-dark-1); font-weight:600; }

/* ── Competitor Intelligence Dashboard ── */
#ci-dashboard { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background: #ffffff; z-index:300; overflow-y:auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
#ci-dashboard.active { display:block; }
.ci-header { background:linear-gradient(135deg,#7c2d12 0%,#9a3412 100%); color:#ffffff; padding:16px 28px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:10; }
.ci-header h1 { font-size:20px; font-weight:700; margin:0; display:flex; align-items:center; gap:10px; }
.ci-header-right { display:flex; align-items:center; gap:10px; }
.ci-close-btn { background:none; border:1px solid rgba(255,255,255,0.35); color:#ffffff; width:34px; height:34px; border-radius:8px; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.ci-close-btn:hover { background: rgba(255,255,255,0.98); }
.ci-refresh-btn { background: rgba(255,255,255,0.98); border:1px solid rgba(255,255,255,0.3); color: #1a1a1a; padding:7px 16px; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.ci-refresh-btn:hover { background: rgba(255,255,255,0.98); }
.ci-body { padding:24px 28px; max-width:1500px; margin:0 auto; }
.ci-alert-bar { background:#fef2f2; border:1px solid #fecaca; border-radius:10px; padding:14px 18px; margin-bottom:18px; display:flex; align-items:center; gap:12px; }
.ci-alert-bar .ci-alert-icon { font-size:20px; }
.ci-alert-bar .ci-alert-text { flex:1; font-size:13px; color:#991b1b; }
.ci-alert-bar .ci-alert-badge { background:#dc2626; color: #1a1a1a; padding:4px 10px; border-radius:12px; font-size:11px; font-weight:700; }
.ci-kpi-row { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px; }
.ci-kpi { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:16px 18px; border-left:4px solid #9a3412; }
.ci-kpi .ci-kpi-label { font-size:11px; font-weight:700; text-transform:uppercase; color:#64748b; letter-spacing:0.5px; margin-bottom:4px; }
.ci-kpi .ci-kpi-value { font-size:26px; font-weight:800; color: #1a1a1a; }
.ci-kpi .ci-kpi-sub { font-size:11px; color:#64748b; margin-top:2px; }
.ci-kpi.green { border-left-color:#16a34a; }
.ci-kpi.red { border-left-color:#dc2626; }
.ci-kpi.blue { border-left-color:#1d4ed8; }
.ci-view-tabs { display:flex; gap:8px; margin-bottom:20px; }
.ci-tab { padding:10px 20px; border:2px solid #e2e8f0; border-radius:10px; font-size:13px; font-weight:700; cursor:pointer; background: #ffffff; color:#64748b; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; transition:background 0.15s,color 0.15s,border-color 0.15s; }
.ci-tab.active { background:#9a3412; color: #1a1a1a; border-color:#9a3412; }
.ci-tab:hover:not(.active) { border-color:#9a3412; color:#9a3412; }
.ci-comp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:16px; }
.ci-comp-card { background: #ffffff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,0.06); overflow:hidden; border:1px solid #e2e8f0; transition:box-shadow 0.2s; }
.ci-comp-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.1); }
.ci-comp-card-header { padding:14px 18px; border-bottom:1px solid #f1f5f9; display:flex; align-items:center; justify-content:space-between; }
.ci-comp-name { font-size:15px; font-weight:700; color: #1a1a1a; }
.ci-comp-threat { font-size:10px; font-weight:700; padding:3px 8px; border-radius:6px; text-transform:uppercase; }
.ci-comp-threat.high { background:#fee2e2; color:#991b1b; }
.ci-comp-threat.medium { background: #ffffff; color:#8b6a2a; }
.ci-comp-threat.low { background:#dcfce7; color:#166534; }
.ci-comp-card-body { padding:14px 18px; }
.ci-comp-stat { display:flex; justify-content:space-between; margin-bottom:8px; }
.ci-comp-stat-label { font-size:12px; color:#64748b; }
.ci-comp-stat-value { font-size:12px; font-weight:700; color: #1a1a1a; }
.ci-comp-card-footer { padding:12px 18px; background: #ffffff; border-top:1px solid #f1f5f9; display:flex; gap:8px; }
.ci-comp-btn { flex:1; padding:8px; border:1px solid #e2e8f0; border-radius:6px; font-size:11px; font-weight:600; cursor:pointer; background: #ffffff; color:#64748b; transition:background 0.15s,color 0.15s,border-color 0.15s; }
.ci-comp-btn:hover { border-color:#9a3412; color:#9a3412; }
.ci-comp-btn.primary { background:#9a3412; color: #1a1a1a; border-color:#9a3412; }
.ci-comp-btn.primary:hover { background:#7c2d12; }
.ci-alerts-list { display:flex; flex-direction:column; gap:10px; }
.ci-alert-item { background: #ffffff; border:1px solid #e2e8f0; border-radius:10px; padding:14px 18px; display:flex; gap:14px; align-items:flex-start; }
.ci-alert-item.high { border-left:4px solid #dc2626; }
.ci-alert-item.medium { border-left:4px solid #f59e0b; }
.ci-alert-item.low { border-left:4px solid #3b82f6; }
.ci-alert-item-icon { font-size:20px; flex-shrink:0; }
.ci-alert-item-content { flex:1; }
.ci-alert-item-msg { font-size:13px; color: #1a1a1a; margin-bottom:4px; }
.ci-alert-item-action { font-size:11px; color:#64748b; font-style:italic; }
.ci-alert-item-time { font-size:10px; color:#64748b; }
.ci-alert-item-btn { padding:6px 12px; border:1px solid #9a3412; border-radius:6px; font-size:11px; font-weight:600; cursor:pointer; background: #ffffff; color:#9a3412; white-space:nowrap; }
.ci-alert-item-btn:hover { background:#9a3412; color: #1a1a1a; }
.ci-h2h-grid { display:grid; grid-template-columns:1fr 80px 1fr; gap:20px; align-items:start; }
.ci-h2h-panel { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:20px; }
.ci-h2h-panel h3 { font-size:14px; font-weight:700; color: #1a1a1a; margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.ci-h2h-vs { display:flex; flex-direction:column; align-items:center; justify-content:center; padding-top:30px; }
.ci-h2h-vs-text { font-size:24px; font-weight:800; color:#9a3412; }
.ci-h2h-stat-row { display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid #f1f5f9; }
.ci-h2h-stat-row:last-child { border-bottom:none; }
.ci-h2h-label { font-size:12px; color:#64748b; }
.ci-h2h-value { font-size:14px; font-weight:700; }
.ci-h2h-value.win { color:#16a34a; }
.ci-h2h-value.lose { color:#dc2626; }
.ci-price-chart { height:200px; background:#f8fafc; border-radius:8px; display:flex; align-items:flex-end; padding:16px; gap:8px; }
.ci-price-bar { flex:1; background:#9a3412; border-radius:4px 4px 0 0; min-height:20px; position:relative; }
.ci-price-bar.us { background:#1d4ed8; }
.ci-price-bar-label { position:absolute; bottom:-20px; left:50%; transform:translateX(-50%); font-size:9px; color:#64748b; white-space:nowrap; }
@media(max-width:900px) { .ci-kpi-row { grid-template-columns:repeat(2,1fr); } .ci-h2h-grid { grid-template-columns:1fr; } .ci-h2h-vs { flex-direction:row; padding:10px 0; } }

/* ── Wholesale & F&I Reports Dashboard ── */
#rpt-dashboard { display:none; position:fixed; top:0; left:0; right:0; bottom:0; background: #ffffff; z-index:300; overflow-y:auto; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
#rpt-dashboard.active { display:block; }
.rpt-header { background: #ffffff; border-bottom:1px solid #e2e8f0; padding:16px 24px; display:flex; align-items:center; gap:14px; position:sticky; top:0; z-index:10; }
.rpt-header h1 { color: #1a1a1a; font-size:18px; font-weight:800; flex:1; }
.rpt-tabs { display:flex; gap:6px; }
.rpt-tab { padding:7px 18px; border:1.5px solid #e2e8f0; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; background: #ffffff; color:#64748b; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; transition:background 0.15s,color 0.15s,border-color 0.15s; }
.rpt-tab.active { background:var(--color-dark-1); color: #1a1a1a; border-color:var(--color-dark-1); border-bottom:2px solid var(--color-gold); }
.rpt-body { padding:20px 24px; max-width:1400px; margin:0 auto; }
.rpt-kpi-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px; margin-bottom:16px; }
.rpt-kpi { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:14px 16px; border-left:3px solid #8b6a2a; }
.rpt-kpi.red { border-left-color:#dc2626; }
.rpt-kpi.green { border-left-color:#10b981; }
.rpt-kpi.gold { border-left-color:#8b6a2a; }
.rpt-kpi .lbl { color:#64748b; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; margin-bottom:3px; }
.rpt-kpi .val { color:#0d1b2e; font-size:22px; font-weight:800; }
.rpt-kpi .sub { color:#64748b; font-size:11px; margin-top:2px; }
.rpt-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.rpt-card { background: #ffffff; border:1px solid #e2e8f0; border-radius:12px; padding:18px 20px; }
.rpt-card h3 { color: #1a1a1a; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; margin-bottom:12px; }
.rpt-tbl { width:100%; border-collapse:collapse; font-size:12.5px; }
.rpt-tbl th { text-align:left; padding:7px 8px; color: #1a1a1a; font-size:10px; font-weight:700; text-transform:uppercase; border-bottom:2px solid #e2e8f0; }
.rpt-tbl th.r { text-align:right; }
.rpt-tbl td { padding:7px 8px; border-bottom:1px solid #f0f3f7; color:#0d1b2e; }
.rpt-tbl td.r { text-align:right; font-variant-numeric:tabular-nums; }
.rpt-tbl tr:hover td { background: #ffffff; }
.rpt-tbl tr:last-child td { border-bottom:none; }
.rpt-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:10px; font-weight:700; }
.rpt-badge.yn { background:#dcfce7; color:#16a34a; }
.rpt-badge.pn { background:#fef9c3; color:#ca8a04; }
.rpt-badge.yu { background:#e0f2fe; color:#0369a1; }
.rpt-badge.rn { background:#fee2e2; color:#dc2626; }
.rpt-badge.mi { background:#ede9fe; color:#8b6a2a; }
.rpt-neg { color:#dc2626; }
.rpt-pos { color:#16a34a; }

/* === LAYOUT IMPROVEMENTS === */
.briefing-banner { display: none; }
#app { display: none; height: 100vh; overflow: hidden; }
.layout { display: flex; height: 100%; min-height: 0; flex-direction: row; }
.sidebar { flex-shrink: 0; min-height: 0; }
.chat-area { display: flex; flex-direction: column; flex: 1; min-height: 0; height: 100%; position: relative; z-index: 1; }
#chat-header { flex-shrink: 0; }
#persistent-kpi-strip { flex-shrink: 0; }
#messages { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; }
#home-dash-wrap { flex: 1; min-height: 0; overflow-y: auto; margin: -20px -14px; width: calc(100% + 28px); }
.input-area {
  flex: 0 0 auto;
  max-height: 240px;
  overflow: hidden;
  display: flex; flex-direction: column;
  justify-content: flex-start;
  padding: 12px 16px 14px; box-sizing: border-box;
  position: sticky; bottom: 0;
  background: var(--color-panel);
}
.input-row { width: 100%; display: flex; align-items: flex-end; gap: 8px; }
.input-wrap { flex: 1 1 auto; position: relative; z-index: 200; }
.send-btn { flex: 0 0 auto; align-self: flex-end; }
#quick-actions {
  display: flex; flex-direction: row; flex-wrap: nowrap; gap: 4px;
  border-top: 1px solid #e8edf2; margin-top: 6px; padding: 6px 0 2px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
#quick-actions::-webkit-scrollbar { display: none; }
#quick-actions .qa-more { position: sticky; right: 0; background: #ffffff; flex-shrink: 0; }
/* Fade-right mask signals scrollable content */
.quick-actions-wrap {
  position: relative;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(to right, black calc(100% - 48px), transparent 100%);
}
.quick-actions-wrap::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 48px;
  background: linear-gradient(to right, transparent, #ffffff);
  pointer-events: none;
  z-index: 10;
}
#quick-actions button {
  display: flex; align-items: center; gap: 5px;
  flex: 0 0 auto; width: auto; text-align: left; background: none; border: 1px solid #e8edf2;
  padding: 4px 10px; font-size: 12px; color: rgb(74,95,122);
  cursor: pointer; border-radius: 20px; height: 26px; white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
#quick-actions button:hover { background: rgba(139,106,42,0.12); color: #8b6a2a; }
#qa-dropdown:not(.open) { display: none; }
.sidebar { overflow-y: auto; overflow-x: hidden; height: 100vh; }
.sidebar-footer {
  position: sticky; bottom: 0; background: #0d1b2e;
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 6px; z-index: 10;
}
/* Scroll indicators — fade masks signal more content below/right */
#sidebar-scroll-area {
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 32px), transparent 100%);
}
/* === END LAYOUT IMPROVEMENTS === */

/* === UNIFIED MODAL CLOSE BUTTONS (audit polish) === */
.mt-close-btn, .gl-close-btn, .mi-close-btn, .cs-close-btn,
.inv-close, .modal-close, .cs-modal-close {
  width: 32px !important; height: 32px !important;
  border-radius: 8px !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  line-height: 1 !important;
  padding: 0 !important;
  transition: background 120ms ease;
}
/* dark-bg (gradient/navy headers) */
.mt-close-btn, .gl-close-btn, .mi-close-btn {
  background: rgba(255,255,255,0.98) !important;
  border: 1px solid rgba(255,255,255,0.22) !important;
  color: #1a1a1a !important;
}
.mt-close-btn:hover, .gl-close-btn:hover, .mi-close-btn:hover {
  background: rgba(255,255,255,0.98) !important;
}
/* light-bg (white card headers) */
.cs-close-btn, .inv-close, .modal-close, .cs-modal-close {
  background: #f1f4f8 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  margin: 0 !important;
}
.cs-close-btn:hover, .inv-close:hover, .modal-close:hover, .cs-modal-close:hover {
  background: #e2e8ef !important;
}
/* cs-modal-close was float:right in a non-flex parent — keep pinned top-right */
.cs-modal-close { position: absolute !important; top: 12px !important; right: 12px !important; }
.cs-upload-box { position: relative; }
/* === FOCUS VISIBLE — WCAG 2.4.7 === */
*:focus-visible{outline:2px solid #8b6a2a;outline-offset:2px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[role="button"]:focus-visible{outline:2px solid #8b6a2a;outline-offset:2px;border-radius:3px}
/* === END UNIFIED CLOSE BUTTONS === */
#brain-command-overlay{display:none;position:fixed;inset:0;background: #ffffff;z-index:9999;overflow-y:auto}#brain-command-overlay.active{display:block}.brain-header{background: #ffffff;border-bottom:2px solid #8b6a2a;padding:16px 28px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}.brain-header h1{font-size:22px;font-weight:800;color: #1a1a1a;margin:0;display:flex;align-items:center;gap:12px}.brain-pulse{display:flex;align-items:center;gap:8px;background:rgba(139,106,42,0.15);border:1px solid rgba(139,106,42,0.4);padding:6px 14px;border-radius:20px;color:#8b6a2a;font-size:12px;font-weight:600}.brain-pulse .pulse-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;animation:brainPulse 1.5s infinite}@keyframes brainPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:0.5;transform:scale(1.2)}}.brain-learning-status{color:rgba(255,255,255,0.7);font-size:12px}.brain-close-btn{background: rgba(255,255,255,0.98);border:1px solid rgba(255,255,255,0.2);color:#64748b;width:36px;height:36px;border-radius:8px;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center}.brain-close-btn:hover{background: rgba(255,255,255,0.98);color: #1a1a1a}.brain-body{padding:24px 28px;max-width:1600px;margin:0 auto}.brain-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;margin-bottom:24px}@media(max-width:1200px){.brain-grid{grid-template-columns:1fr 1fr}}@media(max-width:800px){.brain-grid{grid-template-columns:1fr}}.brain-panel{background: #ffffff;border:1px solid rgba(139,106,42,0.25);border-radius:16px;padding:20px;box-shadow:0 2px 12px rgba(26,34,52,0.07)}.brain-panel-title{font-size:13px;font-weight:700;color:#8b6a2a;text-transform:uppercase;letter-spacing:1px;margin-bottom:16px;display:flex;align-items:center;gap:8px}.brain-event-stream{height:280px;overflow-y:auto;font-size:11px;line-height:1.6}.brain-event{padding:6px 10px;border-radius:6px;margin-bottom:4px;background: #ffffff;border-left:3px solid #e2e8f0;display:flex;gap:10px}.brain-event:hover{background: #ffffff;border-left-color:#8b6a2a}.brain-event-time{color:#64748b;min-width:60px}.brain-event-module{font-weight:600;min-width:90px}.brain-event-module.sales{color:#0d1b2e}.brain-event-module.fi{color:#059669}.brain-event-module.inventory{color:#8b6a2a}.brain-event-module.service{color:#db2777}.brain-event-module.bdc{color:#8b6a2a}.brain-event-action{color:#64748b;flex:1}.brain-correlation{background:rgba(5,150,105,0.07);border:1px solid rgba(5,150,105,0.25);border-radius:10px;padding:14px;margin-bottom:12px}.brain-correlation-title{color:#059669;font-size:12px;font-weight:700;margin-bottom:6px}.brain-correlation-text{color:#64748b;font-size:13px;line-height:1.5}.brain-anomaly{background:rgba(220,38,38,0.07);border:1px solid rgba(220,38,38,0.25);border-radius:10px;padding:14px;margin-bottom:12px}.brain-anomaly-title{color:#dc2626;font-size:12px;font-weight:700;margin-bottom:6px}.brain-anomaly-text{color:#64748b;font-size:13px;line-height:1.5}.brain-opportunity{background:rgba(139,106,42,0.1);border:1px solid rgba(139,106,42,0.3);border-radius:10px;padding:14px;margin-bottom:12px}.brain-opportunity-title{color:#8b6a2a;font-size:12px;font-weight:700;margin-bottom:6px}.brain-opportunity-text{color:#64748b;font-size:13px;line-height:1.5}.brain-module-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:8px;max-height:320px;overflow-y:auto}.brain-module-cell{background: #ffffff;border:1px solid #e5e0d0;border-radius:8px;padding:10px 8px;text-align:center;cursor:pointer;transition:background .15s,color .15s,transform .15s}.brain-module-cell:hover{background: #ffffff;border-color:#8b6a2a;transform:translateY(-2px)}.brain-module-cell.healthy{border-color:rgba(5,150,105,0.4)}.brain-module-cell.warning{border-color:rgba(245,158,11,0.4)}.brain-module-cell.critical{border-color:rgba(220,38,38,0.4)}.brain-module-name{font-size:9px;color:#64748b;margin-bottom:4px}.brain-module-events{font-size:14px;font-weight:700;color: #1a1a1a}.brain-module-status{font-size:8px;margin-top:4px}.brain-module-status.healthy{color:#059669}.brain-module-status.warning{color:#d97706}.brain-module-status.critical{color:#dc2626}.brain-prediction{background: #ffffff;border-radius:10px;padding:14px;margin-bottom:10px;display:flex;align-items:center;gap:12px}.brain-prediction-icon{font-size:24px}.brain-prediction-content{flex:1}.brain-prediction-label{color:#64748b;font-size:11px;font-weight:600;text-transform:uppercase}.brain-prediction-value{color: #1a1a1a;font-size:15px;font-weight:700;margin-top:2px}.brain-prediction-confidence{background:linear-gradient(90deg,#8b6a2a,#a5795a);color:#ffffff;font-size:11px;font-weight:700;padding:4px 10px;border-radius:12px}.brain-ask-section{grid-column:span 2;background: #ffffff;border:2px solid rgba(139,106,42,0.4);border-radius:16px;padding:24px}@media(max-width:800px){.brain-ask-section{grid-column:span 1}}.brain-ask-input-wrap{display:flex;gap:12px;margin-bottom:16px}.brain-ask-input{flex:1;background: #ffffff;border:1px solid #e2e8f0;border-radius:12px;padding:14px 18px;color: #1a1a1a;font-size:15px;outline:none}.brain-ask-input::placeholder{color:#64748b}.brain-ask-input:focus{border-color:#8b6a2a;box-shadow:0 0 0 3px rgba(139,106,42,0.15)}.brain-ask-btn{background: #ffffff;border:none;color:#8b6a2a;padding:14px 28px;border-radius:12px;font-size:14px;font-weight:700;cursor:pointer}.brain-ask-btn:hover{background: #ffffff;transform:translateY(-1px)}.brain-response{background: #ffffff;border-radius:12px;padding:16px;color:#64748b;font-size:14px;line-height:1.7;min-height:80px}.brain-response.thinking{color:#8b6a2a;font-style:italic}.brain-sidebar-btn{background:linear-gradient(135deg,rgba(139,106,42,0.15),rgba(139,106,42,0.05))!important;border-left:3px solid #8b6a2a!important;font-weight:700!important;color: #1a1a1a!important;position:relative;overflow:hidden}.brain-sidebar-btn::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(139,106,42,0.1),transparent);animation:brainShimmer 3s ease-in-out infinite;will-change:transform}@keyframes brainShimmer{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}

/* === TODAY'S COMMAND CENTER === */
#today-actions-overlay{display:none;position:fixed;inset:0;background: #ffffff;z-index:10000;overflow-y:auto;font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif}
#today-actions-overlay.active{display:block}
.tac-header{background: #ffffff;border-bottom:1px solid #64748b;padding:16px 28px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10}
.tac-header-left{display:flex;align-items:center;gap:14px}
.tac-title{font-size:22px;font-weight:800;color: #1a1a1a;letter-spacing:-0.5px}
.tac-date{font-size:13px;color:#64748b;font-weight:500}
.tac-live-badge{display:flex;align-items:center;gap:6px;background:rgba(34,197,94,.15);border:1px solid rgba(34,197,94,.3);padding:5px 12px;border-radius:20px;color:#22c55e;font-size:12px;font-weight:700}
.tac-live-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;animation:tacPulse 1.5s infinite}
@keyframes tacPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.3)}}
.tac-close-btn{background: rgba(255,255,255,0.98);border:1px solid rgba(255,255,255,.15);color:#64748b;width:36px;height:36px;border-radius:8px;cursor:pointer;font-size:20px;display:flex;align-items:center;justify-content:center;line-height:1;transition:background .15s,color .15s,transform .15s}
.tac-close-btn:hover{background: rgba(255,255,255,0.98);color: #1a1a1a}
.tac-body{padding:24px 28px;max-width:1200px;margin:0 auto}
.tac-section{margin-bottom:28px}
.tac-section-header{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.tac-section-label{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:1.5px}
.tac-section-label.urgent{color:#ef4444}
.tac-section-label.money{color:#22c55e}
.tac-section-label.deals{color:#3b82f6}
.tac-section-label.eod{color:#f59e0b}
.tac-section-badge{font-size:11px;font-weight:700;padding:3px 9px;border-radius:10px}
.tac-section-badge.urgent{background:rgba(239,68,68,.15);color:#ef4444;border:1px solid rgba(239,68,68,.3)}
.tac-section-badge.money{background:rgba(34,197,94,.15);color:#22c55e;border:1px solid rgba(34,197,94,.3)}
.tac-section-badge.deals{background:rgba(59,130,246,.15);color:#60a5fa;border:1px solid rgba(59,130,246,.3)}
.tac-section-badge.eod{background:rgba(245,158,11,.15);color:#f59e0b;border:1px solid rgba(245,158,11,.3)}
.tac-rows{display:flex;flex-direction:column;gap:8px}
.tac-row{background: #ffffff;border:1px solid #64748b;border-radius:10px;padding:14px 18px;display:flex;align-items:center;gap:14px;transition:border-color .15s}
.tac-row:hover{border-color: #1a1a1a}
.tac-row.urgent{border-left:3px solid #ef4444}
.tac-row.money{border-left:3px solid #22c55e}
.tac-row.deals{border-left:3px solid #3b82f6}
.tac-row-icon{font-size:20px;flex-shrink:0;width:28px;text-align:center}
.tac-row-body{flex:1}
.tac-row-title{font-size:14px;font-weight:600;color:#f1f5f9;margin-bottom:2px}
.tac-row-sub{font-size:12px;color:#64748b}
.tac-action-btn{border:none;padding:9px 16px;border-radius:7px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;transition:background .15s,color .15s,transform .15s;flex-shrink:0}
.tac-action-btn.red{background:#ef4444;color:#ffffff}.tac-action-btn.red:hover{background:#dc2626}
.tac-action-btn.green{background:#22c55e;color:#ffffff}.tac-action-btn.green:hover{background:#16a34a;color:#ffffff}
.tac-action-btn.blue{background:#3b82f6;color:#ffffff}.tac-action-btn.blue:hover{background:#2563eb}
.tac-action-btn.orange{background:#f59e0b;color:#111}.tac-action-btn.orange:hover{background:#d97706;color:#111}
.tac-quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media(max-width:700px){.tac-quick-grid{grid-template-columns:1fr 1fr}}
.tac-quick-btn{background: #ffffff;border:1px solid #64748b;border-radius:12px;padding:22px 16px;cursor:pointer;text-align:center;transition:background .15s,color .15s,transform .15s;font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif}
.tac-quick-btn:hover{background: #ffffff;border-color: #1a1a1a;transform:translateY(-2px)}
.tac-quick-btn-icon{font-size:28px;margin-bottom:8px}
.tac-quick-btn-label{font-size:14px;font-weight:700;color:#f1f5f9}
.tac-quick-btn-sub{font-size:11px;color:#64748b;margin-top:3px}
.tac-checklist{display:flex;flex-direction:column;gap:8px}
.tac-check-item{display:flex;align-items:center;gap:12px;padding:12px 16px;background: #ffffff;border:1px solid #64748b;border-radius:9px;cursor:pointer;transition:background .15s,color .15s,transform .15s}
.tac-check-item:hover{border-color: #1a1a1a}
.tac-check-item.checked{opacity:.55}
.tac-check-box{width:20px;height:20px;border:2px solid #ffffff;border-radius:5px;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s,transform .15s}
.tac-check-item.checked .tac-check-box{background:#22c55e;border-color:#22c55e}
.tac-check-label{font-size:14px;color:#d1d5db;flex:1}
.tac-check-item.checked .tac-check-label{text-decoration:line-through;color:#4b5563}
.tac-revenue-banner{background:linear-gradient(135deg,rgba(34,197,94,.12),rgba(16,185,129,.08));border:1px solid rgba(34,197,94,.25);border-radius:10px;padding:14px 20px;margin-top:12px;display:flex;align-items:center;justify-content:space-between}
.tac-revenue-left{}
.tac-revenue-label{font-size:12px;font-weight:700;color:#4ade80;text-transform:uppercase;letter-spacing:0.8px}
.tac-revenue-amount{font-size:28px;font-weight:800;color:#22c55e;letter-spacing:-0.5px}
.tac-revenue-sub{font-size:11px;color:#64748b;margin-top:2px}
.tac-revenue-note{font-size:12px;color:#64748b;text-align:right}
.tac-section-divider{height:1px;background:#8b6a2a;margin:4px 0 16px}
#today-actions-sidebar-btn{position:relative}
.tac-urgency-ring{animation:tacRingPulse 2.5s infinite}
@keyframes tacRingPulse{0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,0)}60%{box-shadow:0 0 0 5px rgba(239,68,68,.18)}}
/* Floating Quick-Action Buttons */
#float-quick-actions{position:fixed;bottom:160px;right:24px;display:flex;flex-direction:column;gap:10px;z-index:999998}
.fqa-btn{display:flex;align-items:center;gap:8px;padding:11px 18px;border:none;border-radius:28px;font-size:13px;font-weight:700;cursor:pointer;font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;box-shadow:0 4px 16px rgba(0,0,0,.35);transition:background .15s,color .15s,transform .15s;white-space:nowrap}
.fqa-btn:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.45)}
.fqa-btn.new-deal{background:linear-gradient(135deg,#0a0f1e,#2a3550);color:#ffffff}
.fqa-btn.new-cust{background:linear-gradient(135deg,#059669,#10b981);color:#ffffff}
.fqa-btn.log-call{background:linear-gradient(135deg,#8b6a2a,#a5795a);color:#ffffff}
/* Toast Notifications */
#tac-toast-container{position:fixed;bottom:110px;right:24px;z-index:20000;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}
.tac-toast{background:#0d1b2e;border:1px solid rgba(201,168,76,0.3);border-radius:10px;padding:12px 18px;color:#f1f5f9;font-size:13px;font-weight:600;box-shadow:0 4px 20px rgba(0,0,0,.5);display:flex;align-items:center;gap:10px;max-width:320px;animation:tacToastIn .25s ease;pointer-events:auto}
@keyframes tacToastIn{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
.tac-toast-icon{font-size:16px;flex-shrink:0}
.tac-toast.success{border-left:3px solid #22c55e}
.tac-toast.warning{border-left:3px solid #f59e0b}
.tac-toast.info{border-left:3px solid #3b82f6}
/* === END TODAY'S COMMAND CENTER === */

/* === EXPLAINER ACCORDION PANELS === */
.la-explainer {
  margin: 16px 0 20px 0;
  background: linear-gradient(135deg, rgba(167,139,250,.08) 0%, rgba(124,58,237,.04) 100%);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 10px;
  overflow: hidden;
}
.la-explainer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.la-explainer-header:hover { background: rgba(124,58,237,.06); }
.la-explainer-icon {
  width: 22px; height: 22px;
  background: #8b6a2a;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #1a1a1a; font-size: 12px; font-weight: 700;
}
.la-explainer-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #8b6a2a;
  letter-spacing: .02em;
}
.la-explainer-toggle {
  font-size: 11px;
  color: #8b6a2a;
  opacity: .7;
  transition: transform .2s;
}
.la-explainer.open .la-explainer-toggle { transform: rotate(90deg); }
.la-explainer-body {
  display: none;
  padding: 0 16px 16px 16px;
}
.la-explainer.open .la-explainer-body { display: block; }
.la-explainer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.la-explainer-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.5;
  border-bottom: 1px solid rgba(124,58,237,.15);
}
.la-explainer-list li:last-child { border-bottom: none; }
.la-explainer-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 14px;
  width: 8px; height: 8px;
  background: #a78bfa;
  border-radius: 2px;
}
.la-explainer-list code {
  background: rgba(124,58,237,.2);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  color: #c4b5fd;
}
/* Light-bg variant */
.la-explainer--light { background: linear-gradient(135deg, rgba(167,139,250,.06) 0%, rgba(124,58,237,.03) 100%); }
.la-explainer--light .la-explainer-list li { color: #64748b; }
.la-explainer--light .la-explainer-list code { background: rgba(124,58,237,.1); color: #8b6a2a; }
/* Teal variant */
.la-explainer--teal { background: linear-gradient(135deg, rgba(31,138,138,.08) 0%, rgba(20,184,166,.04) 100%); border-color: rgba(20,184,166,.25); }
.la-explainer--teal .la-explainer-icon { background: #a5795a; }
.la-explainer--teal .la-explainer-title, .la-explainer--teal .la-explainer-toggle { color: #0d9488; }
.la-explainer--teal .la-explainer-header:hover { background: rgba(20,184,166,.06); }
.la-explainer--teal .la-explainer-list li::before { background: #2dd4bf; }
.la-explainer--teal .la-explainer-list li { color: #64748b; border-color: rgba(20,184,166,.15); }
.la-explainer--teal .la-explainer-list code { background: rgba(20,184,166,.12); color: #8b6a2a; }
/* Gold variant */
.la-explainer--gold { background: linear-gradient(135deg, rgba(212,175,55,.1) 0%, rgba(245,158,11,.04) 100%); border-color: rgba(212,175,55,.3); }
.la-explainer--gold .la-explainer-icon { background: #d4af37; }
.la-explainer--gold .la-explainer-title, .la-explainer--gold .la-explainer-toggle { color: #b8860b; }
.la-explainer--gold .la-explainer-header:hover { background: rgba(212,175,55,.06); }
.la-explainer--gold .la-explainer-list li::before { background: #facc15; }
.la-explainer--gold .la-explainer-list li { color: #e2e8f0; border-color: rgba(212,175,55,.2); }
.la-explainer--gold .la-explainer-list code { background: rgba(212,175,55,.15); color: #fcd34d; }
/* Orange variant */
.la-explainer--orange { background: linear-gradient(135deg, rgba(234,88,12,.08) 0%, rgba(249,115,22,.04) 100%); border-color: rgba(234,88,12,.25); }
.la-explainer--orange .la-explainer-icon { background: #ea580c; }
.la-explainer--orange .la-explainer-title, .la-explainer--orange .la-explainer-toggle { color: #ea580c; }
.la-explainer--orange .la-explainer-header:hover { background: rgba(234,88,12,.06); }
.la-explainer--orange .la-explainer-list li::before { background: #fb923c; }
.la-explainer--orange .la-explainer-list li { color: #e2e8f0; border-color: rgba(234,88,12,.15); }
.la-explainer--orange .la-explainer-list code { background: rgba(234,88,12,.15); color: #fdba74; }
/* === END EXPLAINER ACCORDION PANELS === */
