:root {
  color-scheme: light;
  --ink: #282638;
  --muted: #8d899d;
  --line: #eeedf2;
  --paper: #ffffff;
  --canvas: #f7f6fa;
  --sidebar: #272538;
  --sidebar-muted: #aaa7b9;
  --purple: #7965c8;
  --purple-dark: #6853b6;
  --purple-soft: #f0edfb;
  --green: #44a883;
  --green-soft: #e9f6f0;
  --amber: #d28f37;
  --amber-soft: #fff5e5;
  --red: #c96a73;
  --shadow: 0 10px 35px rgba(42, 35, 71, .06);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

.app-shell { min-height: 100vh; }
.app-shell[hidden] { display: none; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 252px; padding: 25px 15px 18px;
  display: flex; flex-direction: column; color: #fff; background: var(--sidebar);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; height: 47px; }
.brand-mark { width: 32px; height: 32px; position: relative; display: block; }
.brand-mark i { position: absolute; width: 14px; height: 14px; border-radius: 90% 90% 45% 45%; background: #b5a6f1; opacity: .95; }
.brand-mark i:nth-child(1) { left: 9px; top: 0; transform: rotate(0deg); }
.brand-mark i:nth-child(2) { left: 17px; top: 9px; transform: rotate(90deg); background: #8c77de; }
.brand-mark i:nth-child(3) { left: 9px; top: 17px; transform: rotate(180deg); background: #d8cffa; }
.brand-mark i:nth-child(4) { left: 1px; top: 9px; transform: rotate(-90deg); background: #9c88e3; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font: 800 22px/22px Manrope, sans-serif; letter-spacing: -.8px; }
.brand-copy small { color: #aaa6bd; font: 500 9px/15px 'DM Sans', sans-serif; letter-spacing: 1.35px; text-transform: uppercase; }

.workspace-switcher { margin: 33px 3px 29px; padding: 11px 10px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.04); border-radius: 10px; }
.workspace-avatar { width: 31px; height: 31px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #eadff5; color: #725c8b; font: 700 14px Manrope, sans-serif; }
.workspace-copy,.profile-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.workspace-copy strong { overflow: hidden; color: #f7f6fb; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy small { color: var(--sidebar-muted); font-size: 10px; }
.chevron { margin-left: auto; color: var(--sidebar-muted); font-size: 17px; }
.nav-label { margin: 0 10px 10px; color: #878398; font: 700 9px 'DM Sans', sans-serif; letter-spacing: 1.25px; }
.nav-label-spaced { margin-top: 28px; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 11px; border-radius: 8px; color: #c1becd; font-size: 12px; font-weight: 500; transition: background .16s, color .16s; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: #39364d; color: #fff; box-shadow: inset 2px 0 #ad9af3; }
.nav-icon { width: 17px; height: 17px; display: inline-flex; flex: none; color: #aaa6ba; }
.nav-item.active .nav-icon { color: #c2b5f7; }
.nav-icon svg { width: 17px; height: 17px; }
.nav-count { margin-left: auto; min-width: 21px; height: 19px; display: grid; place-items: center; border-radius: 6px; background: #745fc0; color: #fff; font-size: 10px; font-weight: 700; }
.nav-count[hidden] { display: none; }
.nav-count.soft { color: #d2c9f4; background: rgba(143,122,212,.19); }
.beta-badge { margin-left: auto; color: #aaa2c4; font-size: 8px; font-weight: 700; letter-spacing: .8px; }
.sidebar-bottom { margin-top: auto; }
.sidebar-divider { height: 1px; margin: 17px 9px 15px; background: rgba(255,255,255,.09); }
.profile-row { display: flex; align-items: center; gap: 9px; padding: 0 8px; }
.profile-avatar,.topbar-avatar { display: grid; flex: none; place-items: center; border-radius: 50%; color: #fff; background: #b49a83; font-size: 10px; font-weight: 700; }
.profile-avatar { width: 31px; height: 31px; }
.profile-copy strong { color: #f3f2f7; font-size: 11px; font-weight: 600; }
.profile-copy small { color: #9692a7; font-size: 10px; }
.more-dots { margin-left: auto; color: #aaa6ba; font-size: 20px; letter-spacing: 1px; }

.main-area { min-height: 100vh; margin-left: 252px; }
.topbar { height: 64px; padding: 0 31px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #9b97a7; font-size: 11px; }
.breadcrumbs strong { color: #464356; font-weight: 600; }
.crumb-slash { color: #d0cdd7; }
.topbar-right { display: flex; align-items: center; gap: 19px; }
.demo-pill { display: inline-flex; align-items: center; gap: 7px; height: 25px; padding: 0 9px; border: 1px solid #ebe7fa; border-radius: 20px; color: #7662b7; background: #faf9fe; font-size: 8px; font-weight: 700; letter-spacing: .65px; }
.demo-dot { width: 6px; height: 6px; border-radius: 50%; background: #9b82e3; }
.topbar-date { color: #9692a2; font-size: 10px; }
.topbar-avatar { width: 29px; height: 29px; font-size: 9px; background: #c2aa94; }
.icon-button { width: 32px; height: 32px; position: relative; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #858193; cursor: default; }
.icon-button svg { width: 17px; height: 17px; }
.notification-button { cursor: pointer; }
.notification-button i { display: none; position: absolute; width: 5px; height: 5px; top: 6px; right: 6px; border: 1px solid white; border-radius: 50%; background: #d47f84; }
.notification-button.has-notification i { display: block; }
.mobile-menu { display: none; }
.page-content { max-width: 1600px; margin: 0 auto; padding: 28px 31px 34px; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 21px; }
.eyebrow { margin-bottom: 7px; color: #9691a4; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; text-transform: uppercase; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin: 0; font: 700 24px/1.25 Manrope, sans-serif; letter-spacing: -.7px; color: #302d40; }
.page-subtitle { margin: 6px 0 0; color: #928ea0; font-size: 11px; line-height: 1.5; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.report-actions { flex-wrap: wrap; justify-content: flex-end; }
.report-date { min-width: 128px; height: 34px; padding: 0 9px; border: 1px solid #e9e6ef; border-radius: 8px; color: #5d586a; background: #fff; font: 10px 'DM Sans', sans-serif; }
.button { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e9e7ee; border-radius: 7px; color: #6d687c; background: white; font-size: 10px; font-weight: 600; white-space: nowrap; cursor: default; }
.button svg { width: 14px; height: 14px; }
.button.primary { border-color: var(--purple); color: white; background: var(--purple); box-shadow: 0 3px 8px rgba(121,101,200,.18); }
.button.pale { border-color: #eeebf8; color: #7865bd; background: #f8f6fd; }
.button[aria-disabled="true"] { opacity: .76; }
.demo-note { display: inline-flex; align-items: center; gap: 6px; color: #a097b7; font-size: 9px; }
.demo-note svg { width: 13px; height: 13px; color: #9a84d9; }
.demo-data-note { margin: -6px 0 15px; padding: 10px 12px; border: 1px solid #ebe7fa; border-radius: 8px; color: #6d6684; background: #faf9fe; font-size: 11px; line-height: 1.5; }
.demo-source-chip { flex: none; padding: 2px 5px; border: 1px solid #e8e1f5; border-radius: 4px; color: #7c6b9b; background: #f5f1fa; font-size: 7px; font-weight: 700; letter-spacing: .25px; }
.surface { border: 1px solid #edebf1; border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }

/* Inbox */
.inbox-title-row { margin-bottom: 17px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.inbox-tools { display: flex; align-items: center; gap: 8px; }
.searchbox { width: 235px; height: 33px; padding: 0 10px; display: flex; align-items: center; gap: 7px; border: 1px solid #ebe9f0; border-radius: 7px; color: #a19cad; background: white; }
.searchbox svg { width: 14px; height: 14px; }
.searchbox input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: 400 10px 'DM Sans', sans-serif; }
.searchbox input::placeholder { color: #a19cad; }
.inbox-filter { height: 33px; max-width: 150px; padding: 0 8px; border: 1px solid #ebe9f0; border-radius: 7px; color: #787487; background: white; font: 400 10px 'DM Sans', sans-serif; }
.filter-button { height: 33px; padding: 0 9px; display: flex; align-items: center; gap: 6px; border: 1px solid #ebe9f0; border-radius: 7px; background: white; color: #787487; font-size: 10px; }
.filter-button svg { width: 13px; height: 13px; }
.inbox-shell { display: grid; grid-template-columns: 280px minmax(320px,1fr) 235px; min-height: 630px; overflow: hidden; position: relative; }
.conversation-list { min-width: 0; border-right: 1px solid var(--line); }
.list-head { padding: 14px 14px 0; }
.list-head-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.list-head-top strong { font: 700 13px Manrope, sans-serif; }
.list-head-top small { color: #a19cad; font-size: 9px; }
.conversation-tabs { display: flex; gap: 14px; height: 32px; border-bottom: 1px solid var(--line); color: #9b97a6; font-size: 9px; }
.conversation-tabs button { display: inline-flex; align-items: center; position: relative; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; white-space: nowrap; cursor: pointer; }
.conversation-tabs .selected { color: #6653b2; font-weight: 700; }
.conversation-tabs .selected::after { position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; content: ''; border-radius: 2px; background: #8d79d6; }
.demo-toggle { margin: 8px 0 0; padding: 0; border: 0; color: #8877bb; background: transparent; font-size: 9px; text-align: left; cursor: pointer; }
.conversation-items { padding: 4px 7px 9px; }
.conversation-item { width: 100%; min-height: 72px; padding: 11px 8px; display: flex; gap: 9px; align-items: flex-start; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.conversation-item[hidden] { display: none; }
.conversation-item:hover { background: #faf9fc; }
.conversation-item.selected { background: #f3f0fb; }
.person-avatar { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #67567f; background: #ebe5f0; font: 600 10px Manrope, sans-serif; }
.person-avatar.rose { color: #8a5b68; background: #f6e5ea; }
.person-avatar.blue { color: #536d81; background: #e4eef5; }
.person-avatar.green { color: #4b7669; background: #e2f0e9; }
.person-avatar.peach { color: #90694e; background: #f5eadc; }
.person-avatar.yellow { color: #89753e; background: #f5f0d9; }
.conversation-main { min-width: 0; flex: 1; }
.conversation-topline { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.person-name { overflow: hidden; color: #393648; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.conversation-time { flex: none; color: #a8a4b1; font-size: 8px; }
.conversation-preview { margin-top: 4px; overflow: hidden; color: #908c9d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-meta { margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.mini-channel { width: 13px; height: 13px; display: inline-grid; place-items: center; border-radius: 4px; color: #fff; font: 700 8px Arial,sans-serif; }
.mini-channel.ig { background: linear-gradient(140deg,#8459c8,#e56779 65%,#f5aa54); }
.mini-channel.viber { background: #7654ba; font-size: 7px; }
.channel-name { overflow: hidden; color: #a19dab; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { margin-left: auto; flex: none; padding: 3px 5px; border-radius: 5px; color: #9b7b41; background: #fff5e5; font-size: 7px; font-weight: 600; }
.status-chip.progress { color: #6e60ae; background: #efecfa; }
.status-chip.closed { color: #59927e; background: #eaf5f0; }
.status-chip.handoff { color: #9a5b39; background: #fff0e8; }
.unread-mark { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #836fd0; }

.chat-panel { min-width: 0; display: flex; flex-direction: column; background: #fff; }
.chat-header { min-height: 63px; padding: 11px 17px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.chat-header .person-avatar { width: 36px; height: 36px; }
.chat-person { min-width: 0; flex: 1; }
.chat-person strong { display: block; color: #383547; font-size: 11px; }
.chat-person small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: #9995a4; font-size: 9px; }
.chat-person small .mini-channel { width: 11px; height: 11px; font-size: 7px; }
.chat-header-actions { display: flex; gap: 3px; }
.contact-panel-trigger, .contact-panel-close { display: none; border: 1px solid var(--line); border-radius: 7px; color: #6653b2; background: #f7f4fc; font: 600 10px 'DM Sans', sans-serif; cursor: pointer; }
.contact-panel-trigger { min-height: 30px; padding: 0 9px; }
.contact-panel-close { min-height: 30px; padding: 0 9px; margin-bottom: 12px; align-items: center; gap: 5px; }
.plain-icon { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 7px; color: #9b97a6; background: transparent; }
.plain-icon svg { width: 15px; height: 15px; }
.chat-status-line { padding: 8px 16px; border-bottom: 1px solid #f4f2f7; display: flex; align-items: center; gap: 6px; color: #9a96a4; font-size: 8px; }
.chat-status-line .status-chip { margin-left: 0; font-size: 8px; }
.chat-status-line .assignee { margin-left: auto; }
.assignment-button { min-height: 25px; padding: 0 8px; font-size: 8px; white-space: nowrap; }
.message-area { min-height: 380px; flex: 1; padding: 17px 19px 15px; overflow: hidden; background-color: #fcfbfd; background-image: radial-gradient(#eae6f2 .7px, transparent .7px); background-size: 17px 17px; }
.demo-conversation-banner { margin: 0 auto 14px; padding: 8px 10px; border: 1px solid #e8e1f5; border-radius: 7px; color: #74658f; background: rgba(248, 245, 252, .96); font-size: 9px; line-height: 1.45; text-align: center; }
.date-divider { margin: 0 auto 18px; width: max-content; padding: 5px 9px; border: 1px solid #efedf2; border-radius: 10px; color: #a5a0af; background: rgba(255,255,255,.9); font-size: 8px; }
.message-row { display: flex; margin: 0 0 12px; }
.message-row.incoming { justify-content: flex-start; }
.message-row.outgoing { justify-content: flex-end; }
.bubble { max-width: 79%; padding: 9px 11px 7px; border: 1px solid #eeecf2; border-radius: 11px 11px 11px 3px; color: #545062; background: #fff; box-shadow: 0 2px 6px rgba(44,35,73,.025); font-size: 10px; line-height: 1.5; }
.outgoing .bubble { border-color: #e7e1f8; border-radius: 11px 11px 3px 11px; color: #50466c; background: #f1edfb; }
.bubble-time { margin-top: 4px; color: #aaa6b2; font-size: 7px; text-align: right; }
.delivery-failed { color: #bd4040; font-weight: 700; }
.delivery-resolution { display: grid; gap: 5px; margin-top: 9px; padding: 8px; border: 1px solid #e6cccc; border-radius: 9px; background: rgba(255, 247, 247, .8); }
.delivery-resolution > span { color: #79595c; font-size: 10px; line-height: 1.4; }
.delivery-resolve-button { justify-self: start; padding: 4px 7px; border: 1px solid #ddc5c5; border-radius: 6px; background: transparent; color: #704447; font: inherit; font-size: 10px; font-weight: 600; cursor: pointer; }
.delivery-resolve-button:hover { background: #fff; border-color: #b8898d; }
[data-theme="dark"] .delivery-resolution { border-color: #65494c; background: rgba(68, 38, 43, .45); }
[data-theme="dark"] .delivery-resolution > span, [data-theme="dark"] .delivery-resolve-button { color: #e4c5c8; }
[data-theme="dark"] .delivery-resolve-button { border-color: #76585c; }
[data-theme="dark"] .delivery-resolve-button:hover { background: #47363a; }
.ai-message { max-width: 85%; margin: 14px auto; padding: 10px 12px; border: 1px solid #e7e1f6; border-radius: 9px; background: #f8f6fd; color: #63578b; font-size: 9px; line-height: 1.5; }
.ai-message-label { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; color: #806bc2; font-size: 8px; font-weight: 700; }
.ai-message-label svg { width: 12px; height: 12px; }
.composer { padding: 11px 13px; border-top: 1px solid var(--line); background: #fff; }
.composer-box { width: 100%; min-height: 59px; padding: 10px 11px; resize: vertical; border: 1px solid #eeecf2; border-radius: 8px; color: #514d60; background: #fff; font-size: 10px; outline-color: #a79ad4; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.composer-toolbar .composer-tools { align-items: center; }
.composer-tool { border: 1px solid #eeecf2; border-radius: 7px; color: #736995; background: #fff; font-size: 17px; }
.quick-reply-trigger,.quick-reply-add { height: 27px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #eeecf2; border-radius: 7px; color: #655b82; background: #fff; font-size: 9px; cursor: pointer; }
.quick-reply-add { width: 27px; justify-content: center; padding: 0; }
.composer-popover { position: relative; z-index: 2; max-height: 230px; overflow: auto; margin: 0 0 8px; padding: 10px; border: 1px solid #eeecf2; border-radius: 9px; background: #fff; box-shadow: 0 10px 28px rgba(44, 36, 68, .12); }
.composer-popover[hidden] { display: none; }
.quick-reply-list > strong { display: block; margin: 0 0 7px; color: #393449; font-size: 10px; }
.quick-reply-row { display: flex; align-items: stretch; gap: 4px; border-top: 1px solid #f1eff4; }
.quick-reply-item { flex: 1; min-width: 0; padding: 8px 2px; border: 0; color: #4b4659; background: transparent; text-align: left; cursor: pointer; }
.quick-reply-item span,.quick-reply-item small { display: block; }
.quick-reply-item span { font-size: 10px; font-weight: 650; }
.quick-reply-item small { overflow: hidden; margin-top: 3px; color: #8e8999; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.quick-reply-delete { width: 26px; border: 0; color: #9993a2; background: transparent; font-size: 18px; cursor: pointer; }
.emoji-grid { display: grid; grid-template-columns: repeat(6, 34px); gap: 5px; }
.emoji-choice { height: 32px; border: 0; border-radius: 6px; background: #f7f5fa; font-size: 18px; cursor: pointer; }
.emoji-choice:hover,.quick-reply-item:hover { background: #f7f5fa; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.composer-tools { display: flex; gap: 3px; }
.composer-tools .plain-icon { width: 24px; height: 24px; }
.composer-actions { display: flex; align-items: center; gap: 8px; }
.shortcut { color: #b0acb9; font-size: 8px; }
.send-button { width: 28px; height: 27px; display: grid; place-items: center; border: 0; border-radius: 7px; color: white; background: #9f91cf; opacity: .68; }
.send-button { cursor: pointer; opacity: 1; }
.send-button:disabled { cursor: not-allowed; opacity: .42; }
.send-button svg { width: 14px; height: 14px; }
.composer-actions { display: flex; align-items: center; gap: 6px; }
.note-button { min-height: 27px; padding: 0 9px; font-size: 9px; }
.login-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(28, 24, 42, .46); backdrop-filter: blur(5px); }
.login-card { width: min(100%, 390px); display: grid; gap: 13px; padding: 28px; border: 1px solid #efedf3; border-radius: 16px; background: #fff; box-shadow: 0 24px 80px rgba(30, 25, 43, .2); }
.login-mark { width: 38px; height: 38px; margin-bottom: 3px; }
.login-card h1 { margin: -8px 0 0; font-size: 25px; }
.login-card p { margin: -8px 0 3px; color: #817c8d; font-size: 12px; }
.login-card label { display: grid; gap: 6px; color: #696476; font-size: 11px; font-weight: 600; }
.login-card input { height: 40px; padding: 0 11px; border: 1px solid #e8e5ed; border-radius: 8px; color: #393449; background: white; font-size: 13px; }
.login-submit { min-height: 40px; justify-content: center; }
.login-error { padding: 9px 11px; border-radius: 7px; color: #8a3434; background: #fff0f0; font-size: 11px; }
.mfa-secret { display: grid; gap: 7px; padding: 12px; border: 1px solid #e8e5ed; border-radius: 9px; background: #faf9fc; }
.mfa-secret small, .mfa-secret p { margin: 0; color: #817c8d; font-size: 10px; }
.mfa-secret code { overflow-wrap: anywhere; padding: 8px; border-radius: 6px; color: #393449; background: #efedf3; font-size: 12px; letter-spacing: .08em; }
.mfa-recovery-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; border: 1px solid #e8e5ed; border-radius: 9px; background: #faf9fc; }
.mfa-recovery-list code { padding: 6px; border-radius: 5px; color: #393449; background: #efedf3; text-align: center; font-size: 11px; letter-spacing: .06em; }
.mfa-cancel { min-height: 36px; justify-content: center; }
.logout-button { min-height: 29px; padding: 0 9px; font-size: 9px; }
.logout-button[hidden] { display: none; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(35, 30, 49, .35); }
.modal-card { width: min(100%, 440px); max-height: calc(100vh - 32px); overflow: auto; padding: 20px; border: 1px solid #eeecf2; border-radius: 14px; background: #fff; box-shadow: 0 22px 60px rgba(40, 32, 67, .2); }
.channel-setup-modal { width: min(100%, 760px); }
.channel-setup-item { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.channel-setup-item > div:first-child { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.channel-setup-item p { margin: 0; color: var(--muted); line-height: 1.55; }
.channel-setup-item code { overflow-wrap: anywhere; color: var(--ink); font-size: 11px; }
.channel-setup-endpoint { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; }
.channel-setup-endpoint small { grid-column: 1 / -1; color: var(--muted); }
.channel-setup-endpoint .button { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-close { width: 30px; height: 30px; border: 0; border-radius: 7px; background: #f5f3f8; cursor: pointer; }
.modal-fields { display: grid; gap: 12px; }
.modal-fields label { display: grid; gap: 5px; color: #676275; font-size: 11px; font-weight: 600; }
.modal-fields input, .modal-fields select, .modal-fields textarea { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid #e9e6ef; border-radius: 7px; color: #383445; background: #fff; font: inherit; font-size: 12px; }
.modal-fields textarea { min-height: 74px; resize: vertical; }
.temporary-password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.temporary-password-help { color: #777184; font-size: 11px; font-weight: 400; line-height: 1.45; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 25; max-width: min(360px, calc(100vw - 36px)); padding: 11px 14px; border-radius: 9px; color: #fff; background: #403a50; box-shadow: 0 8px 28px #29223933; font-size: 12px; }
.contact-panel { padding: 15px 13px; border-left: 1px solid var(--line); background: #fff; }
.contact-card-head { display: flex; flex-direction: column; align-items: center; padding: 6px 4px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.contact-card-head .person-avatar { width: 47px; height: 47px; margin-bottom: 9px; font-size: 13px; }
.contact-card-head strong { color: #383547; font-size: 11px; }
.contact-card-head small { margin-top: 4px; color: #a19dab; font-size: 8px; }
.contact-section { padding: 13px 2px 10px; border-bottom: 1px solid var(--line); }
.contact-section-title { margin-bottom: 10px; color: #a19dab; font-size: 8px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
.detail-row { display: flex; justify-content: space-between; gap: 8px; margin: 9px 0; color: #9b97a5; font-size: 8px; }
.detail-row strong { color: #5b5768; font-size: 8px; font-weight: 600; text-align: right; }
.phone-match-note { display: grid; gap: 5px; margin: 8px 0 10px; padding: 8px; border-radius: 8px; background: #f3f0fb; color: #71658b; font-size: 10px; line-height: 1.45; }
.phone-match-link { border: 0; padding: 0; background: transparent; color: #6955a3; text-align: left; font: inherit; cursor: pointer; }
.phone-match-link:hover { text-decoration: underline; }
.assignee-chip { display: inline-flex; align-items: center; gap: 5px; }
.tiny-avatar { width: 17px; height: 17px; display: inline-grid; place-items: center; border-radius: 50%; color: #705d86; background: #eee6f0; font-size: 7px; font-weight: 700; }
.note-box { padding: 9px; border: 1px solid #f0edf5; border-radius: 7px; color: #8f8a9b; background: #fcfbfd; font-size: 8px; line-height: 1.45; }
.contact-actions { display: grid; gap: 7px; padding-top: 12px; }
.contact-actions .button { width: 100%; min-height: 31px; justify-content: flex-start; font-size: 8px; }
.contact-actions .button svg { width: 13px; height: 13px; }
.call-record { display: grid; gap: 4px; margin: 8px 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 9px; }
.call-record strong { color: var(--ink); }
.call-record small, .call-empty { color: #8d8797; font-size: 8px; }
.call-record span { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.call-stats { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 11px; }
.call-stats span { display: inline-flex; gap: 6px; }
.call-stats strong { color: var(--ink); }
.call-staff { margin-top: 12px; }
.back-to-list { display: none; }

/* Shared section cards */
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 17px; }
.metric-card { min-height: 109px; padding: 15px 16px; position: relative; overflow: hidden; }
.metric-label { display: flex; align-items: center; gap: 6px; color: #9691a2; font-size: 9px; }
.metric-icon { width: 25px; height: 25px; margin-bottom: 12px; display: grid; place-items: center; border-radius: 7px; color: #806bc5; background: #f0edfb; }
.metric-icon svg { width: 14px; height: 14px; }
.metric-icon.green { color: #4a9d7b; background: #eaf6f0; }
.metric-icon.amber { color: #c28a3b; background: #fff5e6; }
.metric-icon.blue { color: #6489ae; background: #edf4f9; }
.metric-value { font: 700 23px/1 Manrope, sans-serif; letter-spacing: -.5px; color: #343144; }
.metric-change { position: absolute; top: 17px; right: 14px; color: #65a889; font-size: 8px; font-weight: 700; }
.metric-foot { margin-top: 7px; color: #aaa6b3; font-size: 8px; }
.two-column { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.85fr); gap: 14px; }
.card-header { min-height: 50px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 0; color: #403d4e; font: 700 11px Manrope, sans-serif; }
.card-header small { color: #a5a1ae; font-size: 8px; }
.card-body { padding: 14px 16px; }
.chart { height: 200px; padding: 10px 0 0; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-gridline { stroke: #f0eef4; stroke-width: 1; }
.chart-area { fill: url(#areaFill); }
.chart-line { fill: none; stroke: #8672cf; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-label { fill: #aaa6b3; font: 9px 'DM Sans',sans-serif; }
.legend-row { display: flex; justify-content: space-between; gap: 10px; margin: 12px 0; color: #777284; font-size: 9px; }
.legend-name { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 8px; height: 8px; border-radius: 3px; background: #8e7ad4; }
.legend-dot.ig2 { background: #d28eab; }
.legend-dot.viber { background: #81b79e; }
.legend-value { color: #4f4b5d; font-weight: 700; }
.progress-list { display: grid; gap: 15px; }
.progress-line-head { display: flex; justify-content: space-between; margin-bottom: 6px; color: #7e7a8a; font-size: 9px; }
.progress-line-head strong { color: #514d60; font-size: 9px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 5px; background: #f0eef4; }
.progress-fill { height: 100%; border-radius: inherit; background: #8a77cf; }
.progress-fill.pink { background: #d694b1; }
.progress-fill.green { background: #77b498; }
.table-card { overflow-x: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th { padding: 10px 15px; color: #aaa6b3; background: #fcfbfd; font-size: 8px; font-weight: 600; text-align: left; }
.data-table td { padding: 11px 15px; border-top: 1px solid #f3f1f5; color: #777284; font-size: 9px; }
.data-table td strong { color: #4d495a; font-size: 9px; font-weight: 600; }
.table-person { display: flex; align-items: center; gap: 8px; }
.table-person .tiny-avatar { width: 23px; height: 23px; font-size: 8px; }
.table-numeric { color: #4b4758 !important; font-weight: 700; }
.table-status { display: inline-flex; padding: 4px 7px; border-radius: 5px; color: #5a997f; background: #eaf6f0; font-size: 8px; font-weight: 600; }
.table-status.waiting { color: #aa7d37; background: #fff4e2; }
.table-status.progress { color: #7462b5; background: #f0edfb; }

/* Reminders */
.reminder-summary { margin-bottom: 16px; padding: 13px 16px; display: flex; align-items: center; gap: 10px; border: 1px solid #eee9fb; border-radius: 9px; background: #f8f6fd; }
.reminder-summary-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #806bc3; background: #eee9fb; }
.reminder-summary-icon svg { width: 15px; height: 15px; }
.reminder-summary strong { display: block; color: #51496f; font-size: 10px; }
.reminder-summary small { display: block; margin-top: 3px; color: #9790ab; font-size: 8px; }
.reminder-day { margin: 0 0 16px; color: #9691a2; font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; }
.reminder-list { display: grid; gap: 9px; }
.reminder-item { padding: 13px 15px; display: grid; grid-template-columns: 62px minmax(0,1fr) 150px auto; align-items: center; gap: 12px; }
.reminder-complete { padding: 6px 10px; font-size: 9px; white-space: nowrap; }
.reminder-time { color: #6654b0; font: 700 11px Manrope,sans-serif; }
.reminder-content strong { display: block; color: #464254; font-size: 10px; }
.reminder-content p { margin: 4px 0 0; color: #9691a1; font-size: 9px; }
.reminder-conversation-link { display: inline-block; margin-top: 5px; padding: 2px 0; border: 0; background: none; color: #6654b0; font: 700 9px Manrope,sans-serif; text-align: left; cursor: pointer; }
.reminder-conversation-link:hover { text-decoration: underline; }
.reminder-conversation-link:focus-visible { outline: 2px solid #6654b0; outline-offset: 2px; border-radius: 2px; }
.report-email-text { min-height: 235px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.5; }
.reminder-person { display: flex; align-items: center; gap: 6px; color: #777284; font-size: 8px; }
.reminder-dot { width: 7px; height: 7px; border-radius: 50%; background: #cf9a55; }
.reminder-dot.purple { background: #8e7ad2; }
.reminder-dot.green { background: #68ac8d; }
.reminder-more { color: #aaa6b3; text-align: right; font-size: 17px; }
.reminder-channel { margin-top: 6px; display: flex; align-items: center; gap: 5px; color: #aaa6b3; font-size: 8px; }
.due-reminder-banner { margin: 0 0 15px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #efd4ad; border-radius: 9px; color: #654b28; background: #fff8ed; }
.due-reminder-copy { min-width: 0; display: grid; gap: 4px; }
.due-reminder-copy strong { font: 700 11px Manrope,sans-serif; }
.due-reminder-copy span { font-size: 10px; }
.due-reminder-copy small { color: #967445; font-size: 9px; }
.due-reminder-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.due-reminder-actions .button { padding: 7px 10px; font-size: 9px; }

/* Assistant */
.assistant-banner { padding: 18px 20px; margin-bottom: 15px; display: flex; align-items: center; gap: 13px; color: #fff; border-radius: 10px; background: linear-gradient(105deg,#7762c3,#9b83d7); box-shadow: 0 8px 22px rgba(116,94,187,.17); }
.assistant-banner-icon { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 11px; background: rgba(255,255,255,.12); }
.assistant-banner-icon svg { width: 20px; height: 20px; }
.assistant-banner-copy { flex: 1; }
.assistant-banner-copy strong { display: block; font: 700 12px Manrope,sans-serif; }
.assistant-banner-copy p { margin: 4px 0 0; color: rgba(255,255,255,.8); font-size: 9px; }
.assistant-online { display: flex; align-items: center; gap: 6px; color: #f1edff; font-size: 8px; }
.assistant-online i { width: 6px; height: 6px; border-radius: 50%; background: #a9e1c4; }
.script-list { display: grid; gap: 8px; }
.script-item { padding: 11px 0; display: flex; gap: 10px; border-bottom: 1px solid #f1eff4; }
.script-item:last-child { border-bottom: 0; }
.script-number { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; color: #806bc5; background: #f0edfb; font-size: 8px; font-weight: 700; }
.script-item strong { color: #514d5e; font-size: 9px; }
.script-item p { margin: 4px 0 0; color: #9995a3; font-size: 8px; line-height: 1.5; }
.handoff-card { padding: 14px; border: 1px solid #f2e6d1; border-radius: 8px; background: #fffaf1; }
.handoff-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #a47a40; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.handoff-label svg { width: 13px; height: 13px; }
.handoff-card p { margin: 0; color: #81745e; font-size: 9px; line-height: 1.55; }
.handoff-footer { margin-top: 11px; padding-top: 9px; border-top: 1px solid #f3e7d3; display: flex; align-items: center; justify-content: space-between; color: #a49172; font-size: 8px; }
.small-section-title { margin: 15px 0 9px; color: #aaa6b3; font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; }
.policy-row { padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f2f0f5; color: #716d7c; font-size: 9px; }
.policy-row:last-child { border-bottom: 0; }
.toggle-demo { width: 27px; height: 15px; flex: none; position: relative; border-radius: 20px; background: #ddd9e7; }
.toggle-demo::after { content: ''; width: 11px; height: 11px; position: absolute; left: 2px; top: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 2px #bbb; }
.toggle-demo.on { background: #8e7ad1; }
.toggle-demo.on::after { left: 14px; }

/* Settings */
.channel-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 15px; }
.channel-card { min-height: 139px; padding: 15px; }
.channel-card-head { display: flex; align-items: center; justify-content: space-between; }
.channel-brand { display: flex; align-items: center; gap: 9px; }
.channel-logo { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #fff; }
.channel-logo.ig { background: linear-gradient(140deg,#7351bd,#d95e89 67%,#f1ab52); }
.channel-logo.viber { background: #7654ba; }
.channel-logo svg { width: 17px; height: 17px; }
.channel-brand strong { display: block; color: #484456; font-size: 10px; }
.channel-brand small { display: block; margin-top: 3px; color: #a19dab; font-size: 8px; }
.connection-demo { padding: 4px 7px; border-radius: 5px; color: #8c83a2; background: #f2eff8; font-size: 7px; font-weight: 700; letter-spacing: .35px; }
.channel-description { min-height: 29px; margin: 13px 0 10px; color: #9b97a5; font-size: 8px; line-height: 1.5; }
.channel-card-foot { padding-top: 9px; border-top: 1px solid #f1eff4; display: flex; justify-content: space-between; color: #aaa6b3; font-size: 8px; }
.access-list { display: grid; gap: 0; }
.access-row { min-height: 49px; display: grid; grid-template-columns: minmax(0,1fr) 120px 100px; align-items: center; gap: 12px; border-bottom: 1px solid #f2f0f5; }
.access-row:last-child { border-bottom: 0; }
.access-row.inactive .access-person strong { color: #8b8794; }
.user-access-button { min-height: 27px; padding: 0 8px; font-size: 8px; white-space: nowrap; }
.user-access-button:disabled { cursor: not-allowed; opacity: .55; }
.access-person { display: flex; align-items: center; gap: 8px; }
.access-person strong { display: block; color: #555162; font-size: 9px; }
.access-person small { display: block; margin-top: 3px; color: #a5a1ae; font-size: 8px; }
.access-role,.access-permissions { color: #8d8998; font-size: 8px; }
.session-row { grid-template-columns: minmax(0,1fr) 100px 150px; }
.session-row .access-person { min-width: 0; }
.session-row .access-person span { min-width: 0; }
.session-row .access-person small { overflow-wrap: anywhere; }
.session-row .access-permissions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.access-state { display: flex; align-items: center; gap: 5px; color: #61977f; font-size: 8px; }
.access-state i { width: 6px; height: 6px; border-radius: 50%; background: #71b393; }
.settings-note { margin-top: 14px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid #f1ecdd; border-radius: 8px; color: #988a6b; background: #fffdf6; font-size: 8px; line-height: 1.5; }
.settings-note svg { width: 14px; height: 14px; flex: none; color: #c19a57; }
.security-card { margin-top: 14px; overflow: hidden; }
.security-grid { padding: 0 17px 15px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.security-grid article { padding: 12px; border: 1px solid #efedf3; border-radius: 8px; background: #fcfbfe; }
.security-grid strong { color: #514c60; font-size: 10px; }
.security-grid p { margin: 6px 0 0; color: #918c9e; font-size: 9px; line-height: 1.5; }
.security-warning { margin: 0 17px 16px; padding: 10px 12px; border-radius: 7px; color: #8e703c; background: #fff7e8; font-size: 9px; line-height: 1.5; }
.access-settings .card-body { display: grid; gap: 8px; }
.access-settings label { color: #716c7d; font-size: 10px; }
.access-settings textarea { width: 100%; padding: 9px 10px; border: 1px solid #e9e6ef; border-radius: 8px; color: #4d485b; background: #fff; resize: vertical; font: 11px 'DM Sans', sans-serif; }
.access-save-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.access-save-row span { color: #918c9b; font-size: 9px; }
.audit-block { margin: 0 17px 16px; padding-top: 12px; border-top: 1px solid #efedf3; }
.audit-block > strong { display: block; margin-bottom: 7px; color: #514c60; font-size: 10px; }
.audit-row { display: grid; grid-template-columns: minmax(120px,1.1fr) minmax(120px,.8fr) 110px minmax(135px,.8fr); gap: 9px; padding: 8px 0; border-top: 1px solid #f3f1f5; color: #817c8d; font-size: 9px; }
.audit-row span:first-child b,.audit-row span:first-child small { display: block; }
.audit-row span:first-child b { color: #514c60; font-weight: 600; }
.audit-row span:first-child small { overflow: hidden; max-width: 260px; margin-top: 3px; color: #9994a3; text-overflow: ellipsis; white-space: nowrap; }
.audit-row time { color: #9994a3; }
.preference-card { margin-bottom: 20px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.preference-card strong { display: block; color: #4d485c; font-size: 11px; }
.preference-card small { display: block; margin-top: 4px; color: #9691a1; font-size: 9px; }
.theme-switch { display: flex; gap: 7px; }
.theme-switch .button[aria-pressed="true"] { color: #fff; border-color: var(--purple); background: var(--purple); }
.funnel-card { margin-bottom: 15px; overflow: hidden; }
.funnel-metrics { padding: 6px 17px 14px; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 12px; }
.funnel-metrics > div { min-height: 63px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 9px; border: 1px solid #f0eef4; border-radius: 8px; background: #fcfbfe; }
.funnel-metrics small { color: #918c9e; font-size: 9px; }
.funnel-metrics strong { color: #413b53; font: 700 18px Manrope,sans-serif; }
.funnel-caption { margin: 0; padding: 0 17px 15px; color: #9a96a4; font-size: 9px; line-height: 1.5; }
.demo-stat-label { margin: 6px 0 10px; color: #a39eae; font-size: 9px; }
.source-chip { padding: 2px 5px; border-radius: 4px; color: #6f6a7e; background: #f0eef4; font-size: 7px; white-space: nowrap; }
.source-chip.paid { color: #986a25; background: #fff3dd; }

.empty-placeholder { color: #aaa6b3; }
.sidebar-scrim { display: none; }

@media (max-width: 1220px) {
  .sidebar { width: 224px; }
  .main-area { margin-left: 224px; }
  .page-content { padding-right: 23px; padding-left: 23px; }
  .inbox-shell { grid-template-columns: 255px minmax(300px,1fr); }
  .contact-panel { display: none; }
  .contact-panel-trigger { display: inline-flex; align-items: center; }
  .inbox-shell.show-contact .contact-panel { display: block; position: absolute; top: 0; right: 0; bottom: 0; z-index: 3; width: min(330px, 100%); overflow: auto; box-shadow: -12px 0 30px #29223922; }
  .inbox-shell.show-contact .contact-panel-close { display: inline-flex; }
  .chat-panel { border-right: 0; }
}
@media (max-width: 880px) {
  .sidebar { width: 205px; }
  .main-area { margin-left: 205px; }
  .topbar { padding: 0 20px; }
  .page-content { padding: 23px 18px; }
  .inbox-shell { grid-template-columns: 235px minmax(290px,1fr); }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .funnel-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .two-column { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .channel-card { min-height: 118px; }
}
@media (max-width: 680px) {
  body { min-width: 0; }
  .sidebar { transform: translateX(-101%); width: 260px; transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim.visible { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(30,27,45,.35); }
  .main-area { margin-left: 0; }
  .topbar { height: 57px; padding: 0 14px; }
  .mobile-menu { display: grid; width: 30px; margin-right: 7px; }
  .breadcrumbs { margin-right: auto; }
  .topbar-date { display: none; }
  .topbar-right { gap: 10px; }
  .demo-pill { height: 23px; padding: 0 7px; font-size: 7px; }
  .topbar-avatar { width: 27px; height: 27px; }
  .page-content { padding: 18px 13px 25px; }
  .page-heading { margin-bottom: 15px; }
  h1 { font-size: 21px; }
  .page-subtitle { max-width: 260px; font-size: 10px; }
  .heading-actions .button { padding: 0 8px; }
  .report-actions { justify-content: flex-start; }
  .inbox-title-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .inbox-tools { grid-column: 1 / -1; width: 100%; gap: 5px; }
  .searchbox { width: auto; min-width: 120px; flex: 1; }
  .inbox-filter { min-width: 0; max-width: 140px; flex: 1; }
  .inbox-shell { min-height: 620px; display: block; }
  .conversation-list { min-height: 620px; border: 0; }
  .chat-panel { display: none; min-height: 620px; }
  .inbox-shell.show-thread .conversation-list { display: none; }
  .inbox-shell.show-thread .chat-panel { display: flex; }
  .back-to-list { display: grid; }
  .inbox-shell.show-thread.show-contact .contact-panel { display: block; width: 100%; }
  .chat-header { padding: 10px 10px; gap: 7px; }
  .message-area { padding-right: 13px; padding-left: 13px; }
  .metric-card { padding: 13px; }
  .metric-value { font-size: 21px; }
  .metric-change { right: 10px; }
  .reminder-item { grid-template-columns: 48px minmax(0,1fr) auto; gap: 8px; }
  .due-reminder-banner { align-items: flex-start; flex-direction: column; }
  .due-reminder-actions { width: 100%; }
  .due-reminder-actions .button { flex: 1; }
  .reminder-person { display: none; }
  .reminder-more { display: none; }
  .reminder-more { grid-column: 3; grid-row: 1; }
  .assistant-banner { padding: 14px; align-items: flex-start; }
  .assistant-online { display: none; }
  .data-table th,.data-table td { padding-right: 9px; padding-left: 9px; }
  .access-row { grid-template-columns: minmax(0,1fr) auto; gap: 7px; padding: 8px 0; }
  .access-role { grid-column: 2; grid-row: 1; }
  .access-permissions { display: block; grid-column: 1 / -1; grid-row: 2; }
  .session-row { grid-template-columns: minmax(0,1fr) auto; }
  .session-row .access-permissions { justify-content: flex-start; }
}
@media (max-width: 360px) {
  .topbar { padding-right: 8px; padding-left: 8px; }
  .mobile-menu { width: 28px; margin-right: 4px; }
  .topbar-right { gap: 5px; }
  .demo-pill { display: none; }
  .icon-button { width: 28px; }
  .topbar-avatar { width: 24px; height: 24px; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8e5ef;
  --muted: #aaa5b8;
  --line: #393642;
  --paper: #24222d;
  --canvas: #191821;
  --purple-soft: #332d49;
  --green-soft: #24382f;
  --amber-soft: #3c3021;
  --shadow: 0 10px 35px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] body,
html[data-theme="dark"] .main-area { color: var(--ink); background: var(--canvas); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .surface,
html[data-theme="dark"] .contact-panel,
html[data-theme="dark"] .chat-panel,
html[data-theme="dark"] .searchbox,
html[data-theme="dark"] .inbox-filter,
html[data-theme="dark"] .button,
html[data-theme="dark"] .composer,
html[data-theme="dark"] .composer-box,
html[data-theme="dark"] .report-date,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .login-card input,
html[data-theme="dark"] .mfa-secret,
html[data-theme="dark"] .mfa-secret code,
html[data-theme="dark"] .mfa-recovery-list,
html[data-theme="dark"] .mfa-recovery-list code,
html[data-theme="dark"] .composer-toolbar button,
html[data-theme="dark"] .composer-popover,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .modal-fields input,
html[data-theme="dark"] .modal-fields select,
html[data-theme="dark"] .modal-fields textarea { color: var(--ink); background-color: #24222d; border-color: #393642; }
html[data-theme="dark"] .topbar { background: rgba(31, 29, 39, .96); }
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .breadcrumbs strong,
html[data-theme="dark"] .person-name,
html[data-theme="dark"] .chat-person strong,
html[data-theme="dark"] .contact-card-head strong,
html[data-theme="dark"] .preference-card strong,
html[data-theme="dark"] .card-header h2,
html[data-theme="dark"] .reminder-content strong,
html[data-theme="dark"] .script-item strong { color: #eeeaf6; }
html[data-theme="dark"] .conversation-item,
html[data-theme="dark"] .conversation-tabs,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .chat-status-line,
html[data-theme="dark"] .contact-section,
html[data-theme="dark"] .access-row,
html[data-theme="dark"] .detail-row,
html[data-theme="dark"] .legend-row,
html[data-theme="dark"] .policy-row,
html[data-theme="dark"] .reminder-item { border-color: #393642; }
html[data-theme="dark"] .reminder-conversation-link { color: #c4b7ff; }
html[data-theme="dark"] .contact-panel-trigger,
html[data-theme="dark"] .contact-panel-close { border-color: #494155; color: #d0c0ef; background: #302b3a; }
html[data-theme="dark"] .conversation-item.selected,
html[data-theme="dark"] .emoji-choice,
html[data-theme="dark"] .quick-reply-item:hover,
html[data-theme="dark"] .message-row .bubble,
html[data-theme="dark"] .demo-data-note,
html[data-theme="dark"] .phone-match-note,
html[data-theme="dark"] .note-box,
html[data-theme="dark"] .handoff-card,
html[data-theme="dark"] .reminder-summary,
html[data-theme="dark"] .modal-close { color: var(--ink); background: #2c2937; }
html[data-theme="dark"] .due-reminder-banner { border-color: #61503a; color: #f0d7ae; background: #332e27; }
html[data-theme="dark"] .due-reminder-copy small { color: #c6a56f; }
html[data-theme="dark"] .demo-data-note { border-color: #393642; }
html[data-theme="dark"] .demo-source-chip,
html[data-theme="dark"] .demo-conversation-banner { border-color: #494155; color: #d0c0ef; background: #302b3a; }
html[data-theme="dark"] .demo-toggle { color: #c2aff2; }
html[data-theme="dark"] .phone-match-note { color: #c9bbeb; }
html[data-theme="dark"] .phone-match-link { color: #c2aff2; }
html[data-theme="dark"] .conversation-preview,
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .detail-row span,
html[data-theme="dark"] .chat-person small,
html[data-theme="dark"] .reminder-content p,
html[data-theme="dark"] .access-person strong,
html[data-theme="dark"] .access-role,
html[data-theme="dark"] .access-permissions,
html[data-theme="dark"] .card-header small,
html[data-theme="dark"] .breadcrumbs,
html[data-theme="dark"] .topbar-date { color: #b5b0c2; }
html[data-theme="dark"] .status-chip { color: #d1c8f2; background: #393249; }
html[data-theme="dark"] .status-chip.closed { color: #a9d8c1; background: #294035; }
html[data-theme="dark"] .status-chip.handoff { color: #f0b49b; background: #49352e; }
html[data-theme="dark"] .modal-fields label { color: #c8c2d4; }
html[data-theme="dark"] .settings-note { border-color: #4b402d; color: #d4c295; background: #302a20; }
html[data-theme="dark"] .theme-switch .button:not([aria-pressed="true"]) { color: var(--ink); }
html[data-theme="dark"] .funnel-metrics > div { border-color: #393642; background: #2a2834; }
html[data-theme="dark"] .funnel-metrics strong { color: #eeeaf6; }
html[data-theme="dark"] .login-card h1 { color: #eeeaf6; }
html[data-theme="dark"] .login-card label { color: #c8c2d4; }
html[data-theme="dark"] .login-card p { color: #b5b0c2; }
html[data-theme="dark"] .mfa-secret small,
html[data-theme="dark"] .mfa-secret p { color: #b5b0c2; }
html[data-theme="dark"] .source-chip { color: #d0cadd; background: #3a3744; }
html[data-theme="dark"] .source-chip.paid { color: #f0cf94; background: #463820; }
html[data-theme="dark"] .security-grid article { border-color: #393642; background: #2a2834; }
html[data-theme="dark"] .security-grid strong { color: #eeeaf6; }
html[data-theme="dark"] .security-grid p { color: #b5b0c2; }
html[data-theme="dark"] .security-warning { color: #e5ce9e; background: #393020; }
html[data-theme="dark"] .access-settings textarea { color: var(--ink); background: #24222d; border-color: #393642; }
html[data-theme="dark"] .access-settings label { color: #b5b0c2; }
html[data-theme="dark"] .audit-block { border-color: #393642; }
html[data-theme="dark"] .audit-block > strong,html[data-theme="dark"] .audit-row span:first-child b { color: #eeeaf6; }
html[data-theme="dark"] .audit-row { border-color: #393642; }

.assistant-script-list { display: grid; gap: 8px; }
.assistant-script { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px; border: 1px solid #eeecf2; border-radius: 10px; }
.assistant-script > div { min-width: 0; }
.assistant-script strong { color: #393449; font-size: 12px; }
.assistant-script p { margin: 5px 0; color: #696477; font-size: 11px; line-height: 1.5; white-space: pre-wrap; }
.assistant-script small { color: #8e8999; font-size: 10px; line-height: 1.5; }
.assistant-test-label { display: block; margin-bottom: 7px; color: #655f70; font-size: 11px; font-weight: 650; }
.assistant-test-input { width: 100%; min-height: 92px; margin-bottom: 10px; padding: 10px; resize: vertical; border: 1px solid #e8e5ed; border-radius: 8px; color: #393449; font: inherit; font-size: 12px; }
.assistant-result { margin-top: 12px; padding: 12px; border: 1px solid #dfebdf; border-radius: 9px; background: #f5faf5; }
.assistant-result.handoff { border-color: #f0e3c9; background: #fffaf0; }
.assistant-result strong,.assistant-result small { display: block; color: #393449; font-size: 11px; }
.assistant-result p { margin: 6px 0; color: #6b6576; font-size: 10px; line-height: 1.5; }
.assistant-result blockquote { margin: 8px 0 0; padding-left: 9px; border-left: 2px solid #cfc7e7; color: #4b4659; font-size: 11px; line-height: 1.5; }
.assistant-result small { margin-top: 8px; color: #777183; font-size: 9px; }
.assistant-feedback { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 10px; border: 1px solid #e8e3f0; border-radius: 8px; color: #655b82; background: #f8f6fb; font-size: 10px; }
.assistant-feedback[hidden] { display: none; }
.assistant-feedback strong { color: #48405e; }
.assistant-feedback span { flex: 1 1 180px; line-height: 1.45; }
.assistant-handoff-actions { display: flex; width: 100%; align-items: center; flex-wrap: wrap; gap: 7px; }
.assistant-handoff-actions small { flex: 1 1 100%; color: #777183; font-size: 9px; line-height: 1.4; }
.assistant-handoff-recorded { color: #59927e; font-size: 9px; font-weight: 700; }
.assistant-draft-button { display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid #ded8ee; border-radius: 7px; color: #655b82; background: #f8f6fb; font-size: 9px; cursor: pointer; }
html[data-theme="dark"] .assistant-script { border-color: #393642; }
html[data-theme="dark"] .assistant-script strong,html[data-theme="dark"] .assistant-result strong,html[data-theme="dark"] .assistant-result blockquote { color: #eeeaf6; }
html[data-theme="dark"] .assistant-script p,html[data-theme="dark"] .assistant-script small,html[data-theme="dark"] .assistant-result p { color: #b5b0c2; }
html[data-theme="dark"] .assistant-test-input { border-color: #393642; color: #eeeaf6; background: #24222d; }
html[data-theme="dark"] .assistant-result { border-color: #385343; background: #202d25; }
html[data-theme="dark"] .assistant-result.handoff { border-color: #584b31; background: #302a20; }
html[data-theme="dark"] .assistant-feedback { border-color: #393642; color: #d0cadd; background: #2a2834; }
html[data-theme="dark"] .assistant-feedback strong { color: #eeeaf6; }

@media (max-width: 680px) {
  .preference-card { align-items: flex-start; flex-direction: column; }
  .theme-switch { width: 100%; }
  .theme-switch .button { flex: 1; }
  .inbox-title-row { flex-wrap: wrap; }
  .inbox-title-row > .button { margin-left: auto; }
  .funnel-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .security-grid { grid-template-columns: 1fr; }
  .audit-row { grid-template-columns: minmax(100px,1fr) minmax(100px,1fr); }
  .audit-row time { grid-column: 2; }
}
