:root {
  --paper: #f7f4ed;
  --paper-light: #fcfbf8;
  --ink: #1c1c1c;
  --muted: rgba(28, 28, 28, .6);
  --line: #e4e1d9;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
.auth-header { position: fixed; top: 0; left: 0; right: 0; z-index: 2; height: 76px; display: flex; align-items: center; padding: 0 38px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 18px; font-weight: 650; letter-spacing: -.5px; text-decoration: none; }
.auth-brand img { display: block; width: 30px; height: 30px; object-fit: contain; }
.auth-page { display: grid; min-height: 100vh; grid-template-rows: 1fr auto; }
.auth-main { position: relative; display: grid; place-items: center; min-height: calc(100vh - 46px); padding: 110px 20px 60px; overflow: hidden; }
.auth-main::before { content: ""; position: absolute; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 68%); }
.auth-card { position: relative; z-index: 1; width: min(100%, 430px); padding: 44px 42px 38px; border: 1px solid var(--line); border-radius: 16px; background: rgba(252,251,248,.82); box-shadow: 0 25px 65px rgba(28,28,28,.07); text-align: center; }
.auth-logo { width: 48px; height: 48px; object-fit: contain; }
.auth-eyebrow { margin: 24px 0 0; color: rgba(28,28,28,.48); font-size: 10px; letter-spacing: .14em; }
.auth-card h1 { margin: 13px 0 0; font-size: 32px; line-height: 1.12; letter-spacing: -1.2px; }
.auth-copy { margin: 15px auto 0; max-width: 320px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-error { margin-top: 20px; padding: 10px 12px; border: 1px solid rgba(124,45,45,.18); border-radius: 7px; background: rgba(124,45,45,.06); color: #713737; font-size: 12px; line-height: 1.45; }
.google-auth-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 28px; border: 1px solid rgba(28,28,28,.28); border-radius: 7px; background: var(--paper-light); color: var(--ink); font-size: 14px; font-weight: 550; text-decoration: none; box-shadow: 0 2px 4px rgba(28,28,28,.04); transition: transform .2s, box-shadow .2s, border-color .2s; }
.google-auth-button:hover { transform: translateY(-1px); border-color: rgba(28,28,28,.45); box-shadow: 0 8px 20px rgba(28,28,28,.08); }
.google-auth-button:focus-visible { outline: 3px solid rgba(28,28,28,.12); outline-offset: 2px; }
.google-auth-button svg { width: 19px; height: 19px; }
.auth-legal { margin: 18px auto 0; color: rgba(28,28,28,.4); font-size: 10px; line-height: 1.55; }
.auth-footer { padding: 0 20px 22px; color: rgba(28,28,28,.38); font-size: 10px; text-align: center; }

/* First-login workspace setup */
.onboarding-main { padding-top: 105px; padding-bottom: 70px; }
.onboarding-card { position: relative; z-index: 1; width: min(100%, 650px); padding: 42px; border: 1px solid var(--line); border-radius: 16px; background: rgba(252,251,248,.9); box-shadow: 0 25px 65px rgba(28,28,28,.07); }
.onboarding-heading { text-align: center; }.onboarding-heading .auth-eyebrow { margin-top: 0; }.onboarding-heading h1 { margin: 12px 0 0; font-size: 34px; letter-spacing: -1.3px; }.onboarding-heading > p:last-child { max-width: 440px; margin: 13px auto 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.onboarding-card form { margin-top: 31px; }
.avatar-field { display: flex; align-items: center; gap: 17px; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: rgba(247,244,237,.65); }
.avatar-preview, .mini-org-avatar { position: relative; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; background: var(--ink); color: white; }
.avatar-preview { width: 66px; height: 66px; border-radius: 15px; font-size: 21px; }.avatar-preview img, .mini-org-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-field > div:last-child { display: flex; align-items: flex-start; flex-direction: column; gap: 8px; }.avatar-field input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }.upload-button { padding: 9px 12px; border: 1px solid rgba(28,28,28,.28); border-radius: 6px; background: var(--paper-light); font-size: 10px; font-weight: 600; cursor: pointer; }.avatar-field input:focus-visible + * { outline: 2px solid var(--ink); }.avatar-field small { color: rgba(28,28,28,.45); font-size: 8px; }
.onboarding-fields { display: grid; gap: 8px; margin-top: 22px; }.onboarding-fields label { margin-top: 9px; font-size: 10px; font-weight: 650; }.onboarding-fields label span { float: right; color: rgba(28,28,28,.4); font-size: 8px; font-weight: 400; }.onboarding-fields input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid rgba(28,28,28,.23); border-radius: 7px; background: white; color: var(--ink); font-size: 12px; outline: none; }.onboarding-fields input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28,28,28,.07); }
.customer-preview { margin-top: 25px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: white; }.customer-preview-label { display: block; margin-bottom: 12px; color: rgba(28,28,28,.4); font-size: 8px; letter-spacing: .12em; }.customer-preview-header { display: flex; align-items: center; gap: 11px; }.mini-org-avatar { width: 39px; height: 39px; border-radius: 10px; font-size: 12px; }.customer-preview-header > div:last-child { display: flex; flex-direction: column; gap: 3px; }.customer-preview-header strong { font-size: 12px; }.customer-preview-header small { color: rgba(28,28,28,.47); font-size: 8px; }.customer-preview-header i { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: #4c7a60; }
.form-error { margin: 16px 0 0; padding: 10px 12px; border: 1px solid rgba(124,45,45,.18); border-radius: 7px; background: rgba(124,45,45,.06); color: #713737; font-size: 10px; line-height: 1.5; }.onboarding-submit { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding: 0 15px; border: 0; border-radius: 7px; background: var(--ink); color: white; font-size: 11px; font-weight: 600; cursor: pointer; }.onboarding-submit:disabled { cursor: wait; opacity: .55; }.security-note { margin: 12px auto 0; color: rgba(28,28,28,.4); font-size: 8px; line-height: 1.55; text-align: center; }

.dashboard-page { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); background: #faf9f6; }
.dashboard-sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; display: flex; flex-direction: column; padding: 24px 16px 16px; border-right: 1px solid var(--line); background: #f1efe9; }
.dashboard-sidebar > .auth-brand { padding: 0 8px 26px; }
.dashboard-sidebar nav { display: grid; gap: 4px; margin-top: 12px; }
.dashboard-sidebar nav a { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; min-height: 39px; padding: 0 10px; border-radius: 7px; color: rgba(28,28,28,.58); font-size: 12px; text-decoration: none; }
.dashboard-sidebar nav a.active { background: rgba(28,28,28,.065); color: var(--ink); font-weight: 600; }
.dashboard-sidebar nav a[aria-disabled="true"] { pointer-events: none; }
.dashboard-sidebar nav small { padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; color: rgba(28,28,28,.38); font-size: 7px; text-transform: uppercase; }
.dashboard-user { margin-top: auto; display: grid; grid-template-columns: 32px minmax(0,1fr) 27px; align-items: center; gap: 9px; padding: 13px 7px 4px; border-top: 1px solid var(--line); }
.user-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: white; font-size: 12px; }
.dashboard-user > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.dashboard-user strong, .dashboard-user small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dashboard-user strong { font-size: 10px; }.dashboard-user small { color: rgba(28,28,28,.45); font-size: 8px; }
.dashboard-user button { width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: rgba(28,28,28,.48); cursor: pointer; }.dashboard-user button:hover { background: rgba(28,28,28,.06); color: var(--ink); }
.dashboard-main { grid-column: 2; min-width: 0; }
.dashboard-topbar { height: 68px; display: flex; align-items: center; justify-content: flex-end; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(250,249,246,.9); }
.secure-label { display: inline-flex; align-items: center; gap: 7px; color: rgba(28,28,28,.48); font-size: 10px; }.secure-label i { width: 6px; height: 6px; border-radius: 50%; background: #4c7a60; box-shadow: 0 0 0 4px rgba(76,122,96,.08); }
.mobile-dashboard-brand { display: none; }
.dashboard-content { width: min(calc(100% - 80px), 1060px); margin: 0 auto; padding: 74px 0; }
.dashboard-eyebrow { margin: 0; color: rgba(28,28,28,.42); font-size: 10px; letter-spacing: .14em; }
.dashboard-content > h1 { margin: 11px 0 0; font-size: clamp(38px, 4.5vw, 58px); line-height: 1.03; letter-spacing: -.045em; }
.dashboard-lead { max-width: 600px; margin: 18px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.getting-started-card { margin-top: 48px; min-height: 190px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.step-tag { color: rgba(28,28,28,.43); font-size: 9px; letter-spacing: .12em; }.getting-started-card h2 { margin: 10px 0 0; font-size: 24px; letter-spacing: -.7px; }.getting-started-card p { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.getting-started-card button { min-width: 138px; min-height: 41px; border: 0; border-radius: 7px; background: var(--ink); color: white; opacity: .32; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-top: 14px; }.dashboard-stats article { min-height: 145px; display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper-light); }.dashboard-stats article > span { color: var(--muted); font-size: 11px; }.dashboard-stats strong { margin-top: 16px; font-size: 32px; letter-spacing: -1px; }.dashboard-stats small { margin-top: auto; color: rgba(28,28,28,.4); font-size: 9px; }

@media (max-width: 720px) {
  .auth-header { height: 64px; padding: 0 18px; }.auth-card { padding: 38px 24px 32px; }.auth-main { padding-top: 90px; }
  .dashboard-page { display: block; }.dashboard-sidebar { display: none; }.dashboard-main { min-height: 100vh; }.dashboard-topbar { height: 64px; justify-content: space-between; padding: 0 17px; }.mobile-dashboard-brand { display: inline-flex; }.mobile-dashboard-brand img { width: 27px; height: 27px; }.dashboard-content { width: calc(100% - 34px); padding: 48px 0; }.getting-started-card { align-items: flex-start; flex-direction: column; }.dashboard-stats { grid-template-columns: 1fr; }
}

/* Team management, exact setup progress, and mobile dashboard navigation */
.progress-ring { --progress: 25%; position: relative; isolation: isolate; border: 0; background: conic-gradient(var(--ink) var(--progress), #dedede 0); }
.progress-ring::before { content: none; }
.progress-ring b { position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #000; font-size: 10px; font-weight: 500; }

/* Installation, customer controls, and usage records */
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; }
.install-card, .api-quickstart, .usage-section { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.install-card { min-width: 0; padding: 28px; }.install-card h2, .api-quickstart h2, .usage-heading h2 { margin: 7px 0 0; font-size: 24px; line-height: 32px; }.install-card > p, .api-quickstart p, .usage-heading p { color: var(--muted); font-size: 14px; line-height: 22px; }.install-card ol { padding-left: 22px; color: #444; font-size: 14px; line-height: 25px; }
.install-code, .api-key-reveal > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 18px; padding: 7px; background: #efefef; }.install-code code, .api-key-reveal code { min-width: 0; padding: 10px; overflow-x: auto; font: 12px/20px ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }.install-code button, .api-key-reveal button, .api-key-form button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: #000; color: #fff; cursor: pointer; }
.api-key-form { margin-top: 20px; }.api-key-form > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }.api-key-form > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }.api-key-form input { min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #ccc; border-radius: 9px; font-size: 14px; }
.api-key-reveal { margin-top: 18px; padding: 16px; border: 1px solid #000; border-radius: 12px; }.api-key-reveal > p { margin: 4px 0 0; color: #666; font-size: 12px; }.api-key-list { display: grid; gap: 8px; margin-top: 18px; }.api-key-list article { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid #e2e2e2; border-radius: 11px; }.api-key-list article > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }.api-key-list small { color: #666; }.api-key-list article > button { min-height: 36px; padding: 0 13px; border: 1px solid #ccc; border-radius: 999px; background: #fff; cursor: pointer; }.api-key-empty { color: #666; font-size: 13px; }
.api-quickstart { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; margin-top: 16px; padding: 28px; }.api-quickstart pre { min-width: 0; margin: 0; padding: 18px; overflow-x: auto; background: #111; color: #fff; font: 12px/20px ui-monospace, SFMono-Regular, Consolas, monospace; }
.docs-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 10px; padding: 0 16px; border: 1px solid #ccc; border-radius: 999px; color: #000; font-size: 13px; text-decoration: none; }
.settings-grid .customer-controls-card { grid-column: 1 / -1; }.customer-controls-form { display: grid; gap: 10px; margin-top: 22px; }.control-row { min-height: 76px; display: grid; grid-template-columns: 22px minmax(0,1fr) 112px auto; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #e2e2e2; border-radius: 12px; cursor: pointer; }.control-row > input[type="checkbox"] { width: 18px; height: 18px; accent-color: #000; }.control-row > span { display: flex; flex-direction: column; gap: 4px; }.control-row strong { font-size: 14px; }.control-row small { color: #666; font-size: 12px; line-height: 18px; }.control-row > input[type="number"] { width: 112px; min-height: 42px; padding: 0 10px; border: 1px solid #ccc; border-radius: 9px; font-size: 14px; }.control-row > input[type="number"]:disabled { background: #eee; color: #888; }.control-row > b { color: #666; font-size: 12px; font-weight: 500; }.captcha-control { grid-template-columns: 22px minmax(0,1fr) auto; }.captcha-control em { padding: 6px 9px; border-radius: 999px; background: #eee; color: #666; font-size: 11px; font-style: normal; }.captcha-control em.ready { background: #e6f3e9; color: #28623b; }.customer-controls-form > button { min-height: 46px; display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 0 17px; border: 0; border-radius: 999px; background: #000; color: #fff; cursor: pointer; }
.usage-section { margin-top: 28px; padding: 28px; }.usage-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }.usage-heading p { margin: 6px 0 0; }.view-heading > .custom-select { align-self: flex-end; flex: 0 0 170px; }.custom-select { position: relative; flex: 0 0 170px; }.custom-select > button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px solid #ccc; border-radius: 999px; background: #fff; cursor: pointer; }.custom-select [role="listbox"] { position: absolute; z-index: 20; top: calc(100% + 7px); right: 0; width: 190px; display: grid; padding: 7px; border: 1px solid #ddd; border-radius: 13px; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.14); }.custom-select [role="option"] { min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }.custom-select [role="option"][aria-selected="true"] { background: #efefef; font-weight: 600; }
.usage-list { display: grid; margin-top: 22px; }.usage-list article { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 28px; min-height: 68px; border-top: 1px solid #e8e8e8; }.usage-list article > div { display: flex; flex-direction: column; gap: 3px; }.usage-list small, .usage-list span { color: #666; font-size: 12px; }.usage-list b { font-size: 13px; }.usage-empty { min-height: 190px; display: flex; align-items: center; justify-content: center; flex-direction: column; margin-top: 20px; border: 1px dashed #ccc; border-radius: 12px; text-align: center; }.usage-empty > span { font-size: 24px; }.usage-empty strong { margin-top: 10px; }.usage-empty p { margin: 5px 12px 0; color: #666; font-size: 13px; }.usage-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }.usage-pagination button { min-height: 40px; padding: 0 15px; border: 1px solid #ccc; border-radius: 999px; background: #fff; cursor: pointer; }.usage-pagination button:disabled { opacity: .4; cursor: not-allowed; }.usage-pagination span { color: #666; font-size: 12px; }

@media (max-width: 900px) { .install-grid, .api-quickstart { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .install-grid { margin-top: 32px; }.install-card, .api-quickstart, .usage-section { padding: 21px 17px; }.install-code, .api-key-reveal > div, .api-key-form > div { grid-template-columns: 1fr; }.install-code button, .api-key-reveal button, .api-key-form button { width: 100%; }.docs-link { width: 100%; }.control-row, .captcha-control { grid-template-columns: 22px minmax(0,1fr); }.control-row > input[type="number"], .control-row > b, .captcha-control em { grid-column: 2; }.control-row > input[type="number"] { width: 100%; }.usage-heading { align-items: stretch; flex-direction: column; }.view-heading > .custom-select { width: 100%; align-self: stretch; flex-basis: auto; }.custom-select { flex-basis: auto; width: 100%; }.custom-select [role="listbox"] { left: 0; right: 0; width: 100%; }.usage-list article { grid-template-columns: 1fr auto; gap: 5px 12px; padding: 13px 0; }.usage-list article > span { grid-column: 1; }.usage-list article > b { grid-column: 2; grid-row: 1 / span 2; }.api-key-list article { grid-template-columns: 1fr; }.api-key-list article > button { width: 100%; } }

.confirm-dialog { width: min(430px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 20px; background: #fff; color: #000; box-shadow: 0 28px 90px rgba(0,0,0,.28); }.confirm-dialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(4px); }.confirm-dialog-shell { padding: 28px; }.confirm-dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #f5e7e7; color: #852f2f; font-weight: 700; }.confirm-dialog h2 { margin: 18px 0 0; font-size: 24px; line-height: 32px; }.confirm-dialog p { margin: 8px 0 0; color: #5e5e5e; font-size: 14px; line-height: 22px; }.confirm-dialog-shell > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }.confirm-dialog button { min-height: 46px; border-radius: 999px; cursor: pointer; }.confirm-dialog [data-api-key-confirm-cancel] { border: 1px solid #ccc; background: #fff; }.confirm-dialog [data-api-key-confirm-delete] { border: 1px solid #000; background: #000; color: #fff; }
@media (max-width: 480px) { .confirm-dialog-shell { padding: 23px 19px; }.confirm-dialog-shell > div { grid-template-columns: 1fr; }.confirm-dialog [data-api-key-confirm-delete] { grid-row: 1; } }

/* View loading */
.view-loader { display: none; }
.dashboard-view.is-loading { min-height: calc(100vh - 68px); }
.dashboard-view.is-loading > :not(.view-loader) { visibility: hidden; }
.dashboard-view.is-loading .view-loader { min-height: 420px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; }
.view-loader strong { color: #5e5e5e; font-size: 13px; font-weight: 500; }
.view-spinner { width: 34px; height: 34px; display: block; border: 3px solid #d7d7d7; border-top-color: #000; border-radius: 50%; animation: dashboard-spin .72s linear infinite; }
.dashboard-sidebar nav a.loading::after { content: ""; width: 13px; height: 13px; justify-self: end; border: 2px solid #ccc; border-top-color: #000; border-radius: 50%; animation: dashboard-spin .72s linear infinite; }
@keyframes dashboard-spin { to { transform: rotate(360deg); } }

/* Editable settings */
.settings-form { display: flex; flex-direction: column; margin-top: 22px; }
.settings-form > label:not(.settings-icon-button) { margin: 13px 0 7px; font-size: 13px; font-weight: 600; }
.settings-form > input:not([type="file"]) { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #cfcfcf; border-radius: 9px; background: #fff; color: #000; font-size: 14px; outline: none; }
.settings-form > input:not([type="file"]):focus { border-color: #000; box-shadow: 0 0 0 3px rgba(0,0,0,.08); }
.settings-form > input[readonly] { background: #efefef; color: #666; }
.settings-form > button { min-height: 46px; display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding: 0 17px; border: 0; border-radius: 999px; background: #000; color: #fff; font-size: 14px; cursor: pointer; }
.settings-form > button:disabled { cursor: wait; opacity: .5; }
.settings-form input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.settings-icon-button { min-height: 42px; display: grid; place-items: center; margin-top: 12px; border: 1px solid #cfcfcf; border-radius: 999px; background: #fff; font-size: 13px; cursor: pointer; }
.settings-form input[type="file"]:focus-visible + .settings-icon-button { outline: 3px solid rgba(0,0,0,.14); outline-offset: 2px; }
.settings-file-note { margin-top: 8px; color: #777; font-size: 11px; line-height: 17px; text-align: center; }
.settings-form .form-error { margin-top: 13px; }

/* Billing */
.billing-overview { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 45px; }
.billing-overview article, .credit-topup-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.billing-overview article { min-height: 220px; display: flex; flex-direction: column; padding: 28px; }
.billing-overview article > span { color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.billing-overview article > strong { margin-top: 24px; font-size: 36px; line-height: 44px; }.billing-overview article > strong b { font-weight: 700; }
.billing-overview article > p { margin: auto 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }.billing-plan-card p b { color: #000; font-weight: 600; }
.credit-topup-card { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 14px; padding: 32px; }
.credit-topup-card h2 { margin: 7px 0 0; font-size: 26px; line-height: 34px; }.credit-topup-card > div > p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.credit-topup-card form { display: flex; flex-direction: column; }.credit-topup-card form > label { margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.credit-input-row { min-height: 52px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 5px 14px; background: #efefef; }
.credit-input-row input { min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; font-size: 17px; font-weight: 600; }.credit-input-row span { font-size: 13px; white-space: nowrap; }
.credit-topup-card form > button { width: 100%; justify-content: space-between; margin-top: 12px; border: 0; cursor: pointer; }.credit-topup-card form > button:disabled { cursor: not-allowed; opacity: .4; }
.credit-topup-card form > small { margin-top: 9px; color: #777; font-size: 11px; line-height: 17px; text-align: center; }
.billing-configuration-note { margin: 14px 0 0; padding: 14px 18px; border-left: 4px solid #000; background: #fff; color: #444; font-size: 13px; line-height: 20px; }

@media (max-width: 900px) {
  .billing-overview, .credit-topup-card { grid-template-columns: 1fr; }.credit-topup-card { gap: 26px; }
}

@media (max-width: 720px) {
  .dashboard-view.is-loading { min-height: calc(100vh - 64px); }.dashboard-view.is-loading .view-loader { min-height: 330px; }
  .billing-overview { margin-top: 30px; }.billing-overview article { min-height: 190px; padding: 23px; }.billing-overview article > strong { font-size: 31px; line-height: 38px; }
  .credit-topup-card { padding: 23px 20px; }.credit-input-row { grid-template-columns: 1fr; gap: 0; }.credit-input-row span { padding-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .view-spinner, .dashboard-sidebar nav a.loading::after { animation-duration: 1.5s; }
}
.mobile-menu-button, .mobile-sidebar-close, .dashboard-backdrop { display: none; }
.team-add-button { border: 0; cursor: pointer; }
.team-add-button:disabled { cursor: not-allowed; opacity: .42; }
.team-summary { display: grid; grid-template-columns: 180px minmax(0,1fr); align-items: center; gap: 28px; margin-top: 45px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.team-summary > div { display: flex; flex-direction: column; gap: 5px; }
.team-summary span { color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.team-summary strong { font-size: 30px; line-height: 36px; }.team-summary strong b { font-weight: 700; }
.team-summary p { margin: 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.team-invite-card { margin-top: 16px; padding: 28px; border: 1px solid #000; border-radius: 16px; background: #fff; }
.team-invite-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.team-invite-heading h2 { margin: 7px 0 0; font-size: 24px; line-height: 32px; }
.team-invite-heading > span { padding: 7px 10px; border-radius: 999px; background: #efefef; color: #555; font-size: 11px; white-space: nowrap; }
.team-invite-card > p { max-width: 700px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.team-invite-message { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin-top: 22px; padding: 6px; background: #efefef; }
.team-invite-message code { min-width: 0; align-self: center; padding: 9px 12px; overflow: auto; color: #000; font: 600 14px/22px ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.team-invite-message button { min-height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: #000; color: #fff; font-size: 13px; cursor: pointer; }
.team-invite-actions { display: flex; align-items: center; gap: 18px; margin-top: 16px; }.team-invite-actions > span { color: var(--muted); font-size: 13px; }.team-invite-actions b { color: #000; }
.team-invite-card .team-security-note { font-size: 11px; line-height: 18px; }
.team-list-heading { margin-top: 42px; }.team-list-heading h2 { margin: 0; font-size: 24px; line-height: 32px; }.team-list-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 20px; }
.team-empty { min-height: 260px; display: flex; align-items: center; justify-content: center; flex-direction: column; margin-top: 14px; border: 1px dashed #cfcfcf; border-radius: 16px; background: #fff; text-align: center; }
.team-empty > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #efefef; font-size: 20px; }.team-empty h3 { margin: 15px 0 0; font-size: 18px; }.team-empty p { margin: 7px 18px 0; color: var(--muted); font-size: 14px; line-height: 21px; }
.team-member-list { display: grid; gap: 10px; margin-top: 14px; }.team-member-list article { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }.team-member-list article > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #000; color: #fff; font-size: 14px; }.team-member-list article > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }.team-member-list strong { overflow: hidden; font-size: 15px; line-height: 21px; text-overflow: ellipsis; white-space: nowrap; }.team-member-list small { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }.team-member-list button { min-height: 38px; padding: 0 14px; border: 1px solid #cfcfcf; border-radius: 999px; background: #fff; font-size: 12px; cursor: pointer; }

@media (max-width: 720px) {
  body.menu-open { overflow: hidden; }
  .dashboard-sidebar { display: flex; z-index: 80; width: min(86vw, 310px); padding-top: 20px; overflow-y: auto; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 18px 0 50px rgba(0,0,0,.16); }
  .dashboard-sidebar.open { transform: translateX(0); }
  .dashboard-sidebar > .auth-brand { padding-right: 44px; }
  .mobile-sidebar-close { position: absolute; top: 18px; right: 16px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #efefef; color: #000; font-size: 21px; cursor: pointer; }
  .dashboard-backdrop { position: fixed; z-index: 70; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(0,0,0,.38); backdrop-filter: blur(2px); }
  .dashboard-topbar { position: sticky; z-index: 40; top: 0; display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; padding: 0 14px; background: rgba(243,243,243,.94); backdrop-filter: blur(14px); }
  .mobile-menu-button { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; }
  .mobile-menu-button span { width: 16px; height: 1.5px; background: #000; }
  .mobile-dashboard-brand { justify-self: center; }.mobile-dashboard-brand span { display: none; }
  .topbar-actions { justify-self: end; }.topbar-actions .icon-button { background: #fff; }
  .dashboard-content { width: calc(100% - 28px); padding: 38px 0 54px; }
  .view-heading h1 { font-size: clamp(34px, 11vw, 42px); line-height: 1.12; }
  .overview-grid { gap: 12px; }.setup-card, .activity-card { padding: 20px; }.setup-list li { grid-template-columns: 28px minmax(0,1fr); padding: 8px 0; }.setup-list li > a { grid-column: 2; padding-bottom: 6px; }
  .team-summary { grid-template-columns: 1fr; gap: 10px; margin-top: 30px; padding: 22px; }
  .team-invite-card { padding: 22px 18px; }.team-invite-heading { flex-direction: column; gap: 12px; }.team-invite-message { grid-template-columns: 1fr; }.team-invite-message button { width: 100%; }.team-invite-actions { align-items: flex-start; flex-direction: column; }.team-invite-actions .dashboard-primary-button { width: 100%; }
  .team-member-list article { grid-template-columns: 40px minmax(0,1fr); }.team-member-list button { grid-column: 1 / -1; width: 100%; }
  .dashboard-toast { right: 14px; bottom: 14px; width: calc(100% - 28px); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-sidebar { transition: none; }
}

/* Uber-inspired readability refresh */
:root {
  --paper: #ffffff;
  --paper-light: #ffffff;
  --ink: #000000;
  --muted: #5e5e5e;
  --line: #e2e2e2;
}
.auth-page, .dashboard-page { background: #fff; }
.dashboard-sidebar { background: #fff; }
.dashboard-main, .dashboard-topbar { background: #f3f3f3; }
.dashboard-sidebar nav a, .mobile-dashboard-nav a { font-size: 14px; }
.dashboard-sidebar nav a.active, .mobile-dashboard-nav a.active { border-radius: 999px; background: #efefef; }
.dashboard-sidebar nav p, .workspace-switcher small, .dashboard-eyebrow, .step-tag { font-size: 12px; line-height: 20px; }
.workspace-switcher { border-radius: 16px; background: #f3f3f3; }
.workspace-switcher strong { font-size: 14px; line-height: 20px; }
.dashboard-user strong { font-size: 14px; line-height: 20px; }
.dashboard-user small { font-size: 12px; line-height: 18px; }
.secure-label { font-size: 12px; }
.view-heading h1 { font-size: clamp(40px, 5vw, 52px); line-height: 1.22; letter-spacing: 0; font-weight: 700; }
.dashboard-lead { max-width: 680px; font-size: 18px; line-height: 26px; }
.dashboard-primary-button, .dashboard-url-form button, .source-dialog-actions button, .document-upload-card button { min-height: 48px; padding-inline: 20px; border-radius: 999px; font-size: 16px; font-weight: 500; }
.setup-card, .activity-card, .source-onboarding-card, .settings-grid article, .website-list article, .document-upload-card { border-color: #e2e2e2; border-radius: 16px; background: #fff; }
.card-heading h2, .source-list-heading h2 { font-size: 24px; line-height: 32px; letter-spacing: 0; }
.setup-list strong, .empty-activity strong { font-size: 14px; line-height: 20px; }
.setup-list small, .empty-activity p { font-size: 12px; line-height: 20px; }
.source-onboarding-copy h2 { font-size: 24px; line-height: 32px; letter-spacing: 0; }
.source-onboarding-copy p { font-size: 16px; line-height: 24px; }
.source-icon { width: 48px; height: 48px; border-radius: 12px; }
.dashboard-url-form > label { margin-bottom: 10px; font-size: 14px; line-height: 20px; }
.dashboard-url-form > div { min-height: 56px; height: auto; border: 0; border-radius: 0; background: #efefef; }
.dashboard-url-form input { font-size: 16px; line-height: 24px; }
.dashboard-url-form > small, .source-list-heading p { font-size: 12px; line-height: 20px; }
.source-empty-state { border-radius: 16px; background: #fff; }
.source-empty-state h3 { font-size: 20px; line-height: 28px; }
.source-empty-state p { font-size: 14px; line-height: 20px; }
.website-list { gap: 16px; }
.website-list article { display: block; padding: 0; overflow: hidden; }
.website-list article > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.website-list article > div:first-child > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.website-list article > div:first-child > div > strong { font-size: 16px; line-height: 24px; }
.website-list article > div:first-child > div > small { color: #5e5e5e; font-size: 12px; line-height: 20px; }
.website-list article > div:first-child > span { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: #efefef; color: #000; font-size: 12px; line-height: 16px; }
.included-page-list { max-height: 280px; display: block !important; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid #e2e2e2; background: #f3f3f3; scrollbar-gutter: stable; }
.included-page-list > div { display: grid !important; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px 24px; border-bottom: 1px solid #e2e2e2; }
.included-page-list > div:last-child { border-bottom: 0; }
.included-page-list > div > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 999px; background: #fff; font-size: 12px; }
.included-page-list > div > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.included-page-list strong { overflow: hidden; font-size: 14px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.included-page-list a { overflow: hidden; color: #5e5e5e; font-size: 12px; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.document-upload-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px; padding: 32px; }
.document-upload-card > div { display: flex; align-items: flex-start; gap: 16px; }
.document-upload-card h2 { margin: 0; font-size: 24px; line-height: 32px; }
.document-upload-card p { margin: 8px 0 0; color: #5e5e5e; font-size: 16px; line-height: 24px; }
.document-upload-card form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.document-upload-card input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.document-upload-card label { min-width: 0; display: flex; align-items: center; padding: 0 16px; overflow: hidden; background: #efefef; font-size: 14px; line-height: 48px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.document-upload-card input:focus-visible + label { outline: 3px solid #000; outline-offset: 2px; }
.document-upload-card button { border: 0; background: #000; color: #fff; cursor: pointer; }
.document-upload-card small { grid-column: 1 / -1; color: #5e5e5e; font-size: 12px; line-height: 20px; }
.vector-store-notice { margin: 16px 0 0; padding: 14px 18px; border-left: 4px solid #000; background: #efefef; color: #282828; font-size: 14px; line-height: 20px; }
.source-dialog { border-radius: 16px; }
.source-dialog-heading h2 { font-size: 24px; line-height: 32px; }
.source-dialog-heading p, .source-selection-tools, .source-dialog-note { font-size: 14px; line-height: 20px; }
.source-page-list strong { font-size: 14px; line-height: 20px; }
.source-page-list small { font-size: 12px; line-height: 20px; }
.source-dialog-actions button:first-child { background: #efefef; border-color: #efefef; }
.source-dialog-actions button[type="submit"] { background: #000; }

@media (max-width: 900px) {
  .document-upload-card { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .dashboard-sidebar nav a, .mobile-dashboard-nav a { font-size: 13px; }
  .view-heading h1 { font-size: 40px; }
  .dashboard-lead { font-size: 16px; line-height: 24px; }
  .website-list article > div:first-child { align-items: flex-start; flex-direction: column; }
  .document-upload-card { padding: 24px; }
  .document-upload-card form { grid-template-columns: 1fr; }
  .document-upload-card button { width: 100%; }
  .document-upload-card small { grid-column: auto; }
}

/* Dashboard workspace */
.workspace-switcher { display: grid; grid-template-columns: 31px 1fr 16px; align-items: center; gap: 9px; margin-bottom: 18px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.48); }
.workspace-switcher > span { width: 31px; height: 31px; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: var(--ink); color: white; font-size: 9px; }.workspace-switcher > span b { color: white; font-size: 9px; }.workspace-switcher > span img { width: 100%; height: 100%; object-fit: cover; }
.workspace-switcher div { display: flex; flex-direction: column; min-width: 0; }.workspace-switcher small { color: rgba(28,28,28,.38); font-size: 7px; letter-spacing: .08em; }.workspace-switcher strong { margin-top: 2px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.workspace-switcher b { color: rgba(28,28,28,.4); font-size: 10px; }
.dashboard-sidebar nav p { margin: 19px 10px 6px; color: rgba(28,28,28,.34); font-size: 8px; letter-spacing: .12em; }
.dashboard-sidebar nav a.active { background: rgba(28,28,28,.07); color: var(--ink); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: rgba(28,28,28,.5); }
.mobile-dashboard-nav { display: none; }
.dashboard-view[hidden] { display: none !important; }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.view-heading h1 { margin: 11px 0 0; font-size: clamp(38px, 4.5vw, 58px); line-height: 1.03; letter-spacing: -.045em; }
.dashboard-primary-button { min-height: 42px; display: inline-flex; align-items: center; gap: 18px; padding: 0 16px; border-radius: 7px; background: var(--ink); color: white; font-size: 12px; text-decoration: none; box-shadow: rgba(255,255,255,.2) 0 .5px 0 inset, rgba(0,0,0,.2) 0 0 0 .5px inset; }
.overview-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; margin-top: 14px; }
.setup-card, .activity-card, .source-onboarding-card, .settings-grid article { border: 1px solid var(--line); border-radius: 13px; background: var(--paper-light); }
.setup-card, .activity-card { min-height: 390px; padding: 24px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }.card-heading h2 { margin: 8px 0 0; font-size: 19px; letter-spacing: -.4px; }.card-heading > a { color: var(--muted); font-size: 10px; }
.progress-ring { width: 38px; height: 38px; display: grid; place-items: center; border: 3px solid rgba(28,28,28,.12); border-top-color: var(--ink); border-radius: 50%; font-size: 9px; }
.setup-list { margin: 24px 0 0; padding: 0; list-style: none; }.setup-list li { position: relative; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 11px; min-height: 67px; border-top: 1px solid var(--line); }.setup-list li > span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(28,28,28,.2); border-radius: 50%; color: rgba(28,28,28,.55); font-size: 9px; }.setup-list li.complete > span { border-color: var(--ink); background: var(--ink); color: white; }.setup-list li div { display: flex; flex-direction: column; gap: 3px; }.setup-list strong { font-size: 11px; }.setup-list small { color: rgba(28,28,28,.45); font-size: 8px; }.setup-list a { font-size: 9px; color: var(--ink); }
.empty-activity { min-height: 275px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }.empty-activity > span, .conversation-empty > span, .conversation-preview > span { width: 39px; height: 39px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }.empty-activity strong, .conversation-empty strong { font-size: 12px; }.empty-activity p, .conversation-empty p, .conversation-preview p { max-width: 260px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.source-onboarding-card { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; margin-top: 45px; padding: 32px; }.source-onboarding-copy { display: flex; gap: 17px; }.source-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: var(--ink); color: white; }.source-onboarding-copy h2 { margin: 1px 0 0; font-size: 22px; letter-spacing: -.5px; }.source-onboarding-copy p { max-width: 410px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.dashboard-url-form > label { display: block; margin-bottom: 8px; font-size: 10px; font-weight: 600; }.dashboard-url-form > div { height: 47px; display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; border: 1px solid rgba(28,28,28,.25); border-radius: 8px; background: white; }.dashboard-url-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 11px; }.dashboard-url-form button { height: 35px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--ink); color: white; font-size: 10px; }.dashboard-url-form button b { margin-left: 8px; }.dashboard-url-form > small { display: block; margin-top: 8px; color: rgba(28,28,28,.4); font-size: 8px; }
.source-list-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 48px; }.source-list-heading h2 { margin: 0; font-size: 17px; }.source-list-heading p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }.source-list-heading button { border: 0; background: transparent; color: rgba(28,28,28,.35); font-size: 9px; }
.source-empty-state { min-height: 250px; display: flex; align-items: center; justify-content: center; flex-direction: column; margin-top: 14px; border: 1px dashed rgba(28,28,28,.18); border-radius: 12px; text-align: center; }.source-empty-state > span { font-size: 25px; color: rgba(28,28,28,.3); }.source-empty-state h3 { margin: 14px 0 0; font-size: 13px; }.source-empty-state p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.website-list { display: grid; gap: 10px; margin-top: 14px; }.website-list article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper-light); }.website-list article div { display: flex; min-width: 0; flex-direction: column; gap: 5px; }.website-list strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.website-list small { color: var(--muted); font-size: 9px; }.website-list article > span { padding: 5px 8px; border-radius: 999px; background: rgba(76,122,96,.1); color: #385f49; font-size: 8px; }
.source-dialog { width: min(720px, calc(100% - 28px)); max-height: min(780px, calc(100vh - 28px)); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-light); color: var(--ink); box-shadow: 0 30px 90px rgba(28,28,28,.25); }.source-dialog::backdrop { background: rgba(20,20,20,.38); backdrop-filter: blur(3px); }.source-dialog-shell { display: flex; max-height: min(780px, calc(100vh - 28px)); flex-direction: column; }.source-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 25px 26px 18px; border-bottom: 1px solid var(--line); }.source-dialog-heading h2 { margin: 7px 0 0; font-size: 22px; }.source-dialog-heading p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }.source-dialog-heading > button { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }.source-selection-tools { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 26px; border-bottom: 1px solid var(--line); font-size: 9px; }.source-selection-tools label { display: flex; align-items: center; gap: 8px; font-weight: 600; }.source-selection-tools span { color: var(--muted); }.source-page-list { min-height: 180px; overflow: auto; padding: 5px 26px; }.source-page-list > label { display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }.source-page-list input { width: 15px; height: 15px; accent-color: var(--ink); }.source-page-list label span { display: flex; min-width: 0; flex-direction: column; gap: 4px; }.source-page-list strong, .source-page-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.source-page-list strong { font-size: 10px; }.source-page-list small { color: var(--muted); font-size: 8px; }.source-dialog-note { margin: 10px 26px 0; color: #785b2c; font-size: 9px; line-height: 1.5; }.source-dialog .form-error { margin: 10px 26px 0; }.source-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 12px; padding: 16px 26px; border-top: 1px solid var(--line); }.source-dialog-actions button { min-height: 38px; padding: 0 14px; border: 1px solid rgba(28,28,28,.25); border-radius: 7px; background: transparent; font-size: 10px; cursor: pointer; }.source-dialog-actions button[type="submit"] { border-color: var(--ink); background: var(--ink); color: white; }.source-dialog-actions button:disabled, .dashboard-url-form button:disabled { cursor: wait; opacity: .5; }
.conversation-layout { min-height: 540px; display: grid; grid-template-columns: 330px 1fr; margin-top: 45px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper-light); }.conversation-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); }.conversation-search { margin: 14px; padding: 11px; border: 1px solid var(--line); border-radius: 7px; color: rgba(28,28,28,.42); font-size: 10px; }.conversation-search span { margin-left: 7px; }.conversation-empty, .conversation-preview { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }.conversation-preview h3 { margin: 0; font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 45px; }.settings-grid article { min-height: 250px; padding: 26px; }.settings-grid h2 { margin: 0; font-size: 19px; }.settings-grid article > p { color: var(--muted); font-size: 11px; line-height: 1.6; }.settings-grid dl { margin: 24px 0 0; }.settings-grid dl div { display: grid; grid-template-columns: 90px 1fr; padding: 12px 0; border-top: 1px solid var(--line); font-size: 10px; }.settings-grid dt { color: var(--muted); }.settings-grid dd { margin: 0; font-weight: 600; }.settings-logout { margin-top: 25px; padding: 10px 13px; border: 1px solid rgba(28,28,28,.3); border-radius: 6px; background: transparent; font-size: 10px; }
.settings-customer-preview { display: flex; align-items: center; gap: 11px; margin-top: 24px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: white; }.settings-customer-preview > span { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border-radius: 10px; background: var(--ink); color: white; font-size: 12px; }.settings-customer-preview img { width: 100%; height: 100%; object-fit: cover; }.settings-customer-preview > div { display: flex; flex-direction: column; gap: 4px; }.settings-customer-preview strong { font-size: 11px; }.settings-customer-preview small { color: rgba(28,28,28,.45); font-size: 8px; }.settings-customer-preview i { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: #4c7a60; }
.dashboard-toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; width: min(370px,calc(100% - 32px)); display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 11px; background: var(--ink); color: white; box-shadow: 0 18px 50px rgba(28,28,28,.25); opacity: 0; transform: translateY(130%); transition: .3s ease; }.dashboard-toast.show { opacity: 1; transform: none; }.dashboard-toast > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); }.dashboard-toast div { flex: 1; }.dashboard-toast strong { font-size: 11px; }.dashboard-toast p { margin: 3px 0 0; color: rgba(255,255,255,.6); font-size: 9px; }.dashboard-toast button { border: 0; background: transparent; color: rgba(255,255,255,.5); }
.dashboard-toast.error { background: #642f2f; }

/* Agent appearance */
.appearance-layout { display: grid; grid-template-columns: minmax(320px,.78fr) minmax(420px,1.22fr); gap: 16px; margin-top: 45px; }
.appearance-controls, .appearance-preview-card { min-height: 610px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.appearance-controls { display: flex; flex-direction: column; padding: 32px; }
.appearance-controls h2, .appearance-preview-heading h2 { margin: 8px 0 0; font-size: 24px; line-height: 32px; }
.appearance-controls > div > p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.appearance-controls fieldset { display: grid; gap: 10px; margin: 30px 0 0; padding: 0; border: 0; }
.appearance-controls legend { margin-bottom: 10px; font-size: 14px; font-weight: 650; }
.theme-choice { position: relative; display: grid; grid-template-columns: 62px minmax(0,1fr) 24px; align-items: center; gap: 14px; min-height: 88px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.theme-choice:hover { transform: translateY(-1px); border-color: #aaa; }
.theme-choice:has(input:checked) { border-color: #000; box-shadow: 0 0 0 1px #000 inset; }
.theme-choice input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.theme-choice:has(input:focus-visible) { outline: 3px solid rgba(0,0,0,.16); outline-offset: 2px; }
.theme-choice > span:nth-of-type(2) { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.theme-choice strong { font-size: 15px; line-height: 20px; }
.theme-choice small { color: var(--muted); font-size: 12px; line-height: 18px; }
.theme-choice > b { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid #cfcfcf; border-radius: 50%; color: transparent; font-size: 11px; }
.theme-choice:has(input:checked) > b { border-color: #000; background: #000; color: #fff; }
.theme-swatch { width: 62px; height: 58px; display: flex; align-items: flex-end; justify-content: space-between; gap: 5px; padding: 9px; border: 1px solid #d8d8d8; border-radius: 10px; }
.theme-swatch i { display: block; height: 17px; border-radius: 6px; }
.theme-swatch i:first-child { width: 25px; }.theme-swatch i:last-child { width: 15px; }
.theme-swatch.light { background: #f5f5f5; }.theme-swatch.light i:first-child { background: #fff; }.theme-swatch.light i:last-child { background: #111; }
.theme-swatch.dark { border-color: #303030; background: #111; }.theme-swatch.dark i:first-child { background: #2b2b2b; }.theme-swatch.dark i:last-child { background: #fff; }
.appearance-save { min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding: 0 20px; border: 0; border-radius: 999px; background: #000; color: #fff; font-size: 16px; cursor: pointer; }
.appearance-save:disabled { cursor: wait; opacity: .55; }
.appearance-security { margin-top: 12px; color: #777; font-size: 11px; line-height: 18px; text-align: center; }
.appearance-preview-card { overflow: hidden; }
.appearance-preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 28px 30px 22px; border-bottom: 1px solid var(--line); }
.appearance-preview-heading > span { padding: 7px 10px; border-radius: 999px; background: #efefef; color: #555; font-size: 11px; }
.widget-preview-stage { min-height: 513px; display: grid; place-items: center; padding: 34px; background: #f3f3f3; }
.widget-preview { --preview-bg: #fff; --preview-panel: #f3f3f3; --preview-ink: #000; --preview-muted: #707070; --preview-line: #dfdfdf; --preview-agent: #efefef; --preview-customer: #000; --preview-customer-ink: #fff; width: min(100%,390px); height: 460px; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border: 1px solid var(--preview-line); border-radius: 22px; background: var(--preview-bg); color: var(--preview-ink); box-shadow: 0 24px 70px rgba(0,0,0,.14); transition: background .25s, color .25s, border-color .25s; }
.widget-preview[data-theme="dark"] { --preview-bg: #111; --preview-panel: #1b1b1b; --preview-ink: #fff; --preview-muted: #a4a4a4; --preview-line: #303030; --preview-agent: #292929; --preview-customer: #fff; --preview-customer-ink: #000; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.widget-preview header { display: grid; grid-template-columns: 42px 1fr 30px; align-items: center; gap: 11px; padding: 17px 18px; border-bottom: 1px solid var(--preview-line); background: var(--preview-bg); }
.widget-preview header > span { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--preview-ink); color: var(--preview-bg); }
.widget-preview header img { width: 100%; height: 100%; object-fit: cover; }.widget-preview header b { font-size: 12px; }
.widget-preview header > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }.widget-preview header strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }.widget-preview header small { color: var(--preview-muted); font-size: 10px; }.widget-preview header small i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #4c9a68; }
.widget-preview header button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--preview-panel); color: var(--preview-muted); }
.widget-preview-body { display: flex; align-items: flex-start; flex-direction: column; padding: 20px 17px; overflow: hidden; background: var(--preview-bg); }
.preview-time { align-self: center; margin: 0 0 17px; color: var(--preview-muted); font-size: 9px; }
.preview-message { max-width: 78%; margin-bottom: 10px; padding: 11px 13px; border-radius: 15px; font-size: 12px; line-height: 18px; }
.preview-message.agent { border-bottom-left-radius: 5px; background: var(--preview-agent); color: var(--preview-ink); }.preview-message.customer { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--preview-customer); color: var(--preview-customer-ink); }
.preview-typing { display: flex; gap: 3px; padding: 11px 13px; border-radius: 15px 15px 15px 5px; background: var(--preview-agent); }.preview-typing i { width: 4px; height: 4px; border-radius: 50%; background: var(--preview-muted); }
.widget-preview footer { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: 10px; margin: 0 12px 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--preview-line); border-radius: 999px; background: var(--preview-panel); color: var(--preview-muted); font-size: 11px; }
.widget-preview footer button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--preview-ink); color: var(--preview-bg); }

@media (max-width: 900px) {
  .overview-grid, .source-onboarding-card, .settings-grid, .appearance-layout { grid-template-columns: 1fr; }.source-onboarding-card { gap: 28px; }.conversation-layout { grid-template-columns: 280px 1fr; }.appearance-controls, .appearance-preview-card { min-height: auto; }
}

@media (max-width: 720px) {
  .dashboard-topbar { gap: 12px; }.mobile-dashboard-nav { display: flex; flex: 1; justify-content: center; gap: 6px; }.mobile-dashboard-nav a { padding: 7px 8px; border-radius: 6px; color: var(--muted); font-size: 9px; text-decoration: none; }.mobile-dashboard-nav a.active { background: rgba(28,28,28,.06); color: var(--ink); }.secure-label { display: none; }.view-heading { align-items: flex-start; flex-direction: column; }.dashboard-primary-button { align-self: stretch; justify-content: space-between; }.dashboard-stats { grid-template-columns: 1fr; }.setup-card, .activity-card { min-height: auto; }.conversation-layout { min-height: 500px; grid-template-columns: 1fr; }.conversation-preview { display: none; }.conversation-list { border-right: 0; }.source-onboarding-card { margin-top: 34px; padding: 23px; }.dashboard-url-form > div { height: auto; flex-wrap: wrap; }.dashboard-url-form input { min-height: 36px; }.dashboard-url-form button { width: 100%; }.settings-grid { margin-top: 34px; }
  .source-dialog-heading, .source-selection-tools, .source-dialog-actions { padding-left: 18px; padding-right: 18px; }.source-page-list { padding-left: 18px; padding-right: 18px; }.source-selection-tools { align-items: flex-start; flex-direction: column; }.website-list article { align-items: flex-start; flex-direction: column; }
  .appearance-layout { margin-top: 34px; }.appearance-controls { padding: 24px; }.appearance-preview-heading { align-items: flex-start; flex-direction: column; padding: 24px; }.widget-preview-stage { min-height: 470px; padding: 20px 12px; }.widget-preview { height: 440px; }.theme-choice { grid-template-columns: 52px minmax(0,1fr) 22px; }.theme-swatch { width: 52px; }
  .onboarding-main { padding: 88px 14px 35px; }.onboarding-card { padding: 28px 20px; }.onboarding-heading h1 { font-size: 29px; }.avatar-field { align-items: flex-start; }.avatar-preview { width: 58px; height: 58px; }.onboarding-fields label span { display: block; float: none; margin-top: 3px; }
}

/* Keep the progress arc proportional after legacy dashboard rules above. */
.progress-ring { --progress: 25%; position: relative; isolation: isolate; border: 0; background: conic-gradient(var(--ink) var(--progress), #dedede 0); }
.progress-ring::before { content: none; }
.progress-ring b { position: relative; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #000; font-size: 10px; font-weight: 500; }
