/* Original CRM, refined. Glisse glass CSS is MIT; see ../licenses/GLISSE.txt. */
@font-face { font-family: 'DM Sans'; src: url('/glass/assets/dm-sans.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bg: #f7f8fa; --surface: #fff; --surface-soft: #f2f4f7; --surface-hover: #f0f2f6;
  --text: #292c34; --navy: #24262d; --navy-2: #363c48; --navy-3: #475060;
  --muted: #626976; --faint: #727a87; --line: #e4e7ed; --line-2: #cbd1db;
  --blue: #315fbd; --blue-2: #315fbd; --blue-soft: #ecf2ff;
  --orange: #dc662e; --orange-2: #bd4519; --orange-3: #a53c17; --orange-soft: #fff0e7;
  --green: #22734c; --green-soft: #eaf6ee; --hot: #b52d37; --hot-soft: #fff0f0;
  --warm: #926117; --warm-soft: #fff5df; --cold: #386acb; --cold-soft: #eaf1ff;
  --message-alert: #b63235; --message-alert-dark: #9a2427; --message-alert-soft: #fff1ef;
  --gray-soft: #f0f2f6; --focus: #bd4519; --focus-on-dark: #ffb080;
  --radius: 16px; --shadow: 0 2px 5px rgb(25 32 48 / .015), 0 8px 26px rgb(25 32 48 / .035);
  --panel: rgb(255 255 255 / .89); --glass: rgb(255 255 255 / .7); --rim: rgb(255 255 255 / .9);
  --photo-opacity: .065; --warm-glow: rgb(255 155 80 / .16); --cool-glow: rgb(148 175 230 / .08);
  --lg-glass: var(--glass); --lg-edge: rgb(68 77 95 / .1); --lg-drop: rgb(30 40 60 / .035);
  --lg-blur: 24px; --lg-filter: saturate(1.45); --lg-foreground: var(--text);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13161c; --surface: #20242d; --surface-soft: #272c36; --surface-hover: #2d3440;
  --text: #e7ebf2; --navy: #f0f3f8; --navy-2: #dce2ee; --navy-3: #c4cfdf;
  --muted: #a6b0c1; --faint: #9aa6b8; --line: #353d4b; --line-2: #505c6f;
  --blue: #9bbcff; --blue-2: #9bbcff; --blue-soft: #263550;
  --orange: #f79b65; --orange-2: #ed9566; --orange-3: #ffb98f; --orange-soft: #3b2d27;
  --green: #80d7aa; --green-soft: #203b31; --hot: #ff9b9f; --hot-soft: #422a33;
  --warm: #ebc477; --warm-soft: #3c3525; --cold: #9bbcff; --cold-soft: #283650;
  --message-alert: #ed858a; --message-alert-dark: #ffb1b0; --message-alert-soft: #38282c;
  --gray-soft: #2b313c; --focus: #f5aa79; --focus-on-dark: #f5aa79;
  --shadow: 0 2px 6px rgb(0 0 0 / .08), 0 14px 32px rgb(0 0 0 / .08);
  --panel: rgb(32 36 45 / .94); --glass: rgb(32 36 45 / .76); --rim: rgb(255 255 255 / .12);
  --photo-opacity: .07; --warm-glow: rgb(182 79 26 / .12); --cool-glow: rgb(69 91 130 / .08);
  --lg-glass: var(--glass); --lg-edge: rgb(255 255 255 / .13); --lg-drop: rgb(0 0 0 / .1);
}
html { background: var(--bg); scroll-padding-top: 110px; }
body { background: transparent; font-size: 14px; line-height: 1.55; letter-spacing: -.012em; }
::selection { background: var(--orange-soft); color: var(--orange-3); }
.ambient-photo, .ambient-light { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.ambient-photo { background: url('/glass/assets/backdrop.jpg') center / cover no-repeat; opacity: var(--photo-opacity); filter: saturate(.55); }
.ambient-light { background: radial-gradient(ellipse 75% 60% at 92% 0%, var(--warm-glow), transparent 75%), radial-gradient(ellipse 55% 55% at 5% 95%, var(--cool-glow), transparent 80%); }
h1, h2, h3, h4 { letter-spacing: -.035em; font-weight: 650; }
strong, b { font-weight: 650; }
.num, .kpi-value, .stage-tile strong, .stat-strip strong, .member-summary strong, .score-value, .donut-value, .agent-stat strong { font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.app { position: relative; }
.skip-link { color: #fff; background: #303c52; }
.sidebar, .topbar { position: sticky; }
.sidebar { --lg-glass: rgb(26 30 37 / .91); --lg-edge: rgb(255 255 255 / .14); --lg-drop: rgb(0 0 0 / .12); top: 12px; margin: 12px 0 12px 12px; height: calc(100dvh - 24px); border-radius: 21px; padding: 24px 12px 14px; color: #bdc5d2; background-color: var(--lg-glass); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12), 0 8px 28px rgb(26 30 37 / .12); scrollbar-width: thin; }
.sidebar-logo img { width: 164px; }
.sidebar-product { margin-bottom: 21px; color: #9da8bb; font-size: 11px; }
.nav { position: relative; isolation: isolate; gap: 3px; }
.nav-link { position: relative; z-index: 1; min-height: 39px; padding: 9px 12px; border-radius: 12px; color: #c1c9d6; font-size: 12.5px; font-weight: 450; transition: color .18s, background-color .18s; }
.nav-link:hover { color: #fff; background: rgb(255 255 255 / .055); }
.nav-link.active { color: #ffbf94; background: linear-gradient(110deg, rgb(239 137 76 / .19), rgb(255 255 255 / .055)); box-shadow: inset 0 0 0 1px rgb(255 187 135 / .14); font-weight: 650; }
.nav-link.active .nav-icon { color: #ffa56e; }
.nav-link .nav-icon { opacity: .88; }
.nav-lens { position: absolute; z-index: 0; left: 0; top: 0; width: 100%; height: 39px; border-radius: 12px; background: rgb(255 255 255 / .05); box-shadow: inset 0 1px 0 rgb(255 255 255 / .09); pointer-events: none; opacity: 0; }
.nav-badge { border-radius: 6px; background: #39404c; color: #eef1f7; }
.sidebar-user { padding-top: 16px; }
.user-chip, .sidebar-status { border-color: rgb(255 255 255 / .1); }
.user-chip strong { color: #e9edf4; font-weight: 550; }
.user-chip small { color: #a3aec0; }
.sidebar-status { font-size: 10.5px; }
.status-row strong { color: #c6cfdd; }
.sidebar-signout { border-radius: 10px; color: #b5bfce; }
.appearance-panel { margin-top: 12px; border-top: 1px solid rgb(255 255 255 / .1); padding-top: 10px; font-size: 12px; }
.appearance-panel > summary { display: flex; align-items: center; gap: 9px; padding: 8px 12px; cursor: pointer; list-style: none; border-radius: 10px; }
.appearance-panel > summary::-webkit-details-marker { display: none; }
.appearance-panel > summary svg { width: 16px; height: 16px; }
.appearance-panel > summary::after { content: '+'; margin-left: auto; }
.appearance-panel[open] > summary::after { content: '−'; }
.appearance-controls { display: grid; gap: 12px; padding: 10px 12px; }
.appearance-controls label { display: grid; gap: 5px; color: #c8d0dc; }
.appearance-controls select { background: #303641; border-color: #4a5363; color: #eef2f8; font-size: 12px; }
.classic-view-link { color: #ffbf94; font-size: 11px; }
.workspace { padding: 0 0 0 6px; }
.topbar { top: 12px; min-height: 73px; gap: 12px; margin: 12px 24px 0; padding: 14px 20px; border: 1px solid var(--rim); border-radius: 19px; background-color: var(--glass); box-shadow: inset 0 1px 0 var(--rim), 0 4px 20px rgb(25 32 48 / .025); }
.topbar-title { flex: 1 1 auto; }
.topbar-title h1 { font-size: 23px; line-height: 30px; font-weight: 650; letter-spacing: -.045em; overflow: hidden; }
.topbar-title p { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.topbar-tools { flex: 0 0 auto; gap: 10px; margin: 0; }
.topbar-tools .select-inline select { min-width: 133px; background: var(--glass); border-color: var(--line); border-radius: 10px; }
.topbar-theme-button { order: 3; flex: 0 0 auto; }
.topbar-tools .icon-button, .glass-theme-button { width: 36px; height: 36px; border-radius: 50%; }
.updated { color: var(--muted); font-size: 10px; }
.theme-glyph { display: block; width: 17px; height: 17px; border-radius: 50%; box-shadow: inset -5px -3px 0 0 currentColor; transform: rotate(-18deg); }
[data-theme="dark"] .theme-glyph { width: 14px; height: 14px; margin: 2px; border: 1.5px solid currentColor; box-shadow: 0 -7px 0 -5px currentColor, 0 7px 0 -5px currentColor, 7px 0 0 -5px currentColor, -7px 0 0 -5px currentColor; transform: rotate(0); }
.content { padding: 26px 24px 44px; }
.page { gap: 22px; }
.card, .agent-card, .member-profile-header, .member-profile-section, .members-tools, .wa-add-number { border-radius: 16px; border-color: var(--line); background: var(--panel); box-shadow: var(--shadow); }
.card-header { padding: 21px 23px 0; }
.card-header h2 { font-size: 15px; font-weight: 650; }
.card-header p { font-size: 12px; line-height: 1.55; }
.card-body { padding: 20px 23px 23px; }
.button, .icon-button, .suggestion-chip { position: relative; background: var(--glass); border-color: var(--line-2); border-radius: 10px; font-weight: 550; }
.button:hover:not(:disabled), .icon-button:hover { color: var(--text); background: var(--surface-hover); border-color: var(--line-2); }
.button.primary { color: #fff; background: linear-gradient(165deg, #d4642b, #b84015); border-color: #b84015; box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 2px 5px rgb(174 67 20 / .12); }
.button.primary:hover:not(:disabled) { color: #fff; background: #b84015; border-color: #aa3b12; }
.button.primary-outline { color: var(--orange-3); border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); background: var(--surface); }
.button.primary-outline:hover:not(:disabled) { color: var(--orange-3); background: var(--orange-soft); border-color: var(--orange); }
.button.danger, .button.danger:hover { color: var(--hot); background: var(--hot-soft); border-color: var(--hot); }
input:not([type="checkbox"]), select, textarea { background: var(--surface); border-color: var(--line-2); border-radius: 10px; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--faint); }
.search-field input { padding-left: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.switch input:checked + .switch-track { background: #c55322; }
.switch-track { background: #8590a0; }
.kpi-grid { border-radius: 16px; background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }
.kpi { position: relative; padding: 21px 18px; gap: 8px; border-color: var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.kpi-top { align-items: start; }
.kpi-icon { display: inline-grid; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px; color: var(--cold); background: var(--cold-soft); }
.kpi-icon svg { width: 15px; height: 15px; }
.kpi-label { padding-top: 3px; color: var(--muted); font-size: 11.5px; font-weight: 550; }
.kpi-value { font-size: 34px; line-height: 1.12; font-weight: 650; }
.kpi-sub, .kpi-more, .delta { font-size: 11px; }
.kpi-more { color: var(--muted); }
.kpi-link:hover { background: var(--surface-hover); }
.kpi.success .kpi-icon { color: var(--green); background: var(--green-soft); }
.kpi.hot .kpi-icon { color: var(--hot); background: var(--hot-soft); }
.stage-tile { border-radius: 11px; border-left-width: 3px; }
.stage-tile strong { font-size: 30px; font-weight: 600; }
.stage-tile.queue { background: var(--warm-soft); }
.stage-tile.in-progress, .stage-tile.in_progress { background: var(--cold-soft); }
.stage-tile.completed { background: var(--green-soft); }
.stage-tile.problem { background: var(--hot-soft); }
.stage-tile.warning { background: var(--warm-soft); }
.stage-tile.info { background: var(--cold-soft); }
.stage-tile.success { background: var(--green-soft); }
.stage-tile.danger { background: var(--hot-soft); }
.stage-tile.info .stage-tile-top { color: var(--cold); }
.stage-tile.danger .stage-tile-top { color: var(--hot); }
.stage-tile.warning .stage-tile-top { color: var(--warm); }
.stage-tile.success .stage-tile-top { color: var(--green); }
.attention-count { border-radius: 8px; }
.chart .grid { stroke: var(--line); }
.chart .tick { fill: var(--muted); }
.funnel-bar, .leader-bar > span, .dimension-track span { background: linear-gradient(90deg, #476eab, #81a0d0); }
.table th { color: var(--muted); background: var(--surface-soft); font-size: 11.5px; font-weight: 550; }
.table td { border-bottom-color: var(--line); }
.table tr.clickable:hover td, .table tr.clickable:focus-within td { background: var(--surface-hover); }
.lead-link { color: var(--text); font-weight: 650; }
.lead-link:hover { color: var(--orange-3); }
.avatar { color: var(--muted); background: var(--gray-soft); border-radius: 10px; }
.avatar.agent { color: var(--orange-3); background: var(--orange-soft); }
.avatar.hot { color: var(--hot); background: var(--hot-soft); }
.avatar.warm { color: var(--warm); background: var(--warm-soft); }
.avatar.cold { color: var(--cold); background: var(--cold-soft); }
.avatar.ineligible { color: var(--muted); background: var(--gray-soft); }
.pill, .chip, .source-tag, .stage-badge, .quality, .rank-badge { border-radius: 6px; }
.pill.info, .strong-chip { color: var(--cold); background: var(--cold-soft); }
.pill.danger { color: var(--hot); background: var(--hot-soft); }
.pill.neutral { color: var(--muted); background: var(--gray-soft); }
.stage-badge.info { color: var(--cold); background: var(--cold-soft); }
.stage-badge.warning { color: var(--warm); background: var(--warm-soft); }
.stage-badge.danger { color: var(--hot); background: var(--hot-soft); }
.stage-badge.success { color: var(--green); background: var(--green-soft); }
.filter-note.warning { color: var(--warm); background: var(--warm-soft); }
.filter-note.danger { color: var(--hot); background: var(--hot-soft); }
.quality b { background: rgb(128 140 160 / .12); }
.filter-note, .notice.info-notice, .wa-details, .agent-stat, .empty-icon { color: var(--muted); background: var(--surface-soft); }
.tab { color: var(--muted); }
.tab.active { color: var(--orange-3); }
.tab-count { color: var(--muted); background: var(--gray-soft); }
.tab.active .tab-count { color: var(--orange-3); background: var(--orange-soft); }
.quality.hot { color: var(--hot); }
.quality.cold { color: var(--cold); }
.quality.ineligible, .quality.open, .gates li.fail { color: var(--muted); }
.source-tag.meta_lead_ad { color: var(--cold); background: var(--cold-soft); border-color: color-mix(in srgb, var(--cold) 28%, var(--line)); }
.source-tag.meta_click_to_whatsapp { color: var(--green); background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 28%, var(--line)); }
.notice.warning, .member-vault-notice { color: var(--warm); background: var(--warm-soft); }
.notice.danger, .form-error, .issue-list strong, .delta.down, .attention-item.danger .attention-count, .stat-strip .danger strong, .check-row.todo .check-icon, .message-alert-count { color: var(--hot); }
.message-alerts { color: var(--text); background: var(--message-alert-soft); border-color: color-mix(in srgb, var(--message-alert) 40%, var(--line)); border-left-color: var(--message-alert); }
.bubble-tag.brain { color: var(--cold); }
.button.message-filter.active, .button.message-filter:hover { color: var(--hot); background: var(--hot-soft); border-color: var(--hot); }
.button.message-filter:hover .message-count, .button.message-filter.active .message-count { color: #fff; background: #b42318; }
.button.pending-filter.active, .button.pending-filter:hover { color: var(--orange-3); background: var(--orange-soft); border-color: var(--orange); }
.quick-reply { color: var(--green); }
.phone-chat { color: var(--text); background: var(--surface-soft); }
.phone .bubble { color: var(--text); background: var(--surface); }
.phone .bubble-row.out .bubble, .brain-reply { color: var(--text); background: var(--green-soft); }
.template-body { color: var(--text); background: var(--green-soft); }
.assistant-msg.assistant .assistant-author { color: var(--cold); }
.chat-hint { color: var(--warm); background: var(--warm-soft); }
.quick-reply:hover { color: var(--green); background: var(--green-soft); border-color: var(--green); }
.template, .mode-tile, .wa-panel, .qr-box, .member-profile-header, .member-profile-section, .member-account-card, .member-edit-form, .wa-add-number, .members-tools { background: var(--surface); }
.mode-tile:has(input:checked), .option-row:has(input:checked) { background: var(--orange-soft); border-color: var(--orange); }
.member-account-card, .member-info-list > div, .member-account-meta, .member-edit-form, .simple-setup-row, .member-financial-summary { border-color: var(--line); }
.member-context-nav a { color: var(--muted); }
.member-context-nav a.active { color: var(--orange-3); }
.member-source, .member-account-meta small { color: var(--muted); }
.member-profile-heading > .avatar { color: var(--orange-3); background: var(--orange-soft); }
.enrollment-payment-list > li { background: var(--surface-soft); }
.enrollment-stages li.current { color: var(--orange-3); background: var(--orange-soft); border-color: var(--orange); }
.message-alert-link { color: var(--text); background: var(--surface); border-color: var(--line-2); }
.message-alert-link:hover { background: var(--surface-hover); }
.leads-table tr.has-unread.clickable:hover td { background: var(--hot-soft); }
.transcript-card .chat-header, .chat-conversation-bar, .transcript-card .reply-form { border-color: var(--line); background: var(--surface); }
.transcript-card .chat-heading p, .chat-number-tab, .chat-role-note, .chat-reema-switch, .chat-sync, .wa-add-number > summary { color: var(--muted); }
.chat-number-tab.active, .chat-reema-switch[aria-checked="true"] { color: var(--green); }
.chat-number-tab.active { border-color: var(--green); }
.chat-number-tab small { color: var(--muted); background: var(--gray-soft); }
.transcript-card .chat { background: var(--surface-soft); }
.transcript-card .bubble { color: var(--text); background: var(--surface); border-color: var(--line); }
.transcript-card .bubble-row.out .bubble, .transcript-card .bubble-row.out.human .bubble { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 20%, var(--line)); }
.transcript-card .bubble p { color: var(--text); }
.transcript-card .bubble-author { color: var(--green); }
.transcript-card .bubble small, .transcript-card .bubble-tag { color: var(--muted); }
.transcript-card .reply-compose textarea { background: var(--surface-soft); border-color: var(--line-2); }
.assistant-window, .sim-chat { background: var(--surface-soft); }
.assistant-msg { color: var(--text); background: var(--surface); border-color: var(--line); }
.assistant-msg.user { color: #fff; background: #3b4f70; }
.dialog { color: var(--text); border: 1px solid var(--rim); border-radius: 22px; background: var(--panel); backdrop-filter: blur(28px) saturate(1.35); box-shadow: inset 0 1px 0 var(--rim), 0 32px 100px rgb(0 0 0 / .24); }
.dialog::backdrop { background: rgb(14 18 27 / .4); backdrop-filter: blur(5px); }
.dialog-form { padding: 26px; }
.toast { border: 1px solid rgb(255 255 255 / .15); border-radius: 14px; background: #2b313d; backdrop-filter: blur(20px); }
.setup-banner { border-radius: 12px; background: var(--warm-soft); border-color: var(--warm); color: var(--warm); }
.login-screen { background: transparent; }
.login-brand { background: linear-gradient(155deg, rgb(26 32 43 / .95), rgb(41 35 32 / .96)); }
.login-panel { position: relative; background: transparent; }
.login-card { padding: 38px; border: 1px solid var(--rim); border-radius: 24px; background: var(--glass); backdrop-filter: blur(30px); box-shadow: var(--shadow); }
.login-card h2 { font-size: 28px; font-weight: 650; }
.login-theme-button { position: absolute; right: 24px; top: 24px; }
.glass-character { display: inline-block; }
.glass-press { --lg-x: 50%; --lg-y: 50%; }
.glass-press::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(130px circle at var(--lg-x) var(--lg-y), rgb(255 255 255 / .2), transparent 85%); opacity: 0; transition: opacity .18s; }
.glass-press:hover::after { opacity: 1; }
[data-theme="dark"] .rank-badge.rank-1, [data-theme="dark"] .badge-chip { color: var(--warm); background: var(--warm-soft); }
[data-theme="dark"] .rank-badge.rank-2 { color: var(--text); background: var(--gray-soft); }
[data-theme="dark"] .rank-badge.rank-3 { color: var(--orange-3); background: var(--orange-soft); }
[data-theme="dark"] .podium-place, [data-theme="dark"] .standing-card { background: var(--surface-soft); border-color: var(--line); }
[data-theme="dark"] .podium-place.place-1 { background: var(--warm-soft); border-color: var(--warm); }
@media (min-width: 1025px) { .app { grid-template-columns: 240px minmax(0, 1fr); } }
@media (max-width: 1360px) { .topbar-tools .updated { display: none; } }
@media (max-width: 1024px) {
  .sidebar { position: fixed; }
  .workspace { padding-left: 0; }
  .sidebar { inset: 10px auto 10px 10px; top: 10px; margin: 0; width: 260px; height: calc(100dvh - 20px); transform: translateX(calc(-100% - 15px)); }
  body.menu-open .sidebar { transform: none; }
  .topbar { margin-inline: 18px; }
  .content { padding-inline: 18px; }
}
@media (max-width: 760px) {
  .topbar { top: 8px; gap: 10px; margin: 8px 10px 0; padding: 12px; border-radius: 17px; }
  .topbar-title { flex: 1 1 0; }
  .topbar-title h1 { font-size: 21px; }
  .topbar-theme-button { order: 0; }
  .topbar-tools { flex: 1 0 100%; width: 100%; justify-content: space-between; gap: 10px; }
  .topbar-tools .select-inline select { min-width: 0; width: 100%; }
  .topbar-tools .switch { flex: 0 0 auto; }
  .content { padding: 18px 12px 36px; }
  .page, .grid-2, .grid-3, .stack { gap: 16px; }
  .card, .agent-card, .kpi-grid { border-radius: 14px; }
  .card-header { padding: 18px 18px 0; }
  .card-body { padding: 16px 18px 18px; }
  .kpi { padding: 16px 14px; }
  .kpi-value { font-size: 29px; }
  .kpi-icon { width: 25px; height: 25px; flex-basis: 25px; }
  .kpi-label { font-size: 11px; }
  .kpi-top { gap: 5px; }
  .kpi-sub { line-height: 1.5; }
  .leads-card .table-scroll, .members-card .table-scroll { margin-inline: -18px; }
  .leads-table tr { border-color: var(--line); padding-inline: 18px; }
  .dialog-form { padding: 21px; }
  .login-card { padding: 27px; }
}
@supports not (backdrop-filter: blur(1px)) {
  .topbar, .card, .dialog, .login-card { background: var(--surface); }
  .sidebar { background: #20252e; }
}
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }

/* Leads: retain the desktop ledger, give phones readable records and short controls. */
.lead-mobile-heading { display: none; }
.lead-filter-panel, .lead-filter-fields, .lead-quick-actions { display: contents; }
.lead-filter-panel > summary { display: none; }
.lead-action-short { display: none; }
@media (min-width: 1025px) {
  .leads-page .toolbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .leads-page .toolbar > .search-field { grid-column: 1 / -1; }
  .lead-filter-panel { display: block; grid-column: 1 / -1; }
  .lead-filter-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .lead-filter-fields > *, .lead-filter-fields select { min-width: 0; width: 100%; }
  .lead-filter-fields .button { justify-content: center; }
  .lead-quick-actions { display: flex; grid-column: 1 / 4; flex-wrap: wrap; gap: 8px; }
  .leads-page .desktop-add-lead { justify-self: end; }
}
@media (max-width: 1024px) {
  .leads-page { font-size: 15px; line-height: 1.5; letter-spacing: 0; font-optical-sizing: auto; }
  .leads-page > .message-alerts { display: none; }
  .leads-page .leads-card { border: 0; border-radius: 0; background: none; box-shadow: none; }
  .leads-page .leads-card > .card-body { gap: 14px; padding: 0; }
  .lead-mobile-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 2px; }
  .lead-mobile-heading h2 { font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -.015em; }
  .lead-mobile-heading .button { min-height: 44px; padding-inline: 16px; font-size: 15px; }
  .leads-page .desktop-add-lead { display: none; }
  .lead-action-short { display: inline; }
  .lead-action-full { display: none; }
  .leads-page .tabs { gap: 7px; padding-bottom: 3px; border: 0; scrollbar-width: none; }
  .leads-page .tabs::-webkit-scrollbar { display: none; }
  .leads-page .tab { flex: 0 0 auto; gap: 7px; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 20px; font-weight: 550; }
  .leads-page .tab.active { color: var(--orange-3); background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
  .leads-page .tab-count { padding: 1px 5px; min-width: 20px; font-size: 12px; }
  .leads-page .toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
  .leads-page .toolbar > .search-field { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; }
  .leads-page input:not([type="checkbox"]), .leads-page select { min-height: 46px; padding-block: 10px; font-size: 16px; font-weight: 450; line-height: 24px; letter-spacing: 0; }
  .leads-page .search-field input { padding-left: 39px; padding-right: 10px; border-color: var(--line-2); background: var(--surface); }
  .leads-page .search-field > svg { width: 18px; height: 18px; left: 13px; }
  .lead-filter-panel > summary { display: flex; grid-column: 2; grid-row: 1; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 550; cursor: pointer; list-style: none; }
  .lead-filter-panel > summary::-webkit-details-marker { display: none; }
  .lead-filter-panel[open] > summary { color: var(--orange-3); background: var(--orange-soft); border-color: var(--orange); }
  .filter-count { display: grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 4px; border-radius: 6px; color: var(--orange-3); background: var(--orange-soft); font-size: 12px; }
  .lead-filter-fields { display: grid; grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
  .lead-filter-fields > * { min-width: 0; }
  .lead-filter-fields select { width: 100%; min-width: 0; }
  .lead-filter-fields .select-field > .sr-only { position: static; display: block; width: auto; height: auto; margin: 0 0 5px; clip: auto; clip-path: none; overflow: visible; white-space: normal; color: var(--muted); font-size: 13px; font-weight: 550; }
  .lead-filter-fields .button { justify-content: start; min-height: 44px; font-size: 14px; text-align: left; }
  .lead-quick-actions { display: flex; grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; gap: 8px; }
  .lead-quick-actions .button { min-height: 44px; padding-inline: 11px; font-size: 13px; line-height: 20px; }
  .lead-quick-actions .button > svg { width: 16px; height: 16px; }
  .leads-page .filter-note { gap: 6px; margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
  .leads-page .leads-card .table-scroll { margin: 0; overflow: visible; }
  .leads-page .leads-table { display: block; width: 100%; min-width: 0; }
  .leads-page .leads-table thead { display: none; }
  .leads-page .leads-table tbody { display: grid; gap: 8px; }
  .leads-page .leads-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--panel); box-shadow: none; }
  .leads-page .leads-table tr.has-unread { border-left: 3px solid var(--message-alert); background: var(--panel); }
  .leads-page .leads-table tr:last-child { border-bottom: 1px solid var(--line); }
  .leads-page .leads-table td, .leads-page .leads-table td:nth-child(odd):not(:first-child), .leads-page .leads-table td:nth-child(even) { min-width: 0; width: auto; padding: 0; border: 0; justify-self: stretch; text-align: left; color: var(--text); background: none; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
  .leads-page .leads-table .lead-identity-cell { grid-column: 1 / -1; box-shadow: none; }
  .leads-page .person { align-items: start; gap: 9px; }
  .leads-page .person .avatar { flex: 0 0 32px; width: 32px; height: 32px; font-size: 13px; }
  .leads-page .person > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 6px; flex: 1; min-width: 0; }
  .leads-page .lead-link { display: inline-flex; grid-column: 1; align-items: center; min-height: 24px; max-width: 100%; padding: 0; color: var(--text); font-size: 17px; line-height: 1.35; font-weight: 650; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }
  .leads-page .phone-line { grid-column: 1 / -1; flex-wrap: wrap; gap: 0 6px; }
  .leads-page .person small, .leads-page .hidden-contact { color: var(--muted); font-size: 14px; line-height: 1.5; }
  .leads-page .person .phone-line > small { font-size: 15px; }
  .leads-page .leads-table tr.has-unread > td:first-child { box-shadow: none; }
  .leads-page .copy-button { width: 44px; height: 44px; min-width: 44px; margin: 0; }
  .leads-page .unread-message-badge { grid-column: 2; grid-row: 1; justify-self: end; width: fit-content; max-width: 100px; margin: 0; padding: 1px 5px; font-size: 11px; line-height: 18px; }
  .leads-page .lead-quality-cell { grid-column: 1; }
  .leads-page .stage-cell { display: flex; grid-column: 2; flex-wrap: wrap; align-items: center; justify-content: end; gap: 3px; }
  .leads-page .stage-cell > .stage-badge { display: none; }
  .leads-page .lead-quality-cell:has(.quality.open) { display: none; }
  .leads-page .leads-table tr:has(.quality.open) .stage-cell { grid-column: 1 / -1; justify-content: start; }
  .leads-page .pill, .leads-page .quality, .leads-page .stage-badge { max-width: 100%; font-size: 12.5px; line-height: 19px; white-space: normal; }
  .leads-page .quality { padding: 2px 6px; }
  .leads-page .quality b { font-size: 12px; }
  .leads-page .stage-badge { padding: 4px 7px; }
  .leads-page .status-line { margin: 0; }
  .leads-page .stage-cell .follow-due { margin: 0; font-size: 13px; }
  .leads-page .leads-table .lead-source-cell, .leads-page .leads-table .lead-agent-cell { display: none; }
  .leads-page .source-tag { padding: 2px 7px; font-size: 12px; line-height: 20px; }
  .leads-page .channel-id { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
  .leads-page td[data-label]::before { display: none; }
  .leads-page .leads-table .lead-city-cell { grid-column: 1; color: var(--muted); font-size: 13px; }
  .leads-page .leads-table .received-cell { grid-column: 2; display: block; padding: 0; border: 0; white-space: normal; text-align: right; }
  .leads-page .received-cell > span { display: none; }
  .leads-page .received-cell span, .leads-page .received-cell small { color: var(--muted); font-size: 12.5px; }
  .leads-page .pager { gap: 12px; padding: 4px 2px; font-size: 14px; }
  .leads-page .pager-buttons { width: 100%; justify-content: space-between; }
  .leads-page .pager-buttons .button { width: 44px; min-height: 44px; }
}
@media (min-width: 650px) and (max-width: 1024px) {
  .leads-page .leads-table tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 350px) {
  .leads-page .lead-filter-fields { grid-template-columns: minmax(0, 1fr); }
  .leads-page .lead-quick-actions { gap: 7px; }
  .leads-page .lead-quick-actions .button { padding-inline: 9px; font-size: 12.5px; }
  .leads-page .leads-table .received-cell { grid-template-columns: minmax(0, 1fr); }
}
