:root {
  --ink: #202534;
  --muted: #666c7d;
  --line: #e1e3ec;
  --paper: #f7f7fb;
  --card: #fff;
  --green: #4f46e5;
  --green-dark: #202534;
  --mint: rgba(79, 70, 229, .1);
  --lime: #f26b5e;
  --orange: #f26b5e;
  --shadow: 0 24px 70px rgba(32, 37, 52, .12);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.notice { background: var(--green-dark); color: #fff; left: 50%; padding: 12px 18px; position: fixed; top: 18px; transform: translateX(-50%); z-index: 20; border-radius: 10px; box-shadow: var(--shadow); }
.contact-form-error { padding: 12px 16px; border: 1px solid #d88b82; border-radius: 10px; background: #fde8e5; color: #7d251d; }
.brand { align-items: center; color: var(--ink); display: inline-flex; text-decoration: none; }
.brand-light { color: #fff; }
.brand-logo { display: block; height: auto; max-width: 190px; width: 190px; }
.brand-logo-light { max-width: 210px; width: 210px; }
.kicker { color: var(--green); font-size: 12px; font-weight: 850; letter-spacing: .11em; margin: 0 0 10px; text-transform: uppercase; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); min-height: 100vh; }
.auth-story { background: radial-gradient(circle at 78% 18%, rgba(242,107,94,.23), transparent 24%), var(--green-dark); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 48px clamp(34px, 6vw, 90px); }
.auth-story .kicker { color: var(--lime); }
.auth-story h1 { font-size: clamp(50px, 6.5vw, 88px); font-weight: 800; letter-spacing: -.055em; line-height: .94; margin: 18px 0 28px; max-width: 820px; }
.auth-lead { color: rgba(255,255,255,.72); font-size: 18px; line-height: 1.65; max-width: 650px; }
.story-stats { border-top: 1px solid rgba(255,255,255,.18); display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); padding-top: 28px; }
.story-stats article { display: grid; gap: 7px; }
.story-stats span { color: rgba(255,255,255,.62); font-size: 13px; line-height: 1.4; }
.auth-panel { align-items: center; background: #f1f0ff; display: flex; justify-content: center; padding: 30px; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: clamp(28px, 5vw, 56px); width: min(480px, 100%); }
.auth-card h2, .onboarding-card h2, .panel h2 { font-size: 30px; letter-spacing: -.04em; margin: 0 0 10px; }
.auth-card > p:not(.kicker), .onboarding-card p, .panel-note { color: var(--muted); line-height: 1.55; }
form { display: grid; gap: 18px; margin-top: 28px; }
label { color: #36433b; display: grid; font-size: 13px; font-weight: 750; gap: 8px; }
input, select { background: #fff; border: 1px solid #cfd8d0; border-radius: 10px; color: var(--ink); min-height: 48px; padding: 0 14px; width: 100%; }
textarea { background: #fff; border: 1px solid #cfd8d0; border-radius: 10px; color: var(--ink); line-height: 1.5; padding: 12px 14px; resize: vertical; width: 100%; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,107,79,.12); outline: none; }
form button, .secondary-button { border: 0; border-radius: 10px; font-weight: 800; min-height: 48px; padding: 0 18px; }
form button { background: var(--green); color: #fff; }
.secondary-button { background: var(--mint); color: var(--green-dark); width: 100%; }
.text-button { background: none; border: 0; color: var(--green); font-weight: 800; margin-top: 18px; padding: 4px 0; }
.auth-secondary-link { display: block; margin-top: 10px; }
.fine-print { border-top: 1px solid var(--line); font-size: 12px; margin-top: 30px; padding-top: 20px; }
.product-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 28px 20px; }
.sidebar nav { display: grid; gap: 7px; margin-top: 46px; }
.nav-item { align-items: center; background: transparent; border: 0; border-radius: 9px; color: var(--muted); display: flex; gap: 10px; font-weight: 700; justify-content: space-between; padding: 12px; text-align: left; }
.nav-item.is-active { background: var(--mint); color: var(--green-dark); }
.nav-unread-badge { background: var(--orange); border-radius: 999px; color: #fff; flex: 0 0 auto; font-size: 10px; line-height: 1; margin-left: auto; min-width: 24px; padding: 5px 7px; text-align: center; }
.sidebar-foot { border-top:1px solid var(--line); display:grid; gap:10px; margin-top:auto; padding:18px 0 0; }
.sidebar-account-card { min-width:0; padding:12px; background:#f7f7fb; border:1px solid #eeeeF4; border-radius:12px; }
.sidebar-account-heading { display:flex; align-items:center; gap:10px; min-width:0; margin-bottom:8px; }
.sidebar-foot .profile-icon { width:36px; height:36px; border-radius:50%; font-size:20px; }
.sidebar-account-name { min-width:0; display:grid; gap:2px; }
.sidebar-foot #userName { font-size:12px; font-weight:700; line-height:1.45; min-width:0; overflow-wrap:anywhere; }
.sidebar-foot .sidebar-account-caption { font-size:10px; color:var(--muted); margin:0; line-height:1.4; }
.sidebar-foot small { color: var(--muted); font-size: 9px; line-height: 1.5; margin-top: 3px; min-width: 0; white-space: nowrap; overflow-x: auto; }
.sidebar-foot #userEmail { display:block; }
.sidebar-action { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:38px; padding:9px 12px; background:#fff; border:1px solid var(--line); border-radius:10px; color:var(--muted); font-size:12px; font-weight:650; line-height:18px; }
.sidebar-action:hover { background:#f4f3ff; color:var(--green); border-color:#d7d3ed; }
.sidebar-action:focus-visible { outline:3px solid var(--mint); outline-offset:2px; }
.workspace { min-width: 0; padding: 34px clamp(24px, 4vw, 58px) 60px; }
.workspace-header { align-items: end; display: flex; justify-content: space-between; margin-bottom: 36px; }
.workspace-header h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 800; letter-spacing: -.045em; margin: 0; }
.org-switcher { min-width: 240px; }
.header-actions { align-items: end; display: flex; gap: 12px; }
.onboarding-card { background: linear-gradient(135deg, #fff 0 54%, #eeedff 54%); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); display: grid; gap: 60px; grid-template-columns: 1fr 1fr; padding: clamp(28px, 5vw, 62px); }
.onboarding-card h2 { font-size: clamp(36px, 5vw, 58px); }
.slug-field { align-items: center; background: #fff; border: 1px solid #cfd8d0; border-radius: 10px; display: flex; overflow: hidden; }
.slug-field span { color: var(--muted); padding-left: 14px; }
.slug-field input { border: 0; padding-left: 3px; }
.metrics-grid { display: grid; gap: 15px; grid-template-columns: repeat(4, 1fr); }
.metric-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 11px; min-height: 160px; padding: 22px; }
.metric-card span { color: var(--muted); font-size: 13px; font-weight: 750; }
.metric-card strong { font-size: 48px; font-weight: 800; }
.metric-card small { color: var(--muted); }
.metric-dark { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.metric-dark span, .metric-dark small { color: rgba(255,255,255,.67); }
.growth-overview { margin-top: 18px; overflow: hidden; padding: 28px; }
.growth-update-status { margin: 16px 0 0; padding: 10px 14px; border-radius: 9px; background: #f0eefc; color: #5144a6; font-size: 13px; line-height: 1.5; }
.growth-update-status[hidden] { display: none; }
#overviewGrowthView[aria-busy="true"] .growth-chart { opacity: .65; }
.growth-chart { transition: opacity .16s ease; }
@media(prefers-reduced-motion: reduce) { .growth-chart { transition: none; } }
.overview-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; margin: 26px 0 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.overview-tabs button { border: 0; border-radius: 9px; padding: 13px 22px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; }
.overview-tabs button[aria-selected="true"] { background: #5144ed; color: white; }
.overview-tabs button:focus-visible { outline: 3px solid #aca5ff; outline-offset: 2px; }
.overview-tabs button[hidden], .overview-tab-panel[hidden] { display: none !important; }
.overview-tab-panel { min-width: 0; }
#overviewGrowthView { margin-top: 0; }
.overview-tab-panel > .panel { margin-top: 0; padding: 28px; }
@media(max-width: 600px) { .overview-tabs button { flex: 1 1 auto; padding: 12px; font-size: 13px; } .overview-tab-panel > .panel { padding: 20px; } }
.growth-heading { align-items: start; display: flex; flex-direction: column; gap: 20px; }
.growth-heading h2 { margin-bottom: 7px; }
.growth-heading > div:first-child > p:last-child { color: var(--muted); line-height: 1.5; margin: 0; max-width: 680px; }
.growth-controls { display: flex; width: 100%; min-width: 0; }
.growth-ranges { align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; }
.growth-ranges button { background: transparent; border: 0; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 800; padding: 9px 12px; }
.growth-ranges button.is-active { background: #fff; box-shadow: 0 2px 8px rgba(32,37,52,.09); color: var(--green); }
.growth-hijri-control { display: flex; margin: 0; width: auto; min-width: 0; }
.growth-hijri-control span, .growth-custom-dates label span { color: var(--muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.growth-hijri-control select { background-color: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 800; min-height: 36px; width: 165px; max-width: 100%; padding: 8px 24px 8px 12px; cursor: pointer; text-overflow: ellipsis; }
.growth-hijri-control select.is-active { background-color: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(32,37,52,.09); }
@media(max-width: 480px) { .growth-ranges { width: 100%; } .growth-hijri-control { flex: 1 1 100%; } .growth-hijri-control select { width: 100%; border-left: 0; border-top: 1px solid var(--line); } }
.growth-custom-dates { align-items: end; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; display: flex; gap: 12px; margin-top: 18px; padding: 14px; }
.growth-custom-dates[hidden] { display: none; }
.growth-custom-dates label { flex: 1; gap: 5px; }
.growth-custom-dates input { min-height: 40px; }
.growth-custom-dates button { background: var(--green); border: 0; border-radius: 9px; color: #fff; font-size: 12px; font-weight: 800; min-height: 40px; padding: 0 18px; }
.growth-hijri-note { background: rgba(79,70,229,.07); border: 1px solid rgba(79,70,229,.18); border-radius: 11px; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 12px; padding: 11px 13px; }
.growth-hijri-note strong { color: var(--ink); }
.growth-summary { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-top: 24px; }
.growth-summary button { background: var(--paper); border: 1px solid transparent; border-radius: 13px; color: var(--ink); display: grid; gap: 5px; min-width: 0; padding: 16px; text-align: left; }
.growth-summary button:hover, .growth-summary button.is-active { background: rgba(79,70,229,.07); border-color: rgba(79,70,229,.24); }
.growth-summary span { color: var(--muted); font-size: 11px; font-weight: 800; }
.growth-summary strong { font-size: 27px; letter-spacing: -.03em; }
.growth-summary small { color: var(--muted); font-size: 10px; }
.growth-summary small.positive { color: #28795b; }
.growth-summary small.negative { color: #b64d43; }
.growth-chart-heading { align-items: end; display: flex; justify-content: space-between; margin-top: 26px; }
.growth-chart-heading div { display: grid; gap: 3px; }
.growth-chart-heading span { color: var(--muted); font-size: 11px; font-weight: 750; }
.growth-chart-heading strong { font-size: 17px; }
.growth-chart { align-items: stretch; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), var(--line) 25%); border-bottom: 1px solid var(--line); display: flex; gap: clamp(3px, .8vw, 10px); height: 210px; margin-top: 14px; padding: 16px 5px 0; position: relative; }
.growth-bar { align-items: center; display: flex; flex: 1 1 0; flex-direction: column; height: 100%; justify-content: flex-end; min-width: 4px; position: relative; }
.growth-bar i { background: linear-gradient(180deg, #756ef0, var(--green)); border-radius: 6px 6px 2px 2px; display: block; min-height: 0; transition: height .22s ease; width: min(100%, 28px); }
.growth-bar:hover i { background: var(--orange); }
.growth-bar span { bottom: -30px; color: var(--muted); font-size: 9px; left: 50%; position: absolute; transform: translateX(-50%); white-space: nowrap; }
.growth-bar:not(.show-label) span { display: none; }
.growth-empty { align-items: center; color: var(--muted); display: flex; font-size: 12px; inset: 0; justify-content: center; position: absolute; text-align: center; }
.growth-footer { color: var(--muted); display: flex; font-size: 11px; justify-content: space-between; line-height: 1.45; margin-top: 34px; }
.growth-footer span:first-child { max-width: 680px; }
.growth-footer span:last-child { font-weight: 800; white-space: nowrap; }
.content-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); margin-top: 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.panel-heading { align-items: start; display: flex; justify-content: space-between; }
.panel-heading > span { background: var(--mint); border-radius: 999px; color: var(--green); font-size: 12px; font-weight: 800; padding: 7px 10px; }
.checklist { display: grid; gap: 0; list-style: none; margin: 24px 0 0; padding: 0; }
.checklist li { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 34px 1fr auto; padding: 17px 0; }
.checklist i { align-items: center; background: #eef1ed; border-radius: 50%; display: inline-flex; font-size: 12px; font-style: normal; font-weight: 800; height: 30px; justify-content: center; width: 30px; }
.checklist .done i { background: var(--lime); }
.checklist div { display: grid; gap: 3px; }
.checklist div span { color: var(--muted); font-size: 12px; }
.checklist button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--green); font-size: 12px; font-weight: 800; padding: 8px 10px; }
.compact { min-height: 38px; width: auto; }
.team-list { margin-top: 22px; }
.team-member { align-items: start; border-top: 1px solid var(--line); display: grid; column-gap: 14px; row-gap: 12px; grid-template-columns: 38px minmax(0, 1fr); padding: 20px 0; }
.avatar { align-items: center; background: var(--orange); border-radius: 50%; color: #fff; display: flex; font-weight: 850; height: 38px; justify-content: center; width: 38px; }
.team-member-identity { display: grid; min-width: 0; }
.team-member-identity strong, .team-member-identity small { overflow-wrap: anywhere; white-space: normal; line-height: 1.5; }
.team-member small, .panel-note { color: var(--muted); font-size: 12px; }
.role { background: #eef1ed; border-radius: 999px; display: inline-flex; font-size: 11px; font-weight: 850; justify-content: center; padding: 6px 9px; text-transform: capitalize; white-space: nowrap; }
.panel-note { border-top: 1px solid var(--line); margin: 10px 0 0; padding-top: 16px; }
.activity-toolbar { display: grid; gap: 12px; grid-template-columns: 1fr 220px; margin: 24px 0 12px; }
.activity-panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.activity-list { display: grid; }
.activity-item { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: 42px minmax(0, 1fr) auto; padding: 17px 20px; }
.activity-item:first-child { border-top: 0; }
.activity-icon { align-items: center; background: var(--mint); border-radius: 11px; color: var(--green); display: flex; font-size: 11px; font-weight: 900; height: 42px; justify-content: center; width: 42px; }
.activity-item strong { display: block; font-size: 14px; }
.activity-item p { color: var(--muted); font-size: 12px; margin: 4px 0; }
.activity-item small { color: var(--muted); font-size: 10px; }
.settings-page-form { gap: 18px; margin-top: 24px; max-width: 920px; }
#settingsView > .profile-card { margin-bottom:28px; }
#workspaceAdministration { display:grid; gap:24px; }
#settingsView > .section-heading { margin-bottom:28px; }
#settingsView .settings-card { padding:30px; gap:22px; }
#settingsView #settingsForm { margin-top:0; max-width:none; gap:24px; }
#settingsView #settingsFields { display:grid; gap:24px; max-width:none; }
#settingsView .settings-card p { line-height:1.65; }
#settingsView .settings-card input:not([type="checkbox"]), #settingsView .settings-card select { padding:12px 16px; min-height:46px; }
#settingsView .settings-card button, #settingsView .settings-save-button { padding:12px 20px; min-height:46px; line-height:1.4; }
#settingsView .settings-card-heading p { margin-top:9px; }
#settingsView .settings-whatsapp-card { background:#f2fbf5; border-color:#c9e9d5; }
.settings-whatsapp-heading { display:flex; align-items:center; gap:18px; }
.settings-whatsapp-icon { display:grid; place-items:center; flex:0 0 52px; width:52px; height:52px; background:#128c4a; color:white; border-radius:14px; }
.settings-whatsapp-icon svg { width:34px; height:34px; }
#settingsView .settings-whatsapp-card button { background:#d9f3e3; color:#125f36; width:auto; justify-self:start; border:1px solid #b6dfc5; }
@media(max-width:650px) { #settingsView .settings-card { padding:22px; } .settings-whatsapp-heading { align-items:flex-start; } }
.profile-heading { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.profile-heading > div { flex:1; }
.profile-heading h3 { margin:0 0 6px; }
.profile-heading p { color:var(--muted); font-size:13px; margin:0; }
.profile-heading button { width:auto; padding:12px 20px; }
.profile-icon { display:grid; place-items:center; width:48px; height:48px; border-radius:14px; background:var(--mint); font-size:26px; flex-shrink:0; }
.profile-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; margin:10px 0 0; }
.profile-details dt { color:var(--muted); font-size:12px; margin-bottom:7px; }
.profile-details dd { margin:0; font-size:14px; overflow-wrap:anywhere; }
@media(max-width:650px) { .profile-details { grid-template-columns:1fr; } }
.settings-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 18px; padding: 24px; }
.settings-card-heading h3 { font-size: 20px; margin: 0; }
.settings-card-heading p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 5px 0 0; }
.settings-page-form .panel-note { margin: -3px 0 0; }
.settings-export { align-items: center; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) auto; margin: 0; }
.settings-export > div { min-width: 0; }
.settings-export p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 5px 0 0; }
.settings-export button { white-space: nowrap; width: auto; }
.settings-save-button { justify-self: start; min-width: 180px; }
.connection-health { background: rgba(79, 70, 229, .07); border: 1px solid rgba(79, 70, 229, .18); border-radius: 14px; padding: 16px; }
.connection-health > div:first-child { align-items: center; display: flex; gap: 9px; }
.connection-health-dot { background: var(--muted); border-radius: 50%; height: 10px; width: 10px; }
.connection-health.healthy .connection-health-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(79, 70, 229, .12); }
.connection-health.waiting .connection-health-dot { background: var(--orange); }
.connection-health.attention { background: rgba(242, 107, 94, .08); border-color: rgba(242, 107, 94, .3); }
.connection-health.attention .connection-health-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(242, 107, 94, .12); }
.connection-health p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 8px 0 14px; }
.connection-health dl { display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin: 0; }
.connection-health dl div { display: grid; gap: 3px; }
.connection-health dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.connection-health dd { font-size: 11px; font-weight: 750; margin: 0; overflow-wrap: anywhere; }
.meta-signup-card { background: rgba(79, 70, 229, .07); border: 1px solid rgba(79, 70, 229, .18); border-radius: 14px; display: grid; gap: 14px; padding: 16px; }
.meta-signup-card > div { display: grid; gap: 5px; }
.meta-signup-card strong { color: var(--ink); }
.meta-signup-card span, .meta-signup-card small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.meta-signup-card button { background: #1877f2; width: 100%; }
.meta-signup-card button:disabled { cursor: wait; opacity: .62; }
.meta-signup-card small.is-error { color: #a8342a; }
.connection-divider { align-items: center; color: var(--muted); display: flex; font-size: 10px; font-weight: 800; gap: 10px; letter-spacing: .05em; text-transform: uppercase; }
.connection-divider::before, .connection-divider::after { background: var(--line); content: ""; flex: 1; height: 1px; }
.usage-plan-card { align-items: center; background: var(--green); border-radius: 20px; color: #fff; display: flex; justify-content: space-between; margin: 24px 0; padding: 26px 30px; }
.usage-plan-card .kicker, .usage-plan-card p { color: #cde5d9; }
.usage-plan-card h3 { font-size: 28px; margin: 4px 0 6px; }
.usage-plan-card > strong { font-size: 42px; font-weight: 800; }
.usage-access-notice { background: #fff1d6; border: 1px solid #e2b45d; border-radius: 14px; color: #68470b; font-weight: 700; margin: -8px 0 22px; padding: 14px 18px; }
.usage-access-notice.blocked { background: #fde8e5; border-color: #d88b82; color: #7d251d; }
.billing-panel { margin-bottom: 24px; }
.billing-plans { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.billing-plan { border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 10px; padding: 18px; }
.billing-plan.current { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.billing-plan strong { font-size: 18px; }
.billing-plan span { color: var(--muted); font-size: 13px; }
.billing-plan button { margin-top: 4px; }
.usage-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
.usage-meter { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.usage-meter-heading { align-items: end; display: flex; justify-content: space-between; }
.usage-meter-heading > div { display: grid; gap: 5px; }
.usage-meter-heading strong { font-size: 20px; }
.usage-meter-heading span, .usage-meter small { color: var(--muted); font-size: 12px; }
.usage-bar { background: var(--soft); border-radius: 99px; height: 9px; margin: 14px 0 8px; overflow: hidden; }
.usage-bar i { background: var(--green); border-radius: inherit; display: block; height: 100%; }
.usage-meter.warning .usage-bar i { background: #e89a38; }
.usage-meter.over .usage-bar i { background: #c34a3f; }
.bot-usage-card { margin-bottom: 24px; }
.bot-usage-summary { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.bot-usage-summary > small { display: block; margin-top: 12px; color: var(--muted); }
.bot-usage-warning { border: 2px solid #a42d26; background: #fff5f3; }
.bot-usage-warning .usage-bar i { background: #a42d26; }
.bot-usage-alert { color: #92251f; font-weight: 700; }
.usage-detail-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.usage-detail-grid article { background: var(--soft); border-radius: 12px; padding: 18px; }
.usage-detail-grid small { color: var(--muted); display: block; }
.usage-detail-grid strong { display: block; font-size: 30px; font-weight: 800; margin-top: 6px; }
.quality-summary { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin: 24px 0 12px; }
.quality-summary article { background: #fff; border: 1px solid var(--line); border-radius: 13px; display: grid; gap: 5px; padding: 17px; }
.quality-summary small { color: var(--muted); }
.quality-summary strong { font-size: 32px; font-weight: 800; }
.quality-toolbar { display: grid; gap: 12px; grid-template-columns: 1fr 220px; margin-bottom: 12px; }
.quality-list { display: grid; gap: 12px; }
.quality-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 12px; padding: 20px; }
.quality-card-heading { align-items: center; display: flex; justify-content: space-between; }
.quality-card-heading div { display: grid; gap: 3px; }
.quality-card-heading small, .quality-card > small { color: var(--muted); }
.quality-card > p { line-height: 1.55; margin: 0; white-space: pre-wrap; }
.quality-card blockquote { background: #f1f4ef; border-left: 3px solid var(--green); color: var(--muted); margin: 0; padding: 10px 12px; }
.quality-status { background: #eef1ed; border-radius: 999px; color: var(--muted); font-size: 10px; font-weight: 850; padding: 6px 9px; text-transform: capitalize; }
.quality-status.approved { background: var(--mint); color: var(--green); }
.quality-status.needs_change { background: #fff1cc; color: #7a5712; }
.quality-review-form { align-items: center; display: grid; gap: 9px; grid-template-columns: 1fr auto auto; margin: 0; }
.quality-review-form input { min-height: 40px; }
.quality-review-form button { min-height: 40px; width: auto; }
.quality-review-form .quality-change-button { background: #fff1cc; color: #7a5712; }
.dialog { border: 0; border-radius: 20px; box-shadow: var(--shadow); padding: 0; width: min(470px, calc(100% - 32px)); }
.dialog::backdrop { background:rgba(32,37,52,.42); }
.dialog { overscroll-behavior:contain; scrollbar-gutter:stable; }
.dialog form { margin: 0; padding: 30px; }
.dialog-heading { align-items: start; display: flex; justify-content: space-between; }
.dialog-heading h2 { font-size: 30px; letter-spacing: -.04em; margin: 0; }
.dialog form > p { color: var(--muted); line-height: 1.5; margin: -4px 0 2px; }
.dialog .dialog-close { display:inline-grid; place-items:center; flex:0 0 38px; background:#eef1ed; border:0; border-radius:50%; color:var(--ink); font-size:25px; font-weight:500; height:38px; min-height:38px; width:38px; min-width:38px; padding:0; line-height:1; }
.dialog .dialog-close:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.dialog-wide { width: min(680px, calc(100% - 32px)); }
.faq-import-preview { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.faq-import-preview article { padding: 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.faq-import-preview article:last-child { border-bottom: 0; }
.faq-import-preview p { margin: 6px 0 0; white-space: pre-wrap; color: var(--muted); font-size: 13px; }
#faqImportStatus { white-space: pre-wrap; max-height: 160px; overflow: auto; }
#faqImportDialog { max-height: calc(100vh - 32px); overflow-y: auto; }
.faq-template-link { color: var(--green); font-weight: 700; }
.campaign-dialog { width:100%; max-width:100%; height:100dvh; max-height:100dvh; margin:0; border-radius:0; box-shadow:none; overflow-y:auto; padding:24px max(12px,calc((100vw - 960px)/2)); }
.campaign-dialog form { max-width:960px; margin:auto; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 22px; }
.toggle-row label { align-items: center; display: flex; gap: 8px; }
.toggle-row input { min-height: 0; width: auto; }
.dialog-actions { display: flex; justify-content: space-between; }
.dialog form > .form-status { background: var(--mint); border: 1px solid rgba(79, 70, 229, .2); border-radius: 10px; color: var(--green); font-size: 12px; font-weight: 750; margin: 0; padding: 11px 13px; }
.dialog form > .form-status.is-error { background: #fde8e5; border-color: #d88b82; color: #7d251d; }
.dialog-actions button:disabled { cursor: wait; opacity: .65; }
.danger-outline { background: #fff; border: 1px solid #d88; color: #963b3b; }
.section-heading { align-items: end; display: flex; justify-content: space-between; }
.section-heading h2 { font-size: 54px; font-weight: 800; letter-spacing: -.045em; margin: 0; }
.section-heading p:not(.kicker) { color: var(--muted); margin-bottom: 0; }
.section-heading > button, .empty-state button { background: var(--green); border: 0; border-radius: 10px; color: #fff; font-weight: 800; min-height: 44px; padding: 0 16px; }
.knowledge-summary { background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; gap: 34px; margin: 28px 0 16px; padding: 16px 20px; }
.knowledge-summary span { color: var(--muted); font-size: 13px; }
.knowledge-summary strong { color: var(--ink); font-size: 18px; margin-right: 4px; }
.knowledge-tester { background: var(--green-dark); border-radius: 16px; color: #fff; display: grid; gap: 18px; grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.3fr); margin: 0 0 16px; padding: 22px; }
.knowledge-tester .kicker { color: var(--lime); }
.knowledge-tester h3 { margin: 0 0 6px; }
.knowledge-tester p { color: rgba(255,255,255,.7); font-size: 13px; margin: 0; }
.knowledge-tester form { align-items: center; display: grid; gap: 10px; grid-template-columns: 1fr auto; margin: 0; }
.knowledge-tester form button { background: var(--lime); color: var(--green-dark); min-height: 48px; }
.knowledge-test-result { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; grid-column: 1 / -1; padding: 15px; }
.knowledge-test-result strong { display: block; margin-bottom: 5px; }
.knowledge-test-result p { color: #fff; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.resource-safety-note { align-items: center; background: #fff1d6; border: 1px solid #e2b45d; border-radius: 13px; display: flex; gap: 10px; margin: 24px 0 14px; padding: 13px 16px; }
.resource-safety-note strong { color: #68470b; white-space: nowrap; }
.resource-safety-note span { color: #765a29; font-size: 12px; line-height: 1.45; }
.resource-entry-list { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.resource-entry-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; display: grid; gap: 14px; padding: 20px; }
.resource-entry-heading, .resource-entry-footer { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.resource-entry-heading h3 { font-size: 17px; margin: 5px 0 0; }
.resource-type { color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.resource-entry-card > p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; white-space: pre-wrap; }
.resource-entry-footer { border-top: 1px solid var(--line); padding-top: 12px; }
.resource-entry-footer > span { color: var(--muted); font-size: 10px; max-width: 75%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-entry-footer button { background: #fff; border: 1px solid var(--line); border-radius: 8px; font-weight: 800; padding: 8px 12px; }
.resource-active-toggle { align-items: center; display: flex; gap: 8px; }
.resource-active-toggle input { min-height: 0; width: auto; }
.assistant-test-safety { align-items: start; background: var(--mint); border: 1px solid rgba(79, 70, 229, .2); border-left: 4px solid var(--green); border-radius: 12px; display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); gap: 12px; margin: 18px 0; padding: 14px 18px; }
.assistant-test-safety strong { color: var(--green); font-size: 13px; line-height: 1.5; }
.assistant-test-safety span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.preview-controls, #assistantTestView .program-test-context { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.preview-controls .website-inbox-filters { margin: 0 0 12px; }
.preview-controls > p { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.preview-guidance { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-top: 20px; padding: 14px 18px; }
.preview-guidance summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--green); }
.preview-guidance p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 14px 0 0; }
.assistant-test-layout { align-items: stretch; display: grid; gap: 14px; grid-template-columns: minmax(0, 820px) minmax(230px, 300px); justify-content: center; }
.assistant-test-phone { background: #efeae2; border: 1px solid #d5d8d3; border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; height: min(680px, calc(100vh - 270px)); min-height: 520px; overflow: hidden; }
.assistant-test-header { align-items: center; background: var(--green-dark); color: #fff; display: grid; gap: 12px; grid-template-columns: auto 1fr auto; padding: 15px 18px; }
.assistant-test-header div { display: grid; gap: 2px; }
.assistant-test-header small { color: rgba(255,255,255,.68); }
.assistant-test-avatar { align-items: center; background: var(--green); border-radius: 50%; display: flex; font-size: 11px; font-weight: 900; height: 42px; justify-content: center; width: 42px; }
.assistant-test-online { color: var(--lime); font-size: 11px; font-weight: 800; }
.assistant-test-messages { background-color: #efeae2; background-image: radial-gradient(rgba(79,70,229,.055) 1px, transparent 1px); background-size: 18px 18px; display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 22px; }
.assistant-test-bubble { align-self: flex-start; background: #fff; border-radius: 4px 14px 14px 14px; box-shadow: 0 1px 2px rgba(14, 27, 20, .12); max-width: 76%; padding: 11px 13px 8px; }
.assistant-test-bubble.user { align-self: flex-end; background: #d9fdd3; border-radius: 14px 4px 14px 14px; }
.assistant-test-bubble p { line-height: 1.48; margin: 0; white-space: pre-wrap; }
.assistant-test-bubble small { color: var(--muted); display: block; font-size: 9px; margin-top: 6px; text-align: right; }
.assistant-test-prompts { background: rgba(255,255,255,.78); display: flex; gap: 7px; overflow-x: auto; padding: 10px 14px 0; }
.assistant-test-prompts button { background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--green); flex: 0 0 auto; font-size: 11px; font-weight: 800; min-height: 32px; padding: 0 12px; }
.assistant-test-form { background: rgba(255,255,255,.78); display: grid; gap: 9px; grid-template-columns: 1fr auto; margin: 0; padding: 10px 14px 14px; }
.assistant-test-form input { background: #fff; border-radius: 999px; min-height: 46px; padding-left: 18px; }
.assistant-test-form button { border-radius: 999px; min-height: 46px; min-width: 82px; width: auto; }
.assistant-test-form button:disabled { cursor: wait; opacity: .65; }
.assistant-test-history { background: #fff; border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; min-height: 0; padding: 20px; }
.assistant-test-history-heading { align-items: start; display: flex; gap: 12px; justify-content: space-between; }
.assistant-test-history h3 { font-size: 20px; margin: 3px 0 0; }
.assistant-test-history-actions { align-items: flex-end; display: flex; flex-direction: column; gap: 8px; }
.assistant-test-history-actions > span { background: var(--mint); border-radius: 999px; color: var(--green); font-size: 10px; font-weight: 850; padding: 6px 8px; }
.assistant-test-history-actions > button { background: #fff4f3; border: 1px solid rgba(150,59,59,.2); border-radius: 999px; color: #963b3b; font-size: 10px; font-weight: 800; padding: 7px 10px; text-decoration: none; white-space: nowrap; }
.assistant-test-history-actions > button:hover, .assistant-test-history-actions > button:focus-visible { background: #fde8e5; border-color: rgba(150,59,59,.38); }
.assistant-test-history-actions > button:disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.assistant-test-history > p, .assistant-test-history-empty { color: var(--muted); font-size: 11px; line-height: 1.5; }
.assistant-test-history-list { display: grid; gap: 8px; max-height: 565px; overflow-y: auto; }
.assistant-test-history-item { align-items: center; background: var(--soft); border: 1px solid transparent; border-radius: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; }
.assistant-test-history-item.is-active { background: var(--mint); border-color: rgba(79,70,229,.25); }
.assistant-test-history-open { background: transparent; border: 0; color: var(--ink); display: grid; gap: 5px; min-width: 0; padding: 12px; text-align: left; width: 100%; }
.assistant-test-history-delete { align-self: stretch; background: transparent; border: 0; border-left: 1px solid var(--line); color: #963b3b; font-size: 9px; font-weight: 800; padding: 0 10px; }
.assistant-test-history-delete:hover, .assistant-test-history-delete:focus-visible { background: rgba(248,113,113,.1); }
.assistant-test-history-list strong { font-size: 12px; line-height: 1.35; }
.assistant-test-history-list span { color: var(--muted); font-size: 9px; }
.knowledge-list { display: grid; gap: 10px; }
#knowledgeView .section-actions { gap:12px; flex-wrap:wrap; }
#knowledgeView .section-actions button { min-height:46px; padding:12px 20px; line-height:1.4; border:1px solid #dcd9f4; border-radius:12px; background:#f3f1fc; color:var(--ink); font-size:13px; font-weight:700; }
#knowledgeView .knowledge-summary { margin:24px 0; padding:20px 24px; gap:28px; flex-wrap:wrap; border-color:#e7e6ef; }
.faq-list-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px; margin:28px 0 20px; }
.faq-list-toolbar h3 { font-size:18px; margin:0 0 8px; }
.faq-list-toolbar p { color:var(--muted); font-size:13px; line-height:1.6; margin:0; }
.faq-list-toolbar label { min-width:240px; }
.faq-test-drawer { margin:0 0 26px; border:1px solid var(--line); border-radius:14px; background:#fff; }
.faq-test-drawer > summary { cursor:pointer; padding:18px 22px; color:var(--green); font-weight:700; font-size:13px; }
.faq-test-drawer .knowledge-tester { margin:0 12px 12px; }
#knowledgeView .knowledge-list { gap:18px; }
#knowledgeView .knowledge-card { padding:26px; gap:26px; border-color:#e7e6ef; border-radius:16px; box-shadow:0 2px 5px rgba(32,37,52,.025); }
#knowledgeView .knowledge-card h3 { line-height:1.5; margin-bottom:12px; }
#knowledgeView .knowledge-card p { line-height:1.7; -webkit-line-clamp:3; }
#knowledgeView .knowledge-card .tag-row { gap:8px; }
#knowledgeView .knowledge-card button { padding:11px 18px; min-height:42px; border-radius:10px; }
@media(max-width:800px) { .faq-list-toolbar label { width:100%; } #knowledgeView .knowledge-card { grid-template-columns:1fr; padding:22px; gap:18px; } #knowledgeView .knowledge-card button { justify-self:start; } }
.knowledge-card { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 18px; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr) auto; padding: 20px; }
.knowledge-card h3 { font-size: 16px; margin: 0 0 8px; }
.knowledge-card p { color: var(--muted); display: -webkit-box; font-size: 13px; line-height: 1.5; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-row span, .status-pill { background: #eef1ed; border-radius: 999px; color: var(--green-dark); font-size: 10px; font-weight: 800; padding: 5px 8px; }
.status-pill.inactive { color: var(--muted); }
.knowledge-card button { background: #fff; border: 1px solid var(--line); border-radius: 8px; font-weight: 800; padding: 8px 12px; }
.empty-state { background: #fff; border: 1px dashed #c7d2c8; border-radius: 16px; display: grid; justify-items: center; padding: 70px 20px; text-align: center; }
.empty-state > span { align-items: center; background: var(--mint); border-radius: 14px; color: var(--green); display: flex; font-weight: 900; height: 54px; justify-content: center; width: 54px; }
.empty-state h3 { font-size: 24px; margin: 16px 0 2px; }
.empty-state p { color: var(--muted); }
.compact-select { min-height: 44px; width: 190px; }
.inbox-tabs { display: flex; gap: 8px; margin-top: 20px; }
.inbox-tab { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); display: inline-flex; font-size: 12px; gap: 9px; min-height: 40px; padding: 0 16px; width: auto; }
.inbox-tab span { align-items: center; background: #eef1ed; border-radius: 999px; color: var(--ink); display: inline-flex; font-size: 10px; justify-content: center; min-height: 22px; min-width: 22px; padding: 0 6px; }
.inbox-tab.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.inbox-tab.is-active span { background: rgba(255,255,255,.2); color: #fff; }
.inbox-unread-notice { background: #fff1d6; border: 1px solid #e2b45d; border-radius: 12px; color: #68470b; font-size: 13px; font-weight: 800; margin-top: 18px; padding: 11px 14px; }
.inbox-layout { background: #fff; border: 1px solid var(--line); border-radius: 16px; display: grid; grid-template-columns: minmax(240px, 30%) minmax(0, 1fr); height: auto; margin-top: 18px; overflow: hidden; }
.conversation-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conversation-item { background: #fff; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); display: grid; gap: 8px; padding: 18px; text-align: left; width: 100%; }
.conversation-item.is-active { background: var(--mint); }
.conversation-item.is-unread { box-shadow: inset 4px 0 var(--orange); }
.conversation-item-top { align-items: center; display: flex; gap: 8px; justify-content: space-between; }
.conversation-item-top .unread-dot { background: var(--orange); border-radius: 50%; height: 9px; margin-left: auto; width: 9px; }
.conversation-item strong { font-size: 14px; }
.conversation-item small, .conversation-item p { color: var(--muted); font-size: 11px; margin: 0; }
.conversation-topic-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.conversation-topic-tags i { background: #efedff; border-radius: 999px; color: #5146d8; font-size: 8px; font-style: normal; font-weight: 800; padding: 4px 7px; }
.conversation-item-meta { align-items: center; display: flex; gap: 8px; justify-content: space-between; }
.routing-pill { border-radius: 999px; flex: 0 0 auto; font-size: 8px; padding: 4px 7px; }
.routing-pill.human { background: #fff1d6; color: #7a4b00; }
.routing-pill.ai { background: var(--mint); color: var(--green); }
.routing-pill.resolved { background: #eef2ef; color: var(--muted); }
.conversation-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.conversation-empty { align-items: center; color: var(--muted); display: flex; flex: 1; flex-direction: column; justify-content: center; text-align: center; }
.conversation-empty > span { align-items: center; background: var(--mint); border-radius: 50%; color: var(--green); display: flex; font-weight: 900; height: 58px; justify-content: center; width: 58px; }
.conversation-empty h3 { color: var(--ink); margin: 15px 0 0; }
.chat-heading { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 18px; justify-content: space-between; padding: 16px 20px; }
.chat-heading h3 { margin: 0; }
.chat-heading small { color: var(--muted); }
.chat-identity { display: grid; gap: 3px; }
.chat-identity .conversation-topic-tags { margin-top: 5px; }
.chat-controls { align-items: end; display: flex; gap: 8px; }
.chat-controls label { color: var(--muted); display: grid; font-size: 9px; font-weight: 800; gap: 3px; }
.chat-controls select { min-height: 36px; padding: 0 9px; width: auto; }
.handoff-banner { border-bottom: 1px solid var(--line); display: grid; gap: 3px; padding: 11px 20px; }
.handoff-banner strong { font-size: 11px; }
.handoff-banner span { color: var(--muted); font-size: 10px; }
.handoff-banner.human { background: #fff7e7; }
.handoff-banner.human strong { color: #875600; }
.handoff-banner.ai { background: #eef9f2; }
.handoff-banner.ai strong { color: var(--green); }
.handoff-banner.resolved { background: #f5f7f6; }
.handoff-banner.resolved strong { color: var(--muted); }
.message-stream { display: flex; flex: 0 0 auto; flex-direction: column; gap: 10px; height: clamp(320px, 50vh, 600px); min-height: 320px; overflow-y: auto; overscroll-behavior: contain; padding: 22px; scrollbar-gutter: stable; }
.chat-heading, .handoff-banner { flex-shrink: 0; }
.chat-heading { flex-wrap: wrap; }
.chat-identity, .chat-controls { min-width: 0; }
.chat-controls { flex-wrap: wrap; }
.message { overflow-wrap: anywhere; }
#messageStream { overflow-anchor:none; }
#messageHistoryItems { display:flex; flex-direction:column; gap:10px; flex:0 0 auto; }
.message-history-tools { display:flex; flex:0 0 auto; flex-direction:column; align-items:center; gap:8px; color:var(--muted); }
#refreshConversationMessages { flex:0 0 auto; margin:8px 16px; }
.message { align-self: flex-start; background: #eef1ed; border-radius: 4px 14px 14px 14px; max-width: 74%; padding: 11px 13px; }
.message.outbound { align-self: flex-end; background: var(--green); border-radius: 14px 4px 14px 14px; color: #fff; }
.message.internal-note { align-self: center; background: #fff5d9; border: 1px solid #ead596; border-radius: 10px; color: var(--ink); max-width: 88%; }
.message p { line-height: 1.45; margin: 0; white-space: pre-wrap; }
.message small { display: block; font-size: 9px; margin-top: 5px; opacity: .64; }
.conversation-note-tools { background: #fffaf0; border-top: 1px solid #ead596; flex: 0 0 auto; }
.conversation-note-tools summary { color: #76530d; cursor: pointer; font-size: 11px; font-weight: 850; padding: 10px 16px; }
.note-form { background: #fffaf0; display: grid; flex: 0 0 auto; gap: 10px; grid-template-columns: 1fr auto; margin: 0; padding: 0 14px 12px; }
.note-form input { min-height: 40px; }
.note-form button { min-height: 40px; width: auto; }
.note-form p { color: var(--muted); font-size: 10px; grid-column: 1 / -1; margin: -3px 2px 0; }
.reply-form { border-top: 1px solid var(--line); display: grid; flex: 0 0 auto; gap: 9px; margin: 0; padding: 14px; }
.reply-compose { display: grid; gap: 10px; grid-template-columns: 1fr auto; }
.reply-compose input, .reply-compose button { min-height: 44px; }
.reply-compose button { width: auto; }
.reply-routing { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.ai-takeover-option { align-items: center; display: inline-flex; font-size: 11px; font-weight: 850; gap: 7px; }
.ai-takeover-option input { min-height: 0; width: auto; }
.reply-routing > span, .reply-note { color: var(--muted); font-size: 9px; margin: 0; }
.section-actions { display: flex; gap: 10px; }
.section-actions .secondary-button { width: auto; }
.contact-toolbar { display: grid; gap: 12px; grid-template-columns: 1fr 220px; margin: 24px 0 12px; }
.consent-review-summary { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; padding: 13px 16px; }
.consent-review-summary span { color: var(--muted); font-size: 12px; }
.consent-review-summary strong { color: var(--ink); font-size: 16px; margin-right: 4px; }
.consent-review-summary small { color: var(--muted); margin-left: auto; }
.contact-lists-panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; display: grid; gap: 14px; margin-top: 14px; padding: 18px; }
.contact-lists-heading { align-items: center; display: flex; gap: 18px; justify-content: space-between; }
.contact-lists-heading h3 { font-size: 20px; margin: 2px 0 4px; }
.contact-lists-heading p { color: var(--muted); font-size: 11px; margin: 0; }
.contact-lists-heading button { flex: 0 0 auto; width: auto; }
.contact-list-cards { display: grid; gap: 9px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-list-card { align-items: center; background: #f7f7fb; border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 12px; justify-content: space-between; padding: 12px 13px; }
.contact-list-card div { display: grid; gap: 3px; min-width: 0; }
.contact-list-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-list-card small, .contact-lists-empty { color: var(--muted); font-size: 10px; }
.contact-list-card button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--green); flex: 0 0 auto; font-size: 10px; font-weight: 800; min-height: 32px; padding: 6px 9px; width: auto; }
.contact-lists-empty { margin: 0; }
.contact-list-members-heading { display: grid; gap: 3px; }
.contact-list-members-heading small { color: var(--muted); font-size: 10px; }
.contact-list-member-options { border: 1px solid var(--line); border-radius: 12px; display: grid; max-height: 300px; overflow-y: auto; }
.contact-list-member-options > label { align-items: center; border-bottom: 1px solid var(--line); display: grid; gap: 10px; grid-template-columns: auto 1fr auto; margin: 0; padding: 11px 12px; }
.contact-list-member-options > label:last-child { border-bottom: 0; }
.contact-list-member-options input { min-height: 0; width: auto; }
.contact-list-member-options span { display: grid; gap: 2px; }
.contact-list-member-options small { color: var(--muted); font-size: 9px; }
.contact-table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.contact-table { border-collapse: collapse; width: 100%; }
.contact-table th { background: #f1f4ef; color: var(--muted); font-size: 11px; letter-spacing: .06em; padding: 12px 16px; text-align: left; text-transform: uppercase; }
.contact-table td { border-top: 1px solid var(--line); font-size: 13px; padding: 15px 16px; }
.contact-table td strong { display: block; }
.contact-table td small { color: var(--muted); }
.contact-table button { background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--green); font-weight: 800; padding: 7px 10px; }
.contact-table .contact-select-cell { padding-left: 14px; padding-right: 6px; width: 28px; }
.contact-select-cell input, .review-confirmation input { min-height: 0; width: auto; }
.consent-warning { background: #fff5dc; border-left: 4px solid #d08b2d; border-radius: 10px; display: grid; gap: 5px; padding: 14px; }
.consent-warning strong { font-size: 13px; }
.consent-warning span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.review-confirmation { align-items: flex-start; display: flex; gap: 10px; line-height: 1.4; }
.consent-pill { border-radius: 999px; display: inline-block; font-size: 10px; font-weight: 850; padding: 6px 9px; }
.consent-pill.opted_in { background: var(--mint); color: var(--green); }
.consent-pill.opted_out { background: #f8e5e2; color: #963b3b; }
.consent-pill.unknown { background: #eef1ed; color: var(--muted); }
.import-preview { background: #f1f4ef; border-radius: 10px; color: var(--muted); font-size: 13px; padding: 12px; }
.campaign-draft-preview { background: #f1f4ef; border-left: 4px solid var(--green); border-radius: 10px; color: var(--muted); font-size: 13px; line-height: 1.5; padding: 12px; white-space: pre-wrap; }
.campaign-safety { align-items: center; background: var(--mint); border: 1px solid #c8e5d5; border-radius: 12px; display: flex; gap: 10px; margin: 24px 0 14px; padding: 13px 16px; }
.campaign-safety strong { color: var(--green); font-size: 12px; }
.campaign-safety span { color: var(--muted); font-size: 12px; }
.campaign-send-guide { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin: 0 0 16px; }
.campaign-send-guide > div { align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 4px; grid-template-columns: 28px 1fr; padding: 14px; }
.campaign-send-guide span { align-items: center; background: var(--mint); border-radius: 50%; color: var(--green); display: flex; font-size: 11px; font-weight: 900; grid-row: 1 / 3; height: 28px; justify-content: center; width: 28px; }
.campaign-send-guide strong { font-size: 12px; }
.campaign-send-guide small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.campaign-list { display: grid; gap: 10px; }
.campaign-card { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 18px; grid-template-columns: 1.3fr .8fr .8fr .5fr; padding: 20px; }
.campaign-card h3 { margin: 0 0 5px; }
.campaign-card small { color: var(--muted); }
.campaign-stat { display: grid; gap: 4px; }
.campaign-stat strong { font-size: 18px; }
.campaign-status { background: #eef1ed; border-radius: 999px; font-size: 10px; font-weight: 850; justify-self: end; padding: 7px 10px; text-transform: capitalize; }
.campaign-card-actions { align-items: flex-end; display: grid; gap: 8px; justify-items: end; }
.campaign-card-actions button { min-height: 34px; width: auto; }
.campaign-template-card .campaign-stat strong { display: -webkit-box; font-size: 14px; line-height: 1.35; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.campaign-help { margin: 0 0 20px; color: var(--muted); }
.campaign-help summary { cursor: pointer; font-size: 13px; font-weight: 700; padding: 4px 0; }
.campaign-help .campaign-send-guide { margin-top: 12px; }
.campaign-group { display: grid; gap: 12px; min-width: 0; }
.campaign-group + .campaign-group { margin-top: 18px; }
.campaign-group-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; }
.campaign-group-title span { color: var(--muted); font-size: 12px; font-weight: 500; }
.campaign-disclosure { background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.campaign-disclosure > summary { display:flex; align-items:center; gap:14px; padding:20px 22px; cursor:pointer; list-style:none; }
.campaign-disclosure > summary::-webkit-details-marker { display:none; }
.campaign-disclosure > summary::before { content:'›'; font-size:24px; color:var(--green); }
.campaign-disclosure[open] > summary::before { transform:rotate(90deg); }
.campaign-disclosure > summary > span:first-of-type { flex:1; min-width:0; }
.campaign-disclosure strong,.campaign-disclosure small { display:block; }
.campaign-disclosure summary strong { font-size:15px; }
.campaign-disclosure summary small { color:var(--muted); font-size:12px; line-height:1.5; margin-top:5px; }
.campaign-group-count { padding:5px 10px; background:var(--mint); color:var(--green); border-radius:999px; font-size:12px; font-weight:750; }
.campaign-group-body { display:grid; gap:12px; padding:0 20px 20px; }
.campaign-disclosure > summary:focus-visible { outline:2px solid var(--green); outline-offset:-3px; }
.campaign-card.campaign-record { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; min-width: 0; }
.campaign-record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.campaign-record-heading h3 { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.campaign-record-heading small { font-size: 12px; }
.campaign-record-heading .campaign-status { flex-shrink: 0; font-size: 11px; }
.campaign-status[data-status="draft"] { background: var(--mint); color: var(--green); }
.campaign-record-details { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); gap: 20px; }
.campaign-record-details strong { font-size: 14px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.campaign-record-details small { font-size: 12px; }
.campaign-record .campaign-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.campaign-record .campaign-card-actions button { font-size: 13px; padding: 8px 14px; min-height: 38px; white-space: nowrap; }
.campaign-record .campaign-cancel-action { margin-left: auto; }
#newCampaignButton, .campaign-record [data-edit-draft] { background: var(--green); color: #fff; border: 0; border-radius: 10px; font-weight: 800; min-height: 44px; padding: 10px 18px; }
@media (max-width: 600px) {
  .campaign-record-details { grid-template-columns: 1fr; gap: 12px; }
  .campaign-record-heading { flex-wrap: wrap; }
  .campaign-record .campaign-cancel-action { margin-left: 0; }
}
.dialog-report { width: min(1050px, calc(100% - 32px)); }
.campaign-report-shell { display: grid; gap: 18px; padding: 30px; }
.delivery-summary { display: grid; gap: 8px; grid-template-columns: repeat(7, 1fr); }
.delivery-summary article { background: #f1f4ef; border-radius: 10px; display: grid; gap: 5px; padding: 13px; }
.delivery-summary small { color: var(--muted); font-size: 10px; }
.delivery-summary strong { font-size: 25px; font-weight: 800; }
.report-toolbar { align-items: end; display: flex; justify-content: space-between; }
.report-toolbar label { color: var(--muted); display: grid; font-size: 10px; font-weight: 800; gap: 5px; }
.report-toolbar select { min-height: 38px; width: 220px; }
.report-toolbar button { width: auto; }
.delivery-table-wrap { border: 1px solid var(--line); border-radius: 12px; max-height: 430px; overflow: auto; }
.delivery-table { border-collapse: collapse; min-width: 760px; width: 100%; }
.delivery-table th { background: #f1f4ef; color: var(--muted); font-size: 10px; letter-spacing: .05em; padding: 11px 13px; position: sticky; text-align: left; text-transform: uppercase; top: 0; }
.delivery-table td { border-top: 1px solid var(--line); font-size: 12px; padding: 12px 13px; }
.delivery-table td strong, .delivery-table td small { display: block; }
.delivery-table td small, .delivery-detail { color: var(--muted); }
.delivery-status { background: #eef1ed; border-radius: 999px; display: inline-block; font-size: 9px; font-weight: 850; padding: 6px 8px; text-transform: capitalize; }
.delivery-status.delivered, .delivery-status.read { background: var(--mint); color: var(--green); }
.delivery-status.failed { background: #f8e5e2; color: #963b3b; }
.delivery-status.suppressed { background: #fff1cc; color: #7a5712; }
.report-empty { color: var(--muted); padding: 20px; text-align: center; }
.audience-preview { background: var(--green-dark); border-radius: 13px; color: #fff; display: grid; gap: 4px; padding: 17px; }
.audience-preview span, .audience-preview small { color: rgba(255,255,255,.68); }
.audience-preview strong { font-size: 36px; font-weight: 800; }
.campaign-recipient-preview { background: #f7f7fb; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; padding: 14px; }
.campaign-recipient-preview > div:first-child { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.campaign-recipient-preview > div:first-child strong { font-size: 12px; }
.campaign-recipient-preview > div:first-child span { color: var(--muted); font-size: 10px; }
.campaign-recipient-list { display: grid; gap: 6px; max-height: 180px; overflow-y: auto; }
.campaign-recipient-row { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 9px; display: flex; gap: 12px; justify-content: space-between; padding: 9px 11px; }
.campaign-recipient-row strong { font-size: 11px; }
.campaign-recipient-row input[type="checkbox"] { width:18px; height:18px; flex:0 0 18px; margin:0; }
.campaign-recipient-row strong { flex:1; }
.campaign-recipient-row span { color: var(--muted); font-size: 10px; }
.campaign-audience-selector { border: 0; display: grid; gap: 10px; margin: 0; padding: 0; }
.campaign-audience-selector > legend { color: #36433b; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.campaign-audience-modes { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.campaign-audience-modes > label { align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 9px; padding: 12px; }
.campaign-audience-modes > label:has(input:checked) { background: var(--mint); border-color: rgba(79,70,229,.35); }
.campaign-audience-modes input, .campaign-filter-options input, .meta-delivery-card input { flex: 0 0 auto; margin-top: 2px; min-height: 0; width: auto; }
.campaign-audience-modes span { display: grid; gap: 3px; }
.campaign-audience-modes strong { font-size: 11px; }
.campaign-audience-modes small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.campaign-filter-panel { background: #f7f7fb; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; padding: 14px; }
.campaign-filter-panel > strong { font-size: 12px; }
.campaign-filter-options { display: flex; flex-wrap: wrap; gap: 7px; }
.campaign-filter-options > label { align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; display: flex; font-size: 10px; font-weight: 750; gap: 6px; padding: 8px 10px; }
.campaign-filter-options > label:has(input:checked) { background: var(--mint); border-color: rgba(79,70,229,.35); color: var(--green); }
.campaign-filter-empty { color: var(--muted); font-size: 10px; margin: 0; }
.campaign-list-note { color: var(--muted); font-size: 9px; }
.campaign-custom-filter { margin: 0; }
.campaign-custom-filter input { min-height: 42px; }
.campaign-custom-filter small { color: var(--muted); font-size: 9px; }
.campaign-delivery-options { border: 0; display: grid; gap: 8px; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; }
.campaign-delivery-options legend { color: #36433b; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.campaign-delivery-options label { align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 11px; display: flex; gap: 9px; padding: 12px; }
.campaign-delivery-options label:has(input:checked) { background: var(--mint); border-color: rgba(79,70,229,.35); }
.campaign-delivery-options input { flex: 0 0 auto; margin-top: 2px; min-height: 0; width: auto; }
.campaign-delivery-options label span { display: grid; gap: 3px; }
.campaign-delivery-options strong { font-size: 11px; }
.campaign-delivery-options small, .campaign-delivery-note { color: var(--muted); font-size: 9px; line-height: 1.4; }
.campaign-delivery-note { margin: -3px 0 0; }
.campaign-audience-confirmation { align-items: flex-start; background: #fff1cc; border: 1px solid #e9cf83; border-radius: 11px; color: #62470d; display: flex; font-size: 12px; font-weight: 750; gap: 10px; line-height: 1.45; padding: 13px 14px; }
.meta-delivery-card { background: linear-gradient(135deg, #f5f9ff, #eef5ff); border: 1px solid #b9d5ff; border-radius: 13px; display: grid; gap: 12px; padding: 14px; }
.meta-delivery-brand { align-items: center; display: grid; gap: 10px; grid-template-columns: auto 1fr auto; }
.meta-mark { align-items: center; background: #0866ff; border-radius: 50%; color: #fff; display: flex; font-size: 25px; font-weight: 800; height: 38px; justify-content: center; line-height: 1; width: 38px; }
.meta-delivery-brand div { display: grid; gap: 2px; }
.meta-delivery-brand strong { color: #10233e; font-size: 13px; }
.meta-delivery-brand small { color: #53657d; font-size: 9px; }
.meta-verified { background: #ddecff; border-radius: 999px; color: #0754cf; font-size: 9px; font-weight: 850; padding: 6px 8px; white-space: nowrap; }
.meta-delivery-card > label { align-items: flex-start; border-top: 1px solid #d5e4f9; color: #334963; display: flex; font-size: 10px; font-weight: 700; gap: 9px; line-height: 1.45; padding-top: 11px; }
.campaign-audience-confirmation input { flex: 0 0 auto; margin-top: 2px; min-height: 0; width: auto; }
.role-guide { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin: 24px 0 16px; }
.role-guide article { background: #fff; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 5px; padding: 16px; }
.role-guide span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.team-directory-panel { margin-top: 0; }
.team-member-access { grid-column: 2; align-items: center; display: flex; flex-wrap: wrap; gap: 10px 16px; min-width: 0; width: 100%; }
.role.pending { background: #fff1cc; color: #7a5712; }
.role.failed { background: #f8e5e2; color: #963b3b; }
.role.disabled { background: #eef1ed; color: var(--muted); }
.team-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; max-width: 100%; }
.team-role-select { background: #fff; border: 1px solid var(--line); border-radius: 7px; flex: 1 1 auto; font-size: 11px; min-height: 32px; min-width: 0; padding: 4px 24px 4px 9px; width: auto; }
.team-text-action { background: transparent; border: 0; color: var(--green); flex: 0 0 auto; font-size: 11px; min-height: 0; padding: 4px 0; text-decoration: underline; }
.team-text-action.danger { color: #963b3b; }
.workspace-loading { align-items: center; background: rgba(245,247,243,.82); display: flex; inset: 0; justify-content: center; position: absolute; z-index: 8; }
.workspace-loading span { background: var(--green-dark); border-radius: 999px; color: #fff; font-size: 12px; font-weight: 800; padding: 10px 14px; }
.workspace { position: relative; }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 520px; }
  .story-stats { display: none; }
  .product-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding: 24px 14px; }
  .sidebar .brand > span:last-child, .nav-item span, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; min-height: 42px; }
  .nav-item::before { content: "•"; font-size: 24px; }
  .nav-unread-badge { margin-left: 0; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .growth-heading { display: grid; }
  .growth-controls { justify-items: stretch; width: 100%; }
  .growth-summary { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .auth-story { min-height: 430px; padding: 30px 24px; }
  .auth-story h1 { font-size: 48px; }
  .chat-heading { align-items: stretch; flex-direction: column; }
  .chat-controls { align-items: stretch; }
  .chat-controls label { flex: 1; }
  .chat-controls select { width: 100%; }
  .handoff-controls { grid-template-columns: 1fr; }
  .auth-panel { padding: 18px; }
  .product-shell { display: block; }
  .sidebar { align-items: center; border-bottom: 1px solid var(--line); border-right: 0; flex-direction: row; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding: 14px 18px; }
  .sidebar .brand-logo { width: 150px; }
  .sidebar nav { display: flex; gap: 6px; margin: 0; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; width: 100%; }
  .sidebar .nav-item { flex: 0 0 auto; min-height: 36px; padding: 8px 11px; }
  .sidebar .nav-item span { display: inline; }
  .sidebar .nav-item::before { display: none; }
  .sidebar .nav-unread-badge { margin-left: auto; }
  .workspace { padding: 24px 16px 40px; }
  .workspace-header { align-items: stretch; display: grid; gap: 18px; }
  .header-actions { align-items: stretch; display: grid; }
  .org-switcher { min-width: 0; }
  .onboarding-card { background: #fff; gap: 20px; grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .growth-overview { padding: 20px; }
  .growth-ranges { width: 100%; }
  .growth-ranges button { flex: 1; }
  .growth-custom-dates { align-items: stretch; display: grid; }
  .growth-chart { height: 170px; }
  .growth-footer { display: grid; gap: 8px; }
  .section-heading { align-items: stretch; display: grid; gap: 18px; }
  .knowledge-tester { grid-template-columns: 1fr; }
  .knowledge-tester form { grid-template-columns: 1fr; }
  .assistant-test-safety { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .assistant-test-layout { grid-template-columns: 1fr; }
  .assistant-test-phone { height: 620px; min-height: 0; }
  .assistant-test-bubble { max-width: 88%; }
  .assistant-test-history { max-height: 360px; }
  .knowledge-card { grid-template-columns: 1fr; }
  .resource-safety-note { align-items: flex-start; flex-direction: column; }
  .resource-entry-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .inbox-layout { grid-template-columns: 1fr; height: auto; }
  .inbox-tabs { overflow-x: auto; padding-bottom: 3px; }
  .conversation-list { border-bottom: 1px solid var(--line); border-right: 0; max-height: 280px; }
  .conversation-pane { min-height: 520px; }
  .reply-compose { grid-template-columns: 1fr; }
  .reply-compose button { width: 100%; }
  .contact-toolbar { grid-template-columns: 1fr; }
  .contact-list-cards { grid-template-columns: 1fr; }
  .activity-toolbar { grid-template-columns: 1fr; }
  .quality-summary, .quality-toolbar, .quality-review-form { grid-template-columns: 1fr; }
  .activity-item { align-items: start; grid-template-columns: 42px 1fr; }
  .activity-item > .status-pill { grid-column: 2; justify-self: start; }
  .usage-plan-card { align-items: start; flex-direction: column; gap: 18px; }
  .usage-grid, .usage-detail-grid, .billing-plans { grid-template-columns: 1fr; }
  .campaign-send-guide, .campaign-audience-modes, .campaign-delivery-options { grid-template-columns: 1fr; }
  .meta-delivery-brand { grid-template-columns: auto 1fr; }
  .meta-verified { grid-column: 2; justify-self: start; }
  .settings-export { align-items: stretch; grid-template-columns: 1fr; }
  .settings-export button, .settings-save-button { width: 100%; }
  .contact-table-wrap { overflow-x: auto; }
  .contact-table { min-width: 850px; }
  .section-actions { align-items: stretch; display: grid; }
  .campaign-card { grid-template-columns: 1fr; }
  .campaign-status { justify-self: start; }
  .campaign-card-actions { justify-items: start; }
  .delivery-summary { grid-template-columns: repeat(2, 1fr); }
  .report-toolbar { align-items: stretch; display: grid; gap: 10px; }
  .report-toolbar select { width: 100%; }
  .role-guide { grid-template-columns: repeat(2, 1fr); }
  .team-member { align-items: start; grid-template-columns: 38px minmax(0, 1fr); }
  .team-member-access { grid-column: 2; width: 100%; }
  .team-actions { justify-content: flex-start; }
}
.campaign-message-editor { border: 1px solid #dfe3ec; border-radius: 20px; padding: 22px; display: grid; gap: 16px; background: #f8f9fc; min-width: 0; }
.campaign-message-editor h3 { margin: 0; }
.campaign-message-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.campaign-variable { padding: 16px; margin-block: 10px; border: 1px solid #dfe3ec; border-radius: 12px; background: white; display: grid; gap: 10px; }
.campaign-variable strong { font-size: 14px; }
.campaign-message-editor [hidden] { display: none !important; }
.wa-campaign-phone { width: min(100%, 390px); margin: 8px auto; border: 1px solid #ced8d3; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px #20372b12; }
.wa-campaign-phone > header { background: #075e54; color: white; display: flex; align-items: center; gap: 12px; padding: 16px; }
.wa-campaign-phone > header strong, .wa-campaign-phone > header small { display: block; color: white; }
.wa-campaign-phone > header small { font-size: 11px; opacity: .8; margin-top: 3px; }
.wa-avatar { border-radius: 50%; background: #ffffff24; padding: 12px; font-weight: 700; }
.wa-campaign-chat { background-color: #efeae2; background-image: radial-gradient(#d8d1c5 1px, transparent 1px); background-size: 18px 18px; padding: 16px 14px 28px; min-height: 250px; }
.wa-preview-day { display: table; margin: 0 auto 16px; padding: 4px 10px; background: #fff9; border-radius: 7px; color: #66736c; font-size: 11px; }
.wa-campaign-bubble { background: white; border-radius: 0 10px 10px; padding: 8px; box-shadow: 0 1px 2px #0002; max-width: 100%; overflow-wrap: anywhere; color: #17221c; }
.wa-campaign-bubble p { font: 14px/1.5 system-ui, sans-serif; white-space: pre-wrap; margin: 6px 4px; color: #17221c; }
.wa-campaign-bubble h4 { font: 700 15px/1.4 system-ui, sans-serif; margin: 7px 4px; }
.campaign-review-summary { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; background: #f4f3fb; padding: 18px; border-radius: 14px; font-size: 14px; }
.campaign-review-summary dt { color: var(--muted); }
.campaign-review-summary dd { margin: 0; overflow-wrap: anywhere; }
#campaignDraftNotice { font-size: 13px; line-height: 1.5; max-width: 480px; }
#campaignReviewDialog { padding: 28px; }
#campaignReviewDialog > p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.wa-footer { display: block; color: #778078; font: 12px/1.4 system-ui, sans-serif; margin: 8px 4px; }
.wa-message-time { display: block; text-align: right; font: 10px system-ui, sans-serif; color: #7b857e; padding: 3px 4px; }
.wa-template-button { text-align: center; color: #0789ba; border-top: 1px solid #edf0ed; padding: 11px 4px; font: 14px system-ui, sans-serif; }
.wa-campaign-media { display: block; width: 100%; max-height: 280px; object-fit: contain; border-radius: 6px; background: #edf1ee; }
.wa-media-empty { background: #edf1ee; border-radius: 6px; min-height: 150px; display: grid; place-items: center; color: #69796e; font-size: 13px; }
.wa-document { display: flex; align-items: center; gap: 12px; padding: 18px 12px; background: #edf1ee; border-radius: 6px; }
.wa-document strong, .wa-document small { display: block; font-size: 12px; }
#campaignMessageError { color: #a43131; font-size: 13px; }
.campaign-upload-panel { padding: 16px; margin-bottom: 18px; border: 1px dashed #bfc4df; border-radius: 12px; background: white; }
.campaign-upload-panel small { display: block; margin: 10px 0; line-height: 1.5; color: var(--muted); }
.campaign-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#campaignUploadStatus { font-size: 13px; overflow-wrap: anywhere; margin-bottom: 0; }
.campaign-combined-help { font-size: 13px; line-height: 1.6; color: #454268; background: #f0eefc; border-radius: 10px; padding: 14px; }
/* Meta template library and composer: retain the product's existing visual language. */
.template-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.template-actions > button { width: auto; }
.template-library-dialog, .template-builder-dialog { width: min(1160px, calc(100vw - 32px)); max-width: 1160px; }
.template-dialog-content, .template-builder-dialog form { padding: 28px; }
.template-dialog-content > p { color: var(--muted, #646b80); line-height: 1.5; }
.template-library-controls { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(140px, .65fr) auto auto; align-items: end; gap: 12px; margin: 24px 0 12px; }
.template-library-controls label { margin: 0; min-width: 0; }
.template-library-controls button { width: auto; margin-bottom: 0; }
.template-library-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.managed-template-card { border: 1px solid #dfe1ed; border-radius: 18px; padding: 20px; display: flex; flex-direction: column; align-items: start; gap: 12px; min-width: 0; }
.managed-template-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; width: 100%; }
.managed-template-heading h3 { font-size: 1.1rem; margin: 0 0 6px; overflow-wrap: anywhere; }
.managed-template-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; margin: 0; line-height: 1.5; }
.managed-template-card details { width: 100%; font-size: .9rem; overflow-wrap: anywhere; }
.managed-template-card summary { cursor: pointer; color: #5040e8; }
.managed-template-card small { font-size: .875rem; color: #646b80; line-height: 1.4; }
.template-status { display: inline-block; border-radius: 20px; padding: 6px 10px; background: #eef0f4; font-size: .875rem; white-space: nowrap; font-weight: 700; }
.template-status-approved { color: #14653c; background: #e5f5ec; }
.template-status-pending { color: #785207; background: #fff2d4; }
.template-status-rejected { color: #a33131; background: #ffeded; }
.template-rejection { background: #ffeded; color: #a33131; padding: 10px; border-radius: 8px; font-size: .9rem; }
.template-empty { grid-column: 1 / -1; text-align: center; padding: 40px 16px; border: 1px dashed #dfe1ed; border-radius: 16px; color: #646b80; }
.template-builder-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .85fr); gap: 28px; align-items: start; }
.template-draft-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 16px; }
.template-draft-fields label { margin: 0; }
.template-draft-fields small, .template-preview-note { font-size: .875rem; line-height: 1.5; color: #646b80; font-weight: 400; }
.template-draft-fields textarea { min-height: 170px; }
.template-preview-column { position: sticky; top: 0; min-width: 0; padding-top: 4px; }
.template-preview-column .wa-campaign-phone { width: 100%; margin: 0; }
.template-preview-column .wa-campaign-chat { min-height: 300px; }
.template-examples { display: grid; gap: 12px; background: #f5f4ff; border-radius: 12px; padding: 16px; }
.template-examples:empty { display: none; }
.template-buttons-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.template-button-row { padding: 14px; border: 1px solid #dfe1ed; border-radius: 12px; display: grid; gap: 12px; margin-bottom: 12px; }
.template-button-row > button { justify-self: end; width: auto; }
.template-submit-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid #dfe1ed; }
.template-submit-panel .checkbox-label { display: flex; align-items: flex-start; gap: 12px; font-size: 1rem; line-height: 1.5; }
.template-submit-panel .checkbox-label input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 3px; }
.template-library-dialog, .template-builder-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
.template-submit-panel .template-actions { justify-content: flex-end; }
#templateBuilderError { color: #a33131; overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .template-library-controls { grid-template-columns: 1fr 1fr; }
  .template-builder-grid { grid-template-columns: 1fr; }
  .template-preview-column { position: static; }
  .template-preview-column .wa-campaign-phone { max-width: 400px; }
  .template-library-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .template-dialog-content, .template-builder-dialog form { padding: 18px; }
  .template-library-controls { grid-template-columns: 1fr; }
  .managed-template-heading { flex-wrap: wrap; }
  .template-submit-panel .template-actions > button { width: 100%; }
}
/* Campaign month calendar, with an accessible daily agenda underneath. */
.campaign-view-switch { display: flex; gap: 8px; margin: 20px 0; }
.campaign-view-switch button { padding: 10px 22px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); }
.campaign-view-switch button[aria-pressed="true"] { background: var(--green); color: white; }
.calendar-list-hidden { display: none !important; }
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.calendar-toolbar h3 { margin:0 0 6px; font-size:1.5rem; }
.calendar-toolbar small, .calendar-note { color:var(--muted); font-size:.875rem; }
.campaign-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
.calendar-weekday { padding:10px 4px; text-align:center; font-size:.875rem; color:var(--muted); }
.calendar-day { background:white; color:var(--ink); min-width:0; min-height:115px; padding:10px; border:1px solid var(--line); border-radius:9px; display:flex; flex-direction:column; gap:6px; text-align:left; }
.calendar-day span { background:var(--mint); color:var(--green); font-size:.875rem; border-radius:5px; padding:5px; width:100%; overflow-wrap:anywhere; }
.calendar-day small { font-size:.875rem; }
.calendar-day.outside-month { background:#f0f1f6; }
.calendar-day.selected-day { outline:2px solid var(--green); outline-offset:-2px; }
.campaign-calendar-agenda { margin-top:24px; background:white; border:1px solid var(--line); border-radius:16px; padding:20px; }
.campaign-calendar-agenda article { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0; border-top:1px solid var(--line); }
.campaign-calendar-agenda p { color:var(--muted); font-size:.875rem; }
@media(max-width:650px) { .calendar-day { padding:5px; min-height:74px; } .calendar-day span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:12px; padding:2px; } .calendar-day strong { font-size:12px; } .campaign-calendar-agenda article { align-items:flex-start; flex-direction:column; } }
.interest-catalog-form { display: flex; gap: 1rem; align-items: end; margin: 1rem 0; flex-wrap: wrap; }
.interest-catalog-form[hidden] { display: none; }
.interest-catalog-form label { flex: 1; min-width: 180px; }
.interest-catalog-form button { width: auto; }
.program-test-context { margin-bottom: 1.5rem; }
.website-setup-card { margin-top: 2rem; }
.website-setup-card form, #websiteEmbedPanel { display: grid; gap: 1rem; margin-top: 1.5rem; }
.website-setup-card [hidden], #websiteInboxSurface[hidden] { display: none; }
.website-inbox-toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.website-inbox-layout { display: grid; grid-template-columns: minmax(220px, 30%) minmax(0, 1fr); border: 1px solid #dedfeb; border-radius: 20px; overflow: hidden; background: white; }
.website-inbox-layout > aside { border-right: 1px solid #dedfeb; padding: 1rem; max-height: 750px; overflow: auto; }
#websiteConversationPane { padding: 1.5rem; min-width: 0; }
.website-chat-row { display: grid; gap: .4rem; width: 100%; text-align: left; background: transparent; color: #222634; padding: 1rem; border-radius: 12px; margin-bottom: .5rem; }
.website-chat-row.is-active { background: #eeebff; }
.website-chat-row span, .website-chat-row small { font-size: .875rem; font-weight: normal; }
.website-transcript { max-height: 420px; overflow: auto; padding: 1rem; background: #f5f6fa; border-radius: 12px; margin: 1rem 0; }
.website-message { padding: 1rem; background: white; border-radius: 12px; margin-bottom: 1rem; overflow-wrap: anywhere; }
.website-message.team { margin-left: 10%; background: #eeebff; }
.website-message.visitor { margin-right: 10%; }
.website-message p { white-space: pre-wrap; margin: .4rem 0 0; }
#websiteReplyForm { display: grid; gap: 1rem; }
@media (max-width: 760px) { .website-inbox-layout { grid-template-columns: 1fr; } .website-inbox-layout > aside { max-height: 240px; border-right: 0; border-bottom: 1px solid #dedfeb; } .website-inbox-toolbar { flex-wrap: wrap; } }
.website-inbox-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:16px 0; }
.website-inbox-filters label { flex:1 1 180px; min-width:0; }
.website-inbox-filters input,.website-inbox-filters select { width:100%; }
.website-inbox-filters .ai-takeover-option { flex:0 0 auto; display:inline-flex; min-height:40px; font-size:13px; }
.website-inbox-filters .ai-takeover-option input { width:16px; height:16px; min-height:0; margin:0; }
.inbox-layout > aside { min-height:0; overflow-y:auto; }
.website-appearance-preview { margin:18px 0; padding:18px; border:1px solid var(--line); border-radius:16px; }
.website-appearance-preview summary { cursor:pointer; font-weight:700; }
.website-preview-controls { display:flex; flex-wrap:wrap; gap:8px; }
.website-preview-controls [aria-pressed="true"] { background:#5040e9; color:white; }
.website-preview-canvas { position:relative; min-height:620px; padding:0 20px 80px; background:#f3f4fa; border:1px solid var(--line); border-radius:18px; overflow:hidden; margin:16px auto; max-width:100%; }
.website-preview-canvas[data-device="mobile"] { width:390px; }
.website-preview-address { padding:14px 0; border-bottom:1px solid var(--line); color:#616777; font-size:13px; }
.website-preview-page { padding:22px 0; max-width:440px; }
.website-preview-page h4 { font-size:24px; margin:8px 0; overflow-wrap:anywhere; }
.website-preview-page p,.website-preview-page span { color:#616777; font-size:14px; }
.website-preview-chat,.website-preview-whatsapp { width:380px; max-width:100%; margin-left:auto; border:1px solid #dce0e9; border-radius:20px; box-shadow:0 16px 40px #0002; overflow:hidden; background:white; }
.website-preview-chat header,.website-preview-whatsapp header { display:flex; align-items:center; gap:12px; padding:16px; background:#202433; color:white; }
.website-preview-chat header strong { flex:1; overflow-wrap:anywhere; }
.website-preview-chat header button { background:transparent; border:0; border-radius:8px; cursor:pointer; color:white; padding:0 8px; font-size:24px; }
.website-preview-messages { padding:16px; background:#f5f6fa; min-height:120px; max-height:230px; overflow:auto; }
.website-preview-messages article { border-radius:12px; padding:12px; background:white; }
.website-preview-messages small { font-size:12px; color:#616777; }
.website-preview-messages p { white-space:pre-wrap; overflow-wrap:anywhere; margin:4px 0; }
.website-preview-notice { font-size:13px; padding:8px 16px; margin:0; color:#525a6e; }
.website-preview-composer { display:flex; gap:8px; padding:12px; font-size:14px; }
.website-preview-composer span:first-child { flex:1; border:1px solid #bdc3d1; border-radius:10px; padding:10px; color:#616777; }
.website-preview-composer span:last-child { background:#5040e9; color:white; border-radius:12px; padding:10px 16px; }
.website-preview-launcher { position:absolute; right:20px; bottom:20px; max-width:calc(100% - 40px); white-space:normal; overflow-wrap:anywhere; background:#5040e9; color:white; border:0; border-radius:12px; padding:10px 16px; font:inherit; cursor:pointer; box-shadow:0 8px 24px #0003; }
.website-preview-whatsapp p { padding:0 16px; font-size:14px; }
.website-preview-whatsapp blockquote { background:#dcf8c6; margin:16px; padding:12px; border-radius:12px; overflow-wrap:anywhere; }
.website-simulator-grid { display:grid; grid-template-columns:minmax(360px,1fr) minmax(290px,360px); gap:24px; margin-top:24px; }
.simulator-device { min-width:0; }
.simulator-device > header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.simulator-device > header h3 { margin:0; }
.simulator-device > header span { color:#616777; font-size:13px; }
.simulator-screen { position:relative; height:660px; border:1px solid var(--line); border-radius:20px; overflow:hidden; isolation:isolate; background:#f4f5fa; }
.simulator-mobile { max-width:360px; margin:auto; border:7px solid #202433; border-radius:30px; }
.simulator-screen iframe { position:absolute; width:100%; height:100%; border:0; inset:0; background:white; }
.simulator-sample { padding:32px; }
.simulator-sample h3 { font-size:28px; overflow-wrap:anywhere; }
.simulator-sample-card { background:white; padding:28px; border-radius:18px; margin:32px 0; }
.simulator-sample-lines { height:180px; background:repeating-linear-gradient(transparent 0 28px,#e4e7f0 28px 38px); border-radius:12px; }
.simulator-wa-icon { position:absolute; right:18px; bottom:18px; width:58px; height:58px; border:0; border-radius:50%; background:#128c55; color:white; box-shadow:0 6px 22px #0004; display:grid; place-items:center; cursor:pointer; z-index:3; }
.simulator-wa-icon svg { width:34px; height:34px; fill:currentColor; }
.simulator-chat { position:absolute; right:16px; bottom:90px; width:370px; max-width:calc(100% - 32px); height:500px; max-height:calc(100% - 110px); border-radius:18px; overflow:hidden; background:white; box-shadow:0 14px 40px #0004; display:flex; flex-direction:column; z-index:2; }
.simulator-chat > header,.simulator-mobile-chat > header { background:#075e54; color:white; padding:14px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.simulator-chat header strong { display:block; overflow-wrap:anywhere; }
.simulator-chat header small { display:block; font-size:12px; }
.simulator-chat header button,.simulator-mobile-chat header button { background:transparent; color:white; border:0; cursor:pointer; font-size:24px; }
.simulator-messages { flex:1; min-height:0; overflow:auto; padding:14px; background:#eeeae2; }
.simulator-greeting { font-size:13px; color:#616777; }
.simulator-bubble { background:white; border-radius:12px; padding:10px; margin:10px 20px 10px 0; overflow-wrap:anywhere; }
.simulator-bubble.visitor { margin:10px 0 10px 20px; background:#dcf8c6; }
.simulator-bubble p { margin:0 0 6px; white-space:pre-wrap; }
.simulator-bubble small { color:#616777; font-size:11px; }
.simulator-chat > p { padding:0 12px; margin:4px 0; font-size:13px; }
.simulator-chat form { padding:10px; display:flex; gap:8px; }
.simulator-chat input { min-width:0; flex:1; }
.simulator-chat form button { width:auto; padding:10px 14px; }
.simulator-mobile-prompt { position:absolute; bottom:90px; right:16px; left:16px; padding:14px; background:white; border-radius:14px; box-shadow:0 8px 24px #0003; display:flex; align-items:center; gap:8px; z-index:3; }
.simulator-mobile-prompt button { background:transparent; color:#202433; border:0; font-size:22px; cursor:pointer; }
.simulator-mobile-chat { position:absolute; inset:70px 12px 90px; background:#eeeae2; border-radius:16px; overflow:auto; box-shadow:0 10px 30px #0004; z-index:2; }
.simulator-mobile-chat p,.simulator-mobile-chat small { display:block; padding:12px; font-size:13px; }
.simulator-mobile-chat blockquote { background:#dcf8c6; margin:12px; padding:14px; border-radius:12px; overflow-wrap:anywhere; }
.simulator-wa-icon:focus-visible,.simulator-chat button:focus-visible,.simulator-mobile-prompt button:focus-visible { outline:3px solid #0574df; outline-offset:3px; }
.simulator-wa-icon.jiggle { animation:simulator-jiggle .5s ease-in-out 3; }
@keyframes simulator-jiggle { 0%,100% { transform:rotate(0); } 25% { transform:rotate(-12deg); } 75% { transform:rotate(12deg); } }
@media(prefers-reduced-motion:reduce) { .simulator-wa-icon.jiggle { animation:none; } }
@media(max-width:1100px) { .website-simulator-grid { grid-template-columns:minmax(0,1fr); } .simulator-mobile { width:100%; } }
.inbox-template-dialog { width: min(940px, calc(100vw - 32px)); }
.inbox-template-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 20px 0; }
.inbox-template-layout > * { min-width: 0; }
.inbox-template-layout label { display: grid; gap: 8px; margin-bottom: 16px; }
.inbox-template-layout input, .inbox-template-layout select { width: 100%; min-width: 0; }
.inbox-template-layout .wa-campaign-chat { min-height: 200px; padding: 18px; border-radius: 16px; }
.inbox-template-layout .wa-campaign-bubble { overflow-wrap: anywhere; }
.inbox-template-layout .wa-campaign-bubble p { white-space: pre-wrap; }
.inbox-template-help, .inbox-template-layout small, .inbox-template-routing small { color: var(--muted, #697083); font-size: .9rem; }
.inbox-template-routing { margin: 20px 0; padding: 16px; border: 1px solid #dedfeb; border-radius: 14px; }
.inbox-template-dialog .checkbox-label { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; line-height: 1.5; }
.inbox-template-dialog .checkbox-label input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 2px 0 0; padding: 0; }
.inbox-template-open { justify-self: start; }
@media (max-width: 700px) { .inbox-template-layout { grid-template-columns: 1fr; } }
/* Owner support context remains visible without replacing the client layout. */
.owner-access-bar { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px 28px; padding:20px 28px; background:#fff9e9; border-bottom:1px solid #e8d49d; }
.owner-access-bar[hidden] { display: none; }
.owner-access-context { display:grid; gap:7px; min-width:0; }
.owner-access-title { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.owner-access-title strong { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.owner-access-identity { color:#70644c; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.owner-mode-badge { background:#fff0bf; color:#735318; border:1px solid #e9d490; border-radius:999px; padding:5px 10px; font-size:11px; font-weight:700; line-height:1.4; }
.owner-mode-badge.live { background:#fce5df; color:#9c291c; border-color:#ecb3a7; }
.owner-access-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.owner-access-actions label { display:flex; align-items:center; gap:9px; margin:0; font-size:12px; white-space:nowrap; }
.owner-access-actions select { width:150px; min-height:44px; height:44px; padding:0 12px; font-size:13px; font-weight:600; }
#ownerSupportButton,.owner-access-actions a { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-height:44px; margin:0; padding:11px 16px; border:1px solid #d7d3ed; border-radius:10px; font:inherit; font-size:13px; font-weight:700; line-height:20px; text-decoration:none; white-space:nowrap; cursor:pointer; }
#ownerSupportButton { color:#fff; background:var(--purple,#4f46e5); border-color:transparent; }
#ownerSupportButton:disabled { opacity:.65; cursor:wait; }
.owner-access-actions a { color:#4034a0; background:#fff; }
.owner-access-actions a:hover { background:#f0edff; }
#ownerSupportStatus { grid-column:1 / -1; font-size:12px; line-height:1.5; color:#655335; padding-top:12px; border-top:1px solid #e8d49d; }
#ownerSupportStatus:empty { display:none; }
@media(max-width:1050px) { .owner-access-bar { grid-template-columns:1fr; gap:16px; } }
@media(max-width:560px) { .owner-access-bar { padding:18px 20px; }.owner-access-actions { display:grid; grid-template-columns:1fr; }.owner-access-actions label { justify-content:space-between; }.owner-access-actions select { flex:1; max-width:75%; } }
.auth-show-password { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.auth-show-password input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; flex: 0 0 18px; }
.auth-show-password[hidden] { display: none; }
.portal-help-guide { max-width: 960px; line-height: 1.7; }
.portal-help-guide .legal-hero, .portal-help-guide .contact-box {
  padding: 20px; background: var(--surface, #fff); border: 1px solid var(--border, #e5e5ef); border-radius: 16px; margin-bottom: 20px;
}
.portal-help-guide .legal-card { padding: 24px; background: var(--surface, #fff); border: 1px solid var(--border, #e5e5ef); border-radius: 16px; }
.portal-help-guide section { scroll-margin-top: 24px; padding: 8px 0 20px; }
.portal-help-guide section + section { border-top: 1px solid var(--border, #e5e5ef); padding-top: 24px; }
.portal-help-guide h2 { font-size: 21px; margin: 0 0 12px; }
.portal-help-guide h3 { font-size: 18px; margin: 16px 0 8px; }
.portal-help-guide p { margin: 0 0 14px; }
.portal-help-guide ul, .portal-help-guide ol { padding-left: 24px; }
.portal-help-guide li { margin-bottom: 8px; }
.portal-help-guide a { color: var(--primary, #5845e8); overflow-wrap: anywhere; }
.auth-startup { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.auth-startup img { max-width: 60vw; height: auto; }
.auth-startup p { color: var(--muted); }
.inbox-filter-drawer { background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 16px; margin:16px 0; }
.inbox-channel-switch { display: flex; gap: 14px; margin: 24px 0; }
.inbox-channel-switch button { flex: 1; display: flex; align-items: center; gap: 14px; text-align: left; padding: 18px 22px; background: #fff; color: #54606b; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font: inherit; font-weight: 750; }
.inbox-channel-switch svg { width: 30px; height: 30px; flex-shrink: 0; }
.inbox-channel-switch small { display: block; font-size: 12px; font-weight: 400; margin-top: 5px; line-height: 1.4; }
#whatsappInboxChannel { color: #146b49; }
#whatsappInboxChannel[aria-pressed="true"] { background: #e4f5ec; border-color: #73b89a; box-shadow: inset 0 -3px #128c7e; }
#websiteInboxChannel { color: #5144c9; }
#websiteInboxChannel[aria-pressed="true"] { background: #efedff; border-color: #aaa0ef; box-shadow: inset 0 -3px #6654df; }
#websiteAttentionCount { margin-left: auto; padding: 5px 9px; border-radius: 20px; background: #eeeafc; font-size: 12px; }
#whatsappInboxSurface .inbox-layout, #websiteInboxSurface .website-inbox-layout { grid-template-columns: minmax(280px, 31%) minmax(0,1fr); border-radius: 18px; margin-top: 0; }
.inbox-sidebar-tools { padding: 16px; border-bottom: 1px solid var(--line); }
.inbox-sidebar-tools > select { width: 100%; font-size: 13px; min-height: 40px; }
.inbox-sidebar-tools .inbox-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 16px; }
.inbox-sidebar-tools .inbox-tab { justify-content: center; font-size: 11px; padding: 7px; gap: 5px; border-radius: 9px; white-space: normal; }
#whatsappInboxSurface .inbox-tab.is-active { background: #147d64; border-color: #147d64; }
#whatsappInboxSurface .inbox-list-heading { background: #f0f8f4; padding: 22px 18px; color: #17604c; }
#websiteInboxSurface .inbox-list-heading { background: #f2f0fd; padding: 22px 18px; color: #5144ac; }
#whatsappInboxSurface .inbox-layout > aside { border-right: 1px solid var(--line); max-height: 900px; }
#whatsappInboxSurface .conversation-list { border: 0; }
#whatsappInboxSurface .conversation-item { padding: 20px 18px; gap: 10px; }
#whatsappInboxSurface .conversation-item.is-active { background: #e7f4ec; box-shadow: inset 3px 0 #128c7e; }
#whatsappInboxSurface .chat-heading { background: #f0f6f3; flex-wrap: wrap; padding: 20px 24px; }
#whatsappInboxSurface .chat-controls { flex-wrap: wrap; }
#whatsappInboxSurface .message-stream { background-color: #efece5; background-image: radial-gradient(#d9d6cc 0.7px,transparent 0.7px); background-size: 18px 18px; }
#whatsappInboxSurface .message { background: white; box-shadow: 0 1px 2px #0000000d; }
#whatsappInboxSurface .message.outbound { background: #d9fdd3; color: #173d2d; }
#whatsappInboxSurface .message.internal-note { background: #fff4d1; color: #6b4f14; }
.inbox-channel-switch button:focus-visible { outline: 3px solid #a79fff; outline-offset: 3px; }
#whatsappInboxSurface .reply-form button[type="submit"] { background: #147d64; }
#whatsappInboxSurface .conversation-empty { min-height: 420px; padding: 32px; background: #f3f7f4; }
#whatsappInboxSurface .conversation-empty > span { background: #dbefe3; color: #147d64; }
#inboxView .inbox-filter-drawer { margin: 12px 0; padding: 12px; }
#inboxView .inbox-filter-drawer summary { line-height: 1.5; }
#inboxView .website-inbox-filters { flex-direction: column; align-items: stretch; }
#inboxView .website-inbox-filters label { flex: none; width: 100%; }
#inboxView .website-inbox-filters input, #inboxView .website-inbox-filters select { min-height: 40px; font-size: 13px; }
#inboxView .website-inbox-filters .ai-takeover-option input { min-height: 0; }
#inboxView [role="status"]:empty { display: none; }
#whatsappSearchStatus, #websiteFilterSummary, #websiteInboxStatus { font-size: 12px; color: var(--muted); line-height: 1.5; }
#websiteInboxSurface .website-inbox-layout > aside { padding: 0 16px 16px; }
#websiteInboxSurface .inbox-list-heading { margin: 0 -16px 16px; }
#websiteInboxSurface .website-chat-row { border: 1px solid #e8e5f4; margin-bottom: 10px; }
#websiteInboxSurface .website-transcript { background: #f2f0fa; padding: 22px; }
#websiteInboxSurface .website-message.team { background: #e6e0ff; }
#websiteConversationPane > .conversation-empty { min-height: 420px; padding: 30px; }
#websiteInboxSurface .website-inbox-toolbar { font-size: 12px; color: var(--muted); margin: 0 0 16px; gap: 20px; }
@media(max-width: 900px) { #whatsappInboxSurface .inbox-layout, #websiteInboxSurface .website-inbox-layout { grid-template-columns: 1fr; } #whatsappInboxSurface .inbox-layout > aside { max-height: 380px; border-right: 0; border-bottom: 1px solid var(--line); } }
@media(max-width: 600px) { .inbox-channel-switch { gap: 8px; } .inbox-channel-switch button { padding: 14px 12px; gap: 9px; font-size: 13px; } .inbox-channel-switch small { display: none; } .inbox-channel-switch svg { width: 23px; height: 23px; } }
.inbox-filter-drawer summary, .reply-help summary { cursor:pointer; color:var(--green); font-size:12px; font-weight:800; }
.inbox-list-heading { display:grid; gap:5px; padding:16px 18px; border-bottom:1px solid var(--line); background:var(--paper); }
.inbox-list-heading strong { font-size:13px; }
.inbox-list-heading small { color:var(--muted); font-size:11px; }
.inbox-compose-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:6px; margin-bottom:10px; }
.inbox-compose-heading strong { font-size:13px; }
.inbox-compose-heading span { color:var(--muted); font-size:11px; }
#replyInput { resize:vertical; min-height:84px; max-height:220px; line-height:1.5; padding:12px; }
.reply-compose { align-items:end; }
.reply-help { margin-top:10px; }
.contact-lists-drawer { margin:16px 0; }
.contact-lists-drawer > summary { cursor:pointer; color:var(--green); font-size:13px; font-weight:750; }
.contact-entry-screen { width:100%; max-width:100%; height:100dvh; max-height:100dvh; margin:0; border-radius:0; padding:32px max(24px,calc((100vw - 800px)/2)); }
.contact-entry-screen form { max-width:800px; margin:auto; }
.contact-entry-choices { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:18px; background:var(--paper); border:1px solid var(--line); border-radius:12px; margin:20px 0; }
.contact-csv-guide { background:var(--paper); border:1px solid var(--line); border-radius:12px; padding:18px; font-size:13px; line-height:1.6; }
.contact-csv-guide small { display:block; color:var(--muted); margin-top:8px; }
#contactsView .section-actions { gap:12px; flex-wrap:wrap; }
#contactsView .section-actions .secondary-button { min-height:46px; padding:12px 20px; line-height:1.4; border:1px solid #dcd9f4; border-radius:12px; background:#f3f1fc; font-size:13px; font-weight:700; transition:background .15s,border-color .15s; }
#contactsView .section-actions .secondary-button:hover { background:#eae6fa; border-color:#c6beef; }
#contactsView .section-actions .secondary-button:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
#contactInterestsDialog { padding:28px; }
#contactInterestsDialog form { padding:16px 0; }
.contact-toolbar { grid-template-columns:minmax(0,1fr) 220px auto; }
@media(max-width:800px) { .contact-toolbar { grid-template-columns:1fr; } .contact-entry-screen { padding:12px; } .contact-entry-screen form { padding:16px; } }
@media(max-width:640px) { .inbox-compose-heading { align-items:flex-start; flex-direction:column; } }
.campaign-service-notice {
  padding: 20px 24px;
  margin: 0 0 24px;
  border: 1px solid #dc8a78;
  border-left: 5px solid #b42318;
  border-radius: 14px;
  background: #fff4ef;
  color: #7a271a;
  line-height: 1.6;
  overflow-wrap: anywhere;
  grid-column: 1 / -1;
}
.campaign-service-notice[hidden] { display: none; }
.profile-icon img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.website-advanced-settings { margin:20px 0; padding:20px; border:1px solid var(--line,#ddd); border-radius:14px; }
.website-advanced-settings summary { cursor:pointer; font-weight:700; margin-bottom:16px; }
#profilePhotoInput {
  box-sizing: border-box;
  height: auto;
  min-height: 52px;
  padding: 10px 12px;
  line-height: 28px;
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
}
#profilePhotoInput::file-selector-button {
  margin: 0 12px 0 0;
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: var(--mint);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}
#profilePhotoInput + small { font-weight: 400; line-height: 1.5; }
