:root {
  color-scheme: light;
  --ink: #18221c;
  --muted: #586760;
  --neutral: #eef1ed;
  --paper: #f5f7f3;
  --white: #fff;
  --sidebar: #141c17;
  --line: #dce4dc;
  --accent: #d7ed90;
  --accent-dark: #21381f;
  --green: #1f613a;
  --radius: 15px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #4d8739; outline-offset: 3px; }
img, svg { display: block; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 9; top: 10px; left: 10px; padding: 12px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.shell { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 28px 17px 16px; background: var(--sidebar); color: #f3f8ee; }
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; margin: 0 0 38px 9px; font-size: 1.55rem; font-weight: 780; letter-spacing: -.07em; line-height: 1.03; }
.brand-icon { display: grid; place-items: center; width: 39px; height: 39px; flex-shrink: 0; border-radius: 11px; color: var(--sidebar); background: var(--accent); }
.nav-group { margin-bottom: 26px; }
.nav-label { margin: 0 0 9px 11px; color: #9bac9f; text-transform: uppercase; letter-spacing: .14em; font-size: .6875rem; font-weight: 680; }
.nav-item { display: flex; gap: 12px; align-items: center; position: relative; border-radius: 8px; padding: 10px 11px; margin: 3px 0; color: #d0d9d2; font-size: .905rem; font-weight: 530; }
.nav-item:hover { color: #fff; background: #233026; }
.nav-item[aria-current] { color: #e6f7bd; font-weight: 680; background: #2c3926; }
.nav-item[aria-current]::after { position: absolute; right: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ''; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-foot { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid #334036; display: flex; align-items: center; gap: 10px; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: .875rem; }
.sidebar-foot small { font-size: .75rem; color: #9bac9f; }
.workspace-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #26352c; color: #d0ded4; }
.workspace-icon svg { width: 17px; height: 17px; }
.topbar { z-index: 2; position: sticky; top: 0; min-height: 66px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumbs, .topbar-actions { display: flex; align-items: center; gap: 13px; font-size: .875rem; }
.topbar-home, .topbar-slash { color: var(--muted); }
#breadcrumb { font-weight: 680; }
.topbar-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; font-weight: 620; white-space: nowrap; }
.topbar-status > span { width: 7px; height: 7px; border-radius: 50%; background: #829085; }
.topbar-status.ready > span { background: #28834c; }
.topbar-status.error > span { background: #b53f31; }
.icon-button, .avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.icon-button { padding: 0; background: transparent; border: 1px solid var(--line); color: #475a4e; }
.icon-button:hover { background: var(--neutral); color: var(--ink); }
.icon-button svg { width: 17px; height: 17px; }
.avatar { font-size: .875rem; font-weight: 760; color: #27421f; background: #e8efdf; border: 1px solid #dde7d6; }
.menu-button { display: none; }
main { padding: 29px 34px 42px; max-width: 1510px; margin-inline: auto; }
main:focus { outline: none; }
.page-head { display: flex; justify-content: space-between; gap: 17px; align-items: flex-end; margin-bottom: 23px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 2.8vw, 2.25rem); font-weight: 760; letter-spacing: -.055em; line-height: 1.12; }
h2 { font-size: 1.065rem; font-weight: 720; letter-spacing: -.025em; }
.description { margin-top: 7px; color: var(--muted); font-size: .94rem; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 8px; border: 1px solid var(--line); background: white; font-size: .875rem; font-weight: 680; line-height: 1.3; min-height: 40px; }
.button:hover { background: #eef2eb; }
.button svg { width: 17px; height: 17px; flex-shrink: 0; }
.button.primary { background: #1c3525; border-color: #1c3525; color: #f5f9f1; }
.button.primary:hover { background: #31513b; }
.button.danger { color: #992e24; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.text-button { display: inline-flex; align-items: center; justify-content: center; padding: 6px 8px; margin: -6px -8px; border: 0; border-radius: 6px; background: transparent; color: #365b39; font-size: .875rem; font-weight: 680; white-space: nowrap; }
.text-button:hover { background: #eaf0e7; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; min-height: 176px; padding: 24px; background: linear-gradient(102deg, #192a1e, #203c2b); color: #f4faee; border-radius: var(--radius); }
.hero-copy { align-self: center; max-width: 570px; z-index: 1; }
.hero h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); line-height: 1.15; margin: 7px 0; letter-spacing: -.055em; }
.hero p { font-size: .925rem; line-height: 1.5; color: #d4e4d6; max-width: 490px; }
.hero-state { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: #deefcb; font-weight: 660; }
.hero-state svg { width: 17px; height: 17px; }
.hero .button { min-height: 33px; padding: 6px 10px; background: var(--accent); border-color: var(--accent); color: #20351c; margin-top: 14px; font-size: .81rem; }
.hero .button:hover { background: #e6f6b3; }
.signal-art { position: absolute; right: 0; top: 0; bottom: 0; width: min(32%, 285px); pointer-events: none; overflow: hidden; background-image: linear-gradient(#c6e7bd14 1px, transparent 1px), linear-gradient(90deg, #c6e7bd14 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, black 20%); }
.signal-art span { position: absolute; left: 58%; top: 50%; width: var(--size); aspect-ratio: 1; border: 1px solid #d5efb74c; border-radius: 50%; transform: translate(-50%, -50%); }
.signal-art span:nth-child(1) { --size: 251px; }
.signal-art span:nth-child(2) { --size: 181px; }
.signal-art span:nth-child(3) { --size: 113px; }
.signal-art span:nth-child(4) { --size: 59px; }
.signal-art .signal-center { display: grid; place-items: center; border: 1px solid #c5ee8f; background: var(--accent); color: #263e21; border-radius: 15px; box-shadow: 0 0 34px #b0d87335; }
.signal-art .signal-center svg { width: 30px; height: 30px; }
.signal-art i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #d5efac; box-shadow: 0 0 11px #d4f8ab; }
.signal-art i:nth-of-type(1) { top: 24%; left: 37%; }
.signal-art i:nth-of-type(2) { top: 72%; left: 80%; }
.signal-art i:nth-of-type(3) { top: 18%; left: 83%; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.metric, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.metric { min-width: 0; padding: 14px 16px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-title { font-size: .875rem; color: #4e6054; font-weight: 580; }
.metric-icon, .agent-icon { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: #315b37; background: #edf4e6; flex-shrink: 0; }
.metric-icon svg, .agent-icon svg { width: 17px; height: 17px; }
.metric strong { display: block; margin-top: 3px; font-size: 1.875rem; line-height: 1.16; font-weight: 730; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.metric small { display: block; margin-top: 3px; color: var(--muted); font-size: .75rem; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(278px, 1fr); gap: 15px; margin-bottom: 16px; }
.panel { min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 19px 13px; }
.panel-subtitle { margin-top: 2px; color: var(--muted); font-size: .8125rem; }
.agents { padding: 0 18px 3px; }
.agent { display: flex; gap: 11px; align-items: center; width: 100%; color: inherit; padding: 12px 2px; text-align: left; }
.agent + .agent { border-top: 1px solid #edf0ec; }
.agent:hover .agent-name { color: var(--green); text-decoration: underline; }
.agent-details { min-width: 0; flex: 1; }
.agent-icon.editor { background: #f0ebfa; color: #594180; }
.agent-icon.leads { background: #f9f1df; color: #785b25; }
.agent-name { display: block; font-size: .9rem; font-weight: 700; }
.agent-details small { display: block; color: var(--muted); font-size: .75rem; }
.tag { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; border-radius: 999px; padding: 3px 8px; background: #edf0ed; color: #4e6054; font-size: .75rem; font-weight: 650; }
.tag.good { background: #eaf4e7; color: #2d6236; }
.tag.wait { background: #f9f0da; color: #76601f; }
.tag.bad { background: #faece8; color: #8f392c; }
.tag.light { background: #f3f5f1; }
.chart { padding: 5px 18px 13px; position: relative; }
.chart-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; height: 113px; text-align: right; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; gap: 4px; background: repeating-linear-gradient(to bottom, #edf1ed 0, #edf1ed 1px, transparent 1px, transparent 33.33%) no-repeat 0 5px / 100% 108px; }
.chart-column { min-width: 0; }
.chart-height { display: flex; justify-content: center; align-items: flex-end; height: 114px; padding: 5px 0 0; }
.chart-bar { width: min(47%, 41px); border-radius: 5px 5px 0 0; background: #90b79a; }
.chart-column:last-child .chart-bar { background: #315f43; }
.chart-date { display: block; padding-top: 5px; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.chart-empty { margin-top: 4px; color: var(--muted); font-size: .75rem; text-align: center; }
.table-wrap { overflow-x: auto; }
.table { border-spacing: 0; width: 100%; text-align: left; font-size: .875rem; }
.table th { color: #526256; background: #f5f7f4; text-transform: uppercase; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; white-space: nowrap; }
.table th, .table td { padding: 11px 15px; vertical-align: middle; border-bottom: 1px solid #e9eee8; }
.table th:first-child, .table td:first-child { padding-left: 19px; }
.table th:last-child, .table td:last-child { padding-right: 19px; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafcf9; }
.table .row-primary { display: block; font-weight: 680; }
.table .row-secondary { display: block; color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.table .nowrap { white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.action { padding: 5px; background: transparent; border: 0; border-radius: 6px; color: #45634d; display: grid; place-items: center; }
.action:hover { background: var(--neutral); }
.action svg { width: 18px; height: 18px; }
.empty { text-align: center; padding: 35px 15px 39px; color: var(--muted); font-size: .875rem; }
.empty-icon { display: grid; place-items: center; width: 39px; height: 39px; margin: 0 auto 9px; border-radius: 10px; background: #edf3ea; color: #41654a; }
.empty strong { color: var(--ink); display: block; margin-bottom: 4px; }
.empty button { margin: 12px auto 0; }
.filters { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 13px; }
.search { position: relative; flex: 0 1 330px; }
.search svg { position: absolute; left: 11px; top: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 35px; }
.item-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.field label, .field-label { display: block; font-size: .875rem; font-weight: 680; margin-bottom: 5px; }
.field small { display: block; color: var(--muted); font-size: .775rem; margin-top: 4px; }
input:not([type='checkbox']), select, textarea { color: var(--ink); width: 100%; padding: 8px 10px; background: white; border: 1px solid #cfd9cf; border-radius: 8px; min-height: 40px; font-size: .925rem; }
.search input:not([type='checkbox']) { padding-left: 35px; }
textarea { resize: vertical; }
.check-options { display: flex; flex-wrap: wrap; gap: 8px; }
.check-options label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; margin: 0; font-weight: 490; }
input[type='checkbox'] { accent-color: #386442; width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
.inline-check { display: flex; align-items: center; gap: 8px; }
.inline-check label { margin: 0; }
#editor-dialog { width: min(545px, calc(100% - 28px)); max-height: calc(100dvh - 30px); background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 0; box-shadow: 0 25px 85px #13271c40; }
#editor-dialog::backdrop { background: #101b14a5; }
.dialog-header { position: sticky; z-index: 1; top: 0; padding: 17px 20px; background: white; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.dialog-header h2 { font-size: 1.16rem; }
.dialog-fields { padding: 17px 20px; display: grid; gap: 13px; }
.dialog-footer { position: sticky; bottom: 0; padding: 12px 20px; border-top: 1px solid var(--line); background: white; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.dialog-error, .banner { padding: 10px 12px; border-radius: 8px; color: #832f24; background: #fbede7; font-size: .875rem; }
.banner { margin-bottom: 15px; }
.toast { z-index: 7; position: fixed; right: 17px; bottom: 17px; max-width: calc(100% - 34px); padding: 11px 15px; border-radius: 9px; background: #203927; color: white; font-size: .9rem; box-shadow: 0 5px 22px #1a2a2133; }
.loading { color: var(--muted); padding: 26px 0; display: flex; align-items: center; gap: 10px; }
.spinner { width: 18px; height: 18px; border: 2px solid #c5d2c5; border-top-color: #315f43; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1120px) { .shell { grid-template-columns: 207px minmax(0, 1fr); } main, .topbar { padding-inline: 23px; } .metrics { gap: 10px; } .metric { padding-inline: 12px; } }
@media (max-width: 860px) { .shell { grid-template-columns: 188px minmax(0, 1fr); } .sidebar { padding-inline: 12px; } main, .topbar { padding-inline: 18px; } .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .overview-grid { grid-template-columns: 1fr; } }
@media (max-width: 660px) {
  .shell { display: block; }
  .sidebar { position: fixed; z-index: 5; top: 0; left: 0; bottom: 0; width: 236px; visibility: hidden; transform: translateX(-105%); transition: transform .16s ease; }
  .sidebar.open { visibility: visible; transform: none; }
  .mobile-scrim { display: block; position: fixed; z-index: 4; inset: 0; border: none; background: #111e15a4; }
  .menu-button { display: grid; }
  .topbar { min-height: 57px; padding-inline: 13px; }
  .breadcrumbs, .topbar-actions { gap: 8px; }
  .topbar-home, .topbar-slash { display: none; }
  .avatar { display: none; }
  main { padding: 20px 13px 28px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 11px; margin-bottom: 16px; }
  .hero { min-height: auto; padding: 18px; }
  .hero-copy { max-width: 100%; }
  .signal-art { opacity: .32; width: 28%; mask-image: linear-gradient(90deg, transparent, black 75%); }
  .table th, .table td { padding-inline: 10px; }
  .table th:first-child, .table td:first-child { padding-left: 13px; }
  .table th:last-child, .table td:last-child { padding-right: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; } }
.stacked-panel { margin-top: 17px; }
.integration-note { color: #645219; background: #f9f1de; border: 1px solid #ebdfbd; padding: 10px 13px; border-radius: 9px; margin-bottom: 14px; font-size: .875rem; }
.login-panel { max-width: 430px; margin: 8vh auto 25px; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); }
.login-panel h1 { margin-top: 14px; font-size: 1.9rem; }
.login-panel form { display: grid; gap: 14px; margin-top: 19px; }
.login-panel .button { width: 100%; }
.dialog-footer .danger { margin-right: auto; }
.billing-link { margin: 1px -8px -3px; }
.dialog-fields h3 { font-size: .95rem; }
.insights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.insights-grid div { padding: 8px 10px; border-radius: 8px; background: var(--paper); }
.insights-grid dt { color: var(--muted); font-size: .8rem; }
.insights-grid dd { margin: 2px 0 0; font-weight: 680; overflow-wrap: anywhere; }

.meta-connection { margin-bottom: 16px; }
.meta-connection .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-import-list { display: grid; gap: 6px; max-height: 43vh; overflow: auto; margin: 12px 0; }
.import-account { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.import-account input { accent-color: #29764a; }
.import-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
