/* Monitor Operacional: shared visual language for the operational workspace. */
:root {
  --bg: #f3f7fc;
  --surface: #fff;
  --surface-soft: #f8fbff;
  --text: #07111f;
  --muted: #51627a;
  --line: #d8e3f1;
  --green: #061121;
  --green-light: #eef5ff;
  --brand-black: #061121;
  --brand-white: #fff;
  --primary: #0b5cff;
  --primary-soft: #eaf2ff;
  --cyan: #19a7b8;
  --success: #22a66a;
  --warning: #dc8a19;
  --danger: #d94a5d;
  --nav-bg: #050b18;
  --nav-hover: #101b2d;
  --radius: 16px;
}
html { overflow-x: hidden; }
body { min-width: 0; overflow-x: hidden; font-family: "Aptos", "Inter", "Roboto", "Segoe UI", Arial, sans-serif; font-size: 15px; color: var(--text); background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 46%, #f6f9fd 100%); }
h1, h2, h3, .brand { font-family: "Aptos Display", "Aptos", "Inter", "Segoe UI", Arial, sans-serif; }
h1 { font-size: 34px; font-weight: 760; letter-spacing: 0; }
h2 { font-size: 19px; font-weight: 720; letter-spacing: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline-color: var(--primary); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; background: linear-gradient(180deg, #07111f 0%, #050b18 54%, #030712 100%); color: var(--brand-white); border: 0; width: 240px; max-height: 100vh; padding: 24px 18px 26px; box-shadow: inset -1px 0 #ffffff08; transition: width .22s ease, padding .22s ease; }
.sidebar-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 28px; }
.brand { display: flex; flex: 1; min-width: 0; gap: 13px; letter-spacing: 0; align-items: flex-start; flex-direction: column; padding: 0 0 0 10px; }
.brand-logo { width: 124px; max-width: 100%; height: auto; display: block; border-radius: 8px; filter: drop-shadow(0 10px 18px #00000040); }
.brand-copy { color: #fff; display: block; max-width: 150px; padding-left: 1px; font-size: 24px; font-weight: 820; line-height: .98; letter-spacing: 0; }
.brand small { color: #b9c8dc; font-size: 10.5px; letter-spacing: .02em; margin-top: 1px; font-weight: 700; }
.sidebar-toggle { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #ffffff1f; border-radius: 9px; color: #dce7f6; background: #ffffff0d; cursor: pointer; flex-shrink: 0; transition: background .18s ease, color .18s ease, transform .22s ease; }
.sidebar-toggle:hover { background: #ffffff18; color: #fff; }
.sidebar-toggle .icon { width: 18px; height: 18px; }
.brand-symbol { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #2c64e7; color: white; flex-shrink: 0; }
.brand-symbol .icon { width: 26px; height: 26px; }
.nav-caption { color: #9db0ca; font-size: 10.5px; margin: 26px 10px 10px; }
.sidebar nav { display: grid; align-content: start; gap: 5px; min-height: 0; overflow-y: auto; padding-bottom: 16px; scrollbar-width: thin; scrollbar-color: #ffffff26 transparent; }
.nav-link { display: flex; align-items: center; gap: 12px; color: #dce7f6; font-size: 14px; padding: 13px 12px; border-radius: 10px; min-height: 46px; }
.nav-link:hover { background: var(--nav-hover); color: #fff; }
.nav-link.active { background: #fff; color: #07111f; box-shadow: inset 4px 0 var(--primary), 0 12px 28px #00000026; font-weight: 800; }
.nav-link .icon { width: 19px; height: 19px; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar-bottom { position: relative; margin-top: auto; padding: 16px 4px 0; flex-shrink: 0; }
.readonly { display: flex; align-items: center; gap: 6px; color: #6ee7b7; font-size: 11.5px; font-weight: 800; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3c9471; flex-shrink: 0; }
.sidebar-bottom > small, .user-block small { color: #aebdd1; font-size: 10.5px; }
.sidebar-bottom > small { display: block; margin-top: 6px; line-height: 1.35; }
.profile-menu { position: relative; margin-top: 24px; padding-top: 18px; border-top: 1px solid #ffffff12; }
.profile-menu summary { list-style: none; }
.profile-menu summary::-webkit-details-marker { display: none; }
.user-block { display: grid; grid-template-columns: 38px minmax(0, 1fr) 14px; align-items: center; border: 1px solid transparent; border-radius: 12px; margin: 0; padding: 9px 6px; gap: 8px; cursor: pointer; }
.user-block:hover, .profile-menu[open] .user-block { background: #ffffff0d; border-color: #ffffff14; }
.user-block strong { color: #fff; font-size: 13px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-block small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-block .user-email { color: #8798b2; }
.user-copy { display: grid; min-width: 0; gap: 1px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 800; font-size: 12px; line-height: 1; box-shadow: inset 0 0 0 1px #ffffff24; }
.user-block > .icon { width: 14px; height: 14px; color: #8ea2bd; transition: transform .15s ease; }
.profile-menu[open] .user-block > .icon { transform: rotate(35deg); color: #dce7f6; }
.profile-menu-panel { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 20; display: grid; gap: 4px; padding: 6px; border: 1px solid #ffffff16; border-radius: 12px; background: #07111f; box-shadow: 0 18px 40px #00000050; }
.profile-menu-link { display: flex; align-items: center; gap: 8px; min-height: 36px; width: 100%; padding: 8px 9px; border: 0; border-radius: 8px; background: transparent; color: #dce7f6; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; }
.profile-menu-link .icon { width: 15px; height: 15px; color: #9eb2ce; }
.profile-menu-link:hover, .profile-menu-link.active { background: #ffffff10; color: #fff; }
.profile-menu .button_to { margin: 0; }
.logout { font-family: inherit; }
.workspace { width: calc(100vw - 240px); max-width: calc(100vw - 240px); min-width: 0; margin-left: 240px; overflow-x: hidden; transition: width .22s ease, max-width .22s ease, margin-left .22s ease; }
.sidebar-collapsed .sidebar { width: 78px; padding-inline: 12px; }
.sidebar-collapsed .workspace { width: calc(100vw - 78px); max-width: calc(100vw - 78px); margin-left: 78px; }
.sidebar-collapsed .sidebar-head { justify-content: center; }
.sidebar-collapsed .brand { display: none; }
.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }
.sidebar-collapsed .nav-caption, .sidebar-collapsed .nav-label, .sidebar-collapsed .sidebar-bottom small, .sidebar-collapsed .user-copy, .sidebar-collapsed .user-block > .icon, .sidebar-collapsed .profile-menu-panel, .sidebar-collapsed .readonly { display: none; }
.sidebar-collapsed .nav-link { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .nav-link.active { box-shadow: inset 0 -4px var(--primary), 0 12px 28px #00000026; }
.sidebar-collapsed .sidebar-bottom { padding: 0; }
.sidebar-collapsed .profile-menu { border-top: 0; padding-top: 0; }
.sidebar-collapsed .user-block { display: flex; justify-content: center; padding: 0; border: 0; }
.sidebar-collapsed .avatar { width: 38px; height: 38px; border-radius: 11px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 36px; font-size: 13px; color: var(--muted); height: 62px; background: #fbfdffcc; border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.slash { margin: 0 12px; color: #bdc3c9; }
main#main-content { width: 100%; min-width: 0; padding: 30px 32px 24px; max-width: 1760px; margin: 0 auto; }
.page-heading, .tabs, .filters, .collection-health, .panel, #dashboard-widgets { min-width: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.page-heading .muted { font-size: 14px; color: #536780; }
.eyebrow { font-size: 11px; color: var(--primary); letter-spacing: 0; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { font-size: 14px; color: #536780; padding: 0 0 13px; border-bottom: 2px solid transparent; }
.tab.selected { color: #07111f; border-color: #07111f; font-weight: 750; }
.filters { display: grid; grid-template-columns: minmax(128px, .48fr) minmax(128px, .48fr) minmax(250px, 1.28fr) repeat(4, minmax(130px, .62fr)) minmax(96px, auto); align-items: end; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; gap: 12px; box-shadow: 0 12px 32px #14376508; }
.filters label { font-size: 12px; font-weight: 700; color: #334761; line-height: 1.2; }
.filters input, .filters select { font-size: 13px; min-height: 38px; border-color: #cfdcee; color: #07111f; background-color: #fbfdff; }
.filter-field { min-width: 0; }
.filters .filter-search { min-width: 0; }
.filters > .filter-period { grid-column: 1 / -1; min-width: 0; display: flex; align-items: flex-end; padding-bottom: 2px; }
.filter-group-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #334761; line-height: 1.2; }
.filters .date-shortcut-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters .date-shortcut { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 13px; border: 1px solid #cfdcee; border-radius: 8px; background: #fbfdff; color: #334761; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none; box-shadow: 0 1px 0 #14376508; }
.filters .date-shortcut:hover { background: var(--primary-soft); border-color: #9fb9ea; }
.filters .date-shortcut.selected { color: #fff; background: var(--brand-black); border-color: var(--brand-black); }
.filter-submit .button { width: 100%; min-width: 86px; }
.filter-summary { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; color: #5b6e87; font-size: 12px; }
.filter-summary strong { color: #334761; }
.filters input:focus, .filters select:focus { border-color: #9dbdf5; box-shadow: 0 0 0 3px #0b5cff14; outline: none; }
.audit-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.audit-summary-card { display: grid; gap: 5px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 12px 32px #14376508; }
.audit-summary-card span { color: #52647e; font-size: 12px; font-weight: 700; }
.audit-summary-card strong { color: #07111f; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.audit-summary-card small { color: #718097; font-size: 11px; }
.audit-summary-card .audit-user-highlight { overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.audit-panel { margin-bottom: 18px; }
.activity-table, .recent-session-table { min-width: 980px; }
.activity-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.audit-user-agent { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 16px; border: 1px solid #ccd9eb; border-radius: 8px; background: #fff; color: #07111f; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.button:hover { background: var(--primary-soft); border-color: #9fb9ea; }
.button.primary { background: var(--brand-black); border-color: var(--brand-black); color: #fff; }
.button.primary:hover { background: #101b2d; }
.button.small { font-size: 12px; min-height: 36px; }
.button.tiny { font-size: 11px; min-height: 32px; }
.button:disabled { cursor: wait; opacity: .6; }
.refresh-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; max-width: 440px; }
.live-label { font-size: 12px; color: #08704c; background: #ecfbf5; border-color: #cceedd; white-space: nowrap; }
.refresh-error { font-size: 12px; color: #9b4e15; text-align: right; }
[hidden] { display: none !important; }
.collection-health { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 13px 16px; border: 1px solid #d9e5f3; border-radius: 10px; background: #fff; font-size: 12px; color: #5b6e87; margin-bottom: 24px; box-shadow: 0 10px 28px #14376508; }
.health-title { display: flex; align-items: center; gap: 8px; color: #08704c; }
.collection-health.attention { background: #fff9ed; border-color: #f2d49b; }
.collection-health.attention .health-title { color: #8a5a0c; }
.collection-health.attention .dot { background: #d28a13; }
.collection-health small { flex-basis: 100%; font-size: 12px; }
.collection-health .text-link { margin-left: auto; }
.collection-overview { overflow: hidden; }
.collection-overview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 22px 16px; }
.collection-overview-heading h2 { margin-top: 3px; font-size: 22px; }
.collection-overview-heading p:not(.eyebrow) { margin-top: 7px; color: #60728d; font-size: 13px; }
.collection-overview-heading p strong { color: #263d5d; }
.collection-live-time { flex-shrink: 0; padding: 7px 10px; border: 1px solid #d9e5f3; border-radius: 999px; background: #f7faff; color: #60728d; font-size: 11px; }
.collection-window { font-variant-numeric: tabular-nums; }
.collection-progress-track { height: 10px; margin: 0 22px; overflow: hidden; border-radius: 999px; background: #e7edf5; }
.collection-progress-track span { display: block; height: 100%; min-width: 0; border-radius: inherit; background: linear-gradient(90deg, #1769e0, #24aa77); transition: width .4s ease; }
.collection-progress-caption { display: flex; align-items: center; gap: 8px; padding: 7px 22px 0; color: #718097; font-size: 11px; }
.collection-progress-caption strong { color: #1f3f69; font-size: 13px; }
.collection-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 16px 22px 22px; }
.collection-summary-item { display: flex; align-items: baseline; gap: 8px; padding: 13px 14px; border: 1px solid #dde7f2; border-radius: 9px; background: #f9fbfe; color: #60728d; }
.collection-summary-item strong { color: #203a60; font-size: 22px; font-variant-numeric: tabular-nums; }
.collection-summary-item span { font-size: 12px; }
.collection-summary-item.complete { background: #effaf5; border-color: #caebdc; }
.collection-summary-item.complete strong { color: #08704c; }
.collection-summary-item.working { background: #eef5ff; border-color: #d1e1fa; }
.collection-summary-item.working strong { color: #1769e0; }
.collection-summary-item.failed { background: #fff3f4; border-color: #f1d0d5; }
.collection-summary-item.failed strong { color: #b43c4e; }
.collection-source-table td { white-space: normal; min-width: 130px; }
.collection-source-table td:first-child { min-width: 190px; }
.collection-source-table td:nth-child(2) { min-width: 220px; }
.collection-source-table td small { display: block; margin-top: 5px; line-height: 1.35; }
.collection-source-row.working { background: #f8fbff; }
.collection-source-row.failed { background: #fffafb; }
.collection-overview.complete .collection-progress-track span { background: #24aa77; }
.section-label { display: flex; align-items: center; justify-content: space-between; margin: 0 0 13px; }
.journey-panel { padding: 14px; display: flex; flex-direction: column; margin-bottom: 18px; }
.journey-panel .section-label { margin-bottom: 10px; }
.journey-panel .footnote { margin: 10px 0 0; }
.section-label h2 { font-size: 17px; }
.section-label > span { font-size: 12px; }
.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.journey-panel .metrics-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; padding-block: 1px; }
.journey-panel .metric-card.featured { grid-column: auto; }
.metric-equations { display: flex; flex-wrap: wrap; gap: 5px 12px; margin: -2px 0 8px; color: #536780; font-size: 10px; line-height: 1.3; }
.metric-equations span { padding: 3px 7px; border: 1px solid #dce6f2; border-radius: 999px; background: #f7faff; }
.metric-equations strong { color: #24476f; }
.metric-equations .metric-equation-alert { border-color: #f0d8aa; background: #fffbf2; color: #805a19; }
.metric-equations .metric-equation-alert strong { color: #805a19; }
.metric-origin-part::after, .metric-journey-part::after, .metric-crosscut::after { position: absolute; top: 5px; right: 6px; padding: 2px 4px; border-radius: 4px; background: #eef5ff; color: #4c6687; font-size: 7px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.metric-origin-part::after { content: "Σ online"; }
.metric-journey-part::after { content: "Σ interagiram"; }
.metric-crosscut::after { content: "não somar"; background: #fff4dc; color: #8b5b0c; }
.metric-origin-part .metric-top, .metric-journey-part .metric-top, .metric-crosscut .metric-top { padding-right: 54px; }
.metric-card { --metric-accent: #6298e9; position: relative; isolation: isolate; overflow: hidden; min-height: 116px; padding: 9px 9px 0; border: 1px solid color-mix(in srgb, var(--metric-accent) 34%, #dce6f3); border-top: 2px solid var(--metric-accent); background: #fff; box-shadow: 0 6px 16px #163b660d; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.metric-card:hover, .metric-card:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--metric-accent) 58%, #b7c8de); box-shadow: 0 10px 24px #163b6618; }
.metric-content { position: relative; z-index: 2; }
.metric-card.featured { --metric-accent: #78a7ff; background: linear-gradient(150deg, #07111f 0%, #101b2d 62%, #152844 100%); border-color: #07111f; color: #fff; }
.journey-panel .metric-card.featured .metric-content { display: block; }
.journey-panel .metric-card.featured .metric-number,
.journey-panel .metric-card.featured .metric-unit { text-align: left; }
#metric-interacting { --metric-accent: #22a66a; background: #e3f6eb; }
#metric-negative_response { --metric-accent: #d94a5d; background: #fde7ec; }
#metric-situation_pending { --metric-accent: #dc9c24; background: #fff1cd; }
#metric-ai { --metric-accent: #8b6df1; background: #eee7ff; }
#metric-inactivity { --metric-accent: #d17a22; background: #fff0df; }
#metric-ai_closed { --metric-accent: #527b8d; background: #e7f1f4; }
#metric-receptive { --metric-accent: #188792; background: #e7f7f8; }
#metric-activated { --metric-accent: #3978d6; background: #e8f0fe; }
#metric-waiting { --metric-accent: #f0a044; background: #fff1dc; }
#metric-open_now { --metric-accent: #3d7df0; background: #e5efff; }
#metric-closed { --metric-accent: #2b9aa3; background: #e1f3f4; }
.metric-top { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 6px; font-size: 10.5px; font-weight: 760; min-height: 28px; line-height: 1.2; }
.metric-top > span:not(.metric-icon) { min-width: 0; }
.metric-top > .icon { opacity: .75; width: 16px; height: 16px; }
.metric-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--metric-accent); background: color-mix(in srgb, var(--metric-accent) 12%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--metric-accent) 34%, transparent); }
.metric-icon .icon { width: 13px; height: 13px; }
.featured .metric-icon { color: #fff; background: #ffffff1c; box-shadow: inset 0 0 0 1px #ffffff30; }
.metric-number { display: block; margin-top: 2px; font-size: 27px; font-weight: 780; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.metric-unit { font-size: 10px; color: #65768f; }
.featured .metric-unit, .featured .metric-bottom { color: #dce8ff; }
.metric-bottom { display: flex; align-items: flex-start; gap: 5px; font-size: 9px; line-height: 1.3; min-height: 42px; margin-top: 7px; padding: 7px 0 8px; border-top: 1px solid color-mix(in srgb, var(--metric-accent) 34%, #dce6f3); color: #536780; }
.metric-card:not(.featured) .metric-bottom { border-top-color: inherit; }
.featured .metric-bottom { border-top-color: #ffffff60; }
.step-index { flex-shrink: 0; font-size: 9px; line-height: inherit; font-weight: 750; }
.footnote { font-size: 12px; color: #5b6e87; margin-bottom: 26px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid #d9e5f3; border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; box-shadow: 0 14px 34px #1437650b; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 18px; }
.panel-heading p { font-size: 13px; }
.panel-note { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 10px 23px; border-top: 1px solid #edf2f8; font-size: 12px; line-height: 1.35; color: #65758d; background: #f8fbff; overflow-wrap: anywhere; }
.panel-note .icon { width: 15px; height: 15px; flex-shrink: 0; color: #6e829e; }
.queue-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 23px 20px; }
.queue-card { display: grid; grid-template-columns: 8px 1fr; gap: 5px 7px; align-items: center; padding: 18px; border: 1px solid #efe9dc; border-radius: 9px; background: #fffcf6; }
.queue-card > span:not(.dot) { font-size: 13px; font-weight: 650; }
.queue-card strong { grid-column: 1 / -1; font-size: 36px; font-variant-numeric: tabular-nums; }
.queue-card small { grid-column: 1 / -1; font-size: 12px; }
.queue-card.open_now { background: #f0f6ff; border-color: #d8e6fb; }
.queue-card.open_now > span:not(.dot) { color: #365d99; }
.activation-rows { padding: 0 23px 15px; }
.activation-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; padding-block: 13px; border-bottom: 1px solid #f0f2f4; }
.activation-row:last-child { border-bottom: 0; }
.activation-row strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.activation-row small { font-size: 12px; }
.text-link { font-size: 13px; }
.badge { padding: 4px 9px; font-size: 12px; font-weight: 700; border-radius: 6px; }
.badge.open, .badge.assigned { background: #eaf2ff; color: #225ba9; }
.badge.success { background: #e7f6ee; color: #236d4b; }
.badge.waiting, .badge.warning, .badge.partial { background: #fff2d4; color: #8b5908; }
.badge.failed, .badge.critical, .badge.loss { background: #ffe9ec; color: #ac3042; }
.badge.closed { background: #eaf0f7; color: #455c78; }
.alert-item { display: flex; align-items: flex-start; gap: 14px; padding: 17px 23px; border-top: 1px solid #eef1f3; }
.alert-symbol { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #fff6e8; color: #c08b32; flex-shrink: 0; }
.alert-symbol.critical { background: #fff0f0; color: var(--danger); }
.alert-symbol .icon { width: 16px; }
.alert-copy { flex: 1; min-width: 0; }
.alert-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.alert-title strong { font-size: 14px; }
.alert-copy p { font-size: 13px; }
details { font-size: 13px; }
summary { cursor: pointer; }
.table-scroll, .table-wrap { overflow-x: auto; border-top: 1px solid #edf2f8; }
table { border-collapse: collapse; width: 100%; text-align: left; white-space: nowrap; }
th { padding: 10px 20px; font-size: 11px; line-height: 1.2; color: #60728d; background: #f7f9fc; font-weight: 700; vertical-align: middle; }
td { font-size: 13px; color: #52647e; padding: 16px 20px; vertical-align: middle; font-weight: 500; }
td small { font-size: 12px; color: #718097; }
tbody tr:hover { background: #f9fbff; }
.name-link { display: block; color: #203a60; font-weight: 650; }
.table-subline { display: block; margin-top: 3px; }
.lead-table { table-layout: fixed; min-width: 1160px; }
.lead-table th:nth-child(1), .lead-table td:nth-child(1) { width: 21%; }
.lead-table th:nth-child(2), .lead-table td:nth-child(2) { width: 10%; }
.lead-table th:nth-child(3), .lead-table td:nth-child(3) { width: 13%; }
.lead-table th:nth-child(4), .lead-table td:nth-child(4) { width: 10%; }
.lead-table th:nth-child(5), .lead-table td:nth-child(5) { width: 12%; }
.lead-table th:nth-child(6), .lead-table td:nth-child(6) { width: 20%; }
.lead-table th:nth-child(7), .lead-table td:nth-child(7) { width: 14%; text-align: right; }
.lead-table .name-link, .lead-table td small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-table .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice { display: block; margin: 0 0 18px; padding: 12px 16px; border: 1px solid #d2e1f5; border-radius: 9px; background: #edf4ff; color: #355786; font-size: 13px; line-height: 1.45; }
.notice.alert { background: #fff5f6; color: #a63242; border-color: #f0c6cd; }
.external-links { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.platform-link { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 5px 9px; border-radius: 6px; border: 1px solid #cfdff5; background: #f0f6ff; color: #245695; font-size: 12px; font-weight: 700; white-space: nowrap; }
.platform-link:hover { background: #e0edff; }
.platform-link .icon { width: 13px; height: 13px; }
.platform-link.blip { color: #176776; background: #ecf8fb; border-color: #cce7ee; }
.unavailable { color: #728095; background: #f5f7fa; border-color: #e4e9f0; cursor: default; font-size: 11px; }
.empty { padding: 35px 23px; text-align: center; color: var(--muted); font-size: 12px; white-space: normal; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pagination > div { display: flex; gap: 8px; }
.row-actions { display: flex; align-items: flex-start; justify-content: flex-end; gap: 9px; }
.inline-form { display: inline-flex; margin: 0; }
.lead-platform-actions { margin: -8px 0 24px; }
.lead-platform-actions .platform-link { padding: 8px 13px; font-size: 12px; }
.collection-actions { margin-bottom: 18px; }
.integration-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 22px; margin-bottom: 22px; }
.integration-card { min-height: 0; margin-bottom: 0; }
.integration-card .panel-heading { align-items: flex-start; }
.integration-card .badge { margin-top: 3px; }
.tag { font-size: 12px; }
.permission-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.permission-option { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.permission-option input { margin-top: 3px; }
.permission-option strong { display: block; font-size: 13px; color: #10233f; }
.permission-option small { display: block; margin-top: 3px; font-size: 12px; color: #64748b; line-height: 1.35; }
.button.danger { color: #a63242; border-color: #f0c6cd; background: #fff5f6; }
.detail-grid { display: grid; grid-template-columns: minmax(120px, .36fr) minmax(0, 1fr); gap: 0; margin: 0; padding: 0 24px 22px; font-size: 13px; }
.detail-grid dt, .detail-grid dd { min-width: 0; margin: 0; padding: 10px 0; border-top: 1px solid #eef3f8; }
.detail-grid dt { color: #667790; font-size: 11.5px; font-weight: 650; line-height: 1.25; }
.detail-grid dd { color: #172f51; font-weight: 550; overflow-wrap: anywhere; }
.detail-grid dd .badge { vertical-align: middle; }
.detail-grid dd small { display: block; margin-top: 3px; color: #718097; font-weight: 500; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 24px 22px; }
.card-actions .button_to { margin: 0; }
.timeline-heading { border-bottom: 1px solid #eef3f8; }
.journey-classification { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border: 1px solid #d2ddeb; border-radius: 999px; background: #f3f6fa; color: #52647e; font-size: 11px; font-weight: 800; white-space: nowrap; }
.journey-classification.receptive { border-color: #bde4e9; background: #eaf8fa; color: #176776; }
.journey-classification.activated { border-color: #c9d9f5; background: #edf4ff; color: #285d9e; }
.timeline { display: grid; gap: 0; margin: 0; padding: 0 18px 12px 24px; list-style: none; }
.timeline-scroll { max-height: min(620px, 68vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #c1d1e5 transparent; scrollbar-width: thin; }
.timeline li { position: relative; display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 4px 10px; padding: 16px 8px 16px 32px; border-top: 1px solid #eef3f8; }
.timeline li::after { position: absolute; top: 36px; bottom: -17px; left: 11px; width: 2px; background: #d8e6f6; content: ""; }
.timeline li:last-child::after { display: none; }
.timeline-index { position: absolute; z-index: 1; top: 18px; left: 0; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; background: #2f6fca; color: #fff; box-shadow: 0 0 0 2px #d8e6f6; font-size: 10px; font-weight: 800; line-height: 1; }
.timeline time { color: #526984; font-size: 12px; font-variant-numeric: tabular-nums; }
.timeline strong { color: #122844; font-size: 13px; line-height: 1.25; }
.timeline-event { display: flex; align-items: center; min-width: 0; gap: 7px; }
.timeline-platform { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 7px; border: 1px solid #bdd3f4; border-radius: 999px; background: #edf4ff; color: #285d9e; font-size: 9px; font-weight: 850; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
.timeline-platform.blip { border-color: #bde4e9; background: #eaf8fa; color: #176776; }
.timeline p { grid-column: 2; color: #536780; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.timeline-technical { grid-column: 2; color: #60728d; font-size: 10.5px; }
.timeline-technical summary { width: max-content; color: #526984; font-weight: 700; }
.timeline-technical code { display: block; max-width: 100%; margin-top: 5px; padding: 6px 8px; overflow: hidden; border-radius: 6px; background: #f5f8fc; color: #52647e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stack { padding: 0 23px 23px; display: flex; flex-direction: column; gap: 18px; }
.stack > .button { align-self: flex-start; }
.form-panel { max-width: 850px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-size: 11px; margin-bottom: 7px; color: #627169; }
input:not([type=submit]), select { width: 100%; min-width: 0; border: 1px solid #dfe5e2; border-radius: 6px; padding: 10px; background: #fff; color: var(--text); }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: linear-gradient(135deg, #07111f 0%, #101b2d 45%, #f3f7fc 45%, #eef5ff 100%); }
.login-shell > .notice { width: min(100%, 440px); margin: 0 0 14px; }
.login-card { width: min(100%, 440px); max-width: none; border: 1px solid #d9e5f4; border-radius: 16px; padding: 34px; background: #fff; box-shadow: 0 28px 80px #06112126; }
.login-brand { display: grid; gap: 14px; margin-bottom: 24px; }
.login-brand .brand-logo { width: 150px; max-width: 100%; height: auto; border-radius: 8px; filter: drop-shadow(0 10px 18px #00000018); }
.login-brand span { color: #07111f; font-size: 25px; font-weight: 820; line-height: 1; letter-spacing: 0; }
.login-card .eyebrow { margin-bottom: 8px; }
.login-card h1 { font-size: 30px; line-height: 1.15; }
.login-card .muted { color: #536780; font-size: 13px; margin-top: 8px; }
.login-card .stack { padding: 26px 0 14px; gap: 15px; }
.login-card label { color: #334761; font-size: 12px; font-weight: 750; }
.login-card input { min-height: 44px; border-color: #cfdcee; background: #fbfdff; font-size: 14px; }
.login-card input:focus { border-color: #9dbdf5; box-shadow: 0 0 0 3px #0b5cff14; outline: none; }
.login-card .button.primary { min-height: 44px; width: 100%; }
.login-card > small { display: block; margin-top: 2px; }
footer { color: #65758b; font-size: 12px; }
@media (max-width: 1600px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .sidebar { width: 208px; padding-inline: 12px; }
  .workspace { width: calc(100vw - 208px); max-width: calc(100vw - 208px); margin-left: 208px; }
  .nav-link { font-size: 12px; }
  main#main-content { padding: 26px 22px; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .journey-panel .metrics-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters .filter-search { grid-column: span 2; }
  .filter-submit { grid-column: span 2; }
  .funnel-age-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-columns { grid-template-columns: 1fr; }
}
@media (max-width: 950px) {
  .audit-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { align-items: flex-start; flex-wrap: wrap; }
  .refresh-controls { justify-content: flex-start; max-width: 100%; }
  .live-label { display: flex; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .filter-search { grid-column: 1 / -1; }
  .filters > .filter-period { grid-column: 1 / -1; }
  .filter-submit { grid-column: 1 / -1; }
  .filter-summary { flex-wrap: wrap; }
  .journey-panel .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .audit-summary-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; width: 100%; padding: 18px 16px 12px; }
  .sidebar-head { padding-bottom: 0; }
  .sidebar-toggle { display: none; }
  .sidebar-collapsed .sidebar { width: 100%; padding: 18px 16px 12px; }
  .sidebar-collapsed .workspace { width: 100%; max-width: 100%; margin-left: 0; }
  .sidebar-collapsed .brand { display: flex; }
  .sidebar-collapsed .nav-caption, .sidebar-collapsed .nav-label, .sidebar-collapsed .sidebar-bottom small, .sidebar-collapsed .user-copy, .sidebar-collapsed .user-block > .icon, .sidebar-collapsed .profile-menu-panel, .sidebar-collapsed .readonly { display: revert; }
  .sidebar-collapsed .nav-link { justify-content: flex-start; padding: 10px; }
  .sidebar nav { gap: 6px; margin-top: 18px; }
  .profile-menu-panel { position: static; margin-top: 7px; background: #ffffff08; box-shadow: 0 16px 28px #00000020; }
  .nav-link { font-size: 12px; padding: 10px; }
  .workspace { width: 100%; max-width: 100%; margin-left: 0; }
  main#main-content { padding: 22px 16px; }
  h1 { font-size: 28px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-panel .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey-panel { padding: 16px; }
  .funnel-age-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 124px; }
  .filters { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
  .date-shortcuts { grid-column: 1 / -1; }
  .filters .date-shortcut { padding-inline: 8px; }
  .collection-health { gap: 7px 12px; }
  .collection-health .text-link { margin-left: 0; }
  .collection-overview-heading { flex-direction: column; gap: 12px; padding: 18px 16px 14px; }
  .collection-progress-track { margin-inline: 16px; }
  .collection-progress-caption { padding-inline: 16px; }
  .collection-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px 18px; }
  .panel-heading { padding: 18px 16px; flex-wrap: wrap; }
  .panel-heading h2 { font-size: 16px; }
  .panel-heading p { font-size: 12px; }
  .queue-cards { gap: 10px; padding-inline: 14px; }
  .queue-card { padding: 12px; }
  .queue-card > span:not(.dot) { font-size: 11px; }
  .alert-title strong { font-size: 12px; }
  .refresh-error { text-align: left; }
}
@media (max-width: 420px) {
  .journey-panel .metrics-grid { grid-template-columns: 1fr; }
  .journey-panel .metric-card.featured { grid-column: auto; }
  .journey-panel .metric-card.featured .metric-content { display: block; }
  .journey-panel .metric-card.featured .metric-number,
  .journey-panel .metric-card.featured .metric-unit { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.operational-funnel { margin-bottom: 28px; }
.funnel-total { display: flex; align-items: baseline; gap: 8px; color: #63738a; font-size: 12px; }
.funnel-total strong { font-size: 30px; color: #17355c; font-variant-numeric: tabular-nums; }
.funnel-caution { margin: 0 24px 18px; padding: 12px 16px; border: 1px solid #f2dba8; border-radius: 9px; background: #fffbf2; color: #805a19; font-size: 12px; }
.conversion-board { display: grid; grid-template-columns: minmax(420px, .95fr) minmax(0, 1.05fr); gap: 16px; align-items: stretch; padding: 14px 20px 18px; }
.conversion-radio { position: absolute; opacity: 0; pointer-events: none; }
.conversion-funnel { position: relative; display: grid; align-content: start; justify-items: center; gap: 14px; min-width: 0; padding: 4px 0; }
.conversion-funnel::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 50%; width: 2px; background: linear-gradient(180deg, #7ba5df, #b4c4d8 42%, #8bbfa8); transform: translateX(-50%); opacity: .55; }
.conversion-step { position: relative; isolation: isolate; display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(100px, auto); gap: 10px; align-items: center; width: 100%; min-width: 0; min-height: 76px; padding: 11px 30px; border: 0; border-radius: 10px; background: transparent; color: #0b2341; cursor: pointer; list-style: none; transition: filter .15s ease, transform .15s ease; }
.conversion-step:nth-child(2) { width: 94%; }
.conversion-step:nth-child(3) { width: 88%; }
.conversion-step:nth-child(4) { width: 82%; }
.conversion-step:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: -13px; width: 24px; height: 13px; background: linear-gradient(180deg, #6f94c5, #9aacbf); clip-path: polygon(50% 100%, 0 0, 100% 0); transform: translateX(-50%); opacity: .92; filter: drop-shadow(0 2px 3px #17365c22); }
.conversion-step:hover { filter: brightness(1.01); transform: translateY(-1px); }
.conversion-step::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 1px solid #aac1dd; border-top: 3px solid #3f7fd4; border-radius: 10px; background: linear-gradient(100deg, #ffffff 0%, #f3f8ff 70%, #e8f1ff 100%); box-shadow: 0 14px 30px #17365c18, inset 0 1px #ffffff; clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 26px 100%); }
.conversion-step-conversation::before { border-color: #a9dce2; border-top-color: #168794; background: linear-gradient(100deg, #ffffff 0%, #effafb 68%, #dff4f6 100%); }
.conversion-step-attended::before { border-color: #cabbef; border-top-color: #7b5fd2; background: linear-gradient(100deg, #ffffff 0%, #f6f2ff 68%, #ede5ff 100%); }
.conversion-step-outcome::before { border-color: #a9dcc0; border-top-color: #2aa464; background: linear-gradient(100deg, #ffffff 0%, #eefaf4 68%, #dcf5e8 100%); }
.conversion-step-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, #ffffff, #f3f8ff); }
.conversion-step-conversation .conversion-step-head::before { background: linear-gradient(100deg, #ffffff, #effafb); }
.conversion-step-attended .conversion-step-head::before { background: linear-gradient(100deg, #ffffff, #f6f2ff); }
.conversion-step-head::-webkit-details-marker { display: none; }
.conversion-step-copy { min-width: 0; }
.conversion-step-copy h3 { margin: 0 0 3px; font-size: 16px; line-height: 1.15; color: #0b2341; }
.conversion-step-copy p { margin: 0; color: #61738d; font-size: 12px; line-height: 1.35; }
.conversion-step > strong { display: grid; justify-items: end; gap: 3px; color: #0d2d53; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.conversion-step > strong small { color: #667790; font-size: 11px; font-weight: 600; }
.conversion-step-toggle { display: grid; place-items: center; color: #64748b; transition: transform .15s ease; }
.conversion-step-toggle .icon { width: 17px; height: 17px; }
.conversion-step[open] .conversion-step-toggle { transform: rotate(90deg); }
.conversion-step-conversation .macro-funnel-icon { background: #eaf8fa; color: #176776; }
.conversion-step-attended .macro-funnel-icon { background: #f5f0ff; color: #6241a5; }
.conversion-step-outcome .macro-funnel-icon { background: #edf8f1; color: #18834d; }
.conversion-detail { min-width: 0; border: 1px solid #dbe5f1; border-radius: 8px; background: #fff; overflow: hidden; }
.conversion-detail-panel { display: none; min-height: 100%; }
.conversion-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid #e6edf6; background: #f8fbff; }
.conversion-detail-head h3 { margin: 2px 0 0; font-size: 18px; color: #0b2341; }
.conversion-detail-head strong { display: grid; justify-items: end; color: #0d2d53; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.conversion-detail-head small { margin-top: 3px; color: #667790; font-size: 11px; font-weight: 600; }
#conversion-radio-new:checked ~ .conversion-funnel .conversion-step-new,
#conversion-radio-conversation:checked ~ .conversion-funnel .conversion-step-conversation,
#conversion-radio-attended:checked ~ .conversion-funnel .conversion-step-attended,
#conversion-radio-outcome:checked ~ .conversion-funnel .conversion-step-outcome { transform: translateY(-1px); }
#conversion-radio-new:checked ~ .conversion-funnel .conversion-step-new::before,
#conversion-radio-conversation:checked ~ .conversion-funnel .conversion-step-conversation::before,
#conversion-radio-attended:checked ~ .conversion-funnel .conversion-step-attended::before,
#conversion-radio-outcome:checked ~ .conversion-funnel .conversion-step-outcome::before { box-shadow: 0 18px 38px #17365c24, inset 0 1px #ffffff; filter: saturate(1.08); }
#conversion-radio-new:checked ~ .conversion-detail .conversion-detail-new,
#conversion-radio-conversation:checked ~ .conversion-detail .conversion-detail-conversation,
#conversion-radio-attended:checked ~ .conversion-detail .conversion-detail-attended,
#conversion-radio-outcome:checked ~ .conversion-detail .conversion-detail-outcome { display: block; }
.macro-funnel-card { min-width: 0; border: 1px solid #dbe5f1; border-radius: 8px; background: #fff; overflow: hidden; }
.macro-funnel-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 88px; padding: 14px; border-bottom: 1px solid #e6edf6; background: #f8fbff; }
.macro-funnel-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: #eef5ff; color: #275889; }
.macro-funnel-icon .icon { width: 19px; height: 19px; }
.macro-funnel-head h3 { margin: 0 0 3px; font-size: 16px; line-height: 1.2; color: #0b2341; }
.macro-funnel-head p { margin: 0; color: #61738d; font-size: 12px; line-height: 1.35; }
.macro-funnel-head strong { display: grid; justify-items: end; gap: 2px; color: #0d2d53; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.macro-funnel-head strong small { color: #667790; font-size: 11px; font-weight: 600; }
.macro-funnel-stages { display: grid; gap: 7px; padding: 10px; border-top: 1px solid #e6edf6; }
.macro-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; min-height: 34px; padding: 8px 9px; border: 1px solid #e1e8f2; border-left: 4px solid #8a98aa; border-radius: 7px; background: #fff; color: #294564; text-decoration: none; }
.macro-stage span { min-width: 0; font-size: 12px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.macro-stage b { color: #0f2e52; font-size: 15px; font-variant-numeric: tabular-nums; }
.macro-stage small { color: #6d7d93; font-size: 11px; font-variant-numeric: tabular-nums; }
.macro-stage:hover { background: #f5f8fc; border-color: #cad8e8; }
.macro-stage-blue { border-left-color: #1f70c9; }
.macro-stage-green { border-left-color: #18834d; }
.macro-stage-amber { border-left-color: #b67610; }
.macro-stage-red { border-left-color: #c03945; }
.macro-stage-neutral { border-left-color: #6f7c8d; }
.macro-stage-empty { margin: 0; padding: 8px; color: #718198; font-size: 12px; }
.macro-funnel-attended .macro-funnel-icon { background: #eefaf6; color: #14735a; }
.macro-funnel-closed .macro-funnel-icon { background: #f5f0ff; color: #6241a5; }
.funnel-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; padding: 20px; align-items: start; }
.funnel-insights { padding: 14px; background: #f6f9fe; border: 1px solid #e2eaf5; border-radius: 12px; align-self: start; }
.funnel-insights-panel { padding: 14px; background: #f6f9fe; border: 1px solid #e2eaf5; border-radius: 12px; align-self: start; }
.funnel-insight { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: end; padding-bottom: 12px; border-bottom: 1px solid #dce5f1; }
.funnel-insight .eyebrow { grid-column: 1 / -1; }
.funnel-insight > strong { display: block; font-size: 28px; margin: 2px 0; color: #214778; }
.funnel-insight p { color: #3b5275; font-size: 14px; text-align: right; }
.funnel-insight small { grid-column: 1 / -1; }
.funnel-insight small, .funnel-age small { color: #65758b; font-size: 12px; }
.funnel-age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; margin-top: 12px; }
.funnel-age { display: grid; gap: 4px; padding: 10px; margin: 0; border: 1px solid #dce5f1; border-radius: 8px; background: #fff; font-size: 12px; color: #53657e; }
.funnel-age > strong { color: #253e60; }
.funnel-overdue { color: #a13e20; font-weight: 700; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 950px) {
  .conversion-board { grid-template-columns: 1fr; }
  .funnel-layout { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .conversion-board { padding: 14px; gap: 12px; }
  .conversion-funnel { gap: 10px; }
  .conversion-step, .conversion-step:nth-child(2), .conversion-step:nth-child(3), .conversion-step:nth-child(4) { width: 100%; }
  .conversion-step { grid-template-columns: 32px minmax(0, 1fr); padding: 12px 22px; }
  .conversion-step > strong { grid-column: 1 / -1; justify-items: start; font-size: 24px; }
  .conversion-step-toggle { grid-column: 3; grid-row: 1; }
  .macro-funnel-head { grid-template-columns: 32px minmax(0, 1fr); }
  .macro-funnel-head strong { grid-column: 1 / -1; justify-items: start; font-size: 24px; }
  .macro-stage { grid-template-columns: minmax(0, 1fr) auto; }
  .macro-stage small { grid-column: 1 / -1; }
  .funnel-layout { padding: 16px; gap: 16px; }
  .funnel-caution { margin-inline: 16px; }
}

.funnel-figure { margin: 0; min-width: 0; padding: 10px; border: 1px solid #e5eaf1; border-radius: 18px; background: linear-gradient(180deg, #f8fafc, #fff 75%); box-shadow: 0 8px 24px #263f6210; }
.funnel-drawing { container-type: inline-size; display: grid; gap: 3px; padding: 0; margin: 0; list-style: none; }
.funnel-drawing > li { --stage-inset: 0%; min-width: 0; margin-inline: var(--stage-inset); }
.funnel-drawing > li:nth-child(2) { --stage-inset: 2%; }
.funnel-drawing > li:nth-child(3) { --stage-inset: 4%; }
.funnel-drawing > li:nth-child(4) { --stage-inset: 6%; }
.funnel-drawing > li:nth-child(5) { --stage-inset: 8%; }
.funnel-drawing > li:nth-child(6) { --stage-inset: 10%; }
.funnel-drawing > li:nth-child(7) { --stage-inset: 12%; }
.funnel-drawing > li:nth-child(8) { --stage-inset: 14%; }
.funnel-drawing > li:nth-child(9) { --stage-inset: 16%; }
.funnel-drawing > li:nth-child(10) { --stage-inset: 18%; }
.funnel-band { --stage-color: #526174; position: relative; isolation: isolate; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 44px; padding: 5px 18px; color: #fff; filter: drop-shadow(0 1px 1px #16294018); text-align: center; text-decoration: none; }
.funnel-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, #ffffff24, #00000012 52%, #ffffff0d), var(--stage-color); border-radius: 7px; box-shadow: inset 0 1px #ffffff45, inset 0 -1px #00000014; clip-path: polygon(0 0, 100% 0, calc(100% - 1.85cqi) 100%, 1.85cqi 100%); transition: filter .15s ease; }
.funnel-band-duplicated { --stage-color: #405b76; }
.funnel-band-negative_response { --stage-color: #785269; }
.response-evidence { max-width: 340px; margin-bottom: 8px; overflow-wrap: anywhere; }
.response-evidence summary { cursor: pointer; font-weight: 600; }
.funnel-drawing > li:nth-child(11) { --stage-inset: 20%; }
.funnel-band-invalid_phone { --stage-color: #bd4b16; }
.funnel-band-verification_pending { --stage-color: #9b710b; }
.funnel-band-unactivated { --stage-color: #60758b; }
.funnel-band-activation_failed { --stage-color: #bd303d; }
.funnel-band-unanswered { --stage-color: #1460c5; }
.funnel-band-bot { --stage-color: #087e88; }
.funnel-band-waiting { --stage-color: #aa650c; }
.funnel-band-human { --stage-color: #6540b6; }
.funnel-band-closed { --stage-color: #148044; }
.funnel-band-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ffffff19; box-shadow: inset 0 1px 1px #ffffff24; }
.funnel-band-icon .icon { width: 17px; height: 17px; }
.funnel-band-content { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.funnel-band-label { width: 100%; font-size: 12px; font-weight: 600; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.funnel-band-metrics { display: flex; align-items: baseline; justify-content: center; gap: 6px; white-space: nowrap; line-height: 1.1; }
.funnel-band-count { font-size: 17px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.funnel-band-percent { padding: 0 0 0 8px; margin-left: 2px; border-left: 1px solid #ffffff70; color: #fff; font-size: 11px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.funnel-band:hover::before { filter: brightness(1.08); }
.funnel-band:focus-visible { outline: 2px solid var(--stage-color); outline-offset: 2px; }
.funnel-other { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin: 8px 0 0; border: 1px solid #e0e6ee; border-radius: 8px; background: #f8fafc; color: #294567; }
.funnel-other > span { flex: 1; min-width: 0; }
.funnel-other > .icon { width: 15px; height: 15px; color: #73849a; }
.funnel-other strong { font-size: 12px; }
.funnel-other small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: #5a6c85; }
.funnel-other b { display: flex; align-items: baseline; gap: 6px; font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; }
.funnel-other:hover { background: #eaf0fa; }
.funnel-figure figcaption { text-align: center; color: #62738b; font-size: 11px; margin: 8px 0 0; }
@media (max-width: 650px) {
  .funnel-band { padding: 5px 12px; grid-template-columns: 24px minmax(0, 1fr); gap: 5px; }
  .funnel-band-icon { width: 24px; height: 24px; }
  .funnel-band-label { font-size: 12px; }
  .funnel-band-count { font-size: 17px; }
  .funnel-age-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .funnel-band::before { transition: none; } }
