:root {
  --navy: #020617;
  --navy-2: #0F172A;
  --blue: #EC3C44;
  --blue-2: #C82930;
  --blue-soft: #FFF0F1;
  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --surface: #ffffff;
  --canvas: #F4F6F8;
  --green: #10a36d;
  --amber: #e69b22;
  --red: #d95757;
  --radius: 14px;
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, .05);
}

@font-face { font-family: Inter; src: local("Inter"); font-style: normal; font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.45 Inter, "Segoe UI", Arial, sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; color: #475569; background: white; padding: 26px 18px 18px; z-index: 30; border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 28px; }
.brand img { width: 46px; height: 46px; object-fit: contain; flex-shrink: 0; }
.brand strong, .brand span { display: block; }
.brand strong { color: var(--navy); font-size: 16px; letter-spacing: -.3px; }
.brand span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { margin: 18px 12px 6px; color: #94A3B8; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.nav-item { border: 0; border-radius: 9px; padding: 11px 13px; display: flex; align-items: center; gap: 12px; color: #475569; background: transparent; text-align: left; transition: .2s ease; }
.nav-item span { width: 22px; color: #64748B; font-size: 18px; text-align: center; }
.nav-item svg { display: block; width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: var(--navy); background: var(--canvas); }
.nav-item.active { color: var(--blue-2); background: var(--blue-soft); font-weight: 650; }
.nav-item.active span { color: var(--blue); }
.sidebar-foot { margin-top: auto; padding: 15px 11px; display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #F9FAFB; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { color: #334155; font-size: 12px; }
.sidebar-foot small { color: var(--muted); font-size: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #2ed294; box-shadow: 0 0 0 4px rgba(46,210,148,.12); }

.main { min-width: 0; }
.topbar { min-height: 80px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 17px 30px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.page-heading { min-width: 180px; }
.eyebrow, .section-kicker { display: block; color: var(--blue); font-size: 10px; font-weight: 750; letter-spacing: 1.2px; text-transform: uppercase; }
.page-heading h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.15; letter-spacing: -.5px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search-box { width: clamp(160px, 20vw, 300px); height: 42px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; background: var(--canvas); min-width: 0; }
.search-box span { color: #87a0b5; font-size: 20px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #9aa9b7; }
.snapshot-pill { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #d9e7e1; border-radius: 12px; color: #39735f; background: #f1faf6; }
.snapshot-pill span { width: 7px; height: 7px; border-radius: 50%; background: #18af77; }
.snapshot-pill b { font-size: 11px; }
.icon-button { border: 0; background: transparent; }
.menu-toggle { display: none; font-size: 20px; }

.content { padding: 24px 34px 52px; }
.view { display: none; animation: viewIn .28s ease; }
.active-view { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-toolbar { min-height: 54px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-toolbar h2 { margin: 3px 0 0; font-size: 21px; letter-spacing: -.35px; }
.toolbar-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.select-wrap { min-width: 175px; color: #7b8997; font-size: 10px; font-weight: 650; letter-spacing: .6px; text-transform: uppercase; }
.select-wrap select { width: 100%; height: 38px; margin-top: 4px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 9px; color: #34465a; background: white; outline: none; text-transform: none; letter-spacing: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 16px; }
.kpi-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-card { min-height: 128px; position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 12px; padding: 20px; border: 1px solid #e8edf2; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.kpi-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -40px; top: -45px; border-radius: 50%; background: var(--tone, #e9f5fb); opacity: .8; }
.kpi-label { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: .55px; text-transform: uppercase; }
.kpi-value { margin: 9px 0 2px; font-size: 28px; font-weight: 760; letter-spacing: -1px; }
.kpi-sub { color: #8b98a5; font-size: 11px; }
.kpi-icon { position: relative; z-index: 1; width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; color: var(--accent, var(--blue)); background: var(--tone, var(--blue-soft)); font-size: 18px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 16px; }
.panel { min-width: 0; padding: 21px; border: 1px solid #e6ebf0; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-wide { min-height: 330px; }
.panel-heading { min-height: 43px; margin-bottom: 17px; display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.panel-heading span { color: var(--blue); font-size: 9px; font-weight: 750; letter-spacing: 1px; text-transform: uppercase; }
.panel-heading h3 { margin: 2px 0 0; font-size: 16px; letter-spacing: -.2px; }
.panel-heading .panel-note { color: #98a5b1; letter-spacing: 0; text-transform: none; font-weight: 500; }
.panel-badge { padding: 5px 8px; border-radius: 7px; color: #287653 !important; background: #eaf8f1; letter-spacing: 0 !important; text-transform: none !important; }

.funnel-chart { display: flex; flex-direction: column; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 92px minmax(70px, 1fr) 55px 90px; gap: 12px; align-items: center; }
.funnel-label { color: #526274; font-size: 12px; font-weight: 650; text-transform: capitalize; }
.funnel-track { height: 11px; border-radius: 99px; background: #eef2f6; overflow: hidden; }
.funnel-fill { height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #38b4e4); transition: width .5s ease; }
.funnel-count { font-weight: 700; font-size: 12px; text-align: right; }
.funnel-value { color: #7c8a98; font-size: 10px; text-align: right; }
.temperature-layout { min-height: 235px; display: grid; grid-template-columns: 148px 1fr; align-items: center; gap: 15px; }
.donut { width: 142px; height: 142px; display: grid; place-items: center; border-radius: 50%; position: relative; }
.donut::after { content: ""; width: 89px; height: 89px; position: absolute; border-radius: 50%; background: white; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center strong { display: block; font-size: 24px; }
.donut-center span { color: #8593a0; font-size: 10px; }
.legend { display: flex; flex-direction: column; gap: 11px; }
.legend-row { display: grid; grid-template-columns: 9px 1fr auto; gap: 8px; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-row span { color: #5f6f7e; font-size: 11px; text-transform: capitalize; }
.legend-row strong { font-size: 11px; }
.bar-chart { height: 220px; display: flex; align-items: stretch; gap: 8px; padding: 6px 4px 0; border-bottom: 1px solid var(--line); }
.bar-slot { flex: 1; min-width: 15px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar-value { color: #6e7e8e; font-size: 9px; margin-bottom: 5px; }
.bar { width: min(34px, 75%); min-height: 3px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #F87176, #EC3C44); transition: height .5s ease; }
.bar-label { position: absolute; top: calc(100% + 7px); color: #8e9aa5; font-size: 9px; white-space: nowrap; }
.leaderboard { display: flex; flex-direction: column; gap: 5px; }
.leader-row { display: grid; grid-template-columns: 26px 34px 1fr auto; gap: 9px; align-items: center; padding: 8px 5px; border-bottom: 1px solid #f0f3f5; }
.rank { color: #9aa6b1; font-size: 10px; text-align: center; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--blue-2); background: var(--blue-soft); font-size: 11px; font-weight: 800; }
.leader-name strong, .leader-name span { display: block; }
.leader-name strong { font-size: 11px; }
.leader-name span { color: #97a2ad; font-size: 9px; }
.leader-score { text-align: right; }
.leader-score strong, .leader-score span { display: block; }
.leader-score strong { color: #15875d; font-size: 11px; }
.leader-score span { color: #9aa5af; font-size: 9px; }

.summary-strip { display: flex; gap: 28px; padding: 15px 18px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.summary-item span, .summary-item strong { display: block; }
.summary-item span { color: #8997a5; font-size: 9px; text-transform: uppercase; letter-spacing: .7px; }
.summary-item strong { margin-top: 2px; font-size: 16px; }
.kanban-board { min-height: 600px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 14px; }
.kanban-column { padding: 12px; border: 1px solid #e5ebf0; border-radius: 14px; background: #eef3f7; }
.kanban-head { margin: -12px -12px 12px; padding: 14px 13px 11px; border-top: 3px solid var(--stage-color); border-radius: 13px 13px 0 0; background: white; }
.kanban-title { display: flex; justify-content: space-between; align-items: center; }
.kanban-title strong { font-size: 12px; text-transform: capitalize; }
.kanban-title span { min-width: 23px; padding: 3px 6px; border-radius: 8px; color: #617282; background: #eef2f5; font-size: 9px; text-align: center; }
.kanban-total { margin-top: 3px; color: #80909e; font-size: 10px; }
.lead-card { width: 100%; margin-bottom: 9px; padding: 13px; border: 1px solid #e3e9ee; border-radius: 11px; background: white; text-align: left; box-shadow: 0 3px 10px rgba(25,48,72,.035); transition: .18s ease; }
.lead-card:hover { transform: translateY(-2px); border-color: #bcd8e8; box-shadow: 0 7px 18px rgba(25,48,72,.08); }
.card-code { color: #82919f; font-size: 9px; }
.lead-card h4 { margin: 6px 0 2px; overflow: hidden; color: #243648; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lead-card p { margin: 0 0 11px; overflow: hidden; color: #8795a1; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.card-row { display: flex; justify-content: space-between; align-items: center; }
.card-value { font-size: 11px; font-weight: 750; }
.temp-chip, .stage-chip { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 7px; font-size: 9px; font-weight: 700; text-transform: capitalize; }
.temp-hot { color: #b54a38; background: #fff0ed; }
.temp-warm { color: #a26b10; background: #fff6df; }
.temp-cold { color: #30739b; background: #e9f5fb; }
.more-card { width: 100%; padding: 8px; border: 0; color: #4e819e; background: transparent; font-size: 10px; }

.table-panel { padding: 0; overflow: hidden; }
.table-panel > .panel-heading { padding: 20px 20px 0; }
.table-meta { padding: 14px 18px; display: flex; justify-content: space-between; color: #8795a2; border-bottom: 1px solid var(--line); font-size: 10px; }
.table-meta span:first-child { color: #3f5367; font-weight: 700; }
.table-scroll { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 15px; color: #83919f; background: #f8fafb; font-size: 9px; font-weight: 750; letter-spacing: .6px; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 15px; border-top: 1px solid #edf1f4; color: #506174; font-size: 11px; vertical-align: middle; }
tbody tr { cursor: pointer; transition: .15s ease; }
tbody tr:hover { background: #f7fbfd; }
td strong { display: block; color: #26394c; font-size: 11px; }
td small { display: block; max-width: 220px; overflow: hidden; color: #94a0aa; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.numeric { text-align: right; white-space: nowrap; }
.stage-chip { color: var(--chip-color, #3e6d87); background: var(--chip-bg, #ebf3f7); }
.pagination { padding: 13px 17px; display: flex; justify-content: flex-end; align-items: center; gap: 13px; border-top: 1px solid var(--line); }
.pagination button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: #536577; background: white; font-size: 10px; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination span { color: #83909d; font-size: 10px; }

.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); gap: 16px; }
.fx-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fx-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f9fbfc; }
.fx-card span, .fx-card strong, .fx-card small { display: block; }
.fx-card span { color: var(--blue); font-size: 10px; font-weight: 750; }
.fx-card strong { margin-top: 4px; font-size: 18px; }
.fx-card small { color: #8d99a4; font-size: 9px; }
.mini-line-chart { height: 140px; margin-top: 18px; }
.mini-line-chart svg { width: 100%; height: 100%; overflow: visible; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 14px; }
.team-card { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.team-head { display: flex; gap: 12px; align-items: center; }
.team-avatar { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 14px; color: var(--blue-2); background: var(--blue-soft); font-size: 14px; font-weight: 800; }
.team-head h3 { margin: 0; font-size: 14px; }
.team-head p { margin: 2px 0 0; color: #84929f; font-size: 10px; }
.team-stats { margin-top: 17px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.team-stat { padding: 10px 8px; border-radius: 9px; background: #f5f8fa; }
.team-stat strong, .team-stat span { display: block; }
.team-stat strong { font-size: 13px; }
.team-stat span { color: #8a97a4; font-size: 8px; text-transform: uppercase; }
.progress-label { margin-top: 14px; display: flex; justify-content: space-between; color: #7d8b99; font-size: 9px; }
.progress-track { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 99px; background: #edf2f5; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--blue); }
.history-grid { grid-template-columns: minmax(320px, .7fr) minmax(0, 1.3fr); }
.duration-chart { display: flex; flex-direction: column; gap: 13px; }
.duration-row { display: grid; grid-template-columns: 84px 1fr 64px; gap: 11px; align-items: center; }
.duration-row span { color: #627283; font-size: 10px; text-transform: capitalize; }
.duration-row strong { font-size: 10px; text-align: right; }
.duration-track { height: 7px; border-radius: 99px; background: #eef2f5; overflow: hidden; }
.duration-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,#F87176,#EC3C44); }

.read-only-badge { padding: 7px 10px; border-radius: 8px; color: #31775d; background: #eaf8f1; font-size: 10px; }
.data-source-grid { display: grid; grid-template-columns: repeat(4, minmax(180px,1fr)); gap: 12px; }
.source-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.source-card-head { display: flex; justify-content: space-between; gap: 9px; }
.source-card h3 { margin: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.source-card strong { color: var(--blue); font-size: 15px; }
.source-card p { margin: 8px 0 0; color: #8a97a3; font-size: 9px; }
.evidence-panel { margin-top: 16px; display: flex; gap: 15px; align-items: flex-start; background: white; }
.evidence-panel h3 { margin: 0 0 4px; font-size: 13px; }
.evidence-panel p { margin: 0; color: #6e7e8d; font-size: 11px; }
.evidence-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--blue); font-weight: 800; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 89; background: rgba(4,18,32,.33); opacity: 0; pointer-events: none; transition: .25s ease; }
.drawer { position: fixed; top: 0; right: 0; z-index: 90; width: min(470px, 94vw); height: 100vh; overflow-y: auto; padding: 30px; background: white; transform: translateX(105%); transition: .28s ease; box-shadow: -20px 0 50px rgba(5,24,44,.15); }
.drawer.open { transform: none; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-close { position: absolute; top: 18px; right: 20px; width: 34px; height: 34px; border: 0; border-radius: 9px; color: #607181; background: #f1f4f6; font-size: 22px; }
.drawer-eyebrow { color: var(--blue); font-size: 9px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; }
.drawer h2 { margin: 6px 45px 3px 0; font-size: 22px; }
.drawer-company { margin: 0 0 16px; color: #7d8b98; }
.drawer-value { margin: 18px 0; padding: 16px; border-radius: 12px; color: white; background: var(--navy-2); }
.drawer-value span, .drawer-value strong { display: block; }
.drawer-value span { color: #CBD5E1; font-size: 9px; text-transform: uppercase; }
.drawer-value strong { font-size: 24px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.detail { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.detail span, .detail strong { display: block; }
.detail span { color: #8d99a4; font-size: 8px; text-transform: uppercase; }
.detail strong { margin-top: 3px; overflow-wrap: anywhere; font-size: 11px; }
.checklist { margin-top: 21px; }
.checklist h3 { font-size: 13px; }
.check-row { padding: 8px 0; display: flex; gap: 9px; align-items: center; border-bottom: 1px solid #eff2f4; color: #617182; font-size: 10px; }
.check-mark { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: white; background: #d7e0e6; font-size: 10px; }
.check-mark.done { background: var(--green); }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 100; padding: 11px 16px; border-radius: 10px; color: white; background: #16324d; font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.loading-state, .error-state { min-height: calc(100vh - 92px); display: grid; place-items: center; align-content: center; color: #748596; text-align: center; }
.loader { width: 34px; height: 34px; border: 3px solid #dce7ee; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state strong { color: #9a4646; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #EC3C44; outline-offset: 3px; }
.auth-shell { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; background: radial-gradient(ellipse at 0% 0%, #FCEBED, transparent 45%), var(--canvas); }
.auth-brand { display: flex; align-items: center; gap: 15px; margin-bottom: 28px; }
.auth-brand img { object-fit: contain; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { color: var(--navy); font-size: 23px; letter-spacing: -.5px; }
.auth-brand span { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 2px; margin-top: 3px; }
.auth-card { width: 100%; max-width: 460px; padding: 36px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 29px; line-height: 1.2; letter-spacing: -.8px; margin: 10px 0 14px; }
.auth-card p { color: var(--muted); line-height: 1.7; }
.auth-card .auth-note { font-size: 11px; line-height: 1.6; text-align: center; margin: 23px 0 0; }
.auth-loading { display: flex; justify-content: center; padding: 18px; }
.primary-button { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; border: 0; border-radius: 9px; background: var(--blue); color: white; font-weight: 600; padding: 12px 16px; text-decoration: none; margin-top: 12px; }
.primary-button:hover { background: var(--blue-2); }
.microsoft-button { background: #2F2F2F; }
.microsoft-button:hover { background: #1F1F1F; }
.text-button { color: #475569; border: 0; background: transparent; padding: 6px 8px; font-size: 12px; border-radius: 6px; }
.text-button:hover { color: var(--blue-2); background: var(--blue-soft); }
.auth-card>.text-button { display: block; margin: 14px auto 0; }
.auth-footer { color: #94A3B8; font-size: 11px; margin-top: 24px; }
.account-summary { min-width: 72px; max-width: 150px; display: flex; flex-direction: column; align-items: flex-end; }
.account-summary strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #334155; }
.account-summary .text-button { padding: 2px 0 0; }
.recovery-notice { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0 0 22px; padding-left: 11px; border-left: 2px solid #CBD5E1; }
.source-warnings { padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.source-card h3 { white-space: normal; }
.empty { color: var(--muted); margin: auto; text-align: center; }
#leadsView .section-toolbar { align-items: flex-start; }
#leadsView .toolbar-controls { max-width: 800px; }
#leadsView .select-wrap { min-width: 145px; flex: 1 1 145px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 215px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .overview-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2,1fr); }
  .data-source-grid { grid-template-columns: repeat(3,1fr); }
  .topbar { flex-wrap: wrap; }
  .top-actions { flex: 1; justify-content: flex-end; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); width: 250px; transition: .25s ease; box-shadow: 20px 0 40px rgba(0,0,0,.2); }
  .sidebar.open { transform: none; }
  .menu-toggle { display: block; }
  .topbar { height: auto; min-height: 78px; padding: 13px 18px; flex-wrap: wrap; }
  .page-heading { flex: 1; }
  .top-actions { width: 100%; }
  .search-box { flex: 1; width: auto; }
  .content { padding: 20px 16px 40px; }
  .split-grid, .history-grid { grid-template-columns: 1fr; }
  .data-source-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .snapshot-pill { display: none; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-controls { width: 100%; }
  .select-wrap { min-width: 0; flex: 1; }
  .kpi-grid, .kpi-grid.compact, .team-grid, .data-source-grid { grid-template-columns: 1fr; }
  .temperature-layout { grid-template-columns: 1fr; justify-items: center; }
  .funnel-row { grid-template-columns: 70px 1fr 35px; }
  .funnel-value { display: none; }
  .summary-strip { overflow-x: auto; }
  .auth-card { padding: 28px 24px; }
  .account-summary { max-width: 100px; }
  .top-actions { flex-basis: 100%; gap: 10px; }
  .summary-item { flex-shrink: 0; }
}
