:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5e7;
  --paper: #ffffff;
  --canvas: #f5f5f7;
  --green: #0071e3;
  --green-dark: #0063c7;
  --green-soft: #edf5ff;
  --lime: #ffffff;
  --orange: #d97736;
  --sidebar: rgba(255,255,255,.82);
  --sidebar-text: #1d1d1f;
  --inverse: #000000;
  --inverse-muted: #a1a1a6;
  --field: #f5f5f7;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #38383a;
  --paper: #1c1c1e;
  --canvas: #000000;
  --green: #2997ff;
  --green-dark: #0077ed;
  --green-soft: #102a43;
  --sidebar: rgba(22,22,23,.88);
  --sidebar-text: #f5f5f7;
  --inverse: #f5f5f7;
  --inverse-muted: #6e6e73;
  --field: #2c2c2e;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Noto Sans SC", sans-serif; transition: color .25s ease, background .25s ease; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; display: flex; flex-direction: column; padding: 28px 18px 20px; color: var(--sidebar-text); background: var(--sidebar); border-right: 1px solid var(--line); backdrop-filter: saturate(180%) blur(24px); z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); border-radius: 10px; filter: drop-shadow(0 5px 10px rgba(0,0,0,.1)); }
.brand-mark img { display: block; width: 34px; height: 34px; color: var(--ink); border-radius: 10px; }
:root[data-theme="dark"] .brand-mark img { filter: invert(1); }
.main-nav { display: grid; gap: 6px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; color: var(--muted); border: 0; border-radius: 10px; background: transparent; text-align: left; transition: .2s ease; }
.nav-item:hover, .nav-item.active { color: var(--ink); background: rgba(128,128,128,.11); }
.nav-item.active::before { content: ""; position: absolute; left: -18px; width: 3px; height: 24px; background: var(--ink); border-radius: 0 4px 4px 0; }
.nav-icon { display: grid; place-items: center; width: 22px; font-size: 18px; }
.nav-count { margin-left: auto; padding: 2px 7px; color: #dffb84; background: rgba(215,243,107,.12); border-radius: 12px; font-size: 11px; }
.sidebar-section { margin-top: 32px; overflow: hidden; }
.section-label { margin: 0 12px 10px; color: #718078; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.side-product { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px; color: var(--muted); border: 0; background: none; text-align: left; font-size: 13px; }
.side-product:hover { color: var(--ink); }
.side-product i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.sidebar-bottom { margin-top: auto; }
.app-version { margin: 8px 12px 2px; color: #66786f; font-size: 9px; letter-spacing: .04em; }
.app-version strong { margin-left: 3px; color: #91a39a; font-weight: 600; }
.profile { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 15px 9px 0; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; color: #1e3329; background: #b7d9c6; border-radius: 50%; font-weight: 700; }
.profile strong, .profile small { display: block; }
.profile strong { font-size: 13px; }
.profile small { margin-top: 2px; color: #7e9087; font-size: 10px; }
.more { margin-left: auto; color: #66786f; }

.main { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; height: 92px; padding: 0 42px; background: color-mix(in srgb, var(--canvas) 82%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: saturate(180%) blur(24px); }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 21px; letter-spacing: -.5px; }
.top-actions { display: flex; align-items: center; gap: 11px; }
.theme-toggle { position: relative; display: grid; grid-template-columns: 27px 27px; align-items: center; width: 58px; height: 32px; padding: 2px; color: var(--muted); background: rgba(128,128,128,.12); border: 0; border-radius: 17px; }
.theme-toggle i { position: absolute; left: 3px; width: 26px; height: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: transform .25s ease; }
.theme-toggle[aria-pressed="true"] i { transform: translateX(26px); }
.theme-icon { position: relative; z-index: 1; font-size: 12px; line-height: 1; }
.status-pill { padding: 8px 12px; color: #587064; background: white; border: 1px solid var(--line); border-radius: 20px; font-size: 11px; }
.status-pill i, .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: #34a56d; border-radius: 50%; box-shadow: 0 0 0 4px rgba(52,165,109,.12); }
.status-pill.partial { color: #8e5d3a; }
.status-pill.partial i { background: #d97736; box-shadow: 0 0 0 4px rgba(217,119,54,.12); }
.status-pill.offline { color: #a5443d; }
.status-pill.offline i { background: #d44e46; box-shadow: 0 0 0 4px rgba(212,78,70,.12); }
.icon-button { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.notification-dot { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; background: #e07d42; border: 2px solid white; border-radius: 50%; }
.primary-button, .secondary-button { padding: 10px 16px; border-radius: 9px; font-size: 12px; font-weight: 600; transition: .2s ease; }
.primary-button { color: white; background: var(--green); border: 1px solid var(--green); box-shadow: none; }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled { color: var(--muted); background: var(--field); border-color: var(--line); box-shadow: none; cursor: not-allowed; transform: none; }
.secondary-button { color: var(--ink); background: white; border: 1px solid var(--line); }
.secondary-button:hover { border-color: #bcc8c1; }
.content { padding: 30px 42px 54px; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }

.campaign-builder { display: grid; grid-template-columns: .78fr 1.22fr; background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.builder-intro { position: relative; padding: 42px 38px; color: #f5f5f7; background: #000; overflow: hidden; }
.builder-intro::after { content: ""; position: absolute; right: -100px; bottom: -100px; width: 260px; height: 260px; background: var(--lime); opacity: .09; filter: blur(20px); border-radius: 50%; }
.builder-intro h2 { position: relative; margin: 0; font-size: 36px; line-height: 1.18; letter-spacing: -1.5px; }
.builder-intro > p { position: relative; margin: 15px 0 34px; color: #b3c3ba; font-size: 13px; line-height: 1.75; }
.workflow { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 0 12px; }
.workflow > span { z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; color: #82968b; background: #294439; border: 1px solid #3a574a; border-radius: 50%; font-size: 10px; font-weight: 700; }
.workflow > span.active { color: #000; background: #fff; border-color: #fff; }
.workflow p { margin: 1px 0 0; }
.workflow strong, .workflow small { display: block; }
.workflow strong { font-size: 12px; }
.workflow small { margin-top: 4px; color: #82968b; font-size: 10px; }
.workflow i { width: 1px; height: 37px; margin: 4px 0 4px 14px; background: #385246; }
.guardrail-note { position: relative; margin-top: 34px; padding: 13px 14px; color: #aebfb6; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; font-size: 10px; line-height: 1.6; }
.guardrail-note strong { color: #e7eee9; }
.campaign-form { padding: 34px 38px 38px; }
.form-section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.form-section-heading.divided { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--line); }
.form-section-heading > span { display: grid; place-items: center; width: 28px; height: 28px; color: var(--green); background: var(--green-soft); border-radius: 8px; font-size: 9px; font-weight: 700; }
.form-section-heading strong, .form-section-heading small { display: block; }
.form-section-heading strong { font-size: 13px; }
.form-section-heading small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.campaign-form label { display: block; margin-top: 13px; color: #3f4b45; font-size: 10px; font-weight: 600; }
.campaign-form label em { margin-left: 4px; color: #c1683b; font-style: normal; font-size: 8px; }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 400; line-height: 1.5; }
.campaign-form input:not([type="checkbox"]):not([type="file"]), .campaign-form textarea, .campaign-form select { width: 100%; margin-top: 7px; padding: 11px 12px; color: var(--ink); background: #fafbfa; border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 11px; transition: .2s; }
.campaign-form textarea { min-height: 66px; resize: vertical; }
.campaign-form input:focus, .campaign-form textarea:focus, .campaign-form select:focus { background: white; border-color: #79a68e; box-shadow: 0 0 0 3px #eef5f1; }
.upload-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-box { display: flex; align-items: center; gap: 10px; min-height: 70px; margin-top: 7px; padding: 12px; color: #52635a; background: #fafbfa; border: 1px dashed #c9d4ce; border-radius: 9px; cursor: pointer; }
.upload-box:hover { border-color: var(--green); }
.upload-box b { display: grid; place-items: center; width: 38px; height: 38px; color: var(--green); background: var(--green-soft); border-radius: 8px; font-size: 18px; }
.upload-box strong, .upload-box small { display: block; }
.upload-box strong { font-size: 10px; }
.upload-box small { color: var(--muted); font-size: 8px; }
.upload-box img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.approval-row { display: flex !important; align-items: flex-start; gap: 10px; padding: 12px; background: #f5f8f5; border-radius: 9px; }
.approval-row input { margin-top: 2px; accent-color: var(--green); }
.approval-row strong, .approval-row small { display: block; }
.approval-row small { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 400; }
.launch-button { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 19px; padding: 14px 16px; color: white; background: var(--green); border: 0; border-radius: 10px; text-align: left; transition: .2s; }
.launch-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.launch-button > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; color: #000; background: white; border-radius: 8px; }
.launch-button strong, .launch-button small { display: block; }
.launch-button strong { font-size: 11px; }
.launch-button small { margin-top: 3px; color: #bdd1c6; font-size: 8px; font-weight: 400; }
.launch-button b { margin-left: auto; font-size: 17px; }
.saved-heading { margin-top: 38px; }

.hero { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; min-height: 285px; padding: 44px 48px; overflow: hidden; color: white; background: #1b3428; border-radius: 20px; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -80px; bottom: -220px; background: var(--lime); opacity: .14; filter: blur(30px); border-radius: 50%; }
.kicker { display: inline-block; margin-bottom: 20px; padding: 6px 10px; color: #dff58e; background: rgba(215,243,107,.1); border: 1px solid rgba(215,243,107,.22); border-radius: 20px; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.hero h2 { margin: 0; max-width: 580px; font-size: clamp(32px, 3vw, 47px); line-height: 1.12; letter-spacing: -2px; }
.hero p { max-width: 540px; margin: 18px 0 0; color: #afc1b7; font-size: 14px; line-height: 1.8; }
.hero-visual { position: relative; min-height: 190px; }
.orbit { position: absolute; top: 50%; left: 52%; border: 1px solid rgba(215,243,107,.18); border-radius: 50%; transform: translate(-50%,-50%); }
.orbit-one { width: 180px; height: 180px; }
.orbit-two { width: 290px; height: 290px; }
.pulse { position: absolute; top: 50%; left: 52%; display: grid; place-items: center; width: 92px; height: 92px; background: rgba(215,243,107,.08); border: 1px solid rgba(215,243,107,.35); border-radius: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 60px rgba(215,243,107,.14); }
.pulse span { width: 28px; height: 28px; background: var(--lime); border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); }
.signal { position: absolute; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; color: #17291f; background: #f1f6f2; border-radius: 11px; font-size: 11px; font-weight: 700; box-shadow: 0 10px 20px rgba(0,0,0,.2); }
.signal-one { top: 11%; left: 20%; }
.signal-two { right: 4%; top: 38%; background: #cce6d7; }
.signal-three { bottom: 6%; left: 22%; background: var(--lime); }

.metrics { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 18px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.metrics article { position: relative; padding: 22px 25px; }
.metrics article:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 24%; width: 1px; height: 52%; background: var(--line); }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 11px; }
.metrics strong { display: inline-block; margin: 8px 10px 5px 0; font-size: 27px; letter-spacing: -1px; }
.metrics small { display: inline; }
.metrics .up { color: var(--green); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 34px 0 16px; }
.section-heading h3 { margin: 0; font-size: 19px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.product-empty { grid-column: 1 / -1; padding: 42px; color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: 15px; text-align: center; }
.product-empty strong { color: var(--ink); font-size: 13px; }
.product-empty p { margin: 6px 0 0; font-size: 10px; }
.product-card { position: relative; padding: 22px; background: white; border: 1px solid var(--line); border-radius: 15px; transition: .2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.product-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--green-dark); background: var(--green-soft); border-radius: 12px; font-weight: 700; }
.running { color: var(--green); background: var(--green-soft); }
.paused { color: #94613c; background: #f8eee6; }
.running, .paused { padding: 5px 8px; border-radius: 14px; font-size: 10px; }
.product-card h4 { margin: 18px 0 7px; font-size: 16px; }
.product-card > p { min-height: 38px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.keywords { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.keywords span { padding: 5px 8px; color: #627068; background: #f3f6f3; border-radius: 6px; font-size: 9px; }
.card-stats { display: flex; justify-content: space-between; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.card-stats strong { margin-right: 3px; color: var(--ink); font-size: 13px; }
.card-action { width: 100%; margin-top: 17px; padding: 9px; color: var(--green); background: transparent; border: 1px solid #cfe0d6; border-radius: 8px; font-size: 11px; font-weight: 600; }
.card-action:hover { color: white; background: var(--green); }

.monitor-heading { display: flex; align-items: flex-end; justify-content: space-between; }
.monitor-heading h2 { margin: 14px 0 6px; font-size: 28px; letter-spacing: -1px; }
.monitor-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.back-button { padding: 0; color: var(--green); background: none; border: 0; font-size: 11px; }
.monitor-stats { display: grid; grid-template-columns: repeat(4,1fr); margin: 26px 0 22px; padding: 20px 24px; background: #000; border-radius: 14px; color: white; }
.monitor-stats > div { padding: 2px 22px; border-right: 1px solid rgba(255,255,255,.1); }
.monitor-stats > div:first-child { padding-left: 0; }
.monitor-stats > div:last-child { border: 0; }
.monitor-stats small { display: block; margin-bottom: 8px; color: #9eb2a7; font-size: 10px; }
.monitor-stats strong { font-size: 19px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.query-banner { display: flex; align-items: center; gap: 10px; margin: -6px 0 16px; padding: 11px 13px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; font-size: 9px; }
.query-banner[hidden] { display: none; }
.query-banner span { flex: 0 0 auto; color: var(--ink); font-weight: 600; }
.query-banner code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.tabs { display: flex; gap: 5px; }
.tab { padding: 8px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 11px; }
.tab.active { color: var(--ink); background: white; box-shadow: 0 3px 12px rgba(30,50,40,.06); }
.tab span { margin-left: 5px; color: #8a9690; }
.search { display: flex; align-items: center; gap: 7px; width: 230px; padding: 8px 11px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.search input { width: 100%; border: 0; outline: 0; font-size: 11px; }
.lead-list { display: grid; gap: 10px; }
.lead-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.lead-avatar { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: #425e51; border-radius: 50%; font-size: 12px; font-weight: 700; }
.lead-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }
.lead-meta strong { font-size: 12px; }
.lead-meta span { color: var(--muted); font-size: 10px; }
.intent { padding: 3px 7px; border-radius: 10px; font-size: 9px !important; font-weight: 600; }
.intent.high { color: #176445; background: #e4f3ea; }
.intent.medium { color: #936029; background: #faf0df; }
.lead-content { margin: 0; max-width: 770px; color: #47534d; font-size: 12px; line-height: 1.65; }
.lead-tags { display: flex; gap: 5px; margin-top: 10px; }
.lead-original { display: inline-block; margin-top: 10px; color: var(--green); font-size: 9px; text-decoration: none; }
.lead-original:hover { text-decoration: underline; }
.lead-tags span { padding: 4px 7px; color: #6c7771; background: #f3f5f3; border-radius: 5px; font-size: 9px; }
.lead-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; min-width: 115px; }
.score { color: var(--green); font-size: 10px; font-weight: 600; }
.reply-button { padding: 8px 11px; color: var(--green); background: var(--green-soft); border: 0; border-radius: 7px; font-size: 10px; font-weight: 600; }
.reply-button.done { color: #76827c; background: #eff2f0; }
.empty-state { padding: 70px; color: var(--muted); background: white; border: 1px dashed #cbd3ce; border-radius: 13px; text-align: center; font-size: 12px; }

.placeholder-view { padding: 150px 30px; background: white; border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.placeholder-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; color: var(--green); background: var(--green-soft); border-radius: 17px; font-size: 25px; }
.placeholder-view h2 { margin: 0; }
.placeholder-view p { color: var(--muted); font-size: 13px; }

.accounts-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.accounts-heading h2 { margin: 0 0 7px; font-size: 32px; letter-spacing: -1.2px; }
.accounts-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.account-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 20px; }
.account-summary article { display: flex; align-items: center; gap: 15px; padding: 21px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.summary-icon { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; color: var(--ink); background: var(--field); border-radius: 13px; font-size: 12px; font-weight: 700; }
.account-summary small, .account-summary strong, .account-summary p { display: block; margin: 0; }
.account-summary small { color: var(--muted); font-size: 9px; }
.account-summary strong { margin: 5px 0 3px; font-size: 21px; letter-spacing: -.5px; }
.account-summary strong b { font: inherit; }
.account-summary p { color: var(--muted); font-size: 9px; }
.account-panel, .role-guide { padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-heading h3, .role-guide h3 { margin: 0; font-size: 15px; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.permission-note { padding: 5px 8px; color: var(--muted); background: var(--field); border-radius: 12px; font-size: 8px; }
.member-row { display: grid; grid-template-columns: minmax(220px,1.3fr) .7fr .7fr auto; align-items: center; gap: 18px; min-height: 70px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.member-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: white; background: #1d1d1f; border-radius: 50%; font-size: 11px; font-weight: 700; }
.member-identity strong, .member-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-identity strong { font-size: 11px; }
.member-identity small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.member-role, .member-status { color: var(--muted); font-size: 10px; }
.role-badge, .status-badge { display: inline-block; padding: 5px 8px; border-radius: 12px; font-size: 9px; }
.role-badge { color: var(--ink); background: var(--field); }
.status-badge.active { color: #16784a; background: #e9f7ef; }
.status-badge.disabled { color: #8e5d3a; background: #f7eee8; }
.member-actions { display: flex; gap: 6px; justify-content: flex-end; }
.member-action { padding: 7px 9px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 7px; font-size: 9px; }
.member-action:hover { color: var(--ink); background: var(--field); }
.member-action.danger:hover { color: #c33b32; border-color: #e8b6b2; background: #fff5f4; }
.owner-label { color: var(--muted); font-size: 9px; }
.empty-members { padding: 36px; color: var(--muted); text-align: center; font-size: 11px; }
.role-guide { margin-top: 20px; }
.role-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 15px; }
.role-grid article { padding: 15px; background: var(--field); border-radius: 11px; }
.role-grid span { font-size: 10px; font-weight: 700; }
.role-grid p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.account-limit-note { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 13px; color: var(--muted); background: var(--field); border-radius: 10px; font-size: 9px; line-height: 1.55; }
.account-limit-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 50%; font-weight: 700; }
.account-limit-note p { margin: 0; }
.account-limit-note strong { color: var(--ink); }

.settings-shell { max-width: 850px; margin: 0 auto; }
.settings-heading { margin-bottom: 24px; }
.settings-heading h2 { margin: 0 0 8px; font-size: 32px; letter-spacing: -1.2px; }
.settings-heading > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.settings-panel { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.setting-row h3 { margin: 0 0 6px; font-size: 14px; }
.setting-row p { margin: 0; color: var(--muted); font-size: 10px; }
.saved-indicator { padding: 5px 8px; color: var(--muted); background: var(--field); border-radius: 12px; font-size: 8px; }
.language-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.language-option { display: grid; grid-template-columns: 42px 1fr 22px; align-items: center; gap: 12px; padding: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 13px; text-align: left; transition: .2s ease; }
.language-option:hover { background: var(--field); }
.language-option.active { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent); }
.language-symbol { display: grid; place-items: center; width: 42px; height: 42px; color: var(--ink); background: var(--field); border-radius: 12px; font-size: 12px; font-weight: 700; }
.language-option strong, .language-option small { display: block; }
.language-option strong { font-size: 11px; }
.language-option small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.language-option i { display: none; color: var(--green); font-style: normal; font-weight: 700; }
.language-option.active i { display: block; }
.language-note { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 14px; color: var(--muted); background: var(--field); border-radius: 11px; font-size: 9px; line-height: 1.6; }
.language-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.language-note p { margin: 0; }
.language-note strong { color: var(--ink); }
.model-settings { margin-top: 20px; }
.active-model-summary { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; margin-top: 20px; padding: 18px; background: var(--field); border-radius: 13px; }
.model-orb { display: grid; place-items: center; width: 48px; height: 48px; color: white; background: #1d1d1f; border-radius: 14px; font-size: 11px; font-weight: 700; }
.active-model-summary small, .active-model-summary strong, .active-model-summary p { display: block; margin: 0; }
.active-model-summary small { color: var(--muted); font-size: 8px; }
.active-model-summary strong { margin: 4px 0; font-size: 13px; }
.active-model-summary p { color: var(--muted); font-size: 9px; }
.model-ready { color: #16784a; font-size: 9px; }
.model-list-heading { display: flex; justify-content: space-between; margin: 24px 0 10px; font-size: 10px; }
.model-list-heading span { color: var(--muted); }
.model-list { display: grid; gap: 9px; }
.model-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; }
.model-row.active { border-color: var(--green); background: color-mix(in srgb, var(--green) 4%, var(--paper)); }
.provider-mark { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink); background: var(--field); border-radius: 10px; font-size: 9px; font-weight: 700; }
.model-info strong, .model-info small { display: block; }
.model-info strong { font-size: 10px; }
.model-info small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.model-actions { display: flex; align-items: center; gap: 7px; }
.model-select, .model-delete { padding: 7px 9px; border-radius: 7px; font-size: 8px; }
.model-select { color: var(--ink); background: var(--paper); border: 1px solid var(--line); }
.model-row.active .model-select { color: var(--green); background: var(--green-soft); border-color: transparent; }
.model-delete { color: var(--muted); background: transparent; border: 0; }
.model-delete:hover { color: #c33b32; }
.model-security-note { display: flex; gap: 11px; margin-top: 18px; padding: 12px 14px; color: var(--muted); background: var(--field); border-radius: 10px; font-size: 9px; line-height: 1.55; }
.model-security-note > span { color: var(--green); font-size: 18px; }
.model-security-note p { margin: 0; }
.model-security-note strong { color: var(--ink); }
.model-api-note { display: flex; gap: 10px; margin-top: 14px; padding: 11px 13px; color: #8e5d3a; background: #fff7f0; border-radius: 9px; font-size: 9px; }
.model-api-note span { font-weight: 700; }
.model-api-note p { margin: 0; }
:root[data-theme="dark"] .model-orb { color: #000; background: #f5f5f7; }
:root[data-theme="dark"] .model-api-note { color: #e8b58d; background: #392519; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 25px; background: rgba(8,20,14,.55); opacity: 0; visibility: hidden; transition: .2s ease; backdrop-filter: blur(5px); }
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal { position: relative; width: min(620px,100%); max-height: calc(100vh - 50px); overflow: auto; padding: 30px; background: white; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.22); transform: translateY(10px); transition: .2s ease; }
.modal-backdrop.open .modal { transform: none; }
.modal-close { position: absolute; right: 20px; top: 18px; width: 30px; height: 30px; color: #78827c; background: #f1f4f2; border: 0; border-radius: 50%; font-size: 19px; }
.modal h2 { margin: 3px 0 8px; font-size: 25px; }
.modal-intro { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.modal label { display: block; margin-top: 15px; color: #3f4b45; font-size: 11px; font-weight: 600; }
.modal input, .modal textarea, .modal select { width: 100%; margin-top: 7px; padding: 11px 12px; color: var(--ink); background: #fafbfa; border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 12px; }
.modal input:focus, .modal textarea:focus, .modal select:focus { border-color: #78a68e; box-shadow: 0 0 0 3px #eef5f1; }
.modal textarea { min-height: 80px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.ai-note, .reply-insight { display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px; color: #476153; background: var(--green-soft); border-radius: 9px; font-size: 10px; line-height: 1.55; }
.ai-note p, .reply-insight p { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.score-ring { float: right; display: grid; place-items: center; width: 66px; height: 66px; color: var(--green); background: var(--green-soft); border: 5px solid #b8d9c6; border-radius: 50%; }
.score-ring strong, .score-ring span { display: block; line-height: 1; }
.score-ring strong { font-size: 17px; }
.score-ring span { font-size: 8px; }
.source-post { margin-top: 20px; padding: 14px; color: #506058; background: #f6f8f6; border-left: 3px solid #9db8aa; border-radius: 5px; font-size: 11px; line-height: 1.6; }
.reply-modal textarea { min-height: 105px; }
.publish-warning { margin-top: 13px; padding: 10px 12px; color: #8e5d3a; background: #fff7f0; border-radius: 8px; font-size: 9px; }
:root[data-theme="dark"] .publish-warning { color: #e8b58d; background: #392519; }
.launch-button.loading { opacity: .72; cursor: wait; pointer-events: none; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 40; padding: 13px 18px; color: white; background: #183126; border-radius: 9px; font-size: 11px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: none; }

:root[data-theme="dark"] .campaign-builder,
:root[data-theme="dark"] .metrics,
:root[data-theme="dark"] .product-card,
:root[data-theme="dark"] .lead-card,
:root[data-theme="dark"] .placeholder-view,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .status-pill,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .tab.active,
:root[data-theme="dark"] .search { background: var(--paper); }
:root[data-theme="dark"] .campaign-form input:not([type="checkbox"]):not([type="file"]),
:root[data-theme="dark"] .campaign-form textarea,
:root[data-theme="dark"] .campaign-form select,
:root[data-theme="dark"] .modal input,
:root[data-theme="dark"] .modal textarea,
:root[data-theme="dark"] .modal select,
:root[data-theme="dark"] .upload-box,
:root[data-theme="dark"] .approval-row,
:root[data-theme="dark"] .source-post { color: var(--ink); background: var(--field); }
:root[data-theme="dark"] .keywords span,
:root[data-theme="dark"] .lead-tags span,
:root[data-theme="dark"] .reply-button.done { color: var(--muted); background: var(--field); }
:root[data-theme="dark"] .profile { border-color: var(--line); }
:root[data-theme="dark"] .builder-intro,
:root[data-theme="dark"] .monitor-stats { background: #0b0b0c; }

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar { width: 82px; padding-inline: 12px; }
  .brand > span:last-child, .nav-item > span:not(.nav-icon), .sidebar-section, .app-version, .profile > span:not(.avatar) { display: none; }
  .brand { justify-content: center; padding-inline: 0; }
  .nav-item { justify-content: center; }
  .nav-item.active::before { left: -12px; }
  .main { grid-column: 2; }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .campaign-builder { grid-template-columns: 1fr; }
  .builder-intro { padding-bottom: 35px; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .account-summary { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: 68px; flex-direction: row; align-items: center; padding: 10px 15px; }
  .brand { padding: 0; }
  .main-nav { display: flex; margin-left: auto; }
  .nav-item { width: 42px; }
  .sidebar-bottom { display: none; }
  .main { width: 100%; }
  .topbar { height: 76px; padding: 0 18px; }
  .topbar .eyebrow, .status-pill, .icon-button { display: none; }
  .topbar h1 { font-size: 16px; }
  .content { padding: 18px; }
  .hero { padding: 30px 24px; min-height: auto; }
  .hero h2 { font-size: 32px; }
  .builder-intro, .campaign-form { padding: 28px 22px; }
  .builder-intro h2 { font-size: 30px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article:nth-child(2)::after { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .monitor-stats { grid-template-columns: 1fr 1fr; gap: 18px; }
  .monitor-stats > div { padding: 0; border: 0; }
  .toolbar { align-items: stretch; gap: 10px; flex-direction: column; }
  .tabs { overflow-x: auto; }
  .search { width: 100%; }
  .lead-card { grid-template-columns: 36px 1fr; }
  .lead-side { grid-column: 2; align-items: flex-start; gap: 10px; }
  .field-row { grid-template-columns: 1fr; }
  .accounts-heading { align-items: flex-start; gap: 18px; flex-direction: column; }
  .member-row { grid-template-columns: 1fr; gap: 10px; padding: 16px 4px; }
  .member-actions { justify-content: flex-start; }
  .role-grid { grid-template-columns: 1fr; }
  .language-grid { grid-template-columns: 1fr; }
  .active-model-summary { grid-template-columns: 42px 1fr; }
  .model-ready { grid-column: 2; }
  .model-row { grid-template-columns: 38px 1fr; }
  .model-actions { grid-column: 2; justify-content: flex-start; }
}
/* Embedded showcase controls */
.showcase-banner {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 330px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: #d9e8ff;
  background: rgba(10, 24, 49, .88);
  border: 1px solid rgba(75, 138, 241, .3);
  border-radius: 9px;
  box-shadow: 0 10px 35px rgba(8, 24, 55, .22);
  backdrop-filter: blur(14px);
  font: 500 12px "Noto Sans SC", sans-serif;
}
.showcase-banner span { display: flex; align-items: center; gap: 8px; }
.showcase-banner i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4e9cff;
  box-shadow: 0 0 8px #4e9cff;
}
.showcase-banner a { color: #6daaff; text-decoration: none; white-space: nowrap; }
@media (max-width: 700px) {
  .showcase-banner { top: 8px; min-width: 0; width: calc(100% - 20px); }
}
