@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  font-family: 'DM Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #20312f;
  background: #f4f7f6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #20312f;
  --muted: #75817f;
  --line: #e6ecea;
  --paper: #fff;
  --green: #2e7668;
  --green-deep: #193d39;
  --green-soft: #e8f3ef;
  --coral: #c87c61;
  --shadow: 0 12px 32px rgba(27, 55, 51, .08);
}

* { box-sizing: border-box; }
html, body, #app { margin: 0; min-height: 100%; min-width: 320px; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(46, 118, 104, .25); outline-offset: 2px; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.boot-mark, .brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; color: #fff; border-radius: 11px; background: #438574; font-size: 19px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }

.workspace { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 248px; display: flex; flex-direction: column; padding: 24px 15px 16px; background: #193d39; color: #eef7f4; }
.brand-lockup { height: 38px; margin: 0 7px 25px; display: flex; align-items: center; gap: 11px; color: #f8fcfb; font-size: 15px; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.brand-lockup .brand-mark { width: 34px; height: 34px; border-radius: 10px; background: #5d9a87; }
.workspace-switch { min-height: 58px; margin: 0 2px 27px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(228,247,240,.15); border-radius: 8px; background: rgba(255,255,255,.055); }
.workspace-avatar, .account-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 33px; height: 33px; border-radius: 8px; background: #d8e9e1; color: #285b4e; font-weight: 700; }
.workspace-label, .account-row > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.workspace-label b, .account-row b { overflow: hidden; color: #f2f7f5; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workspace-label small, .account-row small { color: #a8c2ba; font-size: 10px; }
.switch-caret { margin-left: auto; color: #9dbbb1; }
.nav-caption { padding: 0 12px 9px; color: #88a79e; font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.main-nav { display: grid; gap: 4px; }
.nav-link { position: relative; width: 100%; min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 7px; background: transparent; color: #bdd0ca; text-align: left; font-size: 12px; transition: background .16s ease, color .16s ease; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: #2d6359; color: #fff; box-shadow: inset 2px 0 #9bcdb5; }
.nav-icon { width: 17px; color: #9ebbb1; font-size: 16px; text-align: center; line-height: 1; }
.nav-link.active .nav-icon { color: #d0ecde; }
.nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #eab17e; }
.sidebar-bottom { margin-top: auto; }
.privacy-note { margin: 0 3px 14px; padding: 11px 9px; display: flex; gap: 9px; border: 1px solid rgba(203,227,216,.12); border-radius: 7px; background: rgba(255,255,255,.04); }
.privacy-icon { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(133,197,164,.19); color: #aee0bc; font-size: 11px; }
.privacy-note span:last-child { display: grid; gap: 3px; }
.privacy-note b { color: #dbeae4; font-size: 10px; font-weight: 600; }
.privacy-note small { color: #92afa5; font-size: 9px; }
.account-row { width: 100%; min-height: 48px; padding: 7px 6px; display: flex; align-items: center; gap: 9px; border: 0; border-top: 1px solid rgba(223,243,235,.12); background: transparent; text-align: left; }
.account-row:hover { background: rgba(255,255,255,.05); }
.account-row .account-avatar { width: 31px; height: 31px; border: 0; border-radius: 50%; background: #e2cfbd; color: #705143; font-size: 12px; }
.account-menu { margin-left: auto; color: #9db7ae; font-weight: 700; }

.main-column { min-width: 0; flex: 1; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 10; height: 64px; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9eeec; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #87928f; font-size: 11px; }
.breadcrumb b { color: #354441; font-weight: 600; }
.crumb-sep { color: #c2cbc8; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #f1dcbf; border-radius: 5px; background: #fff8ec; color: #986d3c; font-size: 10px; }
.demo-badge span, .status-dot { width: 6px; height: 6px; border-radius: 50%; background: #d49b54; }
.help-button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #697572; font-size: 11px; }
.status-dot { background: #d59b5c; }
.status-dot.is-on { background: #4b9c79; }
.top-avatar { width: 29px; height: 29px; border: 0; border-radius: 50%; background: #e2eee8; color: #3f7767; font-size: 11px; }
.menu-toggle { display: none !important; }
.page-content { max-width: 1420px; margin: 0 auto; padding: 34px 38px 56px; }
.page-heading { margin: 1px 0 25px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 7px; color: #71837e; font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.page-heading h1 { margin: 0; color: #243532; font-size: 23px; font-weight: 700; line-height: 1.35; }
.page-description { margin: 7px 0 0; color: #85908d; font-size: 11px; line-height: 1.6; }
.btn { min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; font-weight: 600; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #2d7768; color: #fff; box-shadow: 0 2px 5px rgba(39,105,91,.14); }
.btn-primary:hover { background: #25685b; }
.btn-primary:disabled { cursor: wait; opacity: .65; }
.btn-secondary { border-color: #dfe7e4; background: #fff; color: #4b5a56; }
.btn-secondary:hover { border-color: #bdcec8; background: #f8fbfa; }
.btn-wide { width: 100%; min-height: 43px; justify-content: space-between; padding: 0 15px; }
.icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #81908b; font-size: 15px; }
.icon-btn:hover { border-color: #e2e9e6; background: #f7faf9; color: #3e5e54; }
.text-button { padding: 3px 0; border: 0; background: transparent; color: #397d6d; font-size: 10px; font-weight: 600; }
.text-button:hover { color: #245a4f; }

.metric-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { min-width: 0; min-height: 116px; padding: 15px 16px 13px; border: 1px solid #e9eeec; border-radius: 7px; background: #fff; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #75817e; font-size: 10px; }
.stat-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; font-size: 13px; font-weight: 700; }
.tint-green { background: #e8f3ed; color: #4e9276; }
.tint-blue { background: #eaf1f5; color: #5f8799; }
.tint-lilac { background: #f1eef8; color: #8173a2; }
.tint-orange { background: #fbf1e8; color: #c07b48; }
.stat-card > strong { display: block; margin-top: 8px; color: #253835; font-size: 25px; font-weight: 700; line-height: 1.1; }
.stat-foot { margin-top: 7px; color: #99a29f; font-size: 9px; }
.overview-grid { margin-bottom: 18px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .9fr); gap: 14px; }
.panel { border: 1px solid #e8eeeb; border-radius: 7px; background: #fff; }
.chart-panel, .channel-panel { min-height: 239px; padding: 17px 19px 14px; }
.panel-heading { min-height: 34px; padding: 0 0 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-heading h2 { margin: 0; color: #2e3f3b; font-size: 12px; font-weight: 700; }
.panel-heading p { margin: 5px 0 0; color: #939d99; font-size: 9px; }
.range-pill { padding: 5px 8px; border: 1px solid #e7ecea; border-radius: 4px; color: #76837f; font-size: 9px; white-space: nowrap; }
.chart-legend { margin: 1px 0 4px; display: flex; justify-content: flex-end; gap: 13px; color: #87938f; font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 2px; }
.legend-visits { background: #6fa795; }
.legend-adds { background: #e8b582; }
.chart-area { position: relative; height: 137px; padding: 5px 3px 0; display: flex; align-items: stretch; justify-content: space-around; border-bottom: 1px solid #edf1ef; background: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, #f0f3f2 34px, transparent 35px); }
.chart-col { min-width: 20px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.bar-group { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { width: min(11px, 22%); min-height: 0; border-radius: 3px 3px 0 0; transition: height .2s ease; }
.visits-bar { background: #72a997; }
.adds-bar { background: #e8b582; }
.chart-col small { height: 12px; color: #9ca6a3; font-size: 8px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #a1aaa7; font-size: 10px; }
.channel-summary { padding: 2px 0; }
.channel-row { min-height: 58px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #edf1ef; }
.channel-row:last-child { border-bottom: 0; }
.channel-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 7px; font-size: 11px; font-weight: 700; }
.symbol-personal { background: #f5eee8; color: #a67454; }
.symbol-wecom { background: #e8f3ed; color: #4a8b70; }
.channel-row div { min-width: 0; display: grid; gap: 4px; }
.channel-row b { color: #3b4946; font-size: 10px; }
.channel-row small { color: #98a19e; font-size: 8px; }
.channel-row strong { margin-left: auto; color: #3e514b; font-size: 15px; }
.channel-hint { margin-top: 10px; color: #a38466; font-size: 8px; line-height: 1.55; }
.table-panel { overflow: hidden; }
.table-panel > .panel-heading { padding: 16px 18px 10px; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { height: 36px; padding: 0 13px; border-top: 1px solid #edf1ef; border-bottom: 1px solid #edf1ef; background: #fafcfb; color: #87938f; font-size: 9px; font-weight: 600; }
td { height: 54px; padding: 7px 13px; border-bottom: 1px solid #f0f3f2; color: #53615d; font-size: 10px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdfc; }
td b { color: #33433f; font-weight: 600; }
.cell-sub { display: block; margin-top: 4px; color: #a2aba8; font-size: 8px; }
.kind { padding: 4px 7px; display: inline-block; border-radius: 4px; font-size: 8px; font-weight: 600; }
.kind-wecom { background: #e8f3ed; color: #458269; }
.kind-personal { background: #f8eee8; color: #a46d50; }
.status-label { display: inline-flex; align-items: center; gap: 6px; font-size: 9px; }
.status-label i { width: 6px; height: 6px; border-radius: 50%; background: #63a383; }
.status-active { color: #56866f; }
.status-paused { color: #9b8171; }
.status-paused i { background: #c5a78f; }
code { padding: 3px 5px; border-radius: 3px; background: #f3f6f5; color: #587068; font-family: 'DM Sans', monospace; font-size: 9px; }
.muted { color: #a2aba8; font-size: 9px; }
.footnote { margin: 11px 1px; color: #99a39f; font-size: 9px; line-height: 1.6; }
.toolbar { margin: -5px 0 14px; display: flex; align-items: center; gap: 12px; }
.search-box { width: min(310px, 100%); height: 34px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #e0e8e4; border-radius: 5px; background: #fff; color: #82908b; }
.search-box > span { font-size: 17px; line-height: 1; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: none; color: #3f504b; font-size: 10px; }
.search-box input::placeholder { color: #a0aaa6; }
.segmented { padding: 3px; display: inline-flex; gap: 2px; border: 1px solid #e4eae7; border-radius: 5px; background: #fafcfb; }
.segmented button { min-height: 26px; padding: 0 10px; border: 0; border-radius: 3px; background: transparent; color: #84908c; font-size: 9px; }
.segmented button.selected { background: #e8f2ee; color: #397867; font-weight: 600; }
.toolbar-count { margin-left: auto; color: #8d9994; font-size: 9px; white-space: nowrap; }
.copy-link { padding: 0; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; }
.copy-link span { color: #8aa095; font-size: 8px; }
.copy-link.copied span { color: #408369; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1px; }
.person-cell { display: flex; align-items: center; gap: 9px; }
.person-cell > span:last-child { display: grid; gap: 4px; }
.person-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e8efec; color: #557c6b; font-size: 11px; font-weight: 700; }
.weight-value { width: 27px; height: 22px; display: inline-grid; place-items: center; border-radius: 4px; background: #f0f5f2; color: #51806d; font-size: 9px; font-weight: 600; }
.inline-link { color: #43826e; font-size: 9px; text-decoration: none; }
.inline-link:hover { text-decoration: underline; }
.empty-state { min-height: 205px; padding: 27px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-symbol { width: 37px; height: 37px; margin-bottom: 11px; display: grid; place-items: center; border-radius: 11px; background: #eef5f1; color: #63917f; font-size: 21px; }
.empty-state b { color: #4b5b56; font-size: 12px; }
.empty-state p { max-width: 280px; margin: 6px 0 13px; color: #9aa49f; font-size: 9px; line-height: 1.6; }
.inline-error { min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #57645f; text-align: center; }
.inline-error b { font-size: 13px; }
.inline-error span { max-width: 480px; color: #9b6e61; font-size: 10px; }
.page-loading { min-height: 210px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #8c9994; font-size: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid #dfe9e4; border-top-color: #57947e; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.template-tabs { margin: -3px 0 14px; display: flex; gap: 19px; border-bottom: 1px solid #e4ebe8; }
.template-tab { position: relative; padding: 0 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #8b9692; font-size: 10px; }
.template-tab span { min-width: 16px; padding: 2px 4px; border-radius: 8px; background: #edf1ef; color: #84908c; font-size: 8px; text-align: center; }
.template-tab.selected { color: #347666; font-weight: 600; }
.template-tab.selected::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: #4b917d; content: ''; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.template-card { min-width: 0; min-height: 185px; padding: 14px 15px 12px; display: flex; flex-direction: column; border: 1px solid #e7eeea; border-radius: 7px; background: #fff; }
.template-card-top { display: flex; align-items: center; justify-content: space-between; }
.template-type { padding: 4px 6px; border-radius: 4px; font-size: 8px; font-weight: 600; }
.type-landing { background: #f0eef8; color: #7b70a0; }
.type-guide { background: #fbf1e6; color: #a8794e; }
.type-dialog { background: #e8f3ed; color: #52816d; }
.template-card h3 { margin: 12px 0 7px; color: #3c4b47; font-size: 12px; }
.template-card > p { display: -webkit-box; overflow: hidden; margin: 0 0 12px; color: #85918c; font-size: 9px; line-height: 1.75; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.template-card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f0f3f1; color: #a0aaa6; font-size: 8px; }
.template-tip { margin-top: 16px; padding: 12px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; border: 1px solid #e7ecea; border-radius: 6px; background: #fbfdfc; color: #87938f; font-size: 9px; }
.template-tip b { margin-right: 4px; color: #56645f; }
.template-tip span { padding: 4px 6px; border-radius: 3px; background: #f0f4f2; color: #628174; font-size: 8px; }
.template-tip small { flex-basis: 100%; color: #a1aaa7; font-size: 8px; }
.empty-panel { grid-column: 1 / -1; border: 1px solid #e7eeea; border-radius: 7px; background: #fff; }

.analytics-metrics .stat-card > strong { font-size: 20px; }
.analytics-metrics .stat-card:last-child > strong { font-size: 16px; }
.event-name { display: inline-flex; align-items: center; gap: 8px; color: #465650; }
.event-marker { width: 7px; height: 7px; border-radius: 50%; background: #84a9a0; }
.marker-verified { background: #4a9b78; }
.event-kind { padding: 4px 6px; border-radius: 4px; background: #f0f3f2; color: #87928e; font-size: 8px; }
.event-kind.is-verified { background: #e7f3ed; color: #4e876c; }
.analytics-note, .integration-warning { margin-top: 13px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #eadfcd; border-radius: 6px; background: #fffaf1; color: #987d5c; }
.analytics-note p, .integration-warning p { margin: 0; font-size: 9px; line-height: 1.7; }
.analytics-note b { margin-right: 5px; color: #826747; }
.note-icon { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #d7bf9f; border-radius: 50%; font-size: 10px; }

.integration-hero { min-height: 202px; padding: 23px; display: grid; grid-template-columns: 52px minmax(0, 1fr) 220px; align-items: start; gap: 17px; border: 1px solid #e5ece8; border-radius: 8px; background: linear-gradient(118deg, #fff 0%, #f7faf8 100%); }
.integration-hero.connected { border-color: #d7e8df; }
.integration-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #e3f1e8; color: #438368; font-size: 17px; font-weight: 700; }
.integration-copy { min-width: 0; }
.connection-pill { padding: 4px 7px; display: inline-flex; align-items: center; gap: 6px; border-radius: 4px; background: #fbf1e7; color: #a87544; font-size: 8px; }
.connection-pill i { width: 5px; height: 5px; border-radius: 50%; background: #d29b5c; }
.connection-pill.connected { background: #e9f4ed; color: #4e8469; }
.connection-pill.connected i { background: #4e9b75; }
.integration-copy h2 { margin: 10px 0 6px; color: #334440; font-size: 17px; }
.integration-copy p { max-width: 570px; margin: 0 0 14px; color: #89958f; font-size: 10px; line-height: 1.7; }
.integration-aside { min-height: 148px; padding: 13px 13px 10px; display: grid; align-content: start; gap: 11px; border: 1px solid #e6ece8; border-radius: 6px; background: rgba(255,255,255,.78); }
.integration-aside b { color: #63716c; font-size: 9px; }
.integration-aside span { display: flex; align-items: center; gap: 7px; color: #8a9591; font-size: 8px; }
.check-ok { color: #599b78; font-style: normal; }
.check-wait { color: #c49760; font-style: normal; }
.section-title { margin: 22px 0 11px; display: flex; align-items: baseline; gap: 9px; }
.section-title h2 { margin: 0; color: #394945; font-size: 12px; }
.section-title span { color: #9aa49f; font-size: 8px; }
.checklist-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.check-card { min-height: 150px; padding: 14px 15px; position: relative; border: 1px solid #e8eeeb; border-radius: 7px; background: #fff; }
.check-number { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 6px; background: #f0f5f2; color: #658675; font-size: 8px; font-weight: 700; }
.check-card h3 { margin: 10px 0 5px; color: #40514b; font-size: 10px; }
.check-card p { max-width: 340px; margin: 0; color: #8b9792; font-size: 8px; line-height: 1.65; }
.check-state { position: absolute; top: 17px; right: 14px; color: #ae9a81; font-size: 8px; }
.integration-warning { display: block; border-color: #e9e4d7; background: #fbfaf5; color: #7e7b6a; }
.integration-warning b { font-size: 9px; }
.integration-warning p { margin-top: 5px; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(370px, .85fr) minmax(450px, 1.15fr); background: #fff; }
.auth-aside { min-height: 100vh; padding: 35px 48px 28px; display: flex; flex-direction: column; background: #193d39; color: #fff; }
.auth-aside .brand-lockup { margin: 0; }
.auth-story { margin: auto 0; padding: 5vh 0 7vh; }
.auth-story .overline { margin: 0 0 18px; color: #a9cabd; font-size: 10px; font-weight: 600; letter-spacing: .06em; }
.auth-story h1 { margin: 0; color: #f4faf7; font-size: 34px; font-weight: 600; line-height: 1.5; }
.auth-copy { max-width: 340px; margin: 16px 0 0; color: #b3cbc2; font-size: 11px; line-height: 1.9; }
.auth-foot { color: #93b1a7; font-size: 9px; line-height: 1.7; }
.auth-main { min-width: 0; padding: 30px; display: grid; place-items: center; background: #fbfcfb; }
.auth-form { width: min(360px, 100%); padding: 25px 0; }
.auth-form .eyebrow { margin-bottom: 8px; color: #4d8977; }
.auth-form h2 { margin: 0; color: #293a36; font-size: 22px; }
.auth-form > .muted { margin: 8px 0 26px; color: #8b9792; font-size: 10px; line-height: 1.7; }
label { min-width: 0; display: grid; gap: 7px; color: #596863; font-size: 10px; font-weight: 600; }
.auth-form label { margin-top: 15px; }
input, select, textarea { width: 100%; min-width: 0; min-height: 36px; padding: 8px 10px; border: 1px solid #dfe7e3; border-radius: 5px; background: #fff; color: #354641; font-size: 10px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #a4aeaa; }
textarea { min-height: 100px; resize: vertical; line-height: 1.7; }
select[multiple] { min-height: 108px; }
.auth-form .btn { margin-top: 21px; }
.auth-note { margin: 16px 0 0; color: #9aa49f; font-size: 8px; line-height: 1.7; }
.form-error { margin: 10px 0; padding: 8px 10px; border: 1px solid #f0d6cc; border-radius: 4px; background: #fff7f4; color: #a85e4c; font-size: 9px; line-height: 1.5; }
.form-error[hidden] { display: none; }
.fatal-screen { min-height: 100vh; padding: 24px; display: grid; align-content: center; justify-items: center; gap: 11px; text-align: center; }
.fatal-screen h1 { margin: 6px 0 0; color: #334540; font-size: 18px; }
.fatal-screen p { max-width: 480px; margin: 0 0 6px; color: #8a9691; font-size: 10px; line-height: 1.6; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 22px; display: grid; place-items: center; background: rgba(21, 38, 35, .38); backdrop-filter: blur(2px); }
.modal { width: min(540px, 100%); max-height: calc(100vh - 44px); overflow: auto; border: 1px solid #e6ece9; border-radius: 8px; background: #fff; box-shadow: 0 22px 70px rgba(22,45,40,.2); }
.modal-loading { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #7e8b86; font-size: 10px; }
.modal-header { padding: 17px 20px 13px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid #edf1ef; }
.modal-header .eyebrow { margin-bottom: 4px; font-size: 8px; }
.modal-header h2 { margin: 0; color: #31413c; font-size: 15px; }
.modal-close { width: 28px; height: 28px; font-size: 17px; }
.modal-body { padding: 18px 20px 20px; display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.span-2 { grid-column: span 2; }
.member-rules-title { margin-bottom: 7px; color: #596863; font-size: 10px; font-weight: 600; }
.member-rules { overflow: hidden; border: 1px solid #e5ece8; border-radius: 5px; }
.member-rule { padding: 8px; display: grid; grid-template-columns: minmax(120px, 1fr) 74px 74px 82px; align-items: center; gap: 8px; border-bottom: 1px solid #edf1ef; }
.member-rule:last-child { border-bottom: 0; }
.member-pick { display: flex; align-items: center; gap: 7px; }
.member-pick input { width: 14px; min-height: 14px; height: 14px; margin: 0; accent-color: #39826f; }
.member-pick span { min-width: 0; display: grid; gap: 3px; }
.member-pick b { overflow: hidden; color: #4b5a56; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.member-pick small { overflow: hidden; color: #98a39e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.rule-input { gap: 4px; font-size: 8px; }
.rule-input input { min-height: 30px; padding: 5px 6px; }
.field-help { color: #98a39e; font-size: 8px; font-weight: 400; line-height: 1.55; }
.existing-file { display: flex; align-items: center; gap: 6px; color: #718078; font-size: 8px; font-weight: 400; }
.existing-file a { color: #3b806c; }
.check-field { display: flex; align-items: center; gap: 8px; }
.check-field input { width: 14px; min-height: 14px; height: 14px; margin: 0; accent-color: #39826f; }
.check-field span { color: #66746f; font-size: 9px; font-weight: 500; }
.inline-hint { padding: 9px 10px; border: 1px solid #e5ece8; border-radius: 5px; background: #f8fbf9; color: #798680; font-size: 9px; line-height: 1.6; }
.modal-footer { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #edf1ef; }
.toast { margin-bottom: 10px; padding: 9px 11px; border-radius: 5px; font-size: 9px; }
.toast-error { border: 1px solid #f0d6cc; background: #fff7f4; color: #a85e4c; }
.nav-scrim { display: none; }

@media (min-width: 1500px) {
  .page-content { padding-right: 48px; padding-left: 48px; }
}
@media (max-width: 1150px) {
  .sidebar { width: 216px; }
  .main-column { margin-left: 216px; }
  .topbar { padding: 0 25px; }
  .page-content { padding: 28px 25px 45px; }
  .overview-grid { grid-template-columns: minmax(0, 1.4fr) minmax(235px, .85fr); }
  .integration-hero { grid-template-columns: 48px minmax(0, 1fr); }
  .integration-aside { grid-column: 2; min-height: auto; grid-template-columns: repeat(3, auto); align-items: center; }
  .integration-aside b { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  .sidebar { width: 70px; padding: 21px 10px 14px; }
  .brand-lockup { margin: 0 6px 26px; }
  .brand-lockup > span:last-child, .workspace-label, .switch-caret, .nav-caption, .nav-link > span:last-of-type, .nav-dot, .privacy-note, .account-row > span:nth-child(2), .account-menu { display: none; }
  .workspace-switch { min-height: 45px; margin: 0 0 20px; padding: 6px; justify-content: center; }
  .nav-link { min-height: 42px; padding: 0; justify-content: center; }
  .nav-icon { width: auto; font-size: 17px; }
  .account-row { justify-content: center; padding: 9px 0; }
  .main-column { margin-left: 70px; }
  .topbar { padding: 0 19px; }
  .page-content { padding: 24px 19px 38px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .chart-panel { min-height: 220px; }
  .chart-area { height: 125px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .checklist-grid { grid-template-columns: 1fr; }
  .check-card { min-height: 120px; }
}
@media (max-width: 600px) {
  .sidebar { width: 248px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .workspace.nav-open .sidebar { transform: translateX(0); box-shadow: 15px 0 40px rgba(20,49,43,.18); }
  .workspace.nav-open .brand-lockup > span:last-child, .workspace.nav-open .workspace-label, .workspace.nav-open .switch-caret, .workspace.nav-open .nav-caption, .workspace.nav-open .nav-link > span:last-of-type, .workspace.nav-open .privacy-note, .workspace.nav-open .account-row > span:nth-child(2), .workspace.nav-open .account-menu { display: block; }
  .workspace.nav-open .workspace-switch { justify-content: flex-start; padding: 9px 10px; }
  .workspace.nav-open .nav-link { justify-content: flex-start; padding: 0 12px; }
  .workspace.nav-open .nav-link > span:last-of-type { display: inline; }
  .workspace.nav-open .account-row { justify-content: flex-start; padding: 7px 6px; }
  .main-column { margin-left: 0; }
  .topbar { height: 55px; padding: 0 14px; }
  .menu-toggle { display: inline-grid !important; width: 30px; height: 30px; margin-right: 9px; color: #65756f; }
  .breadcrumb { margin-right: auto; gap: 7px; font-size: 10px; }
  .topbar-actions { gap: 9px; }
  .help-button { font-size: 0; gap: 0; }
  .help-button .status-dot { width: 8px; height: 8px; }
  .demo-badge { padding: 5px 6px; font-size: 8px; }
  .page-content { padding: 21px 14px 35px; }
  .page-heading { align-items: flex-start; gap: 10px; margin-bottom: 18px; }
  .page-heading h1 { font-size: 19px; }
  .page-description { max-width: 100%; font-size: 9px; }
  .page-heading > .btn { min-height: 32px; padding: 0 9px; gap: 5px; font-size: 9px; white-space: nowrap; }
  .metric-grid { gap: 8px; margin-bottom: 11px; }
  .stat-card { min-height: 101px; padding: 12px 11px 10px; }
  .stat-top { font-size: 9px; }
  .stat-icon { width: 22px; height: 22px; font-size: 11px; }
  .stat-card > strong { font-size: 21px; }
  .stat-foot { font-size: 8px; }
  .chart-panel, .channel-panel { padding: 14px 13px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .search-box { flex: 1 1 100%; width: 100%; }
  .segmented { flex: 1; }
  .segmented button { flex: 1; padding: 0 6px; }
  .toolbar-count { margin-left: 0; }
  th { padding: 0 10px; font-size: 8px; }
  td { padding: 7px 10px; font-size: 9px; }
  .template-grid { grid-template-columns: 1fr; }
  .template-card { min-height: 155px; }
  .template-tabs { gap: 13px; overflow-x: auto; }
  .template-tab { flex: 0 0 auto; font-size: 9px; }
  .integration-hero { padding: 15px; grid-template-columns: 38px minmax(0,1fr); gap: 11px; }
  .integration-symbol { width: 38px; height: 38px; border-radius: 9px; font-size: 14px; }
  .integration-copy h2 { font-size: 14px; }
  .integration-aside { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .integration-aside b { grid-column: auto; }
  .section-title { flex-wrap: wrap; }
  .section-title span { flex-basis: 100%; }
  .analytics-metrics .stat-card > strong { font-size: 16px; }
  .analytics-metrics .stat-card:last-child > strong { font-size: 13px; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal { max-height: calc(100vh - 20px); border-radius: 9px 9px 4px 4px; }
  .modal-header { padding: 14px 15px 11px; }
  .modal-body { padding: 14px 15px; gap: 12px; }
  .form-grid { gap: 12px 9px; }
  .modal-footer { padding: 10px 15px 13px; }
  .member-rule { grid-template-columns: minmax(80px, 1fr) repeat(3, minmax(54px, 64px)); gap: 6px; padding: 7px 6px; }
  .rule-input { font-size: 7px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { min-height: auto; padding: 18px 20px 16px; }
  .auth-aside .brand-lockup { height: 34px; margin: 0; font-size: 13px; }
  .auth-aside .brand-mark { width: 31px; height: 31px; }
  .auth-story { margin: 29px 0 18px; padding: 0; }
  .auth-story .overline { margin-bottom: 8px; font-size: 8px; }
  .auth-story h1 { font-size: 20px; line-height: 1.45; }
  .auth-copy { display: none; }
  .auth-foot { font-size: 8px; }
  .auth-main { padding: 17px 20px 28px; }
  .auth-form { padding: 10px 0; }
  .auth-form h2 { font-size: 19px; }
  .auth-form > .muted { margin-bottom: 18px; }
  .nav-scrim { position: fixed; inset: 0; z-index: 19; display: block; border: 0; background: rgba(15,31,28,.35); }
}
@media (max-width: 370px) {
  .page-content { padding-right: 10px; padding-left: 10px; }
  .page-heading { flex-wrap: wrap; }
  .page-heading > .btn { margin-top: 2px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .stat-card > strong { font-size: 19px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}
