:root {
  --bg: #08090c;
  --surface: #101219;
  --surface-2: #161820;
  --surface-3: #1c1f28;
  --border: #2b2e38;
  --text: #f5f3f8;
  --muted: #9396a3;
  --accent: #b454ed;
  --pink: #e84b96;
  --cyan: #42d8d0;
  --green: #68d7a3;
  --coral: #ff806c;
  --radius: 8px;
  --sidebar: 72px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); font-family: "DM Sans", sans-serif; letter-spacing: 0; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { color: inherit; cursor: pointer; }
button, input, textarea, select { outline: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--cyan); }
button:disabled, input:disabled, textarea:disabled { cursor: not-allowed; opacity: .55; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); border-right: 1px solid #20232b; background: #0b0c11; display: flex; flex-direction: column; align-items: center; padding: 17px 10px 13px; z-index: 30; }
.brand-mark { width: 36px; height: 36px; border: 0; border-radius: 7px; font: 700 19px "Manrope", sans-serif; color: #090a0d; background: linear-gradient(145deg, var(--cyan), var(--accent) 56%, var(--pink)); }
.side-nav { width: 100%; margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.nav-icon, .icon-button { position: relative; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #8c909d; display: inline-flex; align-items: center; justify-content: center; transition: .18s ease; }
.nav-icon:hover, .icon-button:hover { background: #181a21; color: var(--text); }
.nav-icon.active { color: #e1bcfa; border-color: #55416d; background: #1a1525; }
.nav-icon svg, .icon-button svg { width: 18px; height: 18px; }
.nav-badge { position: absolute; right: -5px; top: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--pink); color: white; display: grid; place-items: center; font-size: 9px; font-weight: 700; }
.settings-button { margin-top: auto; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 24px; border-bottom: 1px solid #20232b; background: rgba(8,9,12,.92); backdrop-filter: blur(18px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { min-width: 0; display: flex; align-items: baseline; gap: 8px; font: 700 18px "Manrope", sans-serif; }
.wordmark small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border: 1px solid #3b3e49; border-radius: 7px; object-fit: cover; }
.notification-center { position: relative; }
.notification-badge { position: absolute; right: -4px; top: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--pink); color: white; display: grid; place-items: center; font-size: 8px; font-weight: 700; }
.notifications-panel { position: absolute; top: 46px; right: -44px; z-index: 70; width: min(360px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 82px)); border: 1px solid #323540; border-radius: 8px; background: #11131a; box-shadow: 0 24px 70px rgba(0,0,0,.52); overflow: hidden; }
.notifications-panel[hidden] { display: none; }
.notifications-panel header { min-height: 51px; padding: 0 10px 0 15px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.notifications-panel header strong { font: 600 13px "Manrope", sans-serif; }
.small-icon { width: 32px; height: 32px; }
.small-icon svg { width: 15px; }
.notifications-list { max-height: 420px; overflow-y: auto; }
.notification-item { width: 100%; min-height: 89px; padding: 12px 15px; border: 0; border-bottom: 1px solid #262933; background: transparent; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; gap: 9px; text-align: left; }
.notification-item:hover { background: #181a22; }
.notification-dot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--accent); }
.notification-item strong, .notification-item small, .notification-item em { display: block; }
.notification-item strong { margin-bottom: 5px; font-size: 10px; }
.notification-item small { color: #b8bac3; font-size: 9px; }
.notification-item em { margin-top: 6px; overflow: hidden; color: var(--muted); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.notification-item time { color: #777b87; font-size: 8px; }
.notification-empty { min-height: 180px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 10px; }
.notification-empty svg { width: 24px; }
.notifications-panel footer { padding: 8px; border-top: 1px solid var(--border); }
.notifications-panel footer button { width: 100%; min-height: 38px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: #c9cbd3; display: flex; align-items: center; gap: 8px; font-size: 10px; text-align: left; }
.notifications-panel footer button:hover { background: #1a1c24; color: white; }
.notifications-panel footer svg { width: 15px; color: #b67be0; }
.connection-button { min-height: 36px; max-width: 190px; padding: 0 12px; border: 1px solid #373240; border-radius: 7px; background: #14121b; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; }
.connection-button span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-button.connected { border-color: rgba(66,216,208,.38); color: #b8f3ef; background: rgba(66,216,208,.08); }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #747883; }
.connected .status-dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(66,216,208,.11); }
.ai-switch { min-height: 36px; padding: 0 7px 0 11px; border: 1px solid #2c2f38; border-radius: 7px; background: #11131a; display: flex; align-items: center; gap: 9px; color: #dbdce3; font-size: 10px; font-weight: 700; }
.ai-switch input, .switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 35px; height: 21px; padding: 3px; border-radius: 11px; background: #3c3f48; transition: .18s ease; }
.switch-track span { display: block; width: 15px; height: 15px; border-radius: 50%; background: white; transition: .18s ease; }
.ai-switch input:checked + .switch-track { background: linear-gradient(90deg, var(--accent), var(--pink)); }
.ai-switch input:checked + .switch-track span { transform: translateX(14px); }

main { width: min(1380px, calc(100% - 40px)); margin: 0 auto; padding: 20px 0 42px; }
.page { display: none; animation: reveal .25s ease both; }
.page.active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.page-heading { min-height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-heading.compact { min-height: 86px; }
.eyebrow { display: block; margin-bottom: 7px; color: #ca93ee; font: 700 9px "Manrope", sans-serif; letter-spacing: 1.4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font: 600 clamp(25px, 3vw, 35px) "Manrope", sans-serif; }
h2 { margin-bottom: 4px; font: 600 16px "Manrope", sans-serif; }
h3 { font: 600 14px "Manrope", sans-serif; }
p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(20,22,29,.98), rgba(13,15,21,.99)); }
.panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-title p { font-size: 10px; }
.primary-button, .ghost-button, .text-button { min-height: 39px; padding: 0 14px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 600; }
.primary-button { border: 1px solid #bc6aee; background: linear-gradient(135deg, #8739c8, #c047d7); color: white; }
.primary-button:hover { filter: brightness(1.08); }
.ghost-button { border: 1px solid var(--border); background: #171920; }
.ghost-button:hover { border-color: #4b4f5c; background: #1b1e26; }
.text-button { padding: 0; border: 0; background: transparent; color: #cda3ed; }
.primary-button svg, .ghost-button svg, .text-button svg { width: 15px; height: 15px; }
.status-pill { padding: 5px 8px; border-radius: 5px; background: #20232b; color: #b5b8c2; font-size: 9px; font-weight: 700; }
.status-pill.online { color: #b8f3df; background: rgba(104,215,163,.1); }
.status-pill.warning { color: #f3ca91; background: rgba(255,184,93,.1); }

.connection-banner { min-height: 60px; margin-bottom: 14px; padding: 10px 13px; border: 1px solid #43364e; border-radius: 8px; background: #17131d; display: flex; align-items: center; gap: 11px; }
.connection-banner.hidden { display: none; }
.connection-banner > svg { width: 18px; color: #d59bf6; }
.connection-banner span { flex: 1; }
.connection-banner strong, .connection-banner small { display: block; }
.connection-banner strong { font-size: 11px; }
.connection-banner small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.metrics-grid { margin-bottom: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.metric-card { min-height: 128px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: #11131a; position: relative; overflow: hidden; }
.metric-card > svg { position: absolute; right: 17px; top: 17px; width: 19px; color: #9296a2; }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: 11px; }
.metric-card strong { margin-top: 8px; font: 600 28px "Manrope", sans-serif; }
.metric-card small { position: absolute; left: 18px; bottom: 15px; color: #7e828f; font-size: 9px; }
.accent-card { border-color: #4b3959; background: linear-gradient(145deg, #23172b, #10191b); }
.accent-card > svg { color: #ca86ef; }
.dashboard-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 14px; }
.overview-panel, .account-panel { min-height: 360px; padding: 19px; }
.attention-list { margin-top: 17px; display: grid; }
.attention-item { min-height: 62px; padding: 8px 6px; border: 0; border-bottom: 1px solid #252832; background: transparent; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; text-align: left; }
.attention-item:hover { background: #171920; }
.attention-item strong, .attention-item small { display: block; }
.attention-item small { max-width: 520px; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.attention-item time { color: #7b7f8a; font-size: 9px; }
.account-identity { margin: 28px 0; padding-bottom: 24px; border-bottom: 1px solid #272a33; display: flex; align-items: center; gap: 12px; }
.account-identity img { width: 52px; height: 52px; border-radius: 7px; object-fit: cover; border: 1px solid #3b3e48; }
.account-identity strong, .account-identity small { display: block; }
.account-identity small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.status-list li { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; font-size: 10px; }
.status-list svg { width: 15px; color: #a7aab4; }
.status-list span { color: var(--muted); }
.empty-inline { padding: 30px 10px; color: var(--muted); text-align: center; font-size: 11px; }

#inbox.page.active { height: calc(100dvh - 126px); min-height: 0; display: grid; grid-template-rows: 86px minmax(0, 1fr); }
.messages-layout { height: 100%; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 292px minmax(0, 1fr); }
.conversation-list { min-width: 0; min-height: 0; overflow: hidden; padding: 14px; border-right: 1px solid var(--border); background: #11121a; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 11px; }
.inbox-title { display: flex; align-items: center; justify-content: space-between; }
.inbox-title h2 { margin: 0; }
.inbox-title span { min-width: 24px; height: 22px; padding: 0 6px; border-radius: 5px; background: #242730; display: grid; place-items: center; color: var(--muted); font-size: 9px; }
.search-box { min-height: 39px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: #191b23; display: flex; align-items: center; gap: 8px; }
.search-box svg { width: 14px; color: #7d818d; }
.search-box input { width: 100%; border: 0; background: transparent; color: var(--text); font-size: 10px; }
.conversation-scroll { min-height: 0; overflow-y: auto; }
.conversation { width: 100%; min-height: 66px; padding: 8px; border: 1px solid transparent; border-bottom-color: #292c34; background: transparent; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; text-align: left; }
.conversation:hover { background: #181a22; }
.conversation.active { border-color: #4c3a5a; border-radius: 7px; background: #211929; }
.conversation strong, .conversation small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation strong { font-size: 10px; }
.conversation small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.conversation time { color: #777b87; font-size: 8px; }
.unread-count { min-width: 17px; height: 17px; border-radius: 9px; background: var(--pink); display: grid; place-items: center; color: white; font-size: 8px; }
.contact-avatar { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: #292c35; color: #e9e7ed; display: grid; place-items: center; font-size: 11px; font-weight: 700; overflow: hidden; }
.contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact-avatar.violet { background: #7d4da0; }
.conversation-workspace { min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: grid; grid-template-rows: 64px 48px minmax(0, 1fr); }
.chat-header { padding: 0 15px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.chat-header > div { min-width: 0; display: flex; align-items: center; gap: 9px; }
.chat-header strong, .chat-header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-header strong { font-size: 11px; }
.chat-header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.conversation-tabs { border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, 1fr); }
.conversation-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 10px; font-weight: 600; }
.conversation-tabs button:hover { background: #15171e; color: var(--text); }
.conversation-tabs button.active { border-color: var(--pink); color: white; background: #18151f; }
.conversation-tabs svg { width: 14px; }
.conversation-tabs span { padding: 2px 5px; border-radius: 4px; background: #272a33; font-size: 8px; }
.conversation-view { min-height: 0; display: none; overflow: hidden; }
.conversation-view.active { position: relative; min-height: 0; display: block; overflow: hidden; }
.conversation-view.active[data-conversation-panel="messages"] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.conversation-view.active > .messages { position: static; min-height: 0; }
.messages { min-height: 0; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: radial-gradient(circle at 55% 0, rgba(184,84,237,.045), transparent 36%); }
.message { width: fit-content; max-width: min(74%, 700px); padding: 11px 13px 9px; border-radius: 8px; background: #22242d; color: #eceaf0; font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.outgoing { align-self: flex-end; border: 1px solid #4d3760; background: #2a1d35; }
.message time { display: block; margin-top: 5px; color: #868995; font-size: 8px; text-align: right; }
.message-media-note { margin-top: 6px; color: #c895e7; display: flex; align-items: center; gap: 5px; font-size: 8px; }
.message-media-note svg { width: 11px; }
.message-photo { display: block; max-width: 220px; max-height: 280px; margin-top: 8px; border-radius: 10px; object-fit: cover; }
.message-media-fallback { margin-top: 6px; font-size: 11px; display: block; color: #c895e7; }
.message audio { display: block; width: min(220px, 100%); margin-top: 8px; }
.composer { position: relative; z-index: 2; min-height: 64px; padding: 10px 13px; border-top: 1px solid var(--border); background: #11131a; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto auto; align-items: center; gap: 9px; }
.attach-button { width: 41px; height: 41px; border: 1px solid #59406e; border-radius: 7px; background: #211729; color: #e5c6f7; display: grid; place-items: center; }
.attach-button:hover { border-color: #8655a5; background: #2a1c35; }
.attach-button svg { width: 16px; }
.vault-picker-grid { max-height: 62vh; overflow-y: auto; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vault-picker-card { min-width: 0; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: #12141b; color: var(--text); text-align: left; overflow: hidden; }
.vault-picker-card img, .vault-picker-card span { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; background: #090a0d; }
.vault-picker-card small { display: block; padding: 7px 8px 8px; color: var(--muted); font-size: 8px; }
.draft-media-offer { grid-column: 1 / -1; min-width: 0; min-height: 38px; padding: 7px 9px; border: 1px solid #4d3760; border-radius: 7px; background: #211929; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 28px; align-items: center; gap: 8px; }
.draft-media-price { display: flex; align-items: center; gap: 4px; color: #e5c6f7; font-size: 11px; font-weight: 700; }
.draft-media-price[hidden] { display: none; }
.draft-media-price input { width: 68px; height: 28px; padding: 0 8px; border: 1px solid #59406e; border-radius: 6px; background: #19141f; color: white; font-size: 11px; }
.draft-media-offer[hidden] { display: none; }
.draft-media-offer > svg { width: 16px; color: #cf8df4; }
.draft-media-offer strong, .draft-media-offer small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-media-offer strong { font-size: 9px; }
.draft-media-offer small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.draft-media-offer button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: #30253a; color: var(--muted); display: grid; place-items: center; }
.draft-media-offer button:hover { color: white; background: #443050; }
.draft-media-offer button svg { width: 13px; }
.composer textarea { width: 100%; min-height: 42px; max-height: 90px; resize: none; padding: 12px; border: 1px solid var(--border); border-radius: 7px; background: #191b22; color: var(--text); font-size: 11px; }
.character-count { color: #6f7380; font-size: 8px; }
.draft-button { height: 41px; padding: 0 12px; border: 1px solid #59406e; border-radius: 7px; background: #211729; color: #e5c6f7; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 10px; font-weight: 700; }
.draft-button:hover { border-color: #8655a5; background: #2a1c35; }
.draft-button svg { width: 15px; }
.send-button { width: 41px; height: 41px; border: 0; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--pink)); display: grid; place-items: center; }
.send-button svg { width: 16px; }
.empty-state { min-height: 220px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.empty-state > svg { width: 28px; margin-bottom: 12px; color: #6d7180; }
.empty-state strong { color: #d5d4da; font-size: 12px; }
.empty-state span { max-width: 380px; margin-top: 5px; font-size: 9px; line-height: 1.5; }
.view-toolbar { margin: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 7px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.view-toolbar h2 { font-size: 14px; }
.view-toolbar p { font-size: 9px; }
.media-chat-heading { margin: 0 14px 8px; font-size: 12px; font-weight: 650; color: #e3e1e7; }
.conversation-view.active[data-conversation-panel="media"] { display: flex; flex-direction: column; }
.conversation-view.active[data-conversation-panel="media"] .media-grid { flex: 1; }
.media-grid { min-height: 0; padding: 0 14px 14px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; gap: 10px; }
.media-item { min-width: 0; border: 1px solid var(--border); border-radius: 7px; background: #12141b; overflow: hidden; }
.media-preview { width: 100%; aspect-ratio: 4 / 3; background: #090a0d; display: grid; place-items: center; overflow: hidden; }
.media-preview img, .media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-preview audio { width: calc(100% - 20px); }
.media-preview > svg { width: 26px; color: #6f7380; }
.media-meta { padding: 10px; display: flex; justify-content: space-between; gap: 8px; }
.media-meta strong, .media-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta strong { font-size: 9px; }
.media-meta small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.fan-view.active { display: block; overflow-y: auto; padding: 14px; }
.panel-section { padding: 17px; border: 1px solid var(--border); border-radius: 7px; background: #11131a; }
.panel-section + .panel-section { margin-top: 12px; }
.fan-ai-toggle { display: flex; align-items: center; gap: 10px; color: #d8b1f2; font-size: 9px; font-weight: 700; }
.fan-stats { margin-top: 15px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.fan-stats > div { min-height: 65px; padding: 10px; border: 1px solid #2b2e38; border-radius: 7px; background: #171920; }
.fan-stats span, .fan-stats strong { display: block; }
.fan-stats span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.fan-stats strong { margin-top: 7px; font-size: 11px; }
.memory-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.memory-grid label { display: grid; gap: 6px; color: #d7d5dc; font-size: 9px; font-weight: 600; }
.memory-grid .wide { grid-column: 1 / -1; }
.memory-grid input, .memory-grid textarea { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid #343743; border-radius: 7px; background: #191b22; color: var(--text); font-size: 10px; }
.memory-grid textarea { resize: vertical; }

.persona-hero { min-height: 132px; padding: 20px; border: 1px solid #33293e; border-radius: 8px; background: linear-gradient(105deg, #24182d, #11161b 64%); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.persona-hero h1 { font-size: 28px; }
.persona-score { width: min(330px, 40%); min-height: 76px; padding: 12px; border: 1px solid #393c46; border-radius: 7px; background: #1a1c24; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 10px; position: relative; }
.persona-score img { width: 48px; height: 48px; border-radius: 7px; object-fit: cover; }
.persona-score strong, .persona-score small { display: block; }
.persona-score small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.persona-score b { font-size: 11px; }
.progress { position: absolute; left: 70px; right: 12px; bottom: 10px; height: 5px; border-radius: 3px; background: #30333d; overflow: hidden; }
.progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--pink), var(--cyan)); transition: width .25s ease; }
.persona-note { width: 100%; min-height: 62px; margin: 13px 0; padding: 0 15px; border: 1px solid var(--border); border-radius: 8px; background: #101219; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 11px; text-align: left; }
.persona-note > svg:first-child { width: 18px; color: #cb8cee; }
.persona-note > svg:last-child { width: 16px; color: var(--cyan); }
.persona-note strong, .persona-note small { display: block; }
.persona-note strong { font-size: 11px; }
.persona-note small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.persona-tabs { margin-bottom: 13px; padding: 7px; border: 1px solid var(--border); border-radius: 8px; background: #101219; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.persona-tab { min-height: 50px; padding: 0 10px; border: 1px solid transparent; border-radius: 7px; background: #171920; color: #b1b4bf; display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; }
.persona-tab svg { width: 15px; }
.persona-tab.active { border-color: #59416a; background: #292033; color: white; }
.persona-tab.complete:after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--cyan); }
.persona-form { padding: 19px; }
.form-heading { margin-bottom: 19px; display: flex; justify-content: space-between; gap: 20px; }
.autosave { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 9px; }
.autosave.saved { color: var(--cyan); }
.autosave.dirty { color: #efba77; }
.autosave svg { width: 14px; }
.form-grid { min-height: 320px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; align-content: start; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: 10px; font-weight: 600; }
.field small { color: #777b87; font-size: 8px; }
.field input, .field textarea, .field select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #343743; border-radius: 7px; background: #1a1c23; color: var(--text); font-size: 11px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #8152a1; }
.range-wrap { display: grid; grid-template-columns: 1fr 42px; align-items: center; gap: 10px; }
.range-wrap output { color: #d79ef7; font-size: 10px; text-align: right; }
.field input[type="range"] { min-height: auto; padding: 0; accent-color: var(--accent); }
.form-footer { margin: 19px -19px -19px; padding: 13px 19px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.form-footer > span { color: var(--muted); font-size: 9px; }
.form-footer > div { display: flex; gap: 7px; }

.switch span { display: block; width: 38px; height: 22px; padding: 3px; border-radius: 11px; background: #3b3e47; transition: .18s ease; }
.switch span:after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: .18s ease; }
.switch input:checked + span { background: linear-gradient(90deg, var(--accent), var(--pink)); }
.switch input:checked + span:after { transform: translateX(16px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.ai-controls-heading { min-height: 124px; margin-bottom: 13px; padding: 21px; border: 1px solid #33293e; border-radius: 8px; background: linear-gradient(105deg, #21172a, #11161b 64%); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ai-controls-heading h1 { font-size: 28px; }
.ai-master { min-width: 245px; padding: 13px; border: 1px solid #373a45; border-radius: 7px; background: #191b22; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ai-master strong, .ai-master small { display: block; }
.ai-master strong { margin-bottom: 3px; font-size: 11px; }
.ai-master small { color: var(--muted); font-size: 8px; }
.control-tabs { margin-bottom: 13px; padding: 7px; border: 1px solid var(--border); border-radius: 8px; background: #101219; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.control-tab { min-height: 58px; padding: 9px 16px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #a6a9b4; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
.control-tab:hover { background: #171920; }
.control-tab.active { border-color: #4e3d5d; background: #211b29; color: white; }
.control-tab > svg { width: 17px; color: #c087e3; }
.control-tab strong, .control-tab small { display: block; }
.control-tab strong { font-size: 10px; }
.control-tab small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.ai-controls-form { overflow: hidden; }
.ai-tab-panel { display: none; min-height: 460px; padding: 21px; }
.ai-tab-panel.active { display: block; }
.control-section-title { min-height: 42px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 11px; }
.control-section-title > span:first-child { width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #56406a; border-radius: 7px; background: #241a2d; display: grid; place-items: center; }
.control-section-title > span:first-child svg { width: 15px; color: #d19af1; }
.control-section-title h2 { font-size: 15px; }
.control-section-title p { font-size: 9px; }
.control-section-title > .status-pill { margin-left: auto; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 13px; }
.control-column { min-width: 0; display: flex; flex-direction: column; gap: 17px; }
.situational-block { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
.check-item { display: flex; align-items: center; gap: 8px; color: #d7d4de; font-size: 12px; }
.check-item input { width: 15px; height: 15px; accent-color: #9b5cff; }
.check-count { color: #8d93a3; }
.control-field { min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 6px; }
.control-field.wide { grid-column: 1 / -1; }
.control-field > span, .control-field legend { color: #e3e1e7; font-size: 10px; font-weight: 600; }
.control-field small { color: #777b87; font-size: 8px; line-height: 1.4; }
.control-field input, .control-field select, .control-field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #343743; border-radius: 7px; background: #1a1c23; color: var(--text); font-size: 10px; }
.control-field textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
.bubble-field legend { margin-bottom: 6px; padding: 0; }
.bubble-field > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.bubble-field label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: var(--muted); font-size: 8px; }
.bump-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bump-card { padding: 16px; border: 1px solid var(--border); border-radius: 7px; background: #12141b; }
.bump-card header { margin-bottom: 17px; display: flex; align-items: center; justify-content: space-between; }
.bump-card header span { display: flex; align-items: center; gap: 8px; }
.bump-card header svg { width: 15px; color: #ca8eed; }
.bump-card header strong { font-size: 10px; }
.bump-card header b { padding: 4px 6px; border-radius: 5px; background: rgba(104,215,163,.1); color: #a9ebce; font-size: 8px; }
.bump-card > label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 8px; }
.switch-toggle { padding: 3px; border-radius: 7px; background: #1d1f27; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.switch-toggle.two { grid-template-columns: repeat(2, 1fr); }
.switch-toggle button { min-height: 30px; border: 0; border-radius: 5px; background: transparent; color: #878a96; font-size: 9px; }
.switch-toggle button.active { background: #393641; color: white; }
.delay-input { display: none; margin-top: 10px; position: relative; }
.delay-input.visible { display: block; }
.delay-input input { width: 100%; height: 39px; padding: 0 70px 0 10px; border: 1px solid #343743; border-radius: 7px; background: #1a1c23; color: white; }
.delay-input span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 8px; }
.quiet-hours { min-height: 68px; margin-top: 12px; padding: 12px 15px; border: 1px solid var(--border); border-radius: 7px; display: grid; grid-template-columns: 1fr 160px 160px; align-items: center; gap: 12px; }
.quiet-hours > div { display: flex; align-items: center; gap: 10px; }
.quiet-hours svg { width: 17px; color: var(--cyan); }
.quiet-hours strong, .quiet-hours small { display: block; }
.quiet-hours strong { font-size: 10px; }
.quiet-hours small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.quiet-hours label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: var(--muted); font-size: 8px; }
.quiet-hours input { height: 38px; padding: 0 9px; border: 1px solid #343743; border-radius: 7px; background: #1a1c23; color: white; }
.toggle-list { margin-top: 20px; border-top: 1px solid #292c34; }
.toggle-list > label { min-height: 66px; padding: 11px 2px; border-bottom: 1px solid #292c34; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.toggle-list strong, .toggle-list small { display: block; }
.toggle-list strong { margin-bottom: 3px; font-size: 10px; }
.toggle-list small { color: var(--muted); font-size: 8px; }
.compact-toggles { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.subscriber-search { margin-bottom: 10px; }
.subscriber-fallback-note { margin: 0 0 8px; color: #9aa0ad; font-size: 11px; line-height: 1.45; }
.subscriber-load-more { margin: 10px auto; display: flex; }
.subscriber-list { max-height: 560px; overflow-y: auto; border-top: 1px solid #292c34; }
.subscriber-row { min-height: 48px; padding: 6px 2px; border-bottom: 1px solid #292c34; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.subscriber-row .contact-avatar { width: 34px; height: 34px; }
.subscriber-row strong, .subscriber-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subscriber-row strong { font-size: 11px; }
.subscriber-row small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.subscriber-row > label { display: flex; align-items: center; gap: 9px; color: #d9b7f0; font-size: 8px; font-weight: 700; }
.subscriber-ai-switch > span:first-child { text-transform: uppercase; letter-spacing: 0.08em; }
.ai-controls-footer { min-height: 66px; padding: 11px 17px; border-top: 1px solid var(--border); background: rgba(15,17,23,.97); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ai-controls-footer > span { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 9px; }
.ai-controls-footer > span svg { width: 13px; }
.ai-controls-footer > span.saved { color: var(--cyan); }
.ai-controls-footer > span.dirty { color: #efba77; }
.ai-controls-footer > div { display: flex; gap: 7px; }
.activity-panel { min-height: 400px; }
.inbox-actions { display: flex; align-items: center; gap: 9px; }
.live-sync { min-height: 34px; padding: 0 10px; border: 1px solid rgba(104,215,163,.2); border-radius: 7px; background: rgba(104,215,163,.06); color: #aee8cf; display: inline-flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 700; }
.live-sync > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(104,215,163,.08); }
.live-sync.syncing > span { animation: pulse 1s ease infinite; }
.live-sync.paused { border-color: #343743; background: #15171d; color: var(--muted); }
.live-sync.paused > span { background: #777b87; box-shadow: none; }
@keyframes pulse { 50% { opacity: .35; } }
.vault-toolbar { min-height: 64px; margin-bottom: 14px; padding: 10px; display: grid; grid-template-columns: minmax(220px, 1fr) 150px 190px 150px auto; align-items: center; gap: 8px; }
.vault-price-tabs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.vault-price-tabs button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: #b7b9c2; font-size: 11px; font-weight: 650; }
.vault-price-tabs button.active { background: #f4f4f5; color: #161616; }
.vault-price-tabs button span { margin-left: 6px; color: #8d909a; font-variant-numeric: tabular-nums; }
.vault-price-tabs button.active span { color: #4b4b4b; }
.posted-badge { position: absolute; top: 8px; left: 8px; z-index: 1; min-height: 18px; padding: 2px 6px; border-radius: 4px; background: #1f8f4e; color: #fff; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.vault-toolbar .search-box { margin: 0; }
.vault-toolbar select { width: 100%; min-height: 42px; padding: 0 32px 0 11px; border: 1px solid #343743; border-radius: 7px; background: #171920; color: var(--text); font-size: 10px; }
.vault-view-toggle { height: 42px; padding: 3px; border: 1px solid #343743; border-radius: 7px; background: #13151b; display: flex; gap: 3px; }
.vault-view-toggle button { width: 35px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.vault-view-toggle button.active { background: #30263a; color: #e1bcfa; }
.vault-view-toggle svg { width: 15px; }
.vault-panel { overflow: hidden; }
.vault-header { min-height: 70px; padding: 15px 17px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.vault-header h2 { font-size: 14px; }
.vault-header p { font-size: 9px; }
.vault-content { min-height: 390px; padding: 14px; }
.vault-content.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: start; gap: 10px; }
.vault-content .empty-state { grid-column: 1 / -1; min-height: 360px; }
.vault-content .empty-state .primary-button { margin-top: 7px; }
.vault-item { min-width: 0; padding: 0; border: 1px solid #2d303a; border-radius: 7px; background: #12141a; overflow: hidden; position: relative; text-align: left; }
.vault-item:hover { border-color: #5a426b; background: #171920; }
.vault-preview { aspect-ratio: 4 / 3; border-bottom: 1px solid #2d303a; background: #090a0e; display: block; overflow: hidden; position: relative; }
.vault-preview > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.vault-item:hover .vault-preview > img { transform: scale(1.025); }
.vault-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #6f7380; }
.vault-placeholder svg { width: 28px; }
.media-type-badge, .nsfw-badge { position: absolute; top: 8px; min-height: 23px; padding: 0 7px; border: 1px solid rgba(255,255,255,.11); border-radius: 5px; background: rgba(8,9,12,.82); backdrop-filter: blur(8px); color: #e5e4e8; display: flex; align-items: center; gap: 5px; font-size: 8px; font-weight: 700; text-transform: capitalize; }
.media-type-badge { left: 8px; }
.vault-preview:has(.posted-badge) .media-type-badge { top: 32px; }
.media-type-badge svg { width: 11px; }
.nsfw-badge { right: 8px; color: #ffc4d9; }
.vault-primary, .vault-description, .vault-price { min-width: 0; display: block; }
.vault-primary strong, .vault-primary small, .vault-price strong, .vault-price small { display: block; }
.vault-primary strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.vault-primary small, .vault-price small { margin-top: 5px; color: #767a87; font-size: 8px; }
.vault-description { color: #c7c8cf; font-size: 9px; line-height: 1.5; }
.vault-description.empty { color: #777b87; font-style: italic; }
.spin-inline { width: 12px; margin-left: 6px; vertical-align: middle; animation: spin .8s linear infinite; }
.vault-price strong { color: #e1c3f4; font-size: 9px; }
.vault-status { padding: 3px 5px; border-radius: 4px; background: #252831; color: #aeb1ba; font-size: 7px; text-transform: uppercase; }
.vault-status.ready { color: #aee8cf; background: rgba(104,215,163,.1); }
.vault-status.processing, .vault-status.created { color: #f0c58c; background: rgba(239,186,119,.1); }
.vault-status.error { color: #f3a79c; background: rgba(255,128,108,.1); }
.vault-open-icon { width: 14px; color: #9296a2; }
.vault-content.grid .vault-primary { padding: 11px 11px 0; }
.vault-content.grid .vault-description { min-height: 54px; padding: 7px 11px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.vault-content.grid .vault-price { padding: 0 11px 12px; }
.vault-content.grid .vault-status { position: absolute; right: 10px; bottom: 12px; }
.vault-content.grid .vault-open-icon { position: absolute; right: 10px; top: calc(75% - 6px); }
.vault-content.list { display: grid; align-content: start; gap: 0; }
.vault-list-head { min-height: 39px; padding: 0 10px; border-bottom: 1px solid var(--border); color: #868995; display: grid; grid-template-columns: 82px 160px minmax(260px, 1fr) 140px 74px 24px; align-items: center; gap: 12px; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.vault-content.list .vault-item { min-height: 94px; padding: 7px 10px; border-width: 0 0 1px; border-radius: 0; display: grid; grid-template-columns: 82px 160px minmax(260px, 1fr) 140px 74px 24px; align-items: center; gap: 12px; }
.vault-content.list .vault-preview { width: 72px; aspect-ratio: 1; border: 0; border-radius: 6px; }
.vault-content.list .media-type-badge { display: none; }
.vault-content.list .vault-description { max-height: 58px; overflow: hidden; }
.vault-content.list .vault-status { justify-self: start; }
.vault-footer { min-height: 64px; padding: 11px; border-top: 1px solid var(--border); text-align: center; }
.media-dialog { width: min(920px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 1px solid #3a3d47; border-radius: 8px; background: #0d0f14; color: var(--text); box-shadow: 0 28px 100px rgba(0,0,0,.75); overflow-x: hidden; }
.media-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(5px); }
.media-dialog-shell { max-height: calc(100vh - 30px); overflow-y: auto; }
.media-dialog-shell > header { min-height: 62px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.media-dialog-shell header strong, .media-dialog-shell header small { display: block; }
.media-dialog-shell header strong { font-size: 12px; }
.media-dialog-shell header small { margin-top: 4px; color: var(--muted); font-size: 8px; text-transform: capitalize; }
.media-dialog-content { min-height: 300px; max-height: 52vh; background: #07080b; display: flex; align-items: center; justify-content: center; overflow: auto; }
.media-dialog-content img, .media-dialog-content video { max-width: 100%; max-height: 52vh; object-fit: contain; display: block; }
.media-dialog-content audio { width: min(560px, calc(100% - 40px)); }
.media-metadata-form { padding: 15px 16px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.media-metadata-form label { min-width: 0; display: grid; gap: 6px; color: #dedde2; font-size: 9px; font-weight: 600; }
.media-metadata-form label.wide, .teaser-setting, .media-form-actions { grid-column: 1 / -1; }
.media-metadata-form textarea, .media-metadata-form input { width: 100%; border: 1px solid #343743; border-radius: 7px; background: #171920; color: var(--text); }
.media-metadata-form textarea { min-height: 76px; padding: 10px; resize: vertical; line-height: 1.5; }
.media-metadata-form label > small, .teaser-setting small { color: #7f828e; font-size: 8px; font-weight: 400; }
.money-input { position: relative; }
.money-input b { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #b5b8c2; font-size: 10px; }
.money-input input { height: 40px; padding: 0 10px 0 25px; }
.teaser-setting { min-height: 52px; padding: 8px 1px; border-top: 1px solid #292c34; border-bottom: 1px solid #292c34; display: flex !important; align-items: center; justify-content: space-between; }
.teaser-setting strong, .teaser-setting small { display: block; }
.teaser-setting small { margin-top: 4px; }
.media-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.media-form-actions > span { color: var(--muted); font-size: 8px; }
.media-loading { min-height: 320px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 10px; }
.media-loading svg { width: 22px; }
.spin { animation: spin .8s linear infinite; }
.button-spinner { width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .28); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.settings-hero { min-height: 122px; padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.settings-hero h1 { margin-bottom: 4px; }
.settings-summary { min-width: min(470px, 48%); display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.settings-summary > div { min-width: 0; min-height: 62px; padding: 12px; border: 1px solid #2b2e38; border-radius: 7px; background: #0e1016; display: flex; align-items: center; gap: 10px; }
.settings-summary svg { width: 17px; color: #999da8; }
.settings-summary span, .settings-summary small, .settings-summary strong { min-width: 0; display: block; }
.settings-summary small { margin-bottom: 5px; color: #777b87; font-size: 8px; }
.settings-summary strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.settings-layout { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 14px; }
.settings-main { min-width: 0; display: grid; gap: 14px; }
.connected-account-card { overflow: hidden; }
.status-pill.past-due { border-color: rgba(255,169,55,.42); background: rgba(255,169,55,.1); color: #ffc16d; }
.account-profile { min-height: 138px; padding: 20px; display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 16px; }
.account-profile > img { width: 86px; height: 86px; border: 1px solid #3c404a; border-radius: 8px; object-fit: cover; }
.account-name-line { display: flex; align-items: center; gap: 9px; }
.account-name-line h2 { margin: 0; font-size: 18px; }
.account-profile > div > strong { display: block; margin-top: 4px; color: #d1d2d8; font-size: 11px; }
.account-profile p { max-width: 600px; margin-top: 11px; font-size: 10px; }
.account-actions { padding: 0 20px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.account-actions a { text-decoration: none; }
.danger-button { min-height: 39px; padding: 0 14px; border: 1px solid rgba(255,128,108,.28); border-radius: 7px; background: rgba(255,128,108,.06); color: #f0aaa0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 600; }
.danger-button:hover:not(:disabled) { border-color: rgba(255,128,108,.55); background: rgba(255,128,108,.1); }
.danger-button svg { width: 15px; }
.connection-details { margin: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); }
.connection-details div { min-width: 0; min-height: 69px; padding: 13px 16px; border-right: 1px solid var(--border); }
.connection-details div:last-child { border-right: 0; }
.connection-details dt { margin-bottom: 7px; color: #777b87; font-size: 8px; text-transform: uppercase; }
.connection-details dd { margin: 0; overflow: hidden; color: #dedde2; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.billing-card { padding: 19px; }
.billing-metrics { margin-top: 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.billing-metrics > div { min-width: 0; padding: 14px; border: 1px solid #2b2e38; border-radius: 7px; background: #0e1016; }
.billing-metrics span, .billing-metrics strong, .billing-metrics small { display: block; }
.billing-metrics span { color: #888c97; font-size: 9px; }
.billing-metrics strong { margin-top: 7px; font-size: 19px; }
.billing-metrics small { margin-top: 5px; color: #777b87; font-size: 8px; }
.billing-footer { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.billing-footer p { max-width: 560px; font-size: 9px; }
.billing-gate[hidden] { display: none; }
.billing-gate { position: fixed; inset: 0; z-index: 100; padding: 20px; background: rgba(4,5,8,.84); backdrop-filter: blur(9px); display: grid; place-items: center; }
.billing-gate-dialog { width: min(420px, 100%); padding: 28px; border: 1px solid rgba(255,169,55,.28); border-radius: 8px; background: #111118; box-shadow: 0 24px 90px rgba(0,0,0,.66); text-align: center; }
.billing-gate-dialog > img { width: 52px; height: 52px; margin-bottom: 18px; border-radius: 8px; }
.billing-gate-dialog > span { display: block; color: #ffbe61; font-size: 8px; font-weight: 700; letter-spacing: 1.2px; }
.billing-gate-dialog h2 { margin-top: 10px; font-size: 23px; }
.billing-gate-dialog p { max-width: 330px; margin: 10px auto 20px; font-size: 10px; line-height: 1.65; }
.billing-gate-action { width: 100%; min-height: 42px; border: 0; border-radius: 7px; background: #f4a51d; color: #171006; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; font-weight: 700; }
.billing-gate-action:hover { background: #ffb637; }
.billing-gate-action svg { width: 15px; }
.billing-gate-dialog .ghost-button { width: 100%; margin-top: 8px; }
.notification-preferences { padding: 19px; }
.preference-list { margin-top: 17px; border-top: 1px solid #292c34; }
.preference-list > label { min-height: 68px; padding: 11px 2px; border-bottom: 1px solid #292c34; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.preference-icon { width: 32px; height: 32px; border: 1px solid #373342; border-radius: 7px; background: #1b1721; display: grid; place-items: center; color: #c78ee9; }
.preference-icon svg { width: 15px; }
.preference-list strong, .preference-list small { display: block; }
.preference-list strong { font-size: 10px; }
.preference-list small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.settings-form-footer { padding-top: 17px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.settings-form-footer > label { display: grid; gap: 7px; color: #d7d5dc; font-size: 9px; font-weight: 600; }
.settings-form-footer select { min-width: 220px; min-height: 39px; padding: 0 10px; border: 1px solid #343743; border-radius: 7px; background: #191b22; color: var(--text); font-size: 10px; }
.settings-shortcuts { display: grid; gap: 10px; }
.shortcut-card { width: 100%; min-height: 72px; padding: 12px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; gap: 10px; text-align: left; }
.shortcut-card:hover { border-color: #4a4054; background: #171820; }
.shortcut-card > span { width: 34px; height: 34px; border: 1px solid #3d3548; border-radius: 7px; background: #1b1721; display: grid; place-items: center; color: #c68ce8; }
.shortcut-card svg { width: 16px; }
.shortcut-card > svg { width: 14px; color: #777b87; }
.shortcut-card strong, .shortcut-card small { display: block; }
.shortcut-card strong { font-size: 10px; }
.shortcut-card small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.local-ai-note { min-height: 96px; padding: 15px; display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 10px; }
.local-ai-note > svg { width: 20px; color: var(--cyan); }
.local-ai-note strong, .local-ai-note small { display: block; }
.local-ai-note strong { font-size: 10px; }
.local-ai-note small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: 340px; padding: 11px 14px; border: 1px solid #43504c; border-radius: 7px; background: #15201d; color: #d4f3e9; font-size: 10px; box-shadow: 0 16px 45px rgba(0,0,0,.4); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .persona-tabs { grid-template-columns: repeat(3, 1fr); }
  .fan-stats { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-shortcuts { grid-template-columns: repeat(3, 1fr); }
  .local-ai-note { grid-column: 1 / -1; }
  .vault-toolbar { grid-template-columns: 1fr 1fr 1fr; }
  .vault-toolbar .search-box { grid-column: 1 / -1; }
  .vault-view-toggle { justify-self: end; }
  .vault-content.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  #inbox.page.active { height: auto; display: block; }
  .messages-layout { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .conversation-list { height: 280px; border-right: 0; border-bottom: 1px solid var(--border); }
  .conversation-workspace { min-height: 620px; }
  .ai-controls-heading { align-items: flex-start; flex-direction: column; }
  .ai-master { width: 100%; }
  .bump-grid, .compact-toggles { grid-template-columns: 1fr; }
  .quiet-hours { grid-template-columns: 1fr 1fr; }
  .quiet-hours > div { grid-column: 1 / -1; }
  .settings-hero { align-items: flex-start; flex-direction: column; }
  .settings-summary { width: 100%; min-width: 0; }
  .vault-content.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vault-list-head { display: none; }
  .vault-content.list .vault-item { padding: 9px; grid-template-columns: 76px minmax(0, 1fr) 72px 20px; gap: 9px; }
  .vault-content.list .vault-preview { width: 66px; grid-row: 1 / span 2; }
  .vault-content.list .vault-primary { grid-column: 2; }
  .vault-content.list .vault-description { grid-column: 2 / -1; }
  .vault-content.list .vault-price { grid-column: 3; grid-row: 1; }
  .vault-content.list .vault-status { grid-column: 3; grid-row: 2; }
  .vault-content.list .vault-open-icon { grid-column: 4; grid-row: 1 / span 2; }
}

@media (max-width: 700px) {
  :root { --sidebar: 0px; }
  .sidebar { inset: auto 0 0; width: 100%; height: 62px; padding: 7px 10px; border: 1px solid #252832; background: rgba(11,12,17,.97); flex-direction: row; justify-content: center; }
  .brand-mark { display: none; }
  .side-nav { width: min(330px, calc(100% - 48px)); margin: 0; flex-direction: row; justify-content: space-around; }
  .settings-button { display: inline-flex; flex: 0 0 40px; margin-top: 0; }
  .nav-icon { width: 45px; }
  .workspace { margin-left: 0; padding-bottom: 66px; }
  .topbar { padding: 0 12px; }
  .wordmark small, .top-actions > .icon-button, #globalAiLabel { display: none; }
  .connection-button { max-width: 130px; padding: 0 9px; }
  main { width: min(100% - 22px, 1380px); padding-top: 10px; }
  .page-heading { min-height: 112px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 12px; }
  .page-heading > button { width: 100%; }
  .inbox-actions { width: 100%; }
  .inbox-actions .ghost-button { flex: 1; }
  .metrics-grid { grid-template-columns: 1fr; }
  .persona-hero { align-items: flex-start; flex-direction: column; }
  .persona-score { width: 100%; }
  .persona-tabs { grid-template-columns: repeat(2, 1fr); }
  .persona-form { padding: 15px; }
  .form-grid, .control-grid { grid-template-columns: 1fr; }
  .field.wide, .control-field.wide { grid-column: auto; }
  .form-footer { margin: 17px -15px -15px; padding: 12px 15px; }
  .form-footer > span { display: none; }
  .control-tabs { grid-template-columns: 1fr; }
  .control-tab { min-height: 48px; justify-content: flex-start; }
  .ai-tab-panel { min-height: 0; padding: 15px; }
  .ai-controls-footer { position: sticky; bottom: 62px; }
  .quiet-hours { grid-template-columns: 1fr; }
  .quiet-hours > div { grid-column: auto; }
  .conversation-tabs button { font-size: 9px; }
  .messages { padding: 13px; }
  .message { max-width: 88%; }
  .draft-button span, .character-count { display: none; }
  .draft-button { width: 41px; padding: 0; }
  .memory-grid, .fan-stats { grid-template-columns: 1fr; }
  .memory-grid .wide { grid-column: auto; }
  .notifications-panel { position: fixed; top: 58px; right: 11px; }
  .settings-summary, .settings-shortcuts { grid-template-columns: 1fr; }
  .local-ai-note { grid-column: auto; }
  .account-profile { grid-template-columns: 64px minmax(0, 1fr); }
  .account-profile > img { width: 64px; height: 64px; }
  .connection-details { grid-template-columns: 1fr 1fr; }
  .connection-details div:nth-child(2) { border-right: 0; }
  .connection-details div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .settings-form-footer { align-items: stretch; flex-direction: column; }
  .billing-footer { align-items: stretch; flex-direction: column; }
  .billing-footer .primary-button { width: 100%; }
  .settings-form-footer select, .settings-form-footer .primary-button { width: 100%; }
  .vault-toolbar { grid-template-columns: 1fr 1fr; }
  .vault-toolbar .search-box { grid-column: 1 / -1; }
  .vault-content.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vault-content.list .vault-item { grid-template-columns: 76px minmax(0, 1fr) 70px 18px; }
  .vault-content.list .vault-preview { width: 60px; }
  .media-dialog-content { min-height: 300px; }
  .media-metadata-form { grid-template-columns: 1fr; }
  .media-metadata-form label.wide, .teaser-setting, .media-form-actions { grid-column: auto; }
}

@media (max-width: 420px) {
  .top-actions { gap: 4px; }
  .avatar { display: none; }
  .wordmark { font-size: 15px; }
  .connection-banner { align-items: flex-start; }
  .connection-banner .ghost-button { min-width: 74px; }
  .persona-hero h1, .ai-controls-heading h1 { font-size: 24px; }
  .persona-note { grid-template-columns: 28px 1fr; }
  .persona-note > svg:last-child { display: none; }
  .ai-controls-footer > span { display: none; }
  .ai-controls-footer { justify-content: flex-end; }
  .view-toolbar { align-items: flex-start; }
  .settings-summary { grid-template-columns: 1fr; }
  .account-profile { align-items: start; grid-template-columns: 1fr; }
  .billing-metrics { grid-template-columns: 1fr; }
  .account-actions > * { width: 100%; }
  .connection-details { grid-template-columns: 1fr; }
  .connection-details div { border-right: 0; border-bottom: 1px solid var(--border); }
  .connection-details div:last-child { border-bottom: 0; }
  .vault-toolbar { grid-template-columns: 1fr; }
  .vault-toolbar .search-box { grid-column: auto; }
  .vault-view-toggle { justify-self: stretch; }
  .vault-view-toggle button { flex: 1; }
  .vault-content { padding: 9px; }
  .vault-content.grid { gap: 7px; }
  .vault-item-copy { padding: 9px; }
}
