/* Tailwind is loaded separately via the Play CDN in each HTML file. */

:root { --background: #f2f6f9; --foreground: #1f2933; }
* { box-sizing: border-box; }
html { background: var(--background); }
html.dark-console,html.dark-console body { background: #07111b; color-scheme: dark; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button, select, input[type="checkbox"] { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #4aa8e8; outline-offset: 2px; }
input[type="checkbox"] { accent-color: #0078d4; }
::view-transition-old(root),::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
html.theme-switching *,html.theme-switching *::before,html.theme-switching *::after { transition: none !important; }

.header-search { display: flex; height: 32px; align-items: center; }
.header-search-input { height: 32px; border: 1px solid #4c5f70; border-radius: 6px; background: rgba(10,24,37,.72); padding: 0 48px 0 36px; color: #f2f7fa; font-size: 12px; line-height: 32px; outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.header-search-input::placeholder { color: #aebdca; opacity: 1; }
.header-search-input:focus { border-color: #68b9ee; background: #0a1b2a; box-shadow: 0 0 0 3px rgba(74,168,232,.13); }
.header-search-icon,.header-search-shortcut { position: absolute; top: 50%; transform: translateY(-50%); }
.header-search-icon { left: 12px; display: grid; width: 14px; height: 14px; place-items: center; color: #aebdca; font-size: 12px; line-height: 1; pointer-events: none; }
.header-search-shortcut { right: 8px; display: inline-flex; height: 20px; align-items: center; border: 1px solid #526a7d; border-radius: 4px; padding: 0 6px; color: #b9c8d3; background: rgba(255,255,255,.04); font-size: 9px; line-height: 1; }
.workspace-meta { color: #68717d; }
.workspace-trigger { border-color: transparent; background: transparent; }
.workspace-trigger:hover { border-color: #d6e1e9; background: #fff; }
.workspace-trigger.is-open { border-color: #79bce8; background: #eef8ff; box-shadow: 0 0 0 2px rgba(0,120,212,.08); }
.workspace-avatar { background: linear-gradient(135deg,#0078d4,#4eb3ed); }
.workspace-trigger-chevron { color: #68717d; }
.workspace-menu { border-color: #c8d4de; background: #fff; color: #273642; }
.workspace-menu-heading { border-color: #e1e7ec; color: #71808d; }
.workspace-option { transition: background .16s ease,color .16s ease; }
.workspace-option:hover { background: #f2f7fb; }
.workspace-option.is-selected { background: #eef7fd; }
.workspace-option-avatar { background: #e9eef2; color: #52606b; }
.workspace-option-avatar.is-selected { background: #0078d4; color: #fff; }
.workspace-option-meta { color: #71808d; }
.workspace-option-check,.workspace-manage { color: #0969da; }
.workspace-menu-footer { border-color: #e1e7ec; background: #f8fafb; }
.workspace-manage:hover { background: #fff; }
.conversation-name { color: #23313c; }
.conversation-id { color: #7b8994; }
.conversation-intent { color: #33434f; }
.conversation-time { color: #3e4c57; }
.conversation-duration { color: #82909b; }
.conversation-sentiment.is-positive { color: #256f3a; }
.conversation-sentiment.is-neutral { color: #8a6500; }
.conversation-row-action { color: #657581; }
.conversation-row-action.is-open { background: #e8f3fa; color: #0872bd; opacity: 1; box-shadow: inset 0 0 0 1px #c9e3f3; }
.row-action-menu { position: absolute; right: 42px; top: 9px; z-index: 20; width: 154px; overflow: hidden; border: 1px solid #c7d2da; border-radius: 9px; padding: 5px; background: #fff; box-shadow: 0 14px 34px rgba(17,44,67,.20); }
.row-action-menu.open-up { top: auto; bottom: 9px; }
.row-action-menu button { display: flex; width: 100%; height: 32px; align-items: center; gap: 8px; border-radius: 6px; padding: 0 8px; color: #34434e; font-size: 9px; font-weight: 650; text-align: left; }
.row-action-menu button:hover { background: #eff6fa; color: #0969da; }
.row-action-menu > span { display: block; height: 1px; margin: 4px 2px; background: #e2e8ed; }
.row-action-menu button.danger { color: #b4232c; }
.row-action-menu button.danger:hover { background: #fff0f1; color: #981b24; }
.console-footer { color: #6e7781; }
.agent-avatar { border: 1px solid #284b66; background: #0d2b43; color: #b7f23a; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.breadcrumb { color: #657480; }
.breadcrumb-link { color: #0969da; font-weight: 600; }
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-separator { color: #a1adb6; }
.breadcrumb-muted { color: #6d7a85; }
.breadcrumb-current { color: #27333d; font-weight: 750; }
.account-trigger { transition: background .16s ease; }
.account-trigger:hover,.account-trigger.is-open { background: #202f3e; }
.account-menu { border-color: #405569; background: #102334; color: #edf4f8; box-shadow: 0 18px 44px rgba(0,0,0,.36); }
.account-menu-profile { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #294052; padding: 13px; }
.account-menu-profile > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 999px; background: linear-gradient(135deg,#348fe0,#276ac5); color: #fff; font-size: 10px; font-weight: 800; }
.account-menu-profile strong,.account-menu-profile small { display: block; }
.account-menu-profile strong { font-size: 11px; }
.account-menu-profile small { margin-top: 2px; color: #9eb0bd; font-size: 9px; }
.account-menu-items { padding: 5px; }
.account-menu-items button,.account-menu-footer button { display: flex; width: 100%; height: 36px; align-items: center; gap: 9px; border-radius: 7px; padding: 0 9px; color: #c9d6df; font-size: 10px; font-weight: 600; text-align: left; }
.account-menu-items button:hover,.account-menu-footer button:hover { background: #193247; color: #fff; }
.account-menu-footer { border-top: 1px solid #294052; padding: 5px; }
.account-menu-footer button { color: #f0a7a7; }
.create-dialog { border-color: #c3ced6; background: #fff; color: #26323c; overflow: hidden; }
.dialog-heading,.dialog-footer { border-color: #d8dee4; }
.dialog-description,.option-meta { color: #6e7781; }
.option-kicker { color: #59636e; }
.dialog-footer { background: #f6f8fa; }
.live-status-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #a6d2b3; border-radius: 999px; background: #eef9f1; padding: 3px 8px; color: #277544; font-size: 9px; font-weight: 800; }
.page-subtitle { color: #65737e; }
.live-command-card { display: grid; gap: 22px; border: 1px solid #1b4f72; border-radius: 15px; padding: 22px; background: radial-gradient(circle at 80% 10%,rgba(53,151,215,.25),transparent 36%),linear-gradient(125deg,#0b1d2c,#123d5b); color: #fff; box-shadow: 0 16px 40px rgba(12,42,68,.18); }
.live-eyebrow { display: flex; align-items: center; gap: 8px; color: #b9f25b; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.live-pulse { width: 8px; height: 8px; border-radius: 999px; background: #75d68d; box-shadow: 0 0 0 5px rgba(117,214,141,.12); }
.live-command-card h2 { margin-top: 10px; font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.live-command-card > div:first-child > p:last-child { margin-top: 7px; color: #b6c8d5; font-size: 10px; }
.live-command-stats { display: grid; grid-template-columns: repeat(4,1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; background: rgba(5,18,28,.34); }
.live-command-stats div { padding: 13px; border-right: 1px solid rgba(255,255,255,.09); }
.live-command-stats div:last-child { border-right: 0; }
.live-command-stats strong,.live-command-stats span { display: block; }
.live-command-stats strong { font-size: 18px; }
.live-command-stats span { margin-top: 3px; color: #9fb5c5; font-size: 8px; font-weight: 650; }
.live-panel { overflow: hidden; border: 1px solid #cfdae3; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(25,61,89,.06); }
.live-panel-head { display: flex; min-height: 62px; align-items: center; justify-content: space-between; border-bottom: 1px solid #dce4ea; padding: 12px 15px; }
.live-panel-head h2 { color: #26333d; font-size: 13px; font-weight: 750; }
.live-panel-head p { margin-top: 3px; color: #73818b; font-size: 9px; }
.live-panel-head > button,.healthy-label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c5d1da; border-radius: 7px; padding: 7px 9px; color: #43535f; font-size: 9px; font-weight: 700; }
.healthy-label { border-color: #b9d9c2; background: #eef9f1; color: #277544; }
.live-session-row { position: relative; display: grid; width: 100%; grid-template-columns: 34px minmax(150px,1fr) 76px 76px 76px; align-items: center; gap: 10px; border-bottom: 1px solid #e5ebef; padding: 12px 14px; color: #34444f; text-align: left; }
.live-session-row:last-child { border-bottom: 0; }
.live-session-row:hover { background: #f4f9fc; }
.live-row-indicator { position: absolute; inset-block: 10px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: #35b76f; }
.live-session-avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #e8f3fa; color: #1475b8; font-size: 9px; font-weight: 800; }
.live-session-person strong,.live-session-person small,.live-session-metric strong,.live-session-metric small { display: block; }
.live-session-person strong { color: #293640; font-size: 10px; }
.live-session-person small { margin-top: 3px; color: #77858f; font-size: 8px; }
.live-session-metric { display: grid; grid-template-columns: 15px 1fr; color: #7a8a95; }
.live-session-metric strong { color: #40505c; font-size: 9px; }
.live-session-metric small { grid-column: 2; color: #87949e; font-size: 7px; }
.live-listen { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 6px; background: #edf6fc; padding: 7px; color: #0872bd; font-size: 8px; font-weight: 750; }
.queue-list { display: grid; gap: 17px; padding: 16px; }
.queue-row-head { display: flex; justify-content: space-between; }
.queue-row-head span:last-child { text-align: right; }
.queue-row-head strong,.queue-row-head small { display: block; }
.queue-row-head strong { color: #34434e; font-size: 10px; }
.queue-row-head small { margin-top: 2px; color: #7d8993; font-size: 8px; }
.queue-track { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #e8eef2; }
.queue-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#1688d9,#4eb3ed); }
.routing-button { display: flex; width: calc(100% - 32px); height: 38px; align-items: center; gap: 8px; margin: 0 16px 16px; border: 1px solid #c5d3dc; border-radius: 8px; padding: 0 10px; color: #0969da; font-size: 9px; font-weight: 750; }
.routing-button svg:last-child { margin-left: auto; }
@media (min-width: 768px) { .live-command-card { grid-template-columns: 1fr minmax(420px,.8fr); align-items: center; } }
@media (max-width: 720px) { .live-command-stats { grid-template-columns: repeat(2,1fr); } .live-command-stats div:nth-child(2) { border-right: 0; } .live-session-row { grid-template-columns: 34px 1fr 68px; } .live-session-metric:nth-of-type(2),.live-listen { display: none; } }

/* Unified console controls */
.overview-actions { padding: 4px; border: 1px solid rgba(137,158,173,.34); border-radius: 13px; background: rgba(255,255,255,.64); box-shadow: 0 8px 24px rgba(28,58,80,.07),inset 0 1px 0 rgba(255,255,255,.9); backdrop-filter: blur(12px); }
.ui-button { position: relative; display: inline-flex; min-width: max-content; height: 40px; align-items: center; justify-content: center; gap: 8px; overflow: hidden; border: 1px solid transparent; border-radius: 9px; padding: 0 15px; font-size: 11px; font-weight: 750; line-height: 1; letter-spacing: -.005em; box-shadow: 0 1px 2px rgba(20,43,61,.08); transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
.ui-button:hover { transform: translateY(-1px); }
.ui-button:active { transform: translateY(0); box-shadow: none; }
.ui-button-primary { border-color: #0465b1; background: linear-gradient(145deg,#168ce0 0%,#0874c9 52%,#0563ad 100%); color: #fff; box-shadow: 0 1px 1px rgba(255,255,255,.22) inset,0 7px 16px rgba(0,103,184,.23),0 1px 2px rgba(0,46,82,.22); }
.ui-button-primary::after { position: absolute; inset: 0; background: linear-gradient(110deg,transparent 18%,rgba(255,255,255,.14) 48%,transparent 72%); content: ""; transform: translateX(-110%); transition: transform .35s ease; }
.ui-button-primary:hover { border-color: #005a9f; background: linear-gradient(145deg,#1183d5,#0569bb); box-shadow: 0 10px 22px rgba(0,103,184,.28),0 1px 2px rgba(0,46,82,.22); }
.ui-button-primary:hover::after { transform: translateX(110%); }
.ui-button-primary > * { position: relative; z-index: 1; }
.ui-button-secondary { border-color: #c0ccd5; background: rgba(255,255,255,.88); color: #25313b; box-shadow: 0 1px 2px rgba(20,43,61,.07),inset 0 1px 0 #fff; }
.ui-button-secondary:hover { border-color: #8298a8; background: #fff; box-shadow: 0 7px 16px rgba(29,55,74,.11); }
.ui-button-danger { border-color: #a11f26; background: linear-gradient(145deg,#dc3b44 0%,#b62a32 55%,#9a1e26 100%); color: #fff; box-shadow: 0 1px 1px rgba(255,255,255,.18) inset,0 7px 16px rgba(158,30,38,.24),0 1px 2px rgba(70,10,14,.20); }
.ui-button-danger:hover { border-color: #8a1a20; background: linear-gradient(145deg,#c93038,#a3222a); box-shadow: 0 10px 22px rgba(158,30,38,.30),0 1px 2px rgba(70,10,14,.22); }
.ui-button-danger .ui-button-icon { background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.dark-console .ui-button-danger { border-color: #b23138; }
.ui-button-icon { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 1; }
.ui-button-icon svg { width: 15px; height: 15px; }
.ui-button-secondary .ui-button-icon { background: #edf4f8; color: #1677bd; }
.ui-button-primary .ui-button-icon { background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ui-select,.ui-input { height: 40px; border: 1px solid #c0ccd5; border-radius: 9px; background-color: rgba(255,255,255,.9); color: #25313b; font-size: 11px; font-weight: 650; line-height: 1; outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.9),0 1px 2px rgba(20,43,61,.05); transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
.ui-select { min-width: 142px; padding: 0 30px 0 12px; }
.select-control { position: relative; display: block; }
.select-control-input { appearance: none; padding-right: 40px; }
.select-control-arrow { position: absolute; right: 13px; top: 50%; display: grid; width: 16px; height: 16px; place-items: center; color: #61727e; transform: translateY(-50%); pointer-events: none; }
.date-control { position: relative; display: block; }
.date-control-icon { position: absolute; left: 12px; top: 50%; z-index: 1; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 5px; background: #edf4f8; color: #1677bd; font-size: 12px; transform: translateY(-50%); pointer-events: none; }
.date-select { min-width: 158px; padding-left: 38px; }
.ui-input { min-width: 0; padding-top: 0; padding-bottom: 0; }
.ui-select:hover,.ui-input:hover { border-color: #8ba0af; }
.ui-select:focus,.ui-input:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.12); }
.ui-input::placeholder { color: #7e8c97; font-weight: 500; }
.conversation-actions { width: min(100%,610px); justify-content: flex-end; }
.ui-search { max-width: 300px; }
.pagination-button { display: inline-grid; min-width: 34px; height: 34px; place-items: center; border: 1px solid #bac6cf; border-radius: 6px; background: #fff; color: #34434e; padding: 0 9px; font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 1px 2px rgba(20,43,61,.05); transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease; }
.pagination-button:hover:not(:disabled):not(.active) { border-color: #7d94a5; background: #f3f8fb; color: #0969da; transform: translateY(-1px); }
.pagination-button.active { border-color: #0067b8; background: #0078d4; color: #fff; box-shadow: 0 3px 9px rgba(0,120,212,.22); }
.pagination-button:disabled { cursor: not-allowed; border-color: #d8e0e6; background: #f4f6f8; color: #9ca8b1; box-shadow: none; }
.pagination-label { display: inline-flex; gap: 6px; padding-inline: 11px; }
.dialog-close { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid transparent; border-radius: 7px; color: #53616c; font-size: 18px; transition: .16s ease; }
.dialog-close:hover { border-color: #d0d8de; background: #f0f4f7; color: #1f2933; }
.option-button { border: 1px solid #c1ccd4; border-radius: 8px; padding: 13px; background: #fff; text-align: left; box-shadow: 0 1px 2px rgba(20,43,61,.04); transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.option-button:hover { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.08),0 5px 14px rgba(28,59,82,.08); transform: translateY(-1px); }
.console-logo { display: grid; grid-template-columns: repeat(3, 4px); align-items: center; gap: 2px; width: 16px; height: 22px; }
.console-logo span { display: block; width: 4px; border-radius: 1px; background: linear-gradient(180deg, #b7f23a, #4aa8e8); }
.console-logo span:nth-child(1) { height: 11px; }
.console-logo span:nth-child(2) { height: 20px; }
.console-logo span:nth-child(3) { height: 15px; }
.sidebar-chevron { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 5px; color: #6b7a86; font-size: 11px; transition: transform .2s ease,background .2s ease; }
.sidebar-chevron.is-open { transform: rotate(180deg); background: rgba(0,120,212,.08); color: #0078d4; }
.sidebar-nav-icon { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border: 1px solid #d7e0e6; border-radius: 7px; background: #edf2f5; color: #52616d; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); transition: border-color .16s ease,background .16s ease,color .16s ease,box-shadow .16s ease; }
.sidebar-nav-icon.is-active { border-color: #b8dcee; background: #fff; color: #0078d4; box-shadow: 0 2px 6px rgba(25,79,115,.09),inset 0 1px 0 #fff; }
.sidebar-dropdown-trigger { color: #3c4a55; }
.sidebar-dropdown-trigger:hover { background: #fff; box-shadow: 0 1px 4px rgba(32,66,90,.06); }
.sidebar-dropdown-trigger.is-child-active { background: linear-gradient(90deg,#e5f4fd,#f3f9fc); color: #0067b8; font-weight: 700; box-shadow: inset 0 0 0 1px #d4eaf7; }
.sidebar-submenu { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .22s ease,opacity .18s ease; }
.sidebar-submenu.is-open { grid-template-rows: 1fr; opacity: 1; }
.sidebar-submenu-inner { min-height: 0; overflow: hidden; margin-left: 20px; padding: 0 0 0 13px; border-left: 1px solid #d6e1e8; transition: padding .2s ease; }
.sidebar-submenu.is-open .sidebar-submenu-inner { padding-top: 6px; padding-bottom: 4px; }
.sidebar-submenu-item { display: flex; width: 100%; height: 34px; align-items: center; gap: 8px; border-radius: 6px; padding: 0 8px; color: #52616d; font-size: 10px; text-align: left; transition: background .16s ease,color .16s ease; }
.sidebar-submenu-item:hover { background: rgba(255,255,255,.82); color: #1e506f; }
.sidebar-submenu-item[aria-current="page"] { background: #edf7fd; color: #0067b8; font-weight: 700; }
.sidebar-submenu-icon { display: grid; width: 19px; height: 19px; place-items: center; color: #7c8c98; font-size: 9px; }
.sidebar-live-count { margin-left: auto; border-radius: 999px; padding: 1px 6px; background: #daf0e3; color: #19713b; font-size: 8px; font-weight: 800; }
.operations-hero { background: radial-gradient(circle at 78% -20%, rgba(39, 137, 210, .38), transparent 40%), linear-gradient(120deg, #0b1c2b 0%, #103c5d 58%, #15273b 100%); }
.hero-action { display: inline-flex; height: 38px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; padding: 0 13px 0 8px; font-size: 10px; font-weight: 750; line-height: 1; transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.hero-action:hover { transform: translateY(-1px); }
.hero-action:active { transform: translateY(0); }
.hero-action:focus-visible { outline: 2px solid #80cfff; outline-offset: 2px; }
.hero-action-icon { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 7px; }
.hero-action-primary { border-color: #9fd927; background: linear-gradient(145deg, #c3f84b, #a8ed24); color: #102235; box-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 7px 16px rgba(133,201,24,.20); }
.hero-action-primary .hero-action-icon { background: rgba(16,34,53,.10); color: #16314a; }
.hero-action-primary:hover { background: linear-gradient(145deg, #ccff59, #b2f52e); box-shadow: inset 0 1px 0 rgba(255,255,255,.56), 0 9px 19px rgba(133,201,24,.26); }
.hero-action-secondary { border-color: rgba(157,190,214,.38); background: rgba(8,25,39,.42); color: #eef6fb; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); backdrop-filter: blur(8px); }
.hero-action-secondary .hero-action-icon { background: rgba(90,180,235,.13); color: #7dd0ff; }
.hero-action-secondary:hover { border-color: rgba(139,204,244,.55); background: rgba(18,47,68,.70); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(4,18,30,.18); }
.hero-orb { position: absolute; border-radius: 999px; filter: blur(1px); pointer-events: none; }
.hero-orb-one { width: 220px; height: 220px; right: 26%; top: -170px; border: 1px solid rgba(183, 242, 58, .18); box-shadow: 0 0 70px rgba(36, 142, 210, .16); }
.hero-orb-two { width: 120px; height: 120px; left: 42%; bottom: -105px; border: 1px solid rgba(90, 180, 235, .16); }
.live-ring { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 999px; background: rgba(183, 242, 58, .12); box-shadow: 0 0 0 4px rgba(183, 242, 58, .05); }
.wave-bar { background: linear-gradient(180deg, #b7f23a, #4aa8e8); opacity: .8; }
.wave-bar:nth-child(3n) { opacity: .42; }
.chart-bar { background: linear-gradient(180deg, #4eb3ed 0%, #0969da 100%); box-shadow: 0 -3px 8px rgba(0,120,212,.10); }
.kpi-card { --accent: #0078d4; --accent-rgb: 0,120,212; position: relative; min-height: 192px; overflow: hidden; border: 1px solid rgba(148, 172, 190, .38); border-radius: 16px; padding: 17px; background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(246,250,253,.92)); box-shadow: 0 10px 30px rgba(25,61,89,.07), inset 0 1px 0 rgba(255,255,255,.9); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.kpi-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .28); box-shadow: 0 18px 38px rgba(25,61,89,.13), inset 0 1px 0 rgba(255,255,255,.9); }
.kpi-card-2 { --accent: #7357d3; --accent-rgb: 115,87,211; }
.kpi-card-3 { --accent: #e87938; --accent-rgb: 232,121,56; }
.kpi-card-4 { --accent: #22a477; --accent-rgb: 34,164,119; }
.kpi-glow { position: absolute; width: 150px; height: 150px; right: -66px; top: -76px; border-radius: 999px; background: radial-gradient(circle, rgba(var(--accent-rgb), .19), rgba(var(--accent-rgb), 0) 70%); pointer-events: none; }
.kpi-label { display: flex; align-items: center; gap: 9px; color: #485762; font-size: 10px; font-weight: 700; }
.kpi-icon { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(var(--accent-rgb), .18); border-radius: 9px; background: rgba(var(--accent-rgb), .09); color: var(--accent); font-size: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.85); }
.kpi-arrow { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 999px; background: rgba(var(--accent-rgb), .08); color: var(--accent); font-size: 11px; transition: transform .2s ease, background .2s ease; }
.kpi-arrow:hover { transform: translate(1px,-1px); background: rgba(var(--accent-rgb), .15); }
.kpi-value { color: #15212b; font-size: clamp(27px,2.2vw,36px); font-weight: 680; letter-spacing: -.055em; line-height: .95; }
.kpi-change { border-radius: 999px; padding: 3px 6px; background: rgba(var(--accent-rgb), .10); color: var(--accent); font-weight: 800; white-space: nowrap; }
.kpi-note,.kpi-context { color: #77858f; }
.kpi-body { display: grid; grid-template-columns: minmax(0,1fr) 96px; align-items: end; gap: 12px; }
.kpi-copy { min-width: 0; }
.kpi-support { display: flex; min-width: 0; align-items: center; gap: 7px; margin-top: 8px; font-size: 8px; }
.kpi-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-visual { display: flex; width: 96px; height: 62px; flex: 0 0 96px; flex-direction: column; justify-content: center; overflow: hidden; border: 1px solid rgba(var(--accent-rgb),.16); border-radius: 11px; background: linear-gradient(180deg,rgba(var(--accent-rgb),.045),rgba(var(--accent-rgb),.10)); color: var(--accent); }
.kpi-visual > small { display: block; overflow: hidden; color: #75848f; font-size: 7px; font-weight: 700; letter-spacing: .01em; line-height: 1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.kpi-trend { padding: 6px 7px 5px; }
.kpi-trend-bars { display: flex; height: 37px; align-items: flex-end; gap: 3px; }
.kpi-trend-bars span { flex: 1; min-width: 2px; border-radius: 2px 2px 1px 1px; background: linear-gradient(180deg,var(--accent),rgba(var(--accent-rgb),.34)); }
.kpi-resolution { align-items: center; gap: 3px; padding: 4px 8px; }
.kpi-resolution-ring { position: relative; display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 999px; background: conic-gradient(var(--accent) 0 91.6%,rgba(var(--accent-rgb),.12) 91.6% 100%); box-shadow: 0 0 16px rgba(var(--accent-rgb),.10); }
.kpi-resolution-ring::before { width: 31px; height: 31px; border-radius: inherit; background: #fff; content: ""; }
.kpi-resolution-ring span { position: absolute; font-size: 8px; font-weight: 850; }
.kpi-calendar { gap: 4px; padding: 6px 9px 5px; }
.kpi-calendar-grid { display: grid; height: 38px; grid-template-columns: repeat(5,1fr); gap: 3px; }
.kpi-calendar-grid span { border-radius: 3px; background: rgba(var(--accent-rgb),.10); }
.kpi-calendar-grid span[data-level="2"] { background: rgba(var(--accent-rgb),.28); }
.kpi-calendar-grid span[data-level="3"] { background: rgba(var(--accent-rgb),.55); }
.kpi-calendar-grid span[data-level="4"] { background: var(--accent); box-shadow: 0 2px 5px rgba(var(--accent-rgb),.18); }
.kpi-speed { gap: 7px; padding: 7px 9px 6px; }
.kpi-speed-head { display: flex; align-items: center; justify-content: space-between; color: #71818c; font-size: 7px; font-weight: 800; line-height: 1; }
.kpi-speed-head strong { color: var(--accent); font-size: 11px; font-weight: 850; }
.kpi-speed-track { position: relative; width: 100%; height: 6px; border-radius: 999px; background: rgba(var(--accent-rgb),.12); }
.kpi-speed-track span { display: block; width: 81%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,rgba(var(--accent-rgb),.42),var(--accent)); }
.kpi-speed-track i { position: absolute; right: 8%; top: -3px; width: 2px; height: 12px; border-radius: 2px; background: #e87938; box-shadow: 0 0 0 2px rgba(232,121,56,.12); }
.kpi-speed > small { text-align: left; }
.kpi-live { display: inline-flex; align-items: center; gap: 5px; color: #4b6858; font-weight: 700; }
.theme-shell,.theme-sidebar,.theme-content,.theme-toolbar,.theme-panel,.kpi-card { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }

/* Complete dark theme */
.dark-console { background: #07111b; color: #e7eef5; color-scheme: dark; }
.dark-console .theme-shell { background: #07111b; color: #e7eef5; }
.dark-console .theme-content { background: radial-gradient(circle at 75% 2%,rgba(16,85,130,.28),transparent 31%),#08131e; color: #e7eef5; }
.dark-console .theme-content h1 { color: #f4f8fb; }
.dark-console .theme-content > div > section:first-of-type p { color: #b3c1cc; }
.dark-console .ui-select,.dark-console .ui-input { border-color: #345064; background-color: #0d1e2b; color: #e4edf4; box-shadow: inset 0 1px 0 rgba(255,255,255,.025); color-scheme: dark; }
.dark-console .ui-select:hover,.dark-console .ui-input:hover { border-color: #4a7088; background-color: #102536; }
.dark-console .ui-select:focus,.dark-console .ui-input:focus { border-color: #4aa8e8; box-shadow: 0 0 0 3px rgba(74,168,232,.13); }
.dark-console .ui-input::placeholder { color: #7f93a3; }
.dark-console .ui-button-secondary { border-color: #3a5569; background: linear-gradient(180deg,#142838,#102230); color: #dce7ef; box-shadow: 0 1px 2px rgba(0,0,0,.20); }
.dark-console .ui-button-secondary:hover { border-color: #5e8299; background: #172d3d; color: #fff; }
.dark-console .ui-button-primary { border-color: #268ed8; background: linear-gradient(180deg,#348fdb,#176fc2); }
.dark-console .overview-actions { border-color: rgba(89,127,151,.35); background: rgba(9,24,36,.7); box-shadow: 0 10px 26px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.035); }
.dark-console .ui-button-secondary .ui-button-icon,.dark-console .date-control-icon { background: #193348; color: #74c5f7; }
.dark-console .select-control-arrow { color: #9fb3c1; }
.dark-console .sidebar-submenu-inner { border-color: #294052; }
.dark-console .sidebar-nav-icon { border-color: #28485c; background: linear-gradient(145deg,#173247,#102737); color: #9ab8ca; box-shadow: inset 0 1px 0 rgba(255,255,255,.035),0 2px 7px rgba(0,0,0,.12); }
.dark-console .sidebar-nav-icon.is-active { border-color: #34799f; background: linear-gradient(145deg,#194b6b,#123650); color: #8bd3fb; box-shadow: 0 0 0 3px rgba(74,168,232,.06),inset 0 1px 0 rgba(255,255,255,.06); }
.dark-console .sidebar-submenu-icon { color: #9bb4c5; }
.dark-console .sidebar-dropdown-trigger { color: #c4d2dc; }
.dark-console .sidebar-dropdown-trigger:hover { background: rgba(255,255,255,.045); box-shadow: none; }
.dark-console .sidebar-dropdown-trigger.is-child-active { background: linear-gradient(90deg,#13334a,#102737); color: #82cff9; box-shadow: inset 0 0 0 1px #2d5269; }
.dark-console .sidebar-submenu-item { color: #8fa4b4; }
.dark-console .sidebar-submenu-item:hover { background: rgba(255,255,255,.045); color: #dbe7ef; }
.dark-console .sidebar-submenu-item[aria-current="page"] { background: rgba(0,120,212,.18); color: #77c8fa; }
.dark-console .sidebar-chevron.is-open { background: rgba(74,168,232,.10); color: #77c8fa; }
.dark-console .sidebar-live-count { background: rgba(51,185,105,.14); color: #78d99e; }
.dark-console .conversation-head { background: linear-gradient(90deg,#0f202d,#102533); }
.dark-console .table-pagination { border-color: #233949; background: #0d1c29; color: #8fa1af; }
.dark-console .table-pagination strong { color: #dce7ef; }
.dark-console .pagination-button { border-color: #3a5263; background: #102230; color: #c6d3dd; box-shadow: none; }
.dark-console .pagination-button:hover:not(:disabled):not(.active) { border-color: #56819b; background: #162b3b; color: #77c8fa; }
.dark-console .pagination-button.active { border-color: #3d9ee3; background: #1978c9; color: #fff; box-shadow: 0 3px 12px rgba(0,120,212,.22); }
.dark-console .pagination-button:disabled { border-color: #263a49; background: #0a1823; color: #506575; }
.dark-console .dialog-close { color: #99aab7; }
.dark-console .dialog-close:hover { border-color: #385163; background: #142735; color: #fff; }
.dark-console .option-button { border-color: #314858; background: #0a1722; color: #e7eef5; box-shadow: none; }
.dark-console .option-button:hover { border-color: #4aa8e8; background: #102433; box-shadow: 0 0 0 3px rgba(74,168,232,.09); }
.dark-console .theme-toolbar { border-color: #294253; background: #0d1d2a; color: #b8c7d2; box-shadow: inset 0 -1px 0 rgba(255,255,255,.015); }
.dark-console .breadcrumb-link { color: #69bdf2; }
.dark-console .breadcrumb-separator { color: #5f7484; }
.dark-console .breadcrumb-muted { color: #a9bbc8; }
.dark-console .breadcrumb-current { color: #f0f5f8; }
.dark-console .theme-sidebar { border-color: #203344; background: linear-gradient(180deg,#0d1b28,#091520); color: #d3dee6; }
.dark-console .theme-sidebar > div { border-color: #203344; }
.dark-console .theme-sidebar button { color: #c8d5de; }
.dark-console .theme-sidebar button:hover { background: rgba(255,255,255,.055); }
.dark-console .theme-sidebar button[aria-current="page"] { background: linear-gradient(90deg,rgba(0,120,212,.23),rgba(44,149,211,.07)); color: #77c8fa; box-shadow: inset 0 0 0 1px rgba(72,166,225,.16); }
.dark-console .theme-sidebar .bg-white { background: #10202e; }
.dark-console .theme-sidebar input,.dark-console .theme-sidebar select { border-color: #2b4051; background: #10202e; color: #e7eef5; }
.dark-console .theme-panel { border-color: #233949; background: #0d1c29; color: #e2ebf2; box-shadow: 0 12px 34px rgba(0,0,0,.20); }
.dark-console .theme-panel > div { border-color: #233949; }
.dark-console .theme-panel h2,.dark-console .theme-panel td { color: #dce7ef; }
.dark-console .theme-panel p,.dark-console .theme-panel th { color: #adbdc8; }
.dark-console .theme-panel thead { border-color: #263b4b; background: #112331; }
.dark-console .theme-panel tbody { border-color: #243847; }
.dark-console .theme-panel tbody tr { border-color: #203442; }
.dark-console .theme-panel tbody tr:hover { background: #12293a; }
.dark-console .theme-panel input,.dark-console .theme-panel select { border-color: #314858; background: #0b1925; color: #dce7ef; }
.dark-console .theme-panel .bg-white { background: #10202e; }
.dark-console [role="dialog"] { border-color: #2a4152; background: #0d1c29; color: #e7eef5; }
.dark-console [role="dialog"] > div { border-color: #293e4e; }
.dark-console [role="dialog"] input,.dark-console [role="dialog"] select { border-color: #314858; background: #0a1722; color: #e7eef5; }
.dark-console .dialog-description,.dark-console .option-meta { color: #aebdca; }
.dark-console .option-kicker { color: #91a6b6; }
.dark-console .dialog-footer { border-color: #2b4354; background: #102330; }
.dark-console .dialog-body label { color: #dce7ee; }
/* iCal link snippet — background/color that reads in both themes. */
.ics-code { background: #f4f8fb; color: #25313b; }
.dark-console .ics-code { background: #0d1e2b; color: #cbd8e1; border: 1px solid #253d51; }
.dark-console .ics-hint { color: #a5b7c4; }
/* Dialog height cascade — cap the outer section to viewport, make the body
   the flex-fill region, and let child flex layouts scroll internally by
   giving the standard `min-h-0` escape hatch. Without this, tall content
   (a 30-turn transcript) grew the dialog past the viewport with no scroll
   anywhere. */
.create-dialog { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dialog-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.dark-console .kpi-card { border-color: rgba(var(--accent-rgb),.18); background: linear-gradient(145deg,rgba(17,35,49,.98),rgba(11,25,37,.98)); box-shadow: 0 14px 34px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.035); }
.dark-console .kpi-card:hover { border-color: rgba(var(--accent-rgb),.40); box-shadow: 0 18px 44px rgba(0,0,0,.30),0 0 32px rgba(var(--accent-rgb),.08); }
.dark-console .kpi-label { color: #c1ced7; }
.dark-console .kpi-icon { border-color: rgba(var(--accent-rgb),.28); background: rgba(var(--accent-rgb),.15); box-shadow: none; }
.dark-console .kpi-value { color: #f3f8fb; }
.dark-console .kpi-visual { border-color: rgba(var(--accent-rgb),.22); background: linear-gradient(180deg,rgba(var(--accent-rgb),.07),rgba(var(--accent-rgb),.12)); }
.dark-console .kpi-visual > small,.dark-console .kpi-speed-head { color: #aebdca; }
.dark-console .kpi-resolution-ring::before { background: #102331; }
.dark-console .kpi-note,.dark-console .kpi-context { color: #bfccd5; }
.dark-console .kpi-context { font-size: 9px; font-weight: 550; }
.dark-console .workspace-meta { color: #aebfcc; }
.dark-console .workspace-meta .bg-\[\#2e8540\] { background: #41c26d; box-shadow: 0 0 0 3px rgba(65,194,109,.12); }
.dark-console .workspace-trigger { border-color: transparent; background: transparent; color: #d8e4ec; }
.dark-console .workspace-trigger:hover { border-color: #345166; background: rgba(255,255,255,.045); }
.dark-console .workspace-trigger.is-open { border-color: #3f91c9; background: linear-gradient(135deg,#112d42,#102536); box-shadow: 0 0 0 2px rgba(74,168,232,.10); }
.dark-console .workspace-trigger-chevron { color: #93a9b9; }
.dark-console .workspace-menu { border-color: #365368; background: #0d1e2b; color: #e5eef4; box-shadow: 0 20px 44px rgba(0,0,0,.42); }
.dark-console .workspace-menu-heading { border-color: #294354; background: #102433; color: #9fb3c2; }
.dark-console .workspace-menu-options { background: #0d1e2b; }
.dark-console .workspace-option { color: #dbe6ed; }
.dark-console .workspace-option:hover { background: #152d3e; }
.dark-console .workspace-option.is-selected { background: linear-gradient(90deg,rgba(0,120,212,.22),rgba(45,147,207,.09)); box-shadow: inset 0 0 0 1px rgba(83,174,228,.13); }
.dark-console .workspace-option-avatar { background: #1c3445; color: #c0d0dc; }
.dark-console .workspace-option-avatar.is-selected { background: linear-gradient(135deg,#1688d9,#2871d1); color: #fff; }
.dark-console .workspace-option-name { color: #e7f0f5; }
.dark-console .workspace-option-meta { color: #99adbb; }
.dark-console .workspace-option-check,.dark-console .workspace-manage { color: #72c5f7; }
.dark-console .workspace-menu-footer { border-color: #294354; background: #102331; }
.dark-console .workspace-manage:hover { background: #183244; color: #9bd8fb; }
.dark-console .conversation-table thead { color: #aebdca; }
.dark-console .conversation-name { color: #edf4f8; }
.dark-console .conversation-id { color: #a5b7c4; }
.dark-console .conversation-intent,.dark-console .conversation-time { color: #c5d3dd; }
.dark-console .conversation-duration { color: #a5b7c4; }
.dark-console .conversation-sentiment.is-positive { color: #66d18c; }
.dark-console .conversation-sentiment.is-neutral { color: #f0b44d; }
.dark-console .conversation-row-action { color: #8fa6b6; }
.dark-console .conversation-row-action.is-open { background: #17364b; color: #78cafa; box-shadow: inset 0 0 0 1px #2b5874; }
.dark-console .row-action-menu { border-color: #365366; background: #102331; box-shadow: 0 18px 38px rgba(0,0,0,.40); }
.dark-console .row-action-menu button { color: #cbd8e1; }
.dark-console .row-action-menu button:hover { background: #193449; color: #85cff9; }
.dark-console .row-action-menu > span { background: #2b4354; }
.dark-console .row-action-menu button.danger { color: #ff9ca4; }
.dark-console .row-action-menu button.danger:hover { background: rgba(218,69,79,.12); color: #ffb7bd; }
.dark-console .agent-avatar { border-color: #315a76; background: linear-gradient(145deg,#16405d,#102e47); color: #c7ff4f; box-shadow: 0 0 0 3px rgba(78,179,237,.07),inset 0 1px 0 rgba(255,255,255,.06); }
.dark-console .console-footer { color: #aebdca; }
.dark-console .page-subtitle { color: #b7c5cf; }
.dark-console .live-status-pill { border-color: rgba(87,204,128,.34); background: rgba(62,186,104,.11); color: #84dda3; }
.dark-console .live-panel { border-color: #294354; background: #0d1e2b; box-shadow: 0 12px 30px rgba(0,0,0,.20); }
.dark-console .live-panel-head { border-color: #294354; }
.dark-console .live-panel-head h2 { color: #edf4f8; }
.dark-console .live-panel-head p { color: #a6b7c3; }
.dark-console .live-panel-head > button { border-color: #3a5669; color: #c4d2dc; }
.dark-console .healthy-label { border-color: rgba(87,204,128,.30); background: rgba(62,186,104,.10); color: #82dca1; }
.dark-console .live-session-row { border-color: #253c4c; color: #d6e1e8; }
.dark-console .live-session-row:hover { background: #132a3a; }
.dark-console .live-session-avatar { background: #17354a; color: #74c5f7; }
.dark-console .live-session-person strong { color: #e8f0f5; }
.dark-console .live-session-person small { color: #a4b5c1; }
.dark-console .live-session-metric { color: #8fa5b4; }
.dark-console .live-session-metric strong { color: #cfdae2; }
.dark-console .live-session-metric small { color: #92a7b5; }
.dark-console .live-listen { background: rgba(0,120,212,.14); color: #78cafa; }
.dark-console .queue-row-head strong { color: #dfe8ee; }
.dark-console .queue-row-head small { color: #9fb1be; }
.dark-console .queue-track { background: #1d3546; }
.dark-console .routing-button { border-color: #365568; color: #76c8f8; }
.dark-console .kpi-card > div:last-child { border-color: rgba(255,255,255,.07); }
.dark-console .kpi-live { color: #9fc7ad; }
.dark-console footer { color: #718696; }
::selection { background: #b8dcf4; color: #111827; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Authentication */
.auth-shell { display: grid; min-height: 100svh; grid-template-columns: minmax(460px,1.05fr) minmax(480px,.95fr); background: #f4f7f9; color: #1f2933; }
.auth-story { position: relative; display: flex; min-height: 100svh; flex-direction: column; overflow: hidden; padding: 32px clamp(32px,5vw,76px) 28px; background: radial-gradient(circle at 84% 14%,rgba(33,151,221,.25),transparent 31%),radial-gradient(circle at 10% 90%,rgba(183,242,58,.09),transparent 32%),linear-gradient(145deg,#071521 0%,#0d2d46 58%,#102235 100%); color: #f4f8fb; }
.auth-story::before { position: absolute; width: 440px; height: 440px; right: -255px; bottom: -225px; border: 1px solid rgba(110,199,247,.12); border-radius: 999px; box-shadow: 0 0 0 72px rgba(110,199,247,.025),0 0 0 144px rgba(110,199,247,.018); content: ""; }
.auth-orbit { position: absolute; width: 310px; height: 310px; right: -156px; top: 82px; border: 1px solid rgba(114,201,248,.11); border-radius: 999px; box-shadow: 0 0 0 42px rgba(114,201,248,.025),0 0 0 84px rgba(114,201,248,.018); }
.auth-orbit > span { position: absolute; display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(131,207,249,.25); border-radius: 10px; background: rgba(10,38,57,.72); color: #78caf8; box-shadow: inset 0 1px 0 rgba(255,255,255,.06),0 9px 22px rgba(0,0,0,.20); backdrop-filter: blur(8px); }
.auth-orbit > span:nth-child(1) { left: -5px; top: 44px; }.auth-orbit > span:nth-child(2) { left: 38px; bottom: 48px; color: #bff45a; }.auth-orbit > span:nth-child(3) { right: 42px; top: -8px; }
.auth-brand { position: relative; z-index: 1; display: inline-flex; width: fit-content; align-items: center; gap: 10px; color: #f3f8fb; font-size: 15px; font-weight: 720; letter-spacing: -.02em; }
.auth-brand small { margin-left: 3px; border-radius: 4px; padding: 3px 6px; background: rgba(255,255,255,.10); color: #b8c7d2; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-story-copy { position: relative; z-index: 1; width: min(100%,590px); margin: auto 0; padding-block: 60px 42px; }
.auth-eyebrow { display: flex; align-items: center; gap: 9px; color: #bff45a; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; animation: auth-fade-up .58s .08s both cubic-bezier(.22,.8,.25,1); }
.auth-eyebrow span { width: 8px; height: 8px; border-radius: 999px; background: #70d58c; box-shadow: 0 0 0 5px rgba(112,213,140,.12); animation: auth-signal-pulse 2.4s 1s infinite ease-out; }
.auth-story h1 { max-width: 590px; margin-top: 20px; font-size: clamp(35px,4.15vw,57px); font-weight: 620; letter-spacing: -.052em; line-height: 1.035; text-wrap: balance; }
.auth-story h1.auth-login-title { font-size: clamp(30px,2.9vw,42px); }
.auth-login-title .auth-title-line { white-space: nowrap; }
.auth-signup-title .auth-title-changing > span { font-size: .84em; letter-spacing: -.04em; }
/* Enough padding-bottom to keep descenders (g/y/p/q/j) inside the clipped
 * reveal-animation box — was .07em, too tight for "you're", "booking",
 * "appointment", etc. and the tail was getting cut off. */
.auth-title-line { display: block; overflow: hidden; padding-bottom: .22em; margin-bottom: -.22em; }
.auth-title-line > span { display: block; transform-origin: left bottom; animation: auth-title-reveal .82s .16s both cubic-bezier(.16,1,.3,1); }
.auth-title-line:nth-child(2) > span { animation-delay: .28s; }
.auth-title-accent > span { width: fit-content; background: linear-gradient(100deg,#f4f8fb 0%,#8bd5fb 52%,#c8fb61 112%); background-size: 180% 100%; color: transparent; -webkit-background-clip: text; background-clip: text; animation-name: auth-title-reveal,auth-title-color; animation-duration: .82s,5.5s; animation-delay: .28s,1.1s; animation-timing-function: cubic-bezier(.16,1,.3,1),ease-in-out; animation-fill-mode: both; animation-iteration-count: 1,infinite; }
.auth-title-changing { min-height: 1.08em; }
.auth-title-changing > span { width: max-content; max-width: 100%; white-space: nowrap; animation-name: auth-phrase-change,auth-title-color; animation-duration: .68s,5.5s; animation-delay: 0s,.45s; }
.auth-title-primary-word { display: inline-block; }
.auth-story-copy > p { max-width: 540px; margin-top: 22px; color: #c0cfda; font-size: 14px; line-height: 1.68; animation: auth-fade-up .68s .42s both cubic-bezier(.22,.8,.25,1); }
.auth-trust-list { display: grid; gap: 12px; margin-top: 30px; }
.auth-trust-list div { display: flex; align-items: center; gap: 10px; color: #d9e6ee; font-size: 11px; font-weight: 600; animation: auth-fade-up .55s both cubic-bezier(.22,.8,.25,1); }
.auth-trust-list div:nth-child(1) { animation-delay: .52s; }.auth-trust-list div:nth-child(2) { animation-delay: .60s; }.auth-trust-list div:nth-child(3) { animation-delay: .68s; }
.auth-trust-list svg { color: #79ccf8; }
.auth-signal-card { position: relative; z-index: 1; width: min(100%,590px); border: 1px solid rgba(128,194,232,.22); border-radius: 14px; padding: 14px; background: rgba(6,20,31,.42); box-shadow: inset 0 1px 0 rgba(255,255,255,.04),0 18px 42px rgba(0,0,0,.18); backdrop-filter: blur(12px); animation: auth-fade-up .72s .72s both cubic-bezier(.22,.8,.25,1); }
.auth-signal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.08); color: #9eb4c3; font-size: 8px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.auth-signal-head span { display: flex; align-items: center; gap: 7px; color: #8ddca7; }
.auth-signal-head i { width: 7px; height: 7px; border-radius: 999px; background: #4bc778; box-shadow: 0 0 0 4px rgba(75,199,120,.10); }
.auth-live-agent { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; margin-top: 12px; border: 1px solid rgba(119,199,242,.12); border-radius: 9px; padding: 9px; background: rgba(17,52,76,.42); }
.auth-agent-mark { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(110,199,247,.25); border-radius: 8px; background: linear-gradient(145deg,#174865,#10334b); color: #c8ff58; font-size: 9px; font-weight: 850; }
.auth-live-agent strong,.auth-live-agent small { display: block; }
.auth-live-agent strong { color: #e7f0f6; font-size: 9px; font-weight: 720; }
.auth-live-agent small { margin-top: 2px; color: #91a9b9; font-size: 7px; }
.auth-agent-time { display: flex; align-items: center; gap: 4px; color: #a9bdca; font-size: 8px; font-weight: 700; }
.auth-signal-body { display: grid; grid-template-columns: 1fr 1fr 1.2fr; align-items: end; gap: 16px; padding-top: 13px; }
.auth-signal-body strong,.auth-signal-body span { display: block; }
.auth-signal-body strong { font-size: 20px; font-weight: 680; letter-spacing: -.035em; }
.auth-signal-body > div > span { margin-top: 3px; color: #92a9b9; font-size: 8px; }
.auth-signal-bars { display: flex; height: 38px; align-items: flex-end; gap: 3px; }
.auth-signal-bars span { flex: 1; min-width: 2px; border-radius: 2px 2px 1px 1px; background: linear-gradient(180deg,#65c7fb,#147bc0); opacity: .85; transform-origin: bottom; animation: auth-bar-rise .62s both cubic-bezier(.22,.8,.25,1); }
.auth-signal-bars span:nth-child(1) { animation-delay: .80s; }.auth-signal-bars span:nth-child(2) { animation-delay: .84s; }.auth-signal-bars span:nth-child(3) { animation-delay: .88s; }.auth-signal-bars span:nth-child(4) { animation-delay: .92s; }.auth-signal-bars span:nth-child(5) { animation-delay: .96s; }.auth-signal-bars span:nth-child(6) { animation-delay: 1s; }.auth-signal-bars span:nth-child(7) { animation-delay: 1.04s; }.auth-signal-bars span:nth-child(8) { animation-delay: 1.08s; }.auth-signal-bars span:nth-child(9) { animation-delay: 1.12s; }.auth-signal-bars span:nth-child(10) { animation-delay: 1.16s; }.auth-signal-bars span:nth-child(11) { animation-delay: 1.2s; }.auth-signal-bars span:nth-child(12) { animation-delay: 1.24s; }
.auth-story-footer { position: relative; z-index: 1; margin-top: 18px; color: #7890a1; font-size: 8px; letter-spacing: .04em; }
.auth-form-side { display: flex; min-height: 100svh; flex-direction: column; background: radial-gradient(circle at 88% 4%,rgba(22,136,204,.08),transparent 30%),#f2f6f9; }
.auth-topbar { display: flex; height: 70px; align-items: center; justify-content: flex-end; padding: 0 clamp(24px,4vw,48px); }
.auth-mobile-brand { display: none; }
.auth-help { display: inline-flex; height: 36px; align-items: center; gap: 6px; margin-right: 9px; border-radius: 8px; padding: 0 10px; color: #61727e; font-size: 9px; font-weight: 680; transition: .16s ease; }
.auth-help:hover { background: rgba(255,255,255,.72); color: #0875c2; }
.auth-theme-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #cbd6de; border-radius: 9px; background: rgba(255,255,255,.85); color: #50616d; box-shadow: 0 1px 2px rgba(20,43,61,.06); transition: .16s ease; }
.auth-theme-button:hover { border-color: #8ba2b2; background: #fff; color: #0875c2; transform: translateY(-1px); }
.auth-form-wrap { width: min(100% - 48px,500px); margin: auto; padding: 20px 0 38px; }
.auth-form-card { position: relative; border: 1px solid #d3dee5; border-radius: 16px; padding: 22px; background: rgba(255,255,255,.80); box-shadow: 0 24px 64px rgba(24,59,84,.11),inset 0 1px 0 #fff; backdrop-filter: blur(16px); animation: auth-card-enter .72s .14s both cubic-bezier(.22,.8,.25,1); }
.auth-access-context { display: flex; min-height: 31px; align-items: center; justify-content: space-between; margin: -7px -7px 20px; border: 1px solid #e0e8ed; border-radius: 9px; padding: 0 9px; background: rgba(244,248,250,.82); color: #687984; font-size: 8px; }
.auth-access-context span { display: flex; align-items: center; gap: 6px; color: #337b55; font-weight: 720; }
.auth-access-context strong { color: #74838e; font-weight: 620; }
.auth-steps { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 8px; margin: -3px 1px 17px; color: #87949e; font-size: 8px; font-weight: 700; }
.auth-steps > span { display: flex; align-items: center; gap: 5px; }
.auth-steps i { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #ced8df; border-radius: 6px; background: #f5f8fa; font-style: normal; }
.auth-steps b { height: 1px; background: #dce4e9; }
.auth-steps .is-active { color: #0875c2; }
.auth-steps .is-active i { border-color: #70b4e1; background: #eaf6fd; color: #0875c2; }
.auth-heading { display: flex; align-items: flex-start; gap: 14px; }
.auth-heading-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid #bfd9ea; border-radius: 11px; background: linear-gradient(145deg,#edf8fe,#e3f2fb); color: #0878c7; box-shadow: inset 0 1px 0 #fff,0 5px 14px rgba(22,102,154,.08); }
.auth-heading h2 { color: #17232c; font-size: 25px; font-weight: 680; letter-spacing: -.035em; line-height: 1.15; }
.auth-heading p { max-width: 390px; margin-top: 7px; color: #6d7c87; font-size: 11px; line-height: 1.55; }
.auth-form { display: grid; gap: 17px; margin-top: 28px; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field { display: grid; gap: 7px; color: #34434f; font-size: 10px; font-weight: 720; }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; }
.auth-label-row a,.auth-consent a,.auth-switch a { color: #0875c2; font-weight: 750; }
.auth-label-row a:hover,.auth-consent a:hover,.auth-switch a:hover { text-decoration: underline; }
.auth-field small { color: #7c8993; font-size: 8px; font-weight: 520; }
.auth-strength { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auth-strength > span { display: grid; flex: 1; grid-template-columns: repeat(4,1fr); gap: 4px; }
.auth-strength i { height: 3px; border-radius: 999px; background: #dce4e9; transition: background .18s ease; }
.auth-strength i.is-filled { background: linear-gradient(90deg,#1688d9,#3db877); }
.auth-strength small { min-width: 88px; text-align: right; }
.auth-input-wrap { position: relative; display: flex; height: 44px; align-items: center; border: 1px solid #bdcad3; border-radius: 9px; background: rgba(255,255,255,.92); color: #71818c; box-shadow: inset 0 1px 0 #fff,0 1px 2px rgba(20,43,61,.04); transition: border-color .16s ease,box-shadow .16s ease,background .16s ease; }
.auth-input-wrap:focus-within { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.11); }
.auth-input-wrap > svg,.auth-input-wrap > iconify-icon { position: absolute; left: 13px; pointer-events: none; color: #71818c; }
.dark-console .auth-input-wrap > iconify-icon { color: #93a9b8; }
.auth-input-wrap input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; padding: 0 42px 0 40px; color: #1f2d37; font-size: 11px; font-weight: 560; }
.auth-input-wrap input::placeholder { color: #8a98a3; }
.auth-input-wrap button { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; margin-right: 3px; border-radius: 7px; color: #71818c; }
.auth-input-wrap button:hover { background: #edf4f8; color: #0875c2; }
.auth-consent { display: flex; align-items: flex-start; gap: 9px; color: #64737e; font-size: 9px; line-height: 1.55; }
.auth-consent input { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 0; }
.auth-submit { position: relative; display: flex; height: 44px; align-items: center; justify-content: center; gap: 9px; overflow: hidden; border: 1px solid #0668b5; border-radius: 9px; background: linear-gradient(145deg,#168ce0,#0874c9 55%,#0563ad); color: #fff; font-size: 11px; font-weight: 760; box-shadow: inset 0 1px 0 rgba(255,255,255,.22),0 9px 20px rgba(0,103,184,.22); transition: transform .16s ease,box-shadow .16s ease,background .16s ease; }
.auth-submit:hover { background: linear-gradient(145deg,#218fdf,#0569bb); box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 12px 25px rgba(0,103,184,.28); transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }
.auth-message { display: flex; align-items: center; justify-content: center; gap: 7px; color: #287544; font-size: 9px; font-weight: 650; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: #81909b; font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.auth-divider::before,.auth-divider::after { height: 1px; flex: 1; background: #dce4e9; content: ""; }
.auth-sso { display: flex; width: 100%; height: 42px; align-items: center; justify-content: center; gap: 9px; border: 1px solid #bdcad3; border-radius: 9px; background: rgba(255,255,255,.85); color: #31414c; font-size: 10px; font-weight: 720; box-shadow: 0 1px 2px rgba(20,43,61,.05); transition: .16s ease; }
.auth-sso:hover { border-color: #879ba9; background: #fff; transform: translateY(-1px); }
.auth-sso-arrow { display: grid; width: 22px; height: 22px; place-items: center; margin-left: -2px; border-radius: 6px; background: #edf4f8; color: #0875c2; }
.auth-ms-mark { display: grid; width: 15px; height: 15px; grid-template-columns: repeat(2,1fr); gap: 1px; }
.auth-ms-mark i:nth-child(1) { background: #f35325; }.auth-ms-mark i:nth-child(2) { background: #81bc06; }.auth-ms-mark i:nth-child(3) { background: #05a6f0; }.auth-ms-mark i:nth-child(4) { background: #ffba08; }
.auth-switch { margin-top: 24px; color: #64737e; font-size: 10px; text-align: center; }
.auth-security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px -22px -22px; border-top: 1px solid #e0e7ec; border-radius: 0 0 16px 16px; padding: 13px; background: rgba(245,248,250,.70); color: #3c8059; }
.auth-security-note strong,.auth-security-note small { display: block; }
.auth-security-note strong { font-size: 8px; font-weight: 780; }
.auth-security-note small { margin-top: 2px; color: #7d8b95; font-size: 7px; }
.auth-form-footer { display: flex; align-items: center; justify-content: space-between; padding: 22px clamp(24px,4vw,48px); color: #87949e; font-size: 8px; }
.auth-form-footer > span:last-child { display: flex; gap: 14px; }
.auth-form-footer a:hover { color: #0875c2; }
.dark-console .auth-form-side { background: radial-gradient(circle at 88% 4%,rgba(20,104,157,.18),transparent 28%),#08131e; }
.dark-console .auth-theme-button { border-color: #345064; background: #102331; color: #aebfcc; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }
.dark-console .auth-theme-button:hover { border-color: #4e7892; background: #162d3e; color: #81cff9; }
.dark-console .auth-help { color: #a9bbc8; }
.dark-console .auth-help:hover { background: rgba(255,255,255,.045); color: #7dccf8; }
.dark-console .auth-form-card { border-color: #294253; background: rgba(13,29,42,.86); box-shadow: 0 28px 70px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.035); }
.dark-console .auth-access-context { border-color: #294354; background: rgba(16,35,49,.82); color: #91a5b4; }
.dark-console .auth-access-context span { color: #79d398; }
.dark-console .auth-access-context strong { color: #93a8b7; }
.dark-console .auth-steps { color: #879baa; }
.dark-console .auth-steps i { border-color: #324c5e; background: #102331; }
.dark-console .auth-steps b { background: #2a4151; }
.dark-console .auth-steps .is-active { color: #79caf8; }
.dark-console .auth-steps .is-active i { border-color: #397ba2; background: #15354b; color: #80cef9; }
.dark-console .auth-heading-icon { border-color: #2f5f7b; background: linear-gradient(145deg,#173c55,#102b3e); color: #7acaf8; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.dark-console .auth-heading h2 { color: #f1f6f9; }
.dark-console .auth-heading p { color: #adbdc8; }
.dark-console .auth-field { color: #dbe5ec; }
.dark-console .auth-field small,.dark-console .auth-consent,.dark-console .auth-switch { color: #a5b6c2; }
.dark-console .auth-label-row a,.dark-console .auth-consent a,.dark-console .auth-switch a { color: #76c8f8; }
.dark-console .auth-input-wrap { border-color: #345064; background: #0d1e2b; color: #93a9b8; box-shadow: inset 0 1px 0 rgba(255,255,255,.025); }
.dark-console .auth-input-wrap:focus-within { border-color: #4aa8e8; background: #102536; box-shadow: 0 0 0 3px rgba(74,168,232,.13); }
.dark-console .auth-input-wrap input { color: #e7eef5; }
.dark-console .auth-input-wrap input::placeholder { color: #7f93a3; }
.dark-console .auth-input-wrap button:hover { background: #173347; color: #7dccf8; }
.dark-console .auth-strength i { background: #294052; }
.dark-console .auth-strength i.is-filled { background: linear-gradient(90deg,#3a9fe3,#51ca7c); }
.dark-console .auth-message { color: #7bd79a; }
.dark-console .auth-divider { color: #8499a8; }
.dark-console .auth-divider::before,.dark-console .auth-divider::after { background: #294052; }
.dark-console .auth-sso { border-color: #365266; background: #102331; color: #d8e4ec; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.dark-console .auth-sso:hover { border-color: #527a92; background: #162d3e; }
.dark-console .auth-sso-arrow { background: #19364b; color: #7dccf8; }
.dark-console .auth-security-note { border-color: #294253; background: rgba(16,35,49,.72); color: #78d397; }
.dark-console .auth-security-note small { color: #9cafbc; }
.dark-console .auth-form-footer { color: #8296a5; }
@keyframes auth-title-reveal { from { opacity: 0; transform: translateY(108%) skewY(2deg); } to { opacity: 1; transform: translateY(0) skewY(0); } }
@keyframes auth-phrase-change { from { opacity: 0; filter: blur(5px); transform: translateY(72%); } to { opacity: 1; filter: blur(0); transform: translateY(0); } }
@keyframes auth-title-color { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes auth-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-card-enter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes auth-bar-rise { from { opacity: 0; transform: scaleY(.1); } to { opacity: .85; transform: scaleY(1); } }
@keyframes auth-signal-pulse { 0% { box-shadow: 0 0 0 0 rgba(112,213,140,.24); } 70%,100% { box-shadow: 0 0 0 8px rgba(112,213,140,0); } }
@media (max-width: 960px) { .auth-shell { grid-template-columns: minmax(0,1fr); } .auth-story { display: none; } .auth-mobile-brand { display: block; margin-right: auto; } .auth-mobile-brand .auth-brand { color: #132535; } .auth-mobile-brand .auth-brand small { background: #e8eef2; color: #64737e; } .dark-console .auth-mobile-brand .auth-brand { color: #eef5f9; } .dark-console .auth-mobile-brand .auth-brand small { background: #162b3b; color: #aebdca; } }
@media (max-width: 520px) { .auth-topbar { height: 62px; padding-inline: 18px; } .auth-help { width: 36px; padding: 0; justify-content: center; font-size: 0; } .auth-form-wrap { width: calc(100% - 28px); padding-top: 10px; } .auth-form-card { padding: 18px; border-radius: 13px; } .auth-field-row { grid-template-columns: 1fr; } .auth-heading h2 { font-size: 22px; } .auth-access-context strong { display: none; } .auth-steps { gap: 5px; } .auth-steps b { min-width: 8px; } .auth-security-note { margin: 18px -18px -18px; border-radius: 0 0 13px 13px; } .auth-form-footer { align-items: flex-start; gap: 10px; padding: 18px; } .auth-form-footer > span:last-child { gap: 10px; } }

/* ══════════════════════════════════════════════════════════════════
   v2 shared UI additions (searchable select, table utilities, forms)
   ══════════════════════════════════════════════════════════════════ */

/* Highlight active sidebar nav item using the template's language. */
.theme-sidebar nav button[data-nav].is-active { background: linear-gradient(90deg,#e5f4fd,#f3f9fc); color: #0067b8; font-weight: 700; box-shadow: inset 0 0 0 1px #d4eaf7; position: relative; }
.theme-sidebar nav button[data-nav].is-active::before { content: ""; position: absolute; inset-block: 8px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: #0078d4; }
.theme-sidebar nav button[data-nav]:not(.is-active) { color: #3c4a55; }
.theme-sidebar nav button[data-nav]:not(.is-active):hover { background: #fff; box-shadow: 0 1px 4px rgba(32,66,90,.06); }
.theme-sidebar nav button[data-nav].is-active .sidebar-nav-icon { border-color: #b8dcee; background: #fff; color: #0078d4; box-shadow: 0 2px 6px rgba(25,79,115,.09),inset 0 1px 0 #fff; }
.dark-console .theme-sidebar nav button[data-nav]:not(.is-active) { color: #c4d2dc; }
.dark-console .theme-sidebar nav button[data-nav]:not(.is-active):hover { background: rgba(255,255,255,.045); box-shadow: none; }
.dark-console .theme-sidebar nav button[data-nav].is-active { background: linear-gradient(90deg,#13334a,#102737); color: #82cff9; box-shadow: inset 0 0 0 1px #2d5269; }
.dark-console .theme-sidebar nav button[data-nav].is-active::before { background: #4aa8e8; }
.dark-console .theme-sidebar nav button[data-nav].is-active .sidebar-nav-icon { border-color: #34799f; background: linear-gradient(145deg,#194b6b,#123650); color: #8bd3fb; box-shadow: 0 0 0 3px rgba(74,168,232,.06),inset 0 1px 0 rgba(255,255,255,.06); }

/* Content area page header pattern */
.page-header { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; }
@media (min-width: 768px) { .page-header { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.page-header h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: #1f2933; }
.page-header .page-sub { margin-top: 6px; font-size: 12px; color: #626c76; }
.dark-console .page-header h1 { color: #f4f8fb; }
.dark-console .page-header .page-sub { color: #b3c1cc; }

/* Panel — generic card container */
.panel { border: 1px solid #cfdae3; border-radius: 10px; background: #fff; box-shadow: 0 4px 18px rgba(25,61,89,.06); overflow: hidden; }
.dark-console .panel { border-color: #233949; background: #0d1c29; box-shadow: 0 12px 34px rgba(0,0,0,.20); color: #e2ebf2; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #d8dee4; }
.dark-console .panel-head { border-color: #233949; }
.panel-head h2 { font-size: 13px; font-weight: 700; color: #26333d; }
.panel-head p { margin-top: 3px; font-size: 10px; color: #6e7781; }
.dark-console .panel-head h2 { color: #dce7ef; }
.dark-console .panel-head p { color: #a5b7c4; }
.panel-body { padding: 18px; }

/* Data table — used across tenant pages */
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table thead th { padding: 10px 16px; background: #f4f8fb; border-bottom: 1px solid #d8e2e9; font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #667581; }
.data-table tbody td { padding: 12px 16px; border-bottom: 1px solid #e5ebf0; font-size: 10px; color: #3e4c57; vertical-align: middle; }
.data-table tbody tr:hover td { background: #f1f8fd; }
.data-table tbody tr:last-child td { border-bottom: none; }
.dark-console .data-table thead th { background: #112331; color: #aebdca; border-color: #263b4b; }
.dark-console .data-table tbody td { border-color: #203442; color: #d6e1e8; }
.dark-console .data-table tbody tr:hover td { background: #12293a; }

/* Section grid (dashboard KPIs, etc.) */
.kpi-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 1280px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }

/* Two-column form layout used on Account, AI Settings, Channels */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width: 900px) { .form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label, .form-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #667581; }
.form-field .hint { font-size: 10px; color: #7c8994; }
.form-field input[type="text"], .form-field input[type="email"], .form-field input[type="tel"], .form-field input[type="number"], .form-field input[type="password"], .form-field input[type="url"], .form-field textarea, .form-field select { height: 40px; border: 1px solid #c0ccd5; border-radius: 9px; background: rgba(255,255,255,.9); padding: 0 12px; font: inherit; font-size: 11px; color: #25313b; outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
.form-field textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.form-field input:hover, .form-field textarea:hover, .form-field select:hover { border-color: #8ba0af; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.12); }
.dark-console .form-field label, .dark-console .form-label { color: #a5b7c4; }
.dark-console .form-field input, .dark-console .form-field textarea, .dark-console .form-field select { border-color: #345064; background: #0d1e2b; color: #e4edf4; color-scheme: dark; }
.dark-console .form-field input:hover, .dark-console .form-field textarea:hover, .dark-console .form-field select:hover { border-color: #4a7088; background: #102536; }

/* Segmented control (for filter tabs) */
.segmented { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #bccbd6; border-radius: 10px; background: #eef4f8; }
.segmented button { border: 0; border-radius: 7px; background: transparent; padding: 6px 12px; font: inherit; font-size: 11px; font-weight: 600; color: #52616d; cursor: pointer; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.segmented button.is-active { background: linear-gradient(145deg,#168ce0,#0563ad); color: #fff; box-shadow: 0 2px 6px rgba(0,120,212,.28), inset 0 1px 0 rgba(255,255,255,.18); }
.segmented button:not(.is-active):hover { background: rgba(255,255,255,.7); color: #26333d; }
.dark-console .segmented { border-color: #345064; background: rgba(9,24,36,.5); }
.dark-console .segmented button { color: #a5b7c4; }
.dark-console .segmented button.is-active { background: linear-gradient(145deg,#348fdb,#176fc2); color: #fff; box-shadow: 0 2px 6px rgba(0,120,212,.35); }
.dark-console .segmented button:not(.is-active):hover { background: rgba(255,255,255,.05); color: #dce7ef; }

/* Searchable combobox */
.ui-combobox { position: relative; display: inline-block; width: 100%; box-sizing: border-box; }
/* In the page-header toolbar row (overview-actions), sit inline with buttons
   and honour the inline min-width instead of stretching to a full line. */
.overview-actions .ui-combobox { width: auto; flex: 0 0 auto; }
.combobox-trigger { display: flex; width: 100%; height: 40px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border: 1px solid #c0ccd5; border-radius: 9px; background: rgba(255,255,255,.9); color: #25313b; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease; }
.combobox-trigger:hover { border-color: #8ba0af; }
.combobox-trigger[aria-expanded="true"] { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.12); }
.combobox-trigger .is-placeholder { color: #7e8c97; font-weight: 500; }
.combobox-panel { position: fixed; z-index: 70; overflow: hidden; border: 1px solid #cbd6df; border-radius: 10px; background: #fff; box-shadow: 0 18px 44px rgba(17,44,67,.18); }
.combobox-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #e5ebf0; color: #7e8c97; }
.combobox-search input { flex: 1; height: 28px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 11px; color: #25313b; }
.combobox-options { max-height: 260px; overflow-y: auto; padding: 4px; }
.combobox-option { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 6px; background: transparent; padding: 8px 10px; font: inherit; font-size: 11px; color: #34434e; text-align: left; cursor: pointer; }
.combobox-option:hover, .combobox-option.is-active { background: #edf6fc; color: #0872bd; }
.combobox-option.is-selected { background: #dcebf7; color: #0067b8; font-weight: 700; }
.combobox-option-meta { font-size: 9px; color: #7c8994; }
.combobox-empty { padding: 20px; text-align: center; font-size: 11px; color: #7c8994; }
.dark-console .combobox-trigger { border-color: #345064; background: #0d1e2b; color: #e4edf4; }
.dark-console .combobox-trigger:hover { border-color: #4a7088; }
.dark-console .combobox-panel { border-color: #365366; background: #102331; box-shadow: 0 22px 48px rgba(0,0,0,.42); }
.dark-console .combobox-search { border-color: #253c4c; color: #93a9b8; }
.dark-console .combobox-search input { color: #e7eef5; }
.dark-console .combobox-option { color: #cbd8e1; }
.dark-console .combobox-option:hover, .dark-console .combobox-option.is-active { background: #16344a; color: #85cff9; }
.dark-console .combobox-option.is-selected { background: rgba(0,120,212,.22); color: #77c8fa; }
.dark-console .combobox-empty { color: #8a9caa; }

/* Native <audio> controls — inherit theme colors so the transport widget
   doesn't look like a bright light-mode blob in the dark console. */
audio { color-scheme: light; width: 100%; }
.dark-console audio { color-scheme: dark; }
.cc-tile audio { margin-top: 8px; border-radius: 6px; }

/* Workspace hub — one card per workspace, plus a plus-tile for creating. */
.workspace-grid { display: grid; gap: 12px; grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width: 640px)  { .workspace-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .workspace-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.workspace-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid #dee5ec; border-radius: 12px; background: #ffffff; text-align: left; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.workspace-card:hover { border-color: #b8dcee; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(25,61,89,.08); }
.workspace-card.is-current { border-color: #7bb8de; box-shadow: 0 0 0 3px rgba(0,120,212,.10); }
.workspace-card-head { display: flex; align-items: center; gap: 12px; }
.workspace-card-name { display: flex; flex-direction: column; min-width: 0; }
.workspace-card-name strong { font-size: 13px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.workspace-card-name span { font-size: 10px; color: #6e7781; }
.workspace-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.workspace-card-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; padding: 10px 12px; border: 1px solid #e5ebf0; border-radius: 8px; background: #f9fbfc; }
.workspace-card-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.workspace-card-meta dt { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #7c8994; }
.workspace-card-meta dd { font-size: 11px; font-weight: 600; color: #1f2933; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.workspace-card-create { display: grid; place-items: center; text-align: center; gap: 6px; border-style: dashed; background: transparent; color: #52616d; cursor: pointer; min-height: 200px; }
.workspace-card-create:hover { border-color: #7bb8de; color: #0067b8; background: rgba(0,120,212,.03); }
.workspace-card-create-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 999px; background: rgba(0,120,212,.10); color: #0078d4; }
.workspace-card-create strong { font-size: 12px; font-weight: 700; color: #1f2933; }
.workspace-card-create span { font-size: 10px; color: #6e7781; max-width: 240px; line-height: 1.45; }
.dark-console .workspace-card { border-color: #253d51; background: #0d1e2b; }
.dark-console .workspace-card.is-current { border-color: #3d7ba8; box-shadow: 0 0 0 3px rgba(74,168,232,.14); }
.dark-console .workspace-card-name strong { color: #f0f6fa; }
.dark-console .workspace-card-name span { color: #a5b7c4; }
.dark-console .workspace-card-meta { border-color: #253d51; background: #102331; }
.dark-console .workspace-card-meta dt { color: #93a9b8; }
.dark-console .workspace-card-meta dd { color: #f0f6fa; }
.dark-console .workspace-card-create { color: #a5b7c4; }
.dark-console .workspace-card-create:hover { color: #85cff9; background: rgba(74,168,232,.06); border-color: #4a89b3; }
.dark-console .workspace-card-create strong { color: #f0f6fa; }
.dark-console .workspace-card-create span { color: #a5b7c4; }
.dark-console .workspace-card-create-icon { background: rgba(74,168,232,.16); color: #7cc5ff; }

/* Round initial avatar — used in contact cells and chat bubbles. Ten tone
   variants that mirror the badge palette so both feel like one system. */
.avatar-circle {
  display: inline-grid; place-items: center;
  border: 1px solid;
  border-radius: 999px;
  font-weight: 700; letter-spacing: .02em;
  flex-shrink: 0;
  line-height: 1;
}
.avatar-circle.size-sm { width: 24px; height: 24px; font-size: 8px; }
.avatar-circle.size-md { width: 32px; height: 32px; font-size: 10px; }
.avatar-circle.size-lg { width: 40px; height: 40px; font-size: 12px; }

.avatar-circle.tone-gray   { background: #f1f5f9; border-color: rgba(100,116,139,.22); color: #475569; }
.avatar-circle.tone-green  { background: #ecfdf5; border-color: rgba(16,185,129,.28); color: #047857; }
.avatar-circle.tone-blue   { background: #eff6ff; border-color: rgba(59,130,246,.28); color: #1d4ed8; }
.avatar-circle.tone-amber  { background: #fff7ed; border-color: rgba(245,158,11,.32); color: #b45309; }
.avatar-circle.tone-red    { background: #fef2f2; border-color: rgba(239,68,68,.28); color: #b91c1c; }
.avatar-circle.tone-lime   { background: #f7fee7; border-color: rgba(132,204,22,.32); color: #4d7c0f; }
.avatar-circle.tone-purple { background: #f5f3ff; border-color: rgba(168,85,247,.28); color: #6d28d9; }
.avatar-circle.tone-teal   { background: #ecfeff; border-color: rgba(6,182,212,.28); color: #0e7490; }
.avatar-circle.tone-indigo { background: #eef2ff; border-color: rgba(99,102,241,.28); color: #4338ca; }
.avatar-circle.tone-pink   { background: #fdf2f8; border-color: rgba(236,72,153,.28); color: #be185d; }

.dark-console .avatar-circle.tone-gray   { background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.32); color: #cbd5e1; }
.dark-console .avatar-circle.tone-green  { background: rgba(16,185,129,.16); border-color: rgba(16,185,129,.36); color: #6ee7b7; }
.dark-console .avatar-circle.tone-blue   { background: rgba(59,130,246,.16); border-color: rgba(59,130,246,.36); color: #93c5fd; }
.dark-console .avatar-circle.tone-amber  { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.38); color: #fbbf24; }
.dark-console .avatar-circle.tone-red    { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.36); color: #fca5a5; }
.dark-console .avatar-circle.tone-lime   { background: rgba(132,204,22,.16); border-color: rgba(132,204,22,.36); color: #bef264; }
.dark-console .avatar-circle.tone-purple { background: rgba(168,85,247,.16); border-color: rgba(168,85,247,.36); color: #d8b4fe; }
.dark-console .avatar-circle.tone-teal   { background: rgba(6,182,212,.16); border-color: rgba(6,182,212,.36); color: #67e8f9; }
.dark-console .avatar-circle.tone-indigo { background: rgba(99,102,241,.16); border-color: rgba(99,102,241,.36); color: #a5b4fc; }
.dark-console .avatar-circle.tone-pink   { background: rgba(236,72,153,.16); border-color: rgba(236,72,153,.36); color: #f9a8d4; }

/* Pill badges — used across tables, dialogs, and cards. Design: subtle
   tinted background + 1px same-hue border + leading solid dot + slightly
   bolder tracked text. All tones have dark-mode variants. */
.badge-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .01em;
  line-height: 1.2;
  white-space: nowrap;
}
.badge-pill-dot { display: inline-block; width: 6px; height: 6px; border-radius: 999px; flex: 0 0 6px; }
.badge-pill.no-dot .badge-pill-dot { display: none; }
.badge-pill.no-dot { padding: 3px 9px; }

/* Light-mode tones — bg / border / text / dot */
.badge-pill.tone-gray   { background: #f1f5f9; border-color: rgba(100,116,139,.22); color: #475569; }
.badge-pill.tone-gray   .badge-pill-dot { background: #64748b; }
.badge-pill.tone-green  { background: #ecfdf5; border-color: rgba(16,185,129,.28); color: #047857; }
.badge-pill.tone-green  .badge-pill-dot { background: #10b981; }
.badge-pill.tone-blue   { background: #eff6ff; border-color: rgba(59,130,246,.28); color: #1d4ed8; }
.badge-pill.tone-blue   .badge-pill-dot { background: #3b82f6; }
.badge-pill.tone-amber  { background: #fff7ed; border-color: rgba(245,158,11,.32); color: #b45309; }
.badge-pill.tone-amber  .badge-pill-dot { background: #f59e0b; }
.badge-pill.tone-red    { background: #fef2f2; border-color: rgba(239,68,68,.28); color: #b91c1c; }
.badge-pill.tone-red    .badge-pill-dot { background: #ef4444; }
.badge-pill.tone-lime   { background: #f7fee7; border-color: rgba(132,204,22,.32); color: #4d7c0f; }
.badge-pill.tone-lime   .badge-pill-dot { background: #84cc16; }
.badge-pill.tone-purple { background: #f5f3ff; border-color: rgba(168,85,247,.28); color: #6d28d9; }
.badge-pill.tone-purple .badge-pill-dot { background: #a855f7; }
.badge-pill.tone-teal   { background: #ecfeff; border-color: rgba(6,182,212,.28); color: #0e7490; }
.badge-pill.tone-teal   .badge-pill-dot { background: #06b6d4; }
.badge-pill.tone-indigo { background: #eef2ff; border-color: rgba(99,102,241,.28); color: #4338ca; }
.badge-pill.tone-indigo .badge-pill-dot { background: #6366f1; }
.badge-pill.tone-pink   { background: #fdf2f8; border-color: rgba(236,72,153,.28); color: #be185d; }
.badge-pill.tone-pink   .badge-pill-dot { background: #ec4899; }

/* Dark-mode tones — soft translucent tint on a dark surface for legibility */
.dark-console .badge-pill.tone-gray   { background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.32); color: #cbd5e1; }
.dark-console .badge-pill.tone-gray   .badge-pill-dot { background: #94a3b8; }
.dark-console .badge-pill.tone-green  { background: rgba(16,185,129,.16); border-color: rgba(16,185,129,.36); color: #6ee7b7; }
.dark-console .badge-pill.tone-green  .badge-pill-dot { background: #34d399; }
.dark-console .badge-pill.tone-blue   { background: rgba(59,130,246,.16); border-color: rgba(59,130,246,.36); color: #93c5fd; }
.dark-console .badge-pill.tone-blue   .badge-pill-dot { background: #60a5fa; }
.dark-console .badge-pill.tone-amber  { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.38); color: #fbbf24; }
.dark-console .badge-pill.tone-amber  .badge-pill-dot { background: #fbbf24; }
.dark-console .badge-pill.tone-red    { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.36); color: #fca5a5; }
.dark-console .badge-pill.tone-red    .badge-pill-dot { background: #f87171; }
.dark-console .badge-pill.tone-lime   { background: rgba(132,204,22,.16); border-color: rgba(132,204,22,.36); color: #bef264; }
.dark-console .badge-pill.tone-lime   .badge-pill-dot { background: #a3e635; }
.dark-console .badge-pill.tone-purple { background: rgba(168,85,247,.16); border-color: rgba(168,85,247,.36); color: #d8b4fe; }
.dark-console .badge-pill.tone-purple .badge-pill-dot { background: #c084fc; }
.dark-console .badge-pill.tone-teal   { background: rgba(6,182,212,.16); border-color: rgba(6,182,212,.36); color: #67e8f9; }
.dark-console .badge-pill.tone-teal   .badge-pill-dot { background: #22d3ee; }
.dark-console .badge-pill.tone-indigo { background: rgba(99,102,241,.16); border-color: rgba(99,102,241,.36); color: #a5b4fc; }
.dark-console .badge-pill.tone-indigo .badge-pill-dot { background: #818cf8; }
.dark-console .badge-pill.tone-pink   { background: rgba(236,72,153,.16); border-color: rgba(236,72,153,.36); color: #f9a8d4; }
.dark-console .badge-pill.tone-pink   .badge-pill-dot { background: #f472b6; }

/* Flow preview simulator — client-side call transcript that runs in a modal.
   Chat bubbles for AI + caller, small centered system notes, and a bottom
   input row that only shows on question nodes. */
.flow-preview-chat { display: flex; flex-direction: column; gap: 10px; min-height: 320px; max-height: 52vh; overflow-y: auto; padding: 14px; border: 1px solid #dbe4ea; border-radius: 10px; background: #f8fbfd; }
/* Transcript variant — flex-fills the parent column height (which itself
   fills the dialog body via `items-stretch` + `min-h-0` cascade) and
   scrolls internally. No own max-height — the dialog body cap already
   bounds it, and keeping this unconstrained is what lets the left and
   right columns end at the same y-coordinate. */
.transcript-log { flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto; }
.flow-preview-msg { display: flex; align-items: flex-start; gap: 8px; }
.flow-preview-msg.is-ai { flex-direction: row-reverse; }
.flow-preview-avatar { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; border-radius: 999px; font-size: 9px; font-weight: 700; background: #e9eef2; color: #52616d; }
.flow-preview-msg.is-ai .flow-preview-avatar { background: #dcebf7; color: #0067b8; }
.flow-preview-bubble { max-width: 78%; padding: 8px 12px; border-radius: 10px; font-size: 11.5px; line-height: 1.5; background: #fff; color: #25313b; border: 1px solid #e5ebf0; }
.flow-preview-msg.is-ai .flow-preview-bubble { background: #dcebf7; color: #0e4a76; border-color: #c8dff0; }
.flow-preview-system { align-self: center; padding: 3px 10px; border-radius: 999px; background: #eef4f8; color: #52616d; font-size: 10px; font-weight: 600; }
.flow-preview-input { display: flex; gap: 8px; }
.flow-preview-input input { flex: 1; height: 36px; border: 1px solid #c0ccd5; border-radius: 8px; padding: 0 12px; font: inherit; font-size: 12px; color: #25313b; background: #fff; outline: none; }
.flow-preview-input input:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.12); }
.dark-console .flow-preview-chat { border-color: #253d51; background: #0d1e2b; }
.dark-console .flow-preview-avatar { background: #1b3244; color: #cbd8e1; }
.dark-console .flow-preview-msg.is-ai .flow-preview-avatar { background: rgba(74,168,232,.20); color: #82cff9; }
.dark-console .flow-preview-bubble { background: #102536; color: #dce7ef; border-color: #253d51; }
.dark-console .flow-preview-msg.is-ai .flow-preview-bubble { background: rgba(74,168,232,.15); color: #cde6f7; border-color: #274a63; }
.dark-console .flow-preview-system { background: rgba(255,255,255,.05); color: #a5b7c4; }
.dark-console .flow-preview-input input { border-color: #345064; background: #0d1e2b; color: #e4edf4; color-scheme: dark; }

/* Flow preview — voice-enabled dialog layout */
.flow-preview-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 280px; align-items: stretch; }
@media (max-width: 800px) { .flow-preview-grid { grid-template-columns: 1fr; } }
.flow-preview-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.flow-preview-toolbar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 10px;
  padding: 8px 10px;
  border: 1px solid #dbe4ea; border-radius: 10px;
  background: linear-gradient(180deg, #f8fbfd 0%, #f0f5f9 100%);
}
.flow-preview-toggles { display: inline-flex; align-items: center; gap: 6px; }

/* Pill toggle — active/inactive segmented button style */
.flow-preview-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  border: 1px solid #cbd6df;
  background: #ffffff;
  color: #52616d;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: color .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.flow-preview-pill:hover:not([disabled]) { border-color: #a9c1d1; color: #24313c; }
.flow-preview-pill[disabled] { opacity: .5; cursor: not-allowed; }
.flow-preview-pill-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #d0d8de;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.6);
}
.flow-preview-pill.is-on {
  color: #0067b8; border-color: #b8dcee;
  background: linear-gradient(180deg, #eef7fd 0%, #dcebf7 100%);
  box-shadow: 0 1px 3px rgba(0,120,212,.14), inset 0 1px 0 rgba(255,255,255,.6);
}
.flow-preview-pill.is-on .flow-preview-pill-dot {
  background: #2e8540;
  box-shadow: 0 0 0 3px rgba(46,133,64,.18), inset 0 0 0 2px rgba(255,255,255,.6);
}
/* Icon-only variant used inside the preview toolbar so both toggles fit
   alongside the language chip and voice picker on a single row. Colour of
   the icon itself carries the on/off signal — no dot label needed. */
.flow-preview-pill.is-icon { padding: 6px 8px; }
.flow-preview-pill.is-icon .flow-preview-pill-dot { display: none; }
.flow-preview-pill.is-icon iconify-icon { color: #7c8994; transition: color .14s ease; }
.flow-preview-pill.is-icon.is-on iconify-icon { color: #0067b8; }

/* Language / voice chip — read-only status showing the tenant's config */
.flow-preview-lang-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbe4ea;
  font-size: 10.5px; font-weight: 700; color: #52616d;
  white-space: nowrap;
}
.flow-preview-lang-chip iconify-icon { color: #0067b8; }
.flow-preview-lang-chip-sep { width: 1px; height: 12px; background: #dbe4ea; }
.flow-preview-lang-chip-voice { color: #7357d3; }

/* Right-side cluster keeps the language chip and voice picker together as one
   unit so they stay side-by-side on the same row (either next to the toggles
   when the toolbar is wide, or wrapped together onto their own row when not),
   instead of the picker breaking to a line by itself. */
.flow-preview-toolbar-right {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
  flex: 1 1 auto; min-width: 0;
  justify-content: flex-end;
}
.flow-preview-voice-picker { min-width: 160px; max-width: 240px; flex: 0 1 220px; }
.flow-preview-voice-picker .combobox-trigger {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd6df;
  background: #fff;
  font-size: 11px;
}
.flow-preview-voice-picker .combobox-trigger:hover { border-color: #a9c1d1; }

.dark-console .flow-preview-toolbar { background: linear-gradient(180deg, #10273a 0%, #0b1e2d 100%); border-color: #253d51; }
.dark-console .flow-preview-pill { background: #0e2233; border-color: #294a63; color: #a5b7c4; }
.dark-console .flow-preview-pill:hover:not([disabled]) { border-color: #4a7088; color: #cbdae4; }
.dark-console .flow-preview-pill.is-on { color: #7cc5ff; background: rgba(74,168,232,.14); border-color: rgba(74,168,232,.36); }
.dark-console .flow-preview-pill-dot { background: #2f4a5f; box-shadow: inset 0 0 0 2px rgba(16,39,58,.6); }
.dark-console .flow-preview-pill.is-on .flow-preview-pill-dot { background: #58d385; box-shadow: 0 0 0 3px rgba(88,211,133,.22), inset 0 0 0 2px rgba(16,39,58,.6); }
.dark-console .flow-preview-lang-chip { background: #0e2233; border-color: #294a63; color: #cbdae4; }
.dark-console .flow-preview-lang-chip iconify-icon { color: #7cc5ff; }
.dark-console .flow-preview-lang-chip-sep { background: #294a63; }
.dark-console .flow-preview-lang-chip-voice { color: #b39cef; }
.dark-console .flow-preview-voice-picker .combobox-trigger { background: #10273a; border-color: #294a63; color: #cbdae4; }

/* Mic button in the input row — pulses when actively listening */
.flow-preview-mic {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: 0 0 36px;
  border: 1px solid #c0ccd5; border-radius: 8px;
  background: #ffffff; color: #52616d;
  transition: color .12s, border-color .12s, background .12s, box-shadow .12s;
}
.flow-preview-mic:hover { color: #0067b8; border-color: #a9c1d1; background: #eef7fd; }
.flow-preview-mic.is-listening {
  color: #ffffff; background: #b4232c; border-color: #b4232c;
  box-shadow: 0 0 0 0 rgba(180,35,44,.55);
  animation: flowMicPulse 1.2s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes flowMicPulse {
  0%   { box-shadow: 0 0 0 0 rgba(180,35,44,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(180,35,44,0);  }
  100% { box-shadow: 0 0 0 0 rgba(180,35,44,0);   }
}

/* Flow trace panel — mirror of the whole flow, live-highlighted */
.flow-preview-map-tile { max-height: 260px; overflow-y: auto; }
.flow-preview-map { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.flow-preview-map-node {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 11px;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.flow-preview-map-node.is-visited { color: #52616d; opacity: .75; }
.flow-preview-map-node.is-pending { color: #7c8994; }
.flow-preview-map-node.is-current { color: #0067b8; background: #eef7fd; border-color: #b8dcee; font-weight: 700; box-shadow: 0 2px 6px rgba(0,120,212,.14); }
.flow-preview-map-icon { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: rgba(0,120,212,.08); color: #0067b8; }
.flow-preview-map-node.tone-green  .flow-preview-map-icon { background: rgba(46,133,64,.10);  color: #217a48; }
.flow-preview-map-node.tone-amber  .flow-preview-map-icon { background: rgba(217,119,6,.10);  color: #b26005; }
.flow-preview-map-node.tone-purple .flow-preview-map-icon { background: rgba(115,87,211,.12); color: #7357d3; }
.flow-preview-map-node.tone-red    .flow-preview-map-icon { background: rgba(180,35,44,.10);  color: #b4232c; }
.flow-preview-map-node.tone-cyan   .flow-preview-map-icon { background: rgba(6,148,170,.10);  color: #0e7c93; }
.flow-preview-map-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-preview-map-id { font-size: 9.5px; font-family: 'JetBrains Mono', monospace; color: #a3b2be; }

.dark-console .flow-preview-toolbar { background: #10273a; border-color: #253d51; }
.dark-console .flow-preview-switch { background: #0e2233; border-color: #294a63; color: #cbdae4; }
.dark-console .flow-preview-switch:hover { border-color: #4a7088; }
.dark-console .flow-preview-voice-select { background: #0a1a26; border-color: #2f4a5f; color: #e4edf4; color-scheme: dark; }
.dark-console .flow-preview-mic { background: #0a1a26; border-color: #345064; color: #cbdae4; }
.dark-console .flow-preview-mic:hover { color: #7cc5ff; border-color: #4a7088; background: #14344c; }
.dark-console .flow-preview-map-node.is-visited { color: #93a9b8; }
.dark-console .flow-preview-map-node.is-pending { color: #7f95a5; }
.dark-console .flow-preview-map-node.is-current { color: #7cc5ff; background: rgba(74,168,232,.14); border-color: rgba(74,168,232,.32); box-shadow: 0 2px 6px rgba(74,168,232,.18); }

/* Info callout — a soft, tinted box for contextual guidance beside form
   controls (e.g. the ACD "default queue" explainer). Not an error/warning. */
.info-callout { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid #c8e0f2; border-radius: 10px; background: linear-gradient(140deg, #eef7fd 0%, #f4faff 100%); color: #14476d; }
.info-callout-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 8px; background: rgba(0,120,212,.14); color: #0067b8; }
.info-callout-body { display: flex; flex-direction: column; gap: 2px; font-size: 11px; line-height: 1.5; }
.info-callout-body strong { font-size: 11.5px; color: #0e4a76; font-weight: 700; }
.info-callout-body code { padding: 1px 5px; border: 1px solid rgba(0,103,184,.20); border-radius: 4px; background: rgba(255,255,255,.6); font-family: 'JetBrains Mono', monospace; font-size: 10px; color: #0e4a76; }
.dark-console .info-callout { border-color: #274a63; background: linear-gradient(140deg, #0e2a3d 0%, #0a2231 100%); color: #a7d0ec; }
.dark-console .info-callout-icon { background: rgba(74,168,232,.18); color: #82cff9; }
.dark-console .info-callout-body strong { color: #cde6f7; }
.dark-console .info-callout-body code { border-color: #34637f; background: rgba(255,255,255,.05); color: #cde6f7; }

/* Contact center — nested inner tiles that live inside a .panel and adapt
   to dark mode (Tailwind arbitrary hex values like bg-[#f9fbfc] don't). */
.cc-tile { padding: 12px; border: 1px solid #e5ebf0; border-radius: 8px; background: #f9fbfc; color: #34434e; }
.cc-tile-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #7c8994; }
.cc-tile-value { margin-top: 4px; font-size: 16px; font-weight: 700; color: #1f2933; }
.cc-tile-title { font-size: 12px; font-weight: 600; color: #1f2933; }
.cc-tile-note  { font-size: 10.5px; color: #6e7781; }
.cc-tile-url   { flex: 1; height: 32px; border: 1px solid #c0ccd5; border-radius: 7px; background: #fff; padding: 0 8px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #25313b; }
.dark-console .cc-tile { border-color: #253d51; background: #0d1e2b; color: #cbd8e1; }
.dark-console .cc-tile-label { color: #93a9b8; }
.dark-console .cc-tile-value { color: #f0f6fa; }
.dark-console .cc-tile-title { color: #f0f6fa; }
.dark-console .cc-tile-note  { color: #a5b7c4; }
.dark-console .cc-tile-url   { border-color: #345064; background: #102536; color: #e4edf4; color-scheme: dark; }

/* ACD master toggle row (contact center) */
.acd-toggle-row { display: flex; align-items: center; gap: 14px; padding: 4px 0; cursor: pointer; }
.acd-toggle-row > input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.acd-toggle-row > .switch .track { width: 40px; height: 22px; background: #c8d4de; border-radius: 999px; transition: background .16s ease; }
.acd-toggle-row > .switch .thumb { position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .16s ease; }
.acd-toggle-row > input:checked ~ .switch .track { background: #0078d4; }
.acd-toggle-row > input:checked ~ .switch .thumb { transform: translateX(18px); }
.acd-toggle-copy { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #52616d; }
.acd-toggle-copy strong { font-size: 12px; color: #1f2933; }
.dark-console .acd-toggle-row > .switch .track { background: #345166; }
.dark-console .acd-toggle-copy { color: #a5b7c4; }
.dark-console .acd-toggle-copy strong { color: #e4edf4; }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 36px; height: 20px; background: #c8d4de; border-radius: 999px; transition: background .16s ease; }
.switch .thumb { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.16); transition: transform .16s ease; }
.switch input:checked + .track { background: #0078d4; }
.switch input:checked + .track + .thumb { transform: translateX(16px); }
.dark-console .switch .track { background: #345166; }

/* Small button variants */
.btn-sm { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid #c0ccd5; border-radius: 7px; background: #fff; font: inherit; font-size: 10px; font-weight: 700; color: #34434e; cursor: pointer; transition: all .12s; }
.btn-sm:hover { border-color: #0078d4; color: #0078d4; }
.dark-console .btn-sm { border-color: #345166; background: #10202e; color: #c6d3dd; }
.dark-console .btn-sm:hover { border-color: #4aa8e8; color: #4aa8e8; }

/* Anim spin */
@keyframes v2-spin { to { transform: rotate(360deg); } }
.animate-spin { animation: v2-spin 1s linear infinite; }

/* Data-table wrapper (search + table + pagination) */
.data-table-wrap { display: block; }
.data-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid #d8dee4; background: linear-gradient(90deg,#ffffff,#f8fbfd); }
.dark-console .data-table-toolbar { border-color: #263b4b; background: #0f1f2c; }
.data-table-search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.data-table-search input { width: 100%; height: 34px; border: 1px solid #c0ccd5; border-radius: 8px; padding: 0 12px 0 32px; background: #fff; font: inherit; font-size: 11px; color: #25313b; outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
.data-table-search input:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.12); }
.data-table-search .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #7c8994; }
.data-table-meta { font-size: 10px; color: #6e7781; }
.dark-console .data-table-search input { border-color: #345064; background: #0d1e2b; color: #e4edf4; }
.dark-console .data-table-meta { color: #a5b7c4; }

.data-table-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid #d8dee4; background: rgba(244,248,251,.6); font-size: 10px; color: #57606a; }
.dark-console .data-table-pagination { border-color: #263b4b; background: rgba(15,31,44,.6); color: #a5b7c4; }
.data-table-pagination .page-controls { display: flex; align-items: center; gap: 4px; }
.data-table-pagination button { display: inline-grid; min-width: 30px; height: 30px; place-items: center; border: 1px solid #bac6cf; border-radius: 6px; background: #fff; color: #34434e; padding: 0 8px; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; transition: all .12s ease; }
.data-table-pagination button:hover:not(:disabled):not(.is-active) { border-color: #0078d4; color: #0078d4; }
.data-table-pagination button.is-active { border-color: #0067b8; background: #0078d4; color: #fff; box-shadow: 0 3px 9px rgba(0,120,212,.22); }
.data-table-pagination button:disabled { cursor: not-allowed; border-color: #d8e0e6; background: #f4f6f8; color: #9ca8b1; box-shadow: none; }
.dark-console .data-table-pagination button { border-color: #345166; background: #10202e; color: #c6d3dd; }
.dark-console .data-table-pagination button:hover:not(:disabled):not(.is-active) { border-color: #4aa8e8; color: #4aa8e8; }
.dark-console .data-table-pagination button.is-active { border-color: #3d9ee3; background: #1978c9; color: #fff; }
.dark-console .data-table-pagination button:disabled { border-color: #263a49; background: #0a1823; color: #506575; }

/* Mode option (selected state) */
.option-button.option-selected { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); background: #f0f8ff; }
.option-button.option-selected .option-kicker { color: #0067b8; }
.dark-console .option-button.option-selected { border-color: #4aa8e8; background: #102434; box-shadow: 0 0 0 3px rgba(74,168,232,.14); }

/* Empty state inside table */
.data-table-empty { padding: 40px 20px; text-align: center; color: #7c8994; font-size: 12px; }

/* ══════════════════════════════════════════════════════════════════
   Richer per-page components
   ══════════════════════════════════════════════════════════════════ */

/* Page-hero card — vibrant introduction to each page */
.page-hero { position: relative; overflow: hidden; border-radius: 14px; padding: 20px 24px; color: #fff; box-shadow: 0 16px 40px rgba(12,42,68,0.20); }
.page-hero::before { content: ""; position: absolute; inset: 0; opacity: .55; background: radial-gradient(circle at 78% -20%, rgba(39, 137, 210, .38), transparent 40%); pointer-events: none; }
.page-hero.tone-navy { background: linear-gradient(120deg, #0b1c2b 0%, #103c5d 58%, #15273b 100%); }
.page-hero.tone-lime { background: linear-gradient(120deg, #08221b 0%, #1c4b39 58%, #14332a 100%); }
.page-hero.tone-purple { background: linear-gradient(120deg, #170a2c 0%, #3c1c74 58%, #1f102f 100%); }
.page-hero.tone-amber { background: linear-gradient(120deg, #2a1a06 0%, #6b3b0a 58%, #2c1a08 100%); }
.page-hero.tone-teal { background: linear-gradient(120deg, #06232a 0%, #0e5566 58%, #0b2f38 100%); }
.page-hero.tone-blue  { background: linear-gradient(120deg, #051a2c 0%, #0a3f6d 58%, #0a1e33 100%); }
.page-hero.tone-green { background: linear-gradient(120deg, #072418 0%, #14563a 58%, #0b271b 100%); }
.page-hero.tone-red   { background: linear-gradient(120deg, #2c0709 0%, #6b1218 58%, #2a0b0e 100%); }
.page-hero-inner { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.page-hero-icon { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border-radius: 14px; background: rgba(255,255,255,.10); color: #d9f4b7; box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 6px 20px rgba(0,0,0,.20); }
.page-hero-icon iconify-icon { font-size: 24px; }
.page-hero-body { flex: 1; min-width: 260px; }
.page-hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #b8f36b; }
.page-hero-body h2 { margin-top: 8px; font-size: 22px; font-weight: 640; letter-spacing: -.03em; line-height: 1.15; text-wrap: balance; }
.page-hero-body p { margin-top: 6px; max-width: 620px; font-size: 12px; line-height: 1.6; color: #b8cadb; }
.page-hero-stats { display: grid; gap: 2px 24px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(120px, auto)); }
.page-hero-stats > div strong { display: block; font-size: 20px; font-weight: 650; letter-spacing: -.02em; color: #f5faff; }
.page-hero-stats > div span { display: block; margin-top: 2px; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #91a9bd; }
.page-hero-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; min-width: 200px; }
@media (max-width: 720px) { .page-hero-inner { flex-direction: column; } .page-hero-side { align-items: flex-start; width: 100%; } }

/* Rich metric card grid — used across metric-heavy pages */
.metric-grid { display: grid; gap: 12px; grid-template-columns: repeat(1, minmax(0,1fr)); }
@media (min-width: 600px) { .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1100px) { .metric-grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .metric-grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.metric-card { position: relative; overflow: hidden; border: 1px solid rgba(148, 172, 190, .38); border-radius: 14px; padding: 16px 18px; background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(246,250,253,.92)); box-shadow: 0 10px 30px rgba(25,61,89,.07), inset 0 1px 0 rgba(255,255,255,.9); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: rgba(var(--_rgb, 0 120 212), .28); box-shadow: 0 18px 38px rgba(25,61,89,.13); }
.metric-card::before { content: ""; position: absolute; right: -46px; top: -46px; width: 120px; height: 120px; border-radius: 999px; background: radial-gradient(circle, rgba(var(--_rgb, 0 120 212), .18), transparent 70%); pointer-events: none; }
.metric-card-head { display: flex; align-items: center; justify-content: space-between; }
.metric-card-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: rgba(var(--_rgb, 0 120 212), .13); color: rgb(var(--_rgb, 0 120 212)); }
.metric-card-icon iconify-icon { font-size: 16px; }
.metric-card-label { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #6e7781; text-transform: uppercase; }
.metric-card-value { margin-top: 12px; font-size: 30px; font-weight: 680; letter-spacing: -.045em; color: #14212d; line-height: 1; }
.metric-card-hint { margin-top: 6px; font-size: 10px; color: #6e7781; }
.metric-card-delta { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 999px; font-size: 9px; font-weight: 800; background: rgba(var(--_rgb, 0 120 212), .10); color: rgb(var(--_rgb, 0 120 212)); }
.dark-console .metric-card { border-color: rgba(var(--_rgb, 0 120 212), .18); background: linear-gradient(145deg,rgba(17,35,49,.98),rgba(11,25,37,.98)); box-shadow: 0 14px 34px rgba(0,0,0,.20); }
.dark-console .metric-card-value { color: #f3f8fb; }
.dark-console .metric-card-hint { color: #a5b7c4; }
.dark-console .metric-card-label { color: #a5b7c4; }

/* Section decorator */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.section-title h3 { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #26333d; }
.section-title h3 span.tile { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; background: #edf4f8; color: #0078d4; box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.section-title h3 span.tile iconify-icon { font-size: 14px; }
.section-title p { margin: 4px 0 0 36px; font-size: 10px; color: #6e7781; }
.dark-console .section-title h3 { color: #f4f8fb; }
.dark-console .section-title h3 span.tile { background: #193348; color: #74c5f7; }

/* Feature card — for AI agents, integrations, plans */
.feature-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid #d7e1e8; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(20,43,61,.06); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.feature-card:hover { transform: translateY(-2px); border-color: #b8dcee; box-shadow: 0 12px 28px rgba(25,61,89,.10); }
.feature-card .icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 10px; background: rgba(0,120,212,.10); color: #0078d4; }
.feature-card .icon iconify-icon { font-size: 20px; }
.feature-card h4 { font-size: 13px; font-weight: 700; color: #26333d; }
.feature-card p { font-size: 11px; color: #6e7781; line-height: 1.55; }
.feature-card .footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; border-top: 1px solid #f0f4f7; font-size: 10px; }
.dark-console .feature-card { border-color: #294253; background: #0d1c29; box-shadow: 0 10px 26px rgba(0,0,0,.20); }
.dark-console .feature-card h4 { color: #f4f8fb; }
.dark-console .feature-card p { color: #a5b7c4; }
.dark-console .feature-card .footer { border-color: #253c4c; }

/* Rich empty state */
.rich-empty { display: grid; place-items: center; padding: 60px 24px; border: 1px dashed #cbd6df; border-radius: 12px; background: linear-gradient(145deg,rgba(255,255,255,.6),rgba(230,240,247,.4)); text-align: center; }
.rich-empty-icon { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 999px; background: linear-gradient(135deg,#eaf3fa,#d5ebfa); color: #0078d4; box-shadow: 0 8px 20px rgba(0,120,212,.15); }
.rich-empty-icon iconify-icon { font-size: 30px; }
.rich-empty h3 { margin-top: 14px; font-size: 15px; font-weight: 700; color: #26333d; }
.rich-empty p { margin-top: 6px; max-width: 420px; font-size: 12px; color: #6e7781; line-height: 1.55; }
.rich-empty .cta { margin-top: 16px; }
.dark-console .rich-empty { border-color: #345166; background: linear-gradient(145deg,#0d1c29,#122a3c); }
.dark-console .rich-empty-icon { background: linear-gradient(135deg,#173a55,#1c4568); color: #7dccf8; }
.dark-console .rich-empty h3 { color: #f4f8fb; }
.dark-console .rich-empty p { color: #a5b7c4; }

/* Timeline (for reminders history, activity logs) */
.timeline { position: relative; margin-left: 8px; padding-left: 20px; border-left: 2px dashed #d5dee5; }
.timeline > .item { position: relative; padding: 0 0 16px 0; }
.timeline > .item::before { content: ""; position: absolute; left: -27px; top: 4px; width: 12px; height: 12px; border-radius: 999px; background: #fff; border: 3px solid #0078d4; box-shadow: 0 2px 6px rgba(0,120,212,.2); }
.timeline > .item.success::before { border-color: #2e8540; }
.timeline > .item.warn::before { border-color: #d97706; }
.timeline > .item.error::before { border-color: #b4232c; }
.timeline-item-title { font-size: 11px; font-weight: 600; color: #26333d; }
.timeline-item-meta { margin-top: 2px; font-size: 10px; color: #7c8994; }
.dark-console .timeline { border-color: #345166; }
.dark-console .timeline > .item::before { background: #0d1c29; }
.dark-console .timeline-item-title { color: #e4edf4; }
.dark-console .timeline-item-meta { color: #a5b7c4; }

/* Sub-nav tabs (for settings pages with sub-sections) */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid rgba(137,158,173,.34); border-radius: 12px; background: rgba(255,255,255,.72); box-shadow: 0 6px 20px rgba(28,58,80,.06); backdrop-filter: blur(10px); overflow-x: auto; max-width: 100%; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 11px; font-weight: 650; color: #52616d; cursor: pointer; white-space: nowrap; transition: background .16s ease, color .16s ease; }
.tabs button:hover { color: #26333d; }
.tabs button.is-active { background: linear-gradient(145deg,#168ce0,#0563ad); color: #fff; box-shadow: 0 3px 8px rgba(0,120,212,.24); }
.tabs button iconify-icon { font-size: 14px; }
.dark-console .tabs { border-color: rgba(89,127,151,.35); background: rgba(9,24,36,.7); }
.dark-console .tabs button { color: #a5b7c4; }
.dark-console .tabs button:hover { color: #dce7ef; }
.dark-console .tabs button.is-active { background: linear-gradient(145deg,#348fdb,#176fc2); color: #fff; }

/* Row-level action menu (three-dots dropdown) */
.action-menu { position: fixed; z-index: 120; min-width: 190px; padding: 4px; border: 1px solid #cbd6df; border-radius: 10px; background: #fff; box-shadow: 0 18px 44px rgba(17,44,67,.18); font-size: 11px; }
.action-menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: #34434e; font: inherit; font-size: 11px; font-weight: 600; text-align: left; cursor: pointer; transition: background .12s ease, color .12s ease; }
.action-menu button:hover { background: #edf6fc; color: #0872bd; }
.action-menu button iconify-icon { font-size: 14px; color: #6b7a86; }
.action-menu button:hover iconify-icon { color: #0872bd; }
.action-menu button.is-danger { color: #b4232c; }
.action-menu button.is-danger:hover { background: #fdecec; color: #942028; }
.action-menu button.is-danger iconify-icon { color: #b4232c; }
.action-menu-sep { height: 1px; margin: 4px 6px; background: #e5ebf0; }
.dark-console .action-menu { border-color: #365366; background: #102331; box-shadow: 0 22px 48px rgba(0,0,0,.42); }
.dark-console .action-menu button { color: #cbd8e1; }
.dark-console .action-menu button:hover { background: #16344a; color: #85cff9; }
.dark-console .action-menu button iconify-icon { color: #93a9b8; }
.dark-console .action-menu button:hover iconify-icon { color: #85cff9; }
.dark-console .action-menu-sep { background: #263e50; }

/* Row action button — 3-dot menu trigger inside data tables. Own hover
   tone per theme so dark mode doesn't flash bright white. */
.row-action-btn { color: #657581; transition: background .14s ease, color .14s ease, box-shadow .14s ease; }
.row-action-btn:hover { background: #ffffff; color: #0872bd; box-shadow: 0 1px 3px rgba(17,44,67,.10); }
.dark-console .row-action-btn { color: #8fa6b6; }
.dark-console .row-action-btn:hover { background: #17364b; color: #78cafa; box-shadow: inset 0 0 0 1px #2b5874; }

/* Icon-tile — small colored icon holder for headers */
.icon-tile { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: rgba(0,120,212,.10); color: #0078d4; }
.icon-tile.tone-green { background: rgba(46,133,64,.12); color: #2e8540; }
.icon-tile.tone-amber { background: rgba(217,119,6,.12); color: #d97706; }
.icon-tile.tone-red { background: rgba(180,35,44,.12); color: #b4232c; }
.icon-tile.tone-purple { background: rgba(115,87,211,.12); color: #7357d3; }
.icon-tile.tone-lime { background: rgba(183,242,58,.16); color: #4d6b0a; }

/* ═══ Analytics — premium visuals ═══ */
.analytics-card { border: 1px solid #d5deea; border-radius: 14px; background: linear-gradient(180deg, #ffffff, #fbfdff); box-shadow: 0 10px 28px rgba(25,61,89,.06); overflow: hidden; }
.dark-console .analytics-card { border-color: #263f52; background: linear-gradient(180deg, #0f2536, #0a1c2a); box-shadow: 0 14px 32px rgba(0,0,0,.28); }
.analytics-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.analytics-card-head h2 { font-size: 13px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.analytics-card-eyebrow { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #7c8994; margin-bottom: 4px; }
.analytics-card-sub { margin-top: 3px; font-size: 10px; color: #64727d; }
.analytics-card-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: #7c8994; }
.analytics-card-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; }
.analytics-card-body { padding: 12px 18px 18px; }
.dark-console .analytics-card-head h2 { color: #edf4f8; }
.dark-console .analytics-card-eyebrow { color: #93a9b8; }
.dark-console .analytics-card-sub { color: #93a9b8; }
.dark-console .analytics-card-legend { color: #93a9b8; }

/* Funnel stages */
.funnel-stages { display: grid; gap: 12px; }
.funnel-stage { display: grid; gap: 6px; }
.funnel-stage-head { display: flex; align-items: center; gap: 8px; }
.funnel-stage-icon { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--_tone) 16%, transparent); color: var(--_tone); }
.funnel-stage-label { flex: 1; font-size: 11px; font-weight: 600; color: #26333d; }
.funnel-stage-value { font-size: 12px; font-weight: 700; color: #1f2933; font-variant-numeric: tabular-nums; }
.funnel-stage-bar { position: relative; height: 10px; overflow: hidden; border-radius: 999px; background: #eef3f8; }
.funnel-stage-bar > span { display: block; height: 100%; border-radius: 999px; transition: width .35s cubic-bezier(.2,.7,.2,1); box-shadow: 0 2px 8px rgba(0,120,212,.18); }
.funnel-stage-drop { font-size: 9px; color: #7c8994; text-align: right; }
.funnel-stage-drop .up { color: #2e8540; font-weight: 700; }
.dark-console .funnel-stage-label { color: #dceaf3; }
.dark-console .funnel-stage-value { color: #f0f6fa; }
.dark-console .funnel-stage-bar { background: #1a3247; }
.dark-console .funnel-stage-drop { color: #96acbb; }

/* Hour heatmap */
.hour-heatmap { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; align-items: end; height: 150px; padding: 6px 2px 22px; position: relative; }
.hour-cell { position: relative; height: 100%; display: flex; align-items: flex-end; }
.hour-cell-bar { display: block; width: 100%; height: var(--_h, 20px); border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, color-mix(in srgb, #0078d4 calc(var(--_intensity, .35) * 100%), transparent), color-mix(in srgb, #0078d4 calc(var(--_intensity, .35) * 100% - 20%), transparent)); box-shadow: inset 0 -2px 0 rgba(0,60,110,.12); transition: transform .18s ease; }
.hour-cell:hover .hour-cell-bar { transform: translateY(-2px); }
.hour-cell-label { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 8px; color: #7c8994; font-weight: 600; letter-spacing: .04em; }
.hour-cell.is-peak .hour-cell-bar { background: linear-gradient(180deg, #b7f23a, #22a477); box-shadow: 0 0 0 2px rgba(34,164,119,.28), inset 0 -2px 0 rgba(0,60,60,.15); }
.hour-cell.is-peak::after { content: "peak"; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 8px; font-weight: 800; color: #22a477; letter-spacing: .1em; text-transform: uppercase; }
.dark-console .hour-cell-label { color: #93a9b8; }

/* Outcomes rows */
.outcome-row { display: grid; gap: 4px; }
.outcome-row-head { display: grid; grid-template-columns: 20px 1fr auto auto; gap: 8px; align-items: center; }
.outcome-icon { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--_tone) 18%, transparent); color: var(--_tone); }
.outcome-label { font-size: 11px; font-weight: 600; color: #26333d; }
.outcome-value { font-size: 12px; font-weight: 700; color: #1f2933; font-variant-numeric: tabular-nums; }
.outcome-share { font-size: 10px; font-weight: 700; color: #7c8994; min-width: 34px; text-align: right; }
.outcome-bar { height: 8px; overflow: hidden; border-radius: 999px; background: #eef3f8; }
.outcome-bar > span { display: block; height: 100%; border-radius: 999px; transition: width .35s ease; }
.dark-console .outcome-label { color: #dceaf3; }
.dark-console .outcome-value { color: #f0f6fa; }
.dark-console .outcome-share { color: #93a9b8; }
.dark-console .outcome-bar { background: #1a3247; }

/* Channel rows */
.channel-rows { display: grid; gap: 10px; }
.channel-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; }
.channel-row-icon { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: color-mix(in srgb, var(--_tone) 16%, transparent); color: var(--_tone); }
.channel-row-body { display: grid; gap: 5px; }
.channel-row-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 11px; color: #26333d; font-weight: 600; }
.channel-row-value { color: #1f2933; font-weight: 700; font-variant-numeric: tabular-nums; }
.channel-row-value em { color: #7c8994; font-weight: 700; margin-left: 6px; font-style: normal; font-size: 10px; }
.channel-row-bar { height: 6px; overflow: hidden; border-radius: 999px; background: #eef3f8; }
.channel-row-bar > span { display: block; height: 100%; border-radius: 999px; transition: width .35s ease; }
.dark-console .channel-row-head { color: #dceaf3; }
.dark-console .channel-row-value { color: #f0f6fa; }
.dark-console .channel-row-bar { background: #1a3247; }

/* Channel doughnut center */
.channel-doughnut-center { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; pointer-events: none; }
.channel-doughnut-center strong { display: block; font-size: 22px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; line-height: 1.1; }
.channel-doughnut-center span { display: block; font-size: 9px; color: #7c8994; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; line-height: 1.1; }
.dark-console .channel-doughnut-center strong { color: #f0f6fa; }
.dark-console .channel-doughnut-center span { color: #93a9b8; }

/* Comparison mini-cards */
.comparison-card { position: relative; overflow: hidden; border: 1px solid #dce4ec; border-radius: 12px; padding: 12px 14px; background: linear-gradient(160deg, #ffffff, #f8fbfd); }
.comparison-card::before { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 999px; background: radial-gradient(circle, rgba(0,120,212,.14), transparent 70%); }
.comparison-card.tone-green::before { background: radial-gradient(circle, rgba(46,133,64,.14), transparent 70%); }
.comparison-card.tone-purple::before { background: radial-gradient(circle, rgba(115,87,211,.14), transparent 70%); }
.comparison-card.tone-amber::before { background: radial-gradient(circle, rgba(217,119,6,.14), transparent 70%); }
.comparison-card-head { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #7c8994; }
.comparison-card-value { margin-top: 10px; font-size: 22px; font-weight: 700; color: #1f2933; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.comparison-card-foot { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #64727d; }
.dark-console .comparison-card { border-color: #294156; background: linear-gradient(160deg, #10273a, #0b1b28); }
.dark-console .comparison-card-value { color: #f0f6fa; }
.dark-console .comparison-card-foot { color: #93a9b8; }
.dark-console .comparison-card-head { color: #93a9b8; }

/* Top questions list */
.top-questions { display: grid; gap: 8px; }
.tq-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed #e5ebf0; }
.tq-row:last-child { border-bottom: 0; }
.tq-rank { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; background: linear-gradient(135deg, #edf4fa, #dce8f2); color: #0067b8; font-size: 11px; font-weight: 800; }
.tq-body { display: grid; gap: 4px; min-width: 0; }
.tq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tq-label { font-size: 11px; font-weight: 600; color: #26333d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-count { font-size: 12px; font-weight: 700; color: #1f2933; font-variant-numeric: tabular-nums; }
.tq-bar { height: 5px; overflow: hidden; border-radius: 999px; background: #eef3f8; }
.tq-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7357d3, #0078d4); }
.dark-console .tq-row { border-color: #253c4e; }
.dark-console .tq-rank { background: linear-gradient(135deg, #1a2f42, #12293c); color: #7cc5ff; }
.dark-console .tq-label { color: #dceaf3; }
.dark-console .tq-count { color: #f0f6fa; }
.dark-console .tq-bar { background: #1a3247; }

/* ═══ Voice preview player (agents page) ═══ */
.voice-player { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid #d5deea; border-radius: 12px; background: linear-gradient(160deg, #ffffff, #f4f8fc); box-shadow: 0 6px 18px rgba(25,61,89,.06); min-width: 0; overflow: hidden; }
.voice-player > * { min-width: 0; }
.voice-player-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-width: 0; }
.voice-player-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: linear-gradient(160deg, #0078d4, #4eb3ed); color: #fff; box-shadow: 0 4px 12px rgba(0,120,212,.28); }
.voice-player-name { flex: 1; min-width: 0; }
.voice-player-name strong { display: block; font-size: 13px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-player-name span { display: block; font-size: 10px; color: #7c8994; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-player-play { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 999px; background: linear-gradient(135deg, #0078d4, #0067b8); color: #fff; cursor: pointer; box-shadow: 0 6px 16px rgba(0,120,212,.35); transition: transform .16s ease, box-shadow .16s ease; }
.voice-player-play:hover { transform: scale(1.05); box-shadow: 0 8px 20px rgba(0,120,212,.42); }
.voice-player-play:disabled { opacity: .55; cursor: not-allowed; }
.voice-player-play.is-loading iconify-icon { animation: vpspin .8s linear infinite; }
@keyframes vpspin { to { transform: rotate(360deg); } }
.voice-player-progress { display: flex; align-items: center; gap: 10px; min-width: 0; }
.voice-player-time { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; color: #7c8994; min-width: 34px; text-align: center; flex: 0 0 auto; }
.voice-player-track { position: relative; flex: 1 1 0; min-width: 0; height: 8px; border-radius: 999px; background: #eaf1f6; cursor: pointer; overflow: hidden; }
.voice-player-track-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #0078d4, #4eb3ed); transition: width .12s linear; }
.voice-player-wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 2px; pointer-events: none; }
.voice-player-wave span { display: block; width: 2px; border-radius: 2px; background: rgba(255,255,255,.55); }
.voice-player-status { font-size: 9px; color: #7c8994; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.voice-player-status.is-playing { color: #22a477; }
.voice-player-status.is-error { color: #b4232c; }
.voice-player-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.voice-player-icon-btn { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #dbe4ea; border-radius: 8px; background: #fff; color: #52616d; cursor: pointer; transition: color .16s, border-color .16s; }
.voice-player-icon-btn:hover { color: #0067b8; border-color: #a9c1d1; }
.voice-player-icon-btn.is-active { color: #0067b8; border-color: #a9c1d1; background: #eef7fd; }
.dark-console .voice-player { border-color: #294156; background: linear-gradient(160deg, #10273a, #0b1b28); box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.dark-console .voice-player-name strong { color: #f0f6fa; }
.dark-console .voice-player-name span { color: #93a9b8; }
.dark-console .voice-player-track { background: #1a3247; }
.dark-console .voice-player-time { color: #93a9b8; }
.dark-console .voice-player-icon-btn { background: #10283a; border-color: #2f4a5f; color: #cbdae4; }
.dark-console .voice-player-icon-btn:hover { color: #7cc5ff; border-color: #4a7088; }

/* ═══ Jump cards (Behavior tab → Related settings) ═══
   Compact horizontal tile: [icon] title on one line, description below,
   trailing chevron on the right — everything centred within the row. */
.jump-card { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 3px 12px; padding: 14px 16px; border: 1px solid #d7e1e8; border-radius: 12px; background: linear-gradient(160deg, #ffffff, #f5fafd); text-align: center; cursor: pointer; box-shadow: 0 4px 14px rgba(20,43,61,.05); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.jump-card:hover { transform: translateY(-2px); border-color: #b8dcee; box-shadow: 0 12px 28px rgba(25,61,89,.10); }
.jump-card:focus-visible { outline: 2px solid #0078d4; outline-offset: 2px; }
.jump-card-row { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.jump-card-icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: rgba(0,120,212,.12); color: #0078d4; flex-shrink: 0; }
.jump-card-title { font-size: 12px; font-weight: 700; letter-spacing: -.01em; color: #1f2933; line-height: 1; }
.jump-card-desc { grid-column: 1 / -1; margin-top: 2px; font-size: 10px; color: #6e7781; line-height: 1.4; text-align: center; }
.jump-card-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: grid; width: 22px; height: 22px; place-items: center; border-radius: 999px; color: #7c8994; background: rgba(0,120,212,.06); transition: color .16s ease, background .16s ease, transform .16s ease; }
.jump-card:hover .jump-card-arrow { color: #0078d4; background: rgba(0,120,212,.14); transform: translateY(-50%) translateX(2px); }
.jump-card.tone-lime .jump-card-icon { background: rgba(183,242,58,.20); color: #4d6b0a; }
.jump-card.tone-purple .jump-card-icon { background: rgba(115,87,211,.14); color: #7357d3; }
.dark-console .jump-card { border-color: #294253; background: linear-gradient(160deg, #0d1c29, #0a1826); box-shadow: 0 10px 26px rgba(0,0,0,.24); }
.dark-console .jump-card:hover { border-color: #3c6480; }
.dark-console .jump-card-title { color: #f0f6fa; }
.dark-console .jump-card-desc { color: #a5b7c4; }
.dark-console .jump-card-arrow { background: rgba(87,167,231,.09); color: #93a9b8; }

/* Analytics — chart empty state */
.chart-empty { display: grid; place-items: center; height: 100%; text-align: center; color: #7c8994; }
.chart-empty-icon { display: grid; width: 44px; height: 44px; place-items: center; margin: 0 auto 10px; border-radius: 12px; background: rgba(0,120,212,.10); color: #0078d4; }
.chart-empty-title { font-size: 12px; font-weight: 700; color: #26333d; }
.chart-empty-note { margin-top: 4px; font-size: 10px; color: #7c8994; }
.dark-console .chart-empty-title { color: #dceaf3; }
.dark-console .chart-empty-icon { background: rgba(87,167,231,.14); color: #7cc5ff; }

/* Channels — voice channel summary (dark-mode safe) */
.voice-channel-summary .voice-channel-number { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: #1f2933; font-variant-numeric: tabular-nums; }
.voice-channel-summary .voice-channel-note { margin-top: 4px; font-size: 11px; color: #6e7781; }
.dark-console .voice-channel-summary .voice-channel-number { color: #f0f6fa; }
.dark-console .voice-channel-summary .voice-channel-note { color: #a5b7c4; }

/* Channels — embed code textarea (full width, terminal look) */
.embed-textarea { display: block; width: 100%; box-sizing: border-box; min-height: 220px; padding: 12px 14px; border: 1px solid #233949; border-radius: 10px; background: #0d1c29; color: #c5d3dd; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; font-size: 10px; line-height: 1.55; resize: vertical; outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.embed-textarea:focus { border-color: #2f5c7d; box-shadow: 0 0 0 3px rgba(0,120,212,.18); }
.dark-console .embed-textarea { background: #061420; color: #d3e2ec; border-color: #1c3245; }

/* ═══ metric-card v2 upgrades (sparkline, footer, better delta chip) ═══ */
.metric-card--v2 { padding: 16px 18px 14px; }
.metric-card--v2 .metric-card-value { font-size: 32px; font-weight: 700; letter-spacing: -.045em; }
.metric-card--v2 .metric-card-icon { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(160deg, rgba(var(--_rgb, 0 120 212), .18), rgba(var(--_rgb, 0 120 212), .06)); box-shadow: inset 0 0 0 1px rgba(var(--_rgb, 0 120 212), .18); }
.metric-card--v2 .metric-card-hint { display: inline-flex; align-items: center; gap: 8px; }
.metric-card-delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 5px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .01em; }
.metric-card-delta iconify-icon { font-size: 10px; }
.metric-card-delta.is-up   { background: rgba(46,133,64,.14); color: #217a48; }
.metric-card-delta.is-down { background: rgba(180,35,44,.14); color: #b4232c; }
.metric-card-delta.is-flat { background: rgba(124,137,148,.16); color: #52616d; }
.metric-card-footer { margin-top: 10px; }
.metric-card-spark { display: block; width: 100%; height: 26px; margin-top: 8px; opacity: .95; }
.dark-console .metric-card-delta.is-up { background: rgba(78,196,116,.16); color: #58d385; }
.dark-console .metric-card-delta.is-down { background: rgba(224,86,96,.16); color: #f18b93; }
.dark-console .metric-card-delta.is-flat { background: rgba(148,164,178,.16); color: #b7c4cd; }

/* metric-card footer progress bar (used e.g. on Live chat > Online now) */
.metric-progress { display: grid; gap: 4px; }
.metric-progress-bar { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(var(--_rgb, 0 120 212), .12); }
.metric-progress-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgb(var(--_rgb, 0 120 212)), color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 60%, #fff)); transition: width .35s cubic-bezier(.2,.7,.2,1); }
.metric-progress-label { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7c8994; }
.dark-console .metric-progress-label { color: #a5b7c4; }

/* ═══ Translation sandbox ═══ */
.translation-sandbox { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
@media (max-width: 900px) { .translation-sandbox { grid-template-columns: 1fr; } }
.ts-side { display: grid; grid-template-rows: auto 1fr auto; gap: 8px; border: 1px solid #d5deea; border-radius: 12px; padding: 12px; background: linear-gradient(180deg, #ffffff, #f7fafc); }
.ts-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ts-eyebrow { font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #7c8994; }
.ts-input { display: block; width: 100%; box-sizing: border-box; min-height: 160px; padding: 12px 14px; border: 1px solid #dfe6ec; border-radius: 10px; background: #ffffff; color: #1f2933; font: inherit; font-size: 12px; line-height: 1.55; resize: vertical; outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
.ts-input:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.ts-input-readonly { background: #f4f8fb; color: #26333d; }
.ts-side-foot { font-size: 10px; color: #7c8994; text-align: right; }
.ts-side-foot-status { text-align: left; font-weight: 700; letter-spacing: .04em; }
.ts-side-foot-status.is-ok { color: #22a477; }
.ts-side-foot-status.is-error { color: #b4232c; }
.ts-actions { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
@media (max-width: 900px) { .ts-actions { flex-direction: row; } }
.ts-icon-btn { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #dbe4ea; border-radius: 10px; background: #fff; color: #52616d; cursor: pointer; transition: color .16s, border-color .16s, background .16s; }
.ts-icon-btn:hover { color: #0067b8; border-color: #a9c1d1; background: #eef7fd; }
.ts-translate-btn { min-width: 140px; justify-content: center; }
.dark-console .ts-side { border-color: #294156; background: linear-gradient(180deg, #10263a, #0a1b28); }
.dark-console .ts-input { border-color: #345064; background: #0d1e2b; color: #e4edf4; color-scheme: dark; }
.dark-console .ts-input:focus { border-color: #4a8fc4; box-shadow: 0 0 0 3px rgba(0,120,212,.28); }
.dark-console .ts-input-readonly { background: #0b1a26; color: #d5e2ec; }
.dark-console .ts-side-foot,
.dark-console .ts-eyebrow { color: #a5b7c4; }
.dark-console .ts-icon-btn { background: #10283a; border-color: #2f4a5f; color: #cbdae4; }
.dark-console .ts-icon-btn:hover { color: #7cc5ff; border-color: #4a7088; background: #14344c; }

/* Panel notes (small body text used across pages, dark-mode safe) */
.panel-note { font-size: 11px; color: #586873; }
.dark-console .panel-note { color: #a5b7c4; }

/* ═══ Preference rows (Account · Preferences) ═══ */
.pref-list { display: grid; gap: 10px; }
.pref-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #e0e6ed; border-radius: 12px; background: linear-gradient(160deg, #ffffff, #f8fbfd); transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.pref-row:hover { border-color: #b8dcee; box-shadow: 0 6px 18px rgba(25,61,89,.06); }
.pref-row-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: rgba(0,120,212,.12); color: #0067b8; }
.pref-row-icon.tone-purple { background: rgba(115,87,211,.14); color: #7357d3; }
.pref-row-icon.tone-amber  { background: rgba(217,119,6,.14);  color: #b26005; }
.pref-row-icon.tone-green  { background: rgba(46,133,64,.14);  color: #217a48; }
.pref-row-body { display: grid; gap: 3px; min-width: 0; }
.pref-row-body strong { font-size: 12px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.pref-row-body span { font-size: 10px; color: #6e7781; line-height: 1.5; }
.dark-console .pref-row { border-color: #253d51; background: linear-gradient(160deg, #10273a, #0b1b28); }
.dark-console .pref-row:hover { border-color: #3c6480; box-shadow: 0 12px 28px rgba(0,0,0,.24); }
.dark-console .pref-row-body strong { color: #f0f6fa; }
.dark-console .pref-row-body span { color: #a5b7c4; }

/* ═══ Billing — quota rows ═══ */
.quota-stack { display: grid; gap: 14px; }
.quota-row { display: grid; gap: 6px; }
.quota-row-head { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; }
.quota-icon { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; background: rgba(0,120,212,.12); color: #0067b8; }
.quota-icon.tone-green  { background: rgba(46,133,64,.14);  color: #217a48; }
.quota-icon.tone-purple { background: rgba(115,87,211,.14); color: #7357d3; }
.quota-icon.tone-amber  { background: rgba(217,119,6,.14);  color: #b26005; }
.quota-label { font-size: 12px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.quota-usage { font-size: 12px; font-weight: 700; color: #1f2933; font-variant-numeric: tabular-nums; }
.quota-usage em { font-style: normal; color: #7c8994; font-size: 10px; font-weight: 600; margin-left: 4px; }
.quota-bar { height: 10px; overflow: hidden; border-radius: 999px; background: #eef3f8; }
.quota-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0078d4, #4eb3ed); transition: width .35s cubic-bezier(.2,.7,.2,1); }
.quota-row.is-warning .quota-bar > span { background: linear-gradient(90deg, #d97706, #f4b25a); }
.quota-row.is-critical .quota-bar > span { background: linear-gradient(90deg, #b4232c, #ef6a72); }
.quota-foot { font-size: 10px; color: #7c8994; font-weight: 600; }
.dark-console .quota-label,
.dark-console .quota-usage { color: #f0f6fa; }
.dark-console .quota-usage em { color: #a5b7c4; }
.dark-console .quota-bar { background: #1a3247; }
.dark-console .quota-foot { color: #a5b7c4; }

/* ═══ Billing — current plan card ═══ */
.current-plan-card { position: relative; overflow: hidden; }
.current-plan-card::before { content: ""; position: absolute; right: -46px; top: -46px; width: 140px; height: 140px; border-radius: 999px; background: radial-gradient(circle, rgba(46,133,64,.20), transparent 70%); }
.current-plan-card.tone-amber::before { background: radial-gradient(circle, rgba(217,119,6,.20), transparent 70%); }
.current-plan-head { position: relative; display: flex; align-items: center; gap: 12px; }
.current-plan-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: linear-gradient(160deg, #b7f23a, #4eb384); color: #14212d; box-shadow: 0 4px 10px rgba(46,133,64,.28); }
.current-plan-card.tone-amber .current-plan-icon { background: linear-gradient(160deg, #ffb84e, #e87938); color: #fff; box-shadow: 0 4px 10px rgba(217,119,6,.28); }
.current-plan-name { font-size: 15px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.current-plan-status { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.current-plan-trial { font-size: 10px; color: #7c8994; }
.current-plan-price { position: relative; margin-top: 18px; display: flex; align-items: baseline; gap: 4px; }
.current-plan-amount { font-size: 30px; font-weight: 700; color: #14212d; letter-spacing: -.03em; }
.current-plan-cycle { font-size: 12px; color: #7c8994; font-weight: 600; }
.current-plan-details { position: relative; margin-top: 14px; display: grid; gap: 8px; padding: 0; list-style: none; }
.current-plan-details li { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #3e4c57; }
.current-plan-details li iconify-icon { color: #22a477; }
.current-plan-actions { position: relative; margin-top: 16px; }
.dark-console .current-plan-name,
.dark-console .current-plan-amount { color: #f0f6fa; }
.dark-console .current-plan-cycle,
.dark-console .current-plan-trial { color: #a5b7c4; }
.dark-console .current-plan-details li { color: #dceaf3; }

/* ═══ Billing — plan pricing tiles ═══ */
.plan-card { position: relative; display: grid; gap: 14px; padding: 22px 22px 20px; border: 1px solid #d5deea; border-radius: 16px; background: linear-gradient(180deg, #ffffff, #f7fbfd); box-shadow: 0 8px 24px rgba(25,61,89,.06); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; overflow: hidden; }
.plan-card:hover { transform: translateY(-3px); border-color: rgba(0,120,212,.32); box-shadow: 0 16px 36px rgba(25,61,89,.12); }
.plan-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 160px; height: 160px; border-radius: 999px; background: radial-gradient(circle, rgba(0,120,212,.14), transparent 70%); pointer-events: none; }
.plan-card.tone-purple::after { background: radial-gradient(circle, rgba(115,87,211,.16), transparent 70%); }
.plan-card.tone-teal::after   { background: radial-gradient(circle, rgba(13,137,154,.16), transparent 70%); }
.plan-card.tone-lime::after   { background: radial-gradient(circle, rgba(183,242,58,.22), transparent 70%); }
.plan-card.is-popular { border-color: rgba(46,133,64,.36); box-shadow: 0 14px 32px rgba(46,133,64,.14); }
.plan-badge { position: absolute; top: 14px; right: 14px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: linear-gradient(120deg, #b7f23a, #4eb384); color: #14212d; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 4px 12px rgba(46,133,64,.22); }
.plan-head { position: relative; display: flex; align-items: center; gap: 12px; }
.plan-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: rgba(0,120,212,.14); color: #0067b8; flex-shrink: 0; }
.plan-card.tone-purple .plan-icon { background: rgba(115,87,211,.16); color: #7357d3; }
.plan-card.tone-teal   .plan-icon { background: rgba(13,137,154,.16); color: #0d899a; }
.plan-card.tone-lime   .plan-icon { background: linear-gradient(160deg, #b7f23a, #7fdb98); color: #14212d; }
.plan-name { font-size: 15px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.plan-desc { margin-top: 3px; font-size: 10px; color: #6e7781; line-height: 1.5; }
.plan-price { position: relative; display: flex; align-items: baseline; gap: 4px; padding: 8px 0; border-top: 1px dashed #dfe6ec; border-bottom: 1px dashed #dfe6ec; }
.plan-price-amount { font-size: 34px; font-weight: 700; color: #14212d; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.plan-price-suffix { font-size: 12px; color: #7c8994; font-weight: 600; }
.plan-features { position: relative; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.plan-features li { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #3e4c57; }
.plan-feature-check { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 999px; background: rgba(46,133,64,.14); color: #22a477; flex-shrink: 0; }
.plan-cta { position: relative; width: 100%; justify-content: center; margin-top: auto; }
.dark-console .plan-card { border-color: #294156; background: linear-gradient(180deg, #10263a, #0b1b28); box-shadow: 0 14px 32px rgba(0,0,0,.24); }
.dark-console .plan-card:hover { border-color: #4a7088; }
.dark-console .plan-name,
.dark-console .plan-price-amount { color: #f0f6fa; }
.dark-console .plan-desc,
.dark-console .plan-price-suffix { color: #a5b7c4; }
.dark-console .plan-price { border-color: #253c4c; }
.dark-console .plan-features li { color: #dceaf3; }

/* ═══ Billing — invoices table ═══ */
.invoices-table { width: 100%; border-collapse: collapse; }
.invoices-table th { padding: 10px 12px; text-align: left; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7c8994; border-bottom: 1px solid #e5ebf0; }
.invoices-table td { padding: 12px; font-size: 11px; color: #26333d; border-bottom: 1px solid #f0f4f7; }
.invoices-table tr:last-child td { border-bottom: 0; }
.invoices-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.invoices-link { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid #dbe4ea; border-radius: 7px; font-size: 10px; font-weight: 700; color: #0067b8; text-decoration: none; transition: background .16s, border-color .16s; }
.invoices-link:hover { background: #eef7fd; border-color: #a9c1d1; }
.dark-console .invoices-table th { border-color: #253c4c; color: #a5b7c4; }
.dark-console .invoices-table td { border-color: #1e3345; color: #dceaf3; }
.dark-console .invoices-link { border-color: #2f4a5f; color: #7cc5ff; background: #10283a; }
.dark-console .invoices-link:hover { background: #14344c; border-color: #4a7088; }

/* ═══ Plan grid — always fit 4 across on wide screens ═══ */
.plan-grid { display: grid; gap: 16px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px)  { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .plan-card { padding: 22px 20px 20px; } .plan-price-amount { font-size: 30px; } }

/* ═══ Metric card — defined icon backdrop v3 ═══
   A larger, more visually anchored icon tile with a soft glassy backdrop,
   layered gradient, and a subtle glow — reads like a labeled product tile
   rather than a floating icon. Applied on top of the .metric-card--v2 layer. */
.metric-card--v2 { padding: 18px 20px 16px; }
.metric-card--v2 .metric-card-head { align-items: flex-start; }
.metric-card--v2 .metric-card-label { padding-top: 8px; }
.metric-card--v2 .metric-card-icon {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.85), rgba(255,255,255,0) 55%),
    linear-gradient(160deg, rgb(var(--_rgb, 0 120 212)), color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 65%, #000 0%));
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -6px 12px rgba(0,0,0,.10),
    0 8px 20px rgba(var(--_rgb, 0 120 212), .28);
}
.metric-card--v2 .metric-card-icon::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  background: radial-gradient(circle, rgba(var(--_rgb, 0 120 212), .28), transparent 65%);
  z-index: -1;
  filter: blur(6px);
  opacity: .8;
}
.metric-card--v2 .metric-card-icon iconify-icon { font-size: 22px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
.metric-card--v2 .metric-card-value { margin-top: 14px; font-size: 30px; }
.metric-card--v2:hover .metric-card-icon { transform: translateY(-1px); }
.metric-card--v2 .metric-card-icon { transition: transform .18s ease; }
.dark-console .metric-card--v2 .metric-card-icon {
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), rgba(255,255,255,0) 55%),
    linear-gradient(160deg, rgb(var(--_rgb, 0 120 212)), color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 45%, #000 0%));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -6px 12px rgba(0,0,0,.20),
    0 8px 22px rgba(var(--_rgb, 0 120 212), .30);
}

/* ═══ Developers · API — rate-limits + prefix ═══ */
.rate-limits { display: grid; gap: 6px; font-size: 11px; color: #4a5762; }
.rate-limits p { line-height: 1.55; }
.rate-limits strong { color: #1f2933; font-weight: 700; }
.rate-limits code { display: inline-block; padding: 2px 6px; border-radius: 5px; background: rgba(0,120,212,.08); color: #0067b8; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; }
.rate-limits-note { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e5ebf0; font-size: 10.5px; color: #6e7781; }
.dark-console .rate-limits { color: #b7c6d1; }
.dark-console .rate-limits strong { color: #f0f6fa; }
.dark-console .rate-limits code { background: rgba(87,167,231,.16); color: #7cc5ff; }
.dark-console .rate-limits-note { border-color: #253c4c; color: #a5b7c4; }

.key-prefix { display: inline-block; padding: 3px 8px; border-radius: 6px; background: rgba(0,120,212,.08); color: #0067b8; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.dark-console .key-prefix { background: rgba(87,167,231,.16); color: #7cc5ff; }

/* ═══ Metric card v3 — icon anchored to bottom-right with backdrop ═══ */
.metric-card--v3 {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 20px;
  min-height: 138px;
}
/* Neutralise the v2 head/inline icon layout — v3 owns the icon absolutely. */
.metric-card--v3 .metric-card-head { display: none; }
.metric-card--v3 .metric-card-body { position: relative; z-index: 2; display: grid; gap: 6px; max-width: calc(100% - 68px); }
.metric-card--v3 .metric-card-label { padding: 0; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6e7781; }
.metric-card--v3 .metric-card-value { margin-top: 6px; font-size: 32px; font-weight: 700; letter-spacing: -.045em; color: #14212d; line-height: 1; }
.metric-card--v3 .metric-card-hint { margin-top: 2px; }
.metric-card--v3 .metric-card-footer { margin-top: 10px; }
.metric-card--v3 .metric-card-spark { margin-top: 8px; }

/* The icon — big, glossy tile, sitting in the bottom-right, half-embedded
   in a radial backdrop that bleeds off the card edge. */
.metric-card--v3 .metric-card-icon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.85), rgba(255,255,255,0) 55%),
    linear-gradient(160deg, rgb(var(--_rgb, 0 120 212)), color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 65%, #000 0%));
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -8px 14px rgba(0,0,0,.14),
    0 12px 24px rgba(var(--_rgb, 0 120 212), .32);
  transition: transform .18s ease, box-shadow .18s ease;
}
.metric-card--v3 .metric-card-icon iconify-icon { font-size: 24px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.22)); }
.metric-card--v3 .metric-card-icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(var(--_rgb, 0 120 212), .35), transparent 65%);
  z-index: -1;
  filter: blur(10px);
  opacity: .9;
}

/* Ambient tinted backdrop that surrounds the corner icon and fades diagonally
   across the tile. Replaces the small ::before circle inherited from v1. */
.metric-card--v3::before {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -70px;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--_rgb, 0 120 212), .24), transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.metric-card--v3::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 55%, rgba(var(--_rgb, 0 120 212), .08));
  z-index: 0;
  pointer-events: none;
}
.metric-card--v3:hover .metric-card-icon { transform: translateY(-2px) scale(1.03); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -8px 14px rgba(0,0,0,.14), 0 16px 32px rgba(var(--_rgb, 0 120 212), .40); }

.dark-console .metric-card--v3 .metric-card-label { color: #a5b7c4; }
.dark-console .metric-card--v3 .metric-card-value { color: #f3f8fb; }
.dark-console .metric-card--v3 .metric-card-icon {
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.32), rgba(255,255,255,0) 55%),
    linear-gradient(160deg, rgb(var(--_rgb, 0 120 212)), color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 42%, #000 0%));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -8px 14px rgba(0,0,0,.24),
    0 12px 26px rgba(var(--_rgb, 0 120 212), .38);
}

/* When a footer or sparkline is present, give the icon a bit more room so it
   doesn't collide with the progress bar / sparkline. */
.metric-card--v3:has(.metric-card-footer) .metric-card-icon,
.metric-card--v3:has(.metric-card-spark)  .metric-card-icon { right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 14px; }
.metric-card--v3:has(.metric-card-footer) .metric-card-icon iconify-icon,
.metric-card--v3:has(.metric-card-spark)  .metric-card-icon iconify-icon { font-size: 20px; }

/* When two analytics panels sit side-by-side and one stretches taller, add
   this variant to vertically centre the body content of the shorter panel
   inside the reserved space. */
.analytics-card--v-center { display: flex; flex-direction: column; }
.analytics-card--v-center > .analytics-card-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* ═══ Metric card v4 — glassy tinted body, oversized icon bleeding
   from the bottom-right corner (no icon tile). Overrides earlier v2/v3
   rules so we don't need to touch call sites. ═══ */
.metric-card--v3 {
  position: relative;
  overflow: hidden;
  padding: 18px 22px 22px;
  min-height: 138px;
  border-radius: 16px;
  /* Glassy tinted background — soft wash of the tone colour with a subtle
     inner highlight along the top edge. */
  background:
    radial-gradient(circle at 100% 100%, rgba(var(--_rgb, 0 120 212), .32), transparent 55%),
    linear-gradient(150deg, rgba(var(--_rgb, 0 120 212), .10) 0%, rgba(var(--_rgb, 0 120 212), .04) 60%, rgba(255,255,255,.85) 100%);
  border-color: rgba(var(--_rgb, 0 120 212), .30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 8px 22px rgba(var(--_rgb, 0 120 212), .10),
    0 1px 2px rgba(20,43,61,.05);
  backdrop-filter: blur(6px);
}
.metric-card--v3::before { content: none; }
.metric-card--v3::after  { content: none; }

.metric-card--v3 .metric-card-body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 6px;
  max-width: calc(100% - 40px);
}
.metric-card--v3 .metric-card-label { padding: 0; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 90%, #1f2933 0%); }
.metric-card--v3 .metric-card-value { margin-top: 6px; font-size: 34px; font-weight: 700; letter-spacing: -.045em; color: #14212d; line-height: 1; }
.metric-card--v3 .metric-card-hint  { margin-top: 4px; color: #4a5762; }
.metric-card--v3 .metric-card-footer { margin-top: 12px; }

/* Oversized watermark-style icon anchored to the bottom-right corner —
   NO tile / NO background. Just the glyph itself, drawn large and tinted
   with the tone, bleeding half off the card edge. */
.metric-card--v3 .metric-card-icon {
  position: absolute;
  right: -14px;
  bottom: -18px;
  z-index: 1;
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: rgb(var(--_rgb, 0 120 212));
  box-shadow: none;
  filter: drop-shadow(0 6px 14px rgba(var(--_rgb, 0 120 212), .35));
  opacity: .92;
  transition: transform .24s cubic-bezier(.2,.7,.2,1), opacity .18s ease;
}
.metric-card--v3 .metric-card-icon iconify-icon {
  font-size: 96px;
  line-height: 1;
  filter: none;
}
.metric-card--v3 .metric-card-icon::before { content: none; }
.metric-card--v3:hover .metric-card-icon { transform: translate(-4px, -4px) rotate(-4deg); opacity: 1; }

/* Ensure the value/label stay legible over the tint by nudging text tone. */
.metric-card--v3 .metric-card-hint    { position: relative; z-index: 2; }
.metric-card--v3 .metric-card-footer  { position: relative; z-index: 2; }
.metric-card--v3 .metric-card-spark   { position: relative; z-index: 2; margin-top: 8px; }

.dark-console .metric-card--v3 {
  background:
    radial-gradient(circle at 100% 100%, rgba(var(--_rgb, 0 120 212), .35), transparent 55%),
    linear-gradient(150deg, rgba(var(--_rgb, 0 120 212), .14) 0%, rgba(var(--_rgb, 0 120 212), .05) 55%, rgba(10,24,36,.98) 100%);
  border-color: rgba(var(--_rgb, 0 120 212), .35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 12px 28px rgba(0,0,0,.30),
    0 1px 2px rgba(0,0,0,.35);
}
.dark-console .metric-card--v3 .metric-card-value { color: #f3f8fb; }
.dark-console .metric-card--v3 .metric-card-hint  { color: #a5b7c4; }
.dark-console .metric-card--v3 .metric-card-icon  {
  color: color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 78%, #ffffff 22%);
  filter: drop-shadow(0 6px 14px rgba(var(--_rgb, 0 120 212), .45));
  opacity: .78;
}

/* ═══ Appointments — compact calendar cells ═══ */
.cal-cell,
.cal-cell-blank { height: 40px; }
.cal-cell {
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  color: #3e4c57;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.cal-cell:hover:not(.is-selected) { background: #eef4f9; color: #0067b8; }
.cal-cell.is-today { background: #eef7fd; color: #0067b8; font-weight: 700; }
.cal-cell.is-selected { background: linear-gradient(135deg, #0078d4, #4eb3ed); color: #fff; font-weight: 800; box-shadow: 0 4px 12px rgba(0,120,212,.34); }
.cal-cell-num { line-height: 1; }
.cal-cell-dot { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 999px; background: #22a477; }
.cal-cell.is-selected .cal-cell-dot { background: #fff; }
.dark-console .cal-cell { color: #cbd8e1; }
.dark-console .cal-cell:hover:not(.is-selected) { background: #14324a; color: #7cc5ff; }
.dark-console .cal-cell.is-today { background: rgba(0,120,212,.16); color: #7cc5ff; }
.dark-console .cal-cell-dot { background: #4ed49b; }

/* Appointments — day sidebar rows */
.day-appt-row { display: grid; grid-template-columns: 62px 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid #e5ebf0; transition: background .16s ease; align-items: center; }
.day-appt-row .row-action-btn { grid-row: 1 / span 2; align-self: center; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; }
.day-appt-row:hover { background: #f4f8fb; }
.day-appt-row:last-child { border-bottom: 0; }
.day-appt-time { grid-row: 1 / span 2; align-self: center; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; font-weight: 800; color: #0067b8; }
.day-appt-name { font-size: 12px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.day-appt-meta { font-size: 10px; color: #7c8994; }
.dark-console .day-appt-row { border-color: #253c4c; }
.dark-console .day-appt-row:hover { background: rgba(87,167,231,.08); }
.dark-console .day-appt-name { color: #f0f6fa; }
.dark-console .day-appt-time { color: #7cc5ff; }
.dark-console .day-appt-meta { color: #a5b7c4; }

/* Reusable adaptive strong text for table cells */
.cell-strong { color: #1f2933; font-weight: 700; }
.dark-console .cell-strong { color: #f0f6fa; }

/* ═══ Unified page loader — used by ui.js#spinner() ═══
   Called by every page while data is loading. Renders a compact centred
   panel with a dual-ring pulse + shimmer bar and a soft skeleton grid,
   dark-mode aware. */
.page-loader {
  display: grid;
  place-items: center;
  padding: 24px;
  /* Fill the visible page area so the card lands mid-screen regardless of
     how tall the previous route was. Header (48px) + toolbar (~52px) +
     breathing room ≈ 160px. */
  min-height: calc(100vh - 200px);
}
.page-loader-card {
  width: 100%;
  max-width: 380px;
  padding: 30px 28px;
  border: 1px solid #d5deea;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
  box-shadow: 0 12px 32px rgba(25,61,89,.08);
  text-align: center;
}
.page-loader-orbit {
  position: relative;
  margin: 0 auto 18px;
  width: 56px;
  height: 56px;
}
.page-loader-orbit::before,
.page-loader-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid transparent;
}
.page-loader-orbit::before {
  border-top-color: #0078d4;
  border-right-color: #4eb3ed;
  animation: pageLoaderSpin 1.1s cubic-bezier(.55,.15,.35,.85) infinite;
}
.page-loader-orbit::after {
  inset: 10px;
  border-top-color: #b7f23a;
  border-left-color: #22a477;
  animation: pageLoaderSpin 1.6s cubic-bezier(.55,.15,.35,.85) reverse infinite;
}
.page-loader-orbit-core {
  position: absolute;
  inset: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0078d4, #4eb3ed);
  box-shadow: 0 6px 16px rgba(0,120,212,.36), inset 0 1px 0 rgba(255,255,255,.4);
}
@keyframes pageLoaderSpin { to { transform: rotate(360deg); } }
.page-loader-title { font-size: 13px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.page-loader-note { margin-top: 4px; font-size: 11px; color: #6e7781; }
.page-loader-shimmer {
  position: relative;
  margin-top: 18px;
  height: 6px;
  border-radius: 999px;
  background: #e6edf2;
  overflow: hidden;
}
.page-loader-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #0078d4, transparent);
  animation: pageLoaderSweep 1.2s ease-in-out infinite;
}
@keyframes pageLoaderSweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.page-loader-skeleton {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.page-loader-skeleton span {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eaf1f6, #f5f9fb, #eaf1f6);
  background-size: 200% 100%;
  animation: pageLoaderShimmer 1.4s ease-in-out infinite;
}
.page-loader-skeleton span:nth-child(1) { animation-delay: 0s; }
.page-loader-skeleton span:nth-child(2) { animation-delay: .12s; }
.page-loader-skeleton span:nth-child(3) { animation-delay: .24s; }
@keyframes pageLoaderShimmer { 0%, 100% { background-position: 200% 50%; } 50% { background-position: 0% 50%; } }
.dark-console .page-loader-card { border-color: #253d51; background: linear-gradient(180deg, #10273a, #0a1b28); box-shadow: 0 16px 40px rgba(0,0,0,.32); }
.dark-console .page-loader-title { color: #f0f6fa; }
.dark-console .page-loader-note { color: #a5b7c4; }
.dark-console .page-loader-shimmer { background: #1a3247; }
.dark-console .page-loader-skeleton span { background: linear-gradient(90deg, #14293a, #1c3548, #14293a); background-size: 200% 100%; }

/* ═══ KPI tile v5 — Azure / Twilio corporate style ═══
   Clean white card with a thin border, a small tone-tinted icon square
   top-left, uppercase label, a large numeric value, and a footer row that
   holds a trend chip and a hint string. An optional sparkline tucks under
   the value at low opacity.

   All previous .metric-card / .metric-card--v2 / .metric-card--v3 rules
   are intentionally left in place but the tile no longer uses those class
   names, so they don't interfere. */
.kpi-tile {
  position: relative;
  /* Flex column: head flows at top, content flexes to fill the rest and
     centres its own children. If the content itself is taller than the
     tile min-height (e.g. value + hint + progress bar), the tile grows
     naturally so nothing touches the head. */
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 18px 16px;
  border: 1px solid #dee5ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(20,43,61,.04);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  overflow: hidden;
  min-height: 148px;
}
/* Content fills the remaining vertical space and centres its own children.
   When content itself is taller than the free space, the tile grows so
   nothing overlaps the head. */
.kpi-tile-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
}
.kpi-tile-content .kpi-tile-value { line-height: 1.05; }
.kpi-tile-content .kpi-tile-foot { min-height: 0; }
.kpi-tile-content .kpi-tile-extra { margin-top: 2px; width: 100%; }
/* (Text-value modifiers are declared after the base .kpi-tile-value rule
   below so they win the cascade — see .kpi-tile-value--textLg further down.) */
.kpi-tile:hover {
  border-color: rgba(var(--_rgb, 0 120 212), .55);
  box-shadow: 0 6px 18px rgba(20,43,61,.08);
}
.kpi-tile::before {
  /* Thin accent bar along the top edge — signature Azure tile treatment. */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, rgb(var(--_rgb, 0 120 212)), color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 55%, #ffffff 0%));
  opacity: 0;
  transition: opacity .16s ease;
}
.kpi-tile:hover::before { opacity: 1; }

.kpi-tile-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.kpi-tile-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 12%, #ffffff 0%);
  color: rgb(var(--_rgb, 0 120 212));
  flex-shrink: 0;
}
.kpi-tile-icon iconify-icon { font-size: 16px; }
.kpi-tile-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #4b5560;
  line-height: 1.2;
}

.kpi-tile-value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #14212d;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  /* Centred within .kpi-tile-mid via the parent's flex alignment. */
}

.kpi-tile-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 16px;
}
.kpi-tile-hint {
  font-size: 11px;
  color: #6e7781;
  line-height: 1.4;
}
.kpi-tile-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 5px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.kpi-tile-delta iconify-icon { font-size: 11px; }
.kpi-tile-delta.is-up   { background: rgba(46,133,64,.12); color: #217a48; }
.kpi-tile-delta.is-down { background: rgba(180,35,44,.12); color: #b4232c; }
.kpi-tile-delta.is-flat { background: rgba(124,137,148,.14); color: #52616d; }

.kpi-tile-extra { margin-top: 6px; }

/* Sparkline sits in the bottom-right at low opacity as a subtle context cue
   (Twilio Segment style). It never fights with the number. */
.kpi-tile-spark {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 108px;
  height: 26px;
  opacity: .55;
  pointer-events: none;
}
.kpi-tile-spark-svg { width: 100%; height: 100%; display: block; }

/* Dark mode */
.dark-console .kpi-tile {
  background: #0d1e2b;
  border-color: #253d51;
  box-shadow: 0 1px 2px rgba(0,0,0,.30);
}
.dark-console .kpi-tile:hover {
  border-color: rgba(var(--_rgb, 0 120 212), .60);
  box-shadow: 0 8px 20px rgba(0,0,0,.32);
}
.dark-console .kpi-tile-label { color: #a5b7c4; }
.dark-console .kpi-tile-value { color: #f0f6fa; }
.dark-console .kpi-tile-hint  { color: #a5b7c4; }
.dark-console .kpi-tile-icon {
  background: color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 22%, #0d1e2b 0%);
  color: color-mix(in srgb, rgb(var(--_rgb, 0 120 212)) 78%, #ffffff 22%);
}
.dark-console .kpi-tile-delta.is-up   { background: rgba(78,196,116,.18); color: #58d385; }
.dark-console .kpi-tile-delta.is-down { background: rgba(224,86,96,.18); color: #f18b93; }
.dark-console .kpi-tile-delta.is-flat { background: rgba(148,164,178,.18); color: #b7c4cd; }
.dark-console .kpi-tile-spark { opacity: .45; }

/* ═══ Editable row (Knowledge base FAQs, Services list) ═══ */
.editable-stack { display: grid; gap: 10px; }
.editable-row {
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid #dee5ec;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 1px 2px rgba(20,43,61,.04);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.editable-row + .editable-row { margin-top: 10px; }
.editable-row:hover { border-color: #b8dcee; box-shadow: 0 6px 16px rgba(25,61,89,.06); }
.editable-row-index {
  margin-top: 22px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,120,212,.10);
  color: #0067b8;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.editable-row-fields { display: grid; gap: 10px; }
@media (min-width: 720px) {
  .editable-row-fields { grid-template-columns: 1fr 1.6fr; }
  .editable-row-fields--services { grid-template-columns: 2fr 1fr 1fr; }
}
.editable-row-fields textarea { min-height: 64px; }
.editable-row-del {
  margin-top: 22px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #f0c8cc;
  border-radius: 8px;
  background: #fef2f2;
  color: #b4232c;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.editable-row-del:hover { background: #b4232c; color: #ffffff; border-color: #b4232c; transform: scale(1.04); }
.dark-console .editable-row { border-color: #253d51; background: linear-gradient(180deg, #10273a, #0b1c2b); box-shadow: 0 8px 20px rgba(0,0,0,.20); }
.dark-console .editable-row:hover { border-color: #3c6480; }
.dark-console .editable-row-index { background: rgba(87,167,231,.16); color: #7cc5ff; }
.dark-console .editable-row-del { border-color: rgba(224,86,96,.30); background: rgba(224,86,96,.10); color: #f18b93; }
.dark-console .editable-row-del:hover { background: #b4232c; border-color: #b4232c; color: #fff; }

/* Empty state for editable lists */
.editable-empty { display: grid; place-items: center; gap: 8px; padding: 32px 16px; text-align: center; border: 1px dashed #cbd6df; border-radius: 12px; background: linear-gradient(180deg, #ffffff, #f7fafc); }
.editable-empty-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; background: rgba(0,120,212,.10); color: #0067b8; }
.editable-empty-title { font-size: 13px; font-weight: 700; color: #26333d; letter-spacing: -.01em; }
.editable-empty-note  { font-size: 11px; color: #7c8994; }
.editable-empty-note strong { color: #0067b8; font-weight: 700; }
.dark-console .editable-empty { border-color: #253d51; background: linear-gradient(180deg, #10273a, #0b1c2b); }
.dark-console .editable-empty-icon { background: rgba(87,167,231,.16); color: #7cc5ff; }
.dark-console .editable-empty-title { color: #f0f6fa; }
.dark-console .editable-empty-note { color: #a5b7c4; }
.dark-console .editable-empty-note strong { color: #7cc5ff; }

/* ═══ Knowledge base — FAQ card ═══
   Each FAQ is its own card with a small header row (index + title + delete)
   and two Q/A fields inside. Question is compact, Answer is spacious with a
   character count. Adapts to dark mode. */
.faq-card {
  border: 1px solid #dee5ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  box-shadow: 0 4px 14px rgba(20,43,61,.04);
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.faq-card + .faq-card { margin-top: 10px; }
.faq-card:hover { border-color: #b8dcee; box-shadow: 0 10px 24px rgba(25,61,89,.08); }
.faq-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8eef4;
  background: rgba(0,120,212,.03);
}
.faq-card-index {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(0,120,212,.14);
  color: #0067b8;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.faq-card-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7c8994;
}
.faq-card-del {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #f0c8cc;
  border-radius: 8px;
  background: #fef2f2;
  color: #b4232c;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.faq-card-del:hover { background: #b4232c; color: #fff; border-color: #b4232c; transform: scale(1.05); }
.faq-card-body { display: grid; gap: 10px; padding: 14px; }

.faq-field {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid #e0e6ed;
  border-radius: 10px;
  background: #ffffff;
  cursor: text;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.faq-field:hover { border-color: #b8dcee; }
.faq-field:focus-within { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); background: #fbfdff; }
.faq-field-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.faq-field-mark.tone-blue { background: rgba(0,120,212,.12); color: #0067b8; }
.faq-field-mark.tone-lime { background: rgba(46,133,64,.14); color: #217a48; }
.faq-field-body { display: grid; gap: 4px; min-width: 0; }
.faq-field-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7c8994;
  line-height: 1.2;
}
.faq-field-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.faq-field-count { font-size: 9px; font-weight: 700; color: #7c8994; font-variant-numeric: tabular-nums; }
.faq-field input,
.faq-field textarea {
  width: 100%;
  padding: 4px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #1f2933;
  font: inherit;
  font-size: 12px;
  line-height: 1.55;
}
.faq-field textarea { min-height: 76px; resize: vertical; }
.faq-field input::placeholder,
.faq-field textarea::placeholder { color: #99a5b0; }

.dark-console .faq-card { border-color: #253d51; background: linear-gradient(180deg, #10273a, #0b1c2b); box-shadow: 0 8px 22px rgba(0,0,0,.20); }
.dark-console .faq-card:hover { border-color: #3c6480; }
.dark-console .faq-card-head { background: rgba(87,167,231,.05); border-color: #1d3448; }
.dark-console .faq-card-index { background: rgba(87,167,231,.16); color: #7cc5ff; }
.dark-console .faq-card-title,
.dark-console .faq-field-label,
.dark-console .faq-field-count { color: #a5b7c4; }
.dark-console .faq-card-del { border-color: rgba(224,86,96,.30); background: rgba(224,86,96,.10); color: #f18b93; }
.dark-console .faq-card-del:hover { background: #b4232c; border-color: #b4232c; color: #fff; }
.dark-console .faq-field { border-color: #2f4a5f; background: #0a1a26; }
.dark-console .faq-field:hover { border-color: #4a7088; }
.dark-console .faq-field:focus-within { border-color: #4a8fc4; box-shadow: 0 0 0 3px rgba(0,120,212,.24); background: #0d2233; }
.dark-console .faq-field input,
.dark-console .faq-field textarea { color: #e4edf4; color-scheme: dark; }
.dark-console .faq-field input::placeholder,
.dark-console .faq-field textarea::placeholder { color: #6a7f8f; }
.dark-console .faq-field-mark.tone-blue { background: rgba(87,167,231,.18); color: #7cc5ff; }
.dark-console .faq-field-mark.tone-lime { background: rgba(78,196,116,.18); color: #58d385; }

/* KPI tile value size modifiers — declared here so they override the base
   .kpi-tile-value { font-size: 34px } rule via source order. */
.kpi-tile-value.kpi-tile-value--textLg { font-size: 18px; font-weight: 700; letter-spacing: -.005em; }
.kpi-tile-value.kpi-tile-value--textSm { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }

/* Account · Security — session-info block, dark-mode safe */
.session-info { display: grid; gap: 10px; font-size: 12px; line-height: 1.55; color: #4a5762; }
.session-info p { display: flex; align-items: flex-start; gap: 10px; }
.session-info-icon { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: rgba(0,120,212,.12); color: #0067b8; flex-shrink: 0; margin-top: 1px; }
.session-info strong { color: #1f2933; font-weight: 700; }
.dark-console .session-info { color: #b7c6d1; }
.dark-console .session-info strong { color: #f0f6fa; }
.dark-console .session-info-icon { background: rgba(87,167,231,.18); color: #7cc5ff; }

/* ═══ Notifications dropdown (header bell button) ═══ */
.notif-control { display: inline-block; }
.notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #b4232c;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #0b1724;
}
.notif-menu {
  position: absolute;
  right: 8px;
  top: 54px;
  z-index: 60;
  width: 340px;
  max-width: calc(100vw - 20px);
  border: 1px solid #cbd6df;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 48px rgba(17,44,67,.22);
  overflow: hidden;
  color: #26333d;
}
.dark-console .notif-menu { border-color: #253d51; background: #10273a; color: #dceaf3; box-shadow: 0 26px 54px rgba(0,0,0,.44); }
.notif-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5ebf0;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}
.dark-console .notif-menu-head { border-color: #1e3345; background: linear-gradient(180deg, #12293c, #0e2131); }
.notif-menu-head strong { display: block; font-size: 12px; font-weight: 700; letter-spacing: -.01em; color: #1f2933; }
.notif-menu-head span { display: block; font-size: 10px; color: #7c8994; margin-top: 1px; }
.dark-console .notif-menu-head strong { color: #f0f6fa; }
.dark-console .notif-menu-head span { color: #a5b7c4; }
.notif-menu-action {
  border: 0;
  background: transparent;
  padding: 4px 8px;
  border-radius: 6px;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  color: #0067b8;
  cursor: pointer;
  transition: background .16s ease;
}
.notif-menu-action:hover { background: rgba(0,120,212,.10); }
.dark-console .notif-menu-action { color: #7cc5ff; }
.dark-console .notif-menu-action:hover { background: rgba(87,167,231,.14); }

.notif-menu-list { max-height: 380px; overflow-y: auto; }
.notif-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #f0f4f7;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .14s ease;
}
.notif-item:hover { background: #f4f8fb; }
.dark-console .notif-item { border-color: #1e3345; }
.dark-console .notif-item:hover { background: rgba(87,167,231,.06); }
.notif-item.is-unread { background: rgba(0,120,212,.04); }
.notif-item.is-unread .notif-item-body strong::after {
  content: "";
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0078d4;
}
.dark-console .notif-item.is-unread { background: rgba(87,167,231,.08); }
.notif-item-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,120,212,.12);
  color: #0067b8;
  flex-shrink: 0;
  margin-top: 2px;
}
.notif-item-icon.tone-green { background: rgba(46,133,64,.14); color: #217a48; }
.notif-item-icon.tone-red   { background: rgba(180,35,44,.14); color: #b4232c; }
.notif-item-icon.tone-amber { background: rgba(217,119,6,.14); color: #b26005; }
.dark-console .notif-item-icon { background: rgba(87,167,231,.16); color: #7cc5ff; }
.dark-console .notif-item-icon.tone-green { background: rgba(78,196,116,.18); color: #58d385; }
.dark-console .notif-item-icon.tone-red   { background: rgba(224,86,96,.18); color: #f18b93; }
.dark-console .notif-item-icon.tone-amber { background: rgba(255,184,84,.18); color: #ffb84e; }
.notif-item-body { display: grid; gap: 2px; min-width: 0; }
.notif-item-body strong { font-size: 11.5px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; line-height: 1.3; }
.notif-item-body span { font-size: 10.5px; color: #52616d; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; }
.notif-item-body em { font-style: normal; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; color: #7c8994; }
.dark-console .notif-item-body strong { color: #f0f6fa; }
.dark-console .notif-item-body span   { color: #b7c6d1; }
.dark-console .notif-item-body em     { color: #94a7b6; }

.notif-empty { display: grid; place-items: center; gap: 6px; padding: 32px 20px; text-align: center; color: #7c8994; }
.notif-empty-icon { display: grid; width: 46px; height: 46px; place-items: center; margin: 0 auto 4px; border-radius: 12px; background: rgba(0,120,212,.10); color: #0067b8; }
.notif-empty strong { font-size: 12px; color: #26333d; font-weight: 700; }
.notif-empty span { font-size: 10.5px; color: #7c8994; }
.dark-console .notif-empty { color: #a5b7c4; }
.dark-console .notif-empty strong { color: #f0f6fa; }
.dark-console .notif-empty span { color: #a5b7c4; }
.dark-console .notif-empty-icon { background: rgba(87,167,231,.16); color: #7cc5ff; }

.notif-menu-foot {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid #e5ebf0;
  background: linear-gradient(0deg, #f7fafc, #ffffff);
}
.dark-console .notif-menu-foot { border-color: #1e3345; background: linear-gradient(0deg, #0e2131, #10273a); }
.notif-menu-link {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  background: #ffffff;
  color: #26333d;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color .16s, border-color .16s, background .16s;
}
.notif-menu-link:hover { color: #0067b8; border-color: #a9c1d1; background: #eef7fd; }
.dark-console .notif-menu-link { background: #0d2233; border-color: #2f4a5f; color: #dceaf3; }
.dark-console .notif-menu-link:hover { background: #14344c; border-color: #4a7088; color: #7cc5ff; }

/* Bottom cluster (foot + optional extra). Reserves the same min-height as
   the head so the middle stays visually balanced even when it only holds
   a single hint line. */
.kpi-tile-bottom { display: grid; gap: 4px; align-content: end; min-height: 32px; }

/* Notifications — action row (Mark all read + Clear all) */
.notif-menu-actions { display: flex; gap: 4px; }
.notif-menu-action-danger { color: #b4232c; }
.notif-menu-action-danger:hover { background: rgba(180,35,44,.10); }
.dark-console .notif-menu-action-danger { color: #f18b93; }
.dark-console .notif-menu-action-danger:hover { background: rgba(224,86,96,.14); }

/* ═══ Header quick search ═══ */
.header-search-wrap { position: relative; width: 100%; max-width: 520px; }
.quicksearch-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid #cbd6df;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 56px rgba(17,44,67,.22);
  color: #26333d;
}
.dark-console .quicksearch-panel { border-color: #253d51; background: #10273a; color: #dceaf3; box-shadow: 0 26px 60px rgba(0,0,0,.46); }

.quicksearch-group {
  padding: 8px 14px 4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7c8994;
}
.dark-console .quicksearch-group { color: #94a7b6; }

.quicksearch-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease;
}
.quicksearch-item:hover,
.quicksearch-item.is-active { background: rgba(0,120,212,.08); }
.dark-console .quicksearch-item:hover,
.dark-console .quicksearch-item.is-active { background: rgba(87,167,231,.10); }
.quicksearch-item-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,120,212,.12);
  color: #0067b8;
}
.quicksearch-item-icon.tone-green  { background: rgba(46,133,64,.14); color: #217a48; }
.quicksearch-item-icon.tone-purple { background: rgba(115,87,211,.14); color: #7357d3; }
.quicksearch-item-icon.tone-amber  { background: rgba(217,119,6,.14); color: #b26005; }
.quicksearch-item-icon.tone-lime   { background: rgba(183,242,58,.22); color: #4d6b0a; }
.dark-console .quicksearch-item-icon { background: rgba(87,167,231,.18); color: #7cc5ff; }
.dark-console .quicksearch-item-icon.tone-green  { background: rgba(78,196,116,.18); color: #58d385; }
.dark-console .quicksearch-item-icon.tone-purple { background: rgba(154,120,236,.20); color: #b39cef; }
.dark-console .quicksearch-item-icon.tone-amber  { background: rgba(255,184,84,.20); color: #ffb84e; }
.dark-console .quicksearch-item-icon.tone-lime   { background: rgba(183,242,58,.20); color: #cfe98a; }

.quicksearch-item-body { display: grid; gap: 2px; min-width: 0; }
.quicksearch-item-body strong {
  font-size: 12px;
  font-weight: 700;
  color: #1f2933;
  letter-spacing: -.01em;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quicksearch-item-body span {
  font-size: 10.5px;
  color: #52616d;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dark-console .quicksearch-item-body strong { color: #f0f6fa; }
.dark-console .quicksearch-item-body span   { color: #b7c6d1; }
.quicksearch-item-body mark {
  background: rgba(255, 210, 90, .35);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 700;
}
.dark-console .quicksearch-item-body mark { background: rgba(255, 218, 105, .28); color: #ffe08a; }
.quicksearch-item-kbd {
  padding: 2px 6px;
  border: 1px solid #cbd6df;
  border-radius: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #52616d;
  background: #f4f8fb;
}
.quicksearch-item.is-active .quicksearch-item-kbd { background: #ffffff; color: #0067b8; border-color: #a9c1d1; }
.dark-console .quicksearch-item-kbd { background: #10273a; border-color: #345064; color: #a5b7c4; }
.dark-console .quicksearch-item.is-active .quicksearch-item-kbd { background: #14344c; color: #7cc5ff; border-color: #4a7088; }

.quicksearch-empty { padding: 22px 18px; text-align: center; font-size: 11px; color: #7c8994; }
.quicksearch-empty strong { color: #26333d; font-weight: 700; }
.dark-console .quicksearch-empty { color: #a5b7c4; }
.dark-console .quicksearch-empty strong { color: #f0f6fa; }

/* ═══ Workspace switcher menu (sidebar top button) ═══ */
.workspace-trigger { cursor: pointer; }
.workspace-trigger .workspace-caret { transition: transform .16s ease; }
.workspace-trigger.is-open .workspace-caret { transform: rotate(180deg); }

.workspace-menu {
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(100% - 4px);
  z-index: 50;
  overflow: hidden;
  border: 1px solid #cbd6df;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 46px rgba(17,44,67,.20);
}
.dark-console .workspace-menu { border-color: #253d51; background: #10273a; box-shadow: 0 24px 52px rgba(0,0,0,.42); }

.workspace-menu-head {
  padding: 12px 14px;
  border-bottom: 1px solid #e5ebf0;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}
.workspace-menu-head strong { display: block; font-size: 12px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.workspace-menu-head span { display: block; font-size: 10px; color: #7c8994; margin-top: 2px; }
.dark-console .workspace-menu-head { border-color: #1e3345; background: linear-gradient(180deg, #12293c, #0e2131); }
.dark-console .workspace-menu-head strong { color: #f0f6fa; }
.dark-console .workspace-menu-head span { color: #a5b7c4; }

.workspace-menu-list { max-height: 260px; overflow-y: auto; padding: 4px; }
.workspace-menu-loading { padding: 20px; text-align: center; font-size: 11px; color: #7c8994; }
.dark-console .workspace-menu-loading { color: #a5b7c4; }

.workspace-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: background .14s ease;
}
.workspace-item:hover { background: #f4f8fb; }
.dark-console .workspace-item:hover { background: rgba(87,167,231,.08); }
.workspace-item.is-current { background: rgba(0,120,212,.08); }
.dark-console .workspace-item.is-current { background: rgba(87,167,231,.14); }
.workspace-item-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 2px 6px rgba(0,0,0,.10);
}
.workspace-item-body { display: grid; gap: 1px; min-width: 0; }
.workspace-item-body strong { font-size: 12px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-item-body span { font-size: 10px; color: #7c8994; }
.dark-console .workspace-item-body strong { color: #f0f6fa; }
.dark-console .workspace-item-body span { color: #a5b7c4; }
.workspace-item-check { color: #0067b8; }
.dark-console .workspace-item-check { color: #7cc5ff; }

.workspace-menu-foot {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-top: 1px solid #e5ebf0;
  background: linear-gradient(0deg, #f7fafc, #ffffff);
}
.dark-console .workspace-menu-foot { border-color: #1e3345; background: linear-gradient(0deg, #0e2131, #10273a); }
.workspace-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #26333d;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.workspace-menu-link:hover { background: #eef7fd; color: #0067b8; }
.dark-console .workspace-menu-link { color: #dceaf3; }
.dark-console .workspace-menu-link:hover { background: rgba(87,167,231,.12); color: #7cc5ff; }

/* ═══ Channels — Widget appearance + Embed code twin panels ═══
   The grid keeps both panels the same height (default stretch), and the
   inner .panel-body flexes so the tallest field (Welcome message textarea
   on the left, embed textarea on the right) expands to fill dead space. */
.channel-widget-grid { align-items: stretch; }
.channel-widget-panel { display: flex; flex-direction: column; }
.channel-widget-panel .panel-body { flex: 1; display: flex; flex-direction: column; }
.channel-widget-body > .form-grid { flex: 1; display: grid; align-content: start; }
.channel-widget-body .channel-welcome-field { display: flex; flex-direction: column; }
.channel-widget-body .channel-welcome-field textarea { flex: 1; min-height: 90px; resize: vertical; }
.channel-widget-body .embed-textarea { flex: 1; min-height: 220px; }

/* ═══ Analytics — Channel breakdown layout ═══
   Two-column grid inside the card, both children vertically centred, and
   the whole grid horizontally centred so there's no dead space on the
   right when the row list is narrower than the column. */
.channel-breakdown-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  justify-content: center;
}
@media (max-width: 600px) {
  .channel-breakdown-body { grid-template-columns: 1fr; }
}
.channel-donut-slot { position: relative; width: 190px; height: 190px; justify-self: center; }

/* Danger variant of .btn-sm — used for Revoke / Delete / Disconnect etc.
   Fixes the inline `color:#b4232c` legibility problem in dark mode. */
.btn-sm.is-danger,
.btn-sm-danger {
  border-color: #f0c8cc;
  background: #fef2f2;
  color: #b4232c;
}
.btn-sm.is-danger:hover,
.btn-sm-danger:hover {
  border-color: #b4232c;
  background: #b4232c;
  color: #ffffff;
}
.btn-sm.is-danger iconify-icon,
.btn-sm-danger iconify-icon { color: inherit; }
.dark-console .btn-sm.is-danger,
.dark-console .btn-sm-danger {
  border-color: rgba(224,86,96,.35);
  background: rgba(224,86,96,.12);
  color: #f18b93;
}
.dark-console .btn-sm.is-danger:hover,
.dark-console .btn-sm-danger:hover {
  border-color: #d84a56;
  background: #b4232c;
  color: #ffffff;
}

/* ═══ Sidebar plan card (bottom-left of sidebar) ═══
   Bumped the font sizes and switched to semantic classes so text is
   readable and adapts to dark mode. */
.sidebar-plan-card {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 12px 12px 10px;
  border: 1px solid #d7e1e8;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(34,66,88,.06);
}
.dark-console .sidebar-plan-card { border-color: #253d51; background: #10273a; box-shadow: 0 6px 18px rgba(0,0,0,.24); }

.sidebar-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-plan-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -.005em;
  color: #1f2933;
}
.dark-console .sidebar-plan-name { color: #f0f6fa; }
.sidebar-plan-link {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  color: #0067b8;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.sidebar-plan-link:hover { background: rgba(0,120,212,.10); color: #0057a3; }
.dark-console .sidebar-plan-link { color: #7cc5ff; }
.dark-console .sidebar-plan-link:hover { background: rgba(87,167,231,.14); color: #a8d9ff; }

.sidebar-plan-bar {
  margin-top: 8px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf2;
}
.sidebar-plan-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0078d4, #4eb3ed);
  transition: width .35s cubic-bezier(.2,.7,.2,1);
}
.dark-console .sidebar-plan-bar { background: #1a3247; }

.sidebar-plan-note {
  margin-top: 8px;
  font-size: 10px;
  color: #52616d;
  line-height: 1.4;
}
.dark-console .sidebar-plan-note { color: #a5b7c4; }

/* ═══ AI agents · Data collection tiles ═══ */
.data-field-grid { display: grid; gap: 10px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 600px)  { .data-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .data-field-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.data-field-tile {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dee5ec;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.data-field-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.data-field-tile:hover { border-color: #b8dcee; box-shadow: 0 6px 16px rgba(25,61,89,.06); }
.data-field-tile.is-on { border-color: #0078d4; background: #eef7fd; box-shadow: 0 6px 18px rgba(0,120,212,.10); }
.data-field-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0,120,212,.12);
  color: #0067b8;
}
.data-field-icon.tone-purple { background: rgba(115,87,211,.14); color: #7357d3; }
.data-field-icon.tone-green  { background: rgba(46,133,64,.14);  color: #217a48; }
.data-field-icon.tone-amber  { background: rgba(217,119,6,.14);  color: #b26005; }
.data-field-icon.tone-lime   { background: rgba(183,242,58,.22); color: #4d6b0a; }
.data-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #1f2933;
  letter-spacing: -.005em;
}
.data-field-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #cbd6df;
  transition: color .16s ease, transform .16s ease;
}
.data-field-tile.is-on .data-field-check { color: #0067b8; transform: scale(1.08); }
.dark-console .data-field-tile { border-color: #253d51; background: #0d1e2b; }
.dark-console .data-field-tile:hover { border-color: #3c6480; box-shadow: 0 8px 20px rgba(0,0,0,.24); }
.dark-console .data-field-tile.is-on { border-color: #57a7e7; background: rgba(87,167,231,.10); box-shadow: 0 8px 22px rgba(87,167,231,.16); }
.dark-console .data-field-label { color: #f0f6fa; }
.dark-console .data-field-icon { background: rgba(87,167,231,.18); color: #7cc5ff; }
.dark-console .data-field-icon.tone-purple { background: rgba(154,120,236,.20); color: #b39cef; }
.dark-console .data-field-icon.tone-green  { background: rgba(78,196,116,.18); color: #58d385; }
.dark-console .data-field-icon.tone-amber  { background: rgba(255,184,84,.20); color: #ffb84e; }
.dark-console .data-field-icon.tone-lime   { background: rgba(183,242,58,.22); color: #cfe98a; }
.dark-console .data-field-check { color: #3f5c73; }
.dark-console .data-field-tile.is-on .data-field-check { color: #7cc5ff; }

/* ═══ Flows page — templates + visual step editor ═══ */
.flow-template-grid { display: grid; gap: 10px; grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px)  { .flow-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .flow-template-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.flow-template-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  min-height: 82px;
  border: 1px solid #dee5ec;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.flow-template-card:hover { border-color: #b8dcee; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(25,61,89,.10); }
.flow-template-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(0,120,212,.10);
  color: #0078d4;
  line-height: 1;
}
.flow-template-icon iconify-icon { font-size: 24px; }
.flow-template-icon.tone-purple { background: rgba(115,87,211,.12); color: #7357d3; }
.flow-template-icon.tone-amber  { background: rgba(217,119,6,.12);  color: #b26005; }
.flow-template-icon.tone-red    { background: rgba(180,35,44,.12);  color: #b4232c; }
.flow-template-icon.tone-green  { background: rgba(46,133,64,.12);  color: #2e8540; }
.flow-template-icon.tone-gray   { background: rgba(87,105,118,.12); color: #52616d; }
.flow-template-text { display: flex; flex-direction: column; gap: 3px; justify-content: center; min-width: 0; }
.flow-template-name { font-size: 13px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.flow-template-desc { font-size: 10.5px; color: #6e7781; line-height: 1.45; }
.dark-console .flow-template-card { border-color: #253d51; background: #0d1e2b; }
.dark-console .flow-template-card:hover { border-color: #3c6480; box-shadow: 0 14px 30px rgba(0,0,0,.28); }
.dark-console .flow-template-icon { background: rgba(74,168,232,.14); color: #7cc5ff; }
.dark-console .flow-template-icon.tone-purple { background: rgba(150,120,240,.18); color: #b7a2ff; }
.dark-console .flow-template-icon.tone-amber  { background: rgba(255,160,60,.16);  color: #ffbf6b; }
.dark-console .flow-template-icon.tone-red    { background: rgba(255,110,120,.16); color: #ff9ca4; }
.dark-console .flow-template-icon.tone-green  { background: rgba(80,190,120,.16);  color: #8ce0aa; }
.dark-console .flow-template-icon.tone-gray   { background: rgba(180,196,208,.16); color: #c8d5df; }
.dark-console .flow-template-name { color: #f0f6fa; }
.dark-console .flow-template-desc { color: #a5b7c4; }

.flow-name-input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd6df;
  border-radius: 9px;
  background: #ffffff;
  color: #1f2933;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
  min-width: 200px;
  max-width: 320px;
}
.flow-name-input:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.dark-console .flow-name-input { background: #0d1e2b; border-color: #345064; color: #f0f6fa; }

.flow-steps { display: grid; gap: 12px; }

.flow-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
}
.flow-step-rail {
  display: grid;
  grid-template-rows: 32px 1fr;
  justify-items: center;
  align-items: start;
  padding-top: 4px;
}
.flow-step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0078d4, #4eb3ed);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0,120,212,.30), inset 0 1px 0 rgba(255,255,255,.28);
}
.flow-step.tone-green  .flow-step-num { background: linear-gradient(135deg, #22a477, #58d385); box-shadow: 0 4px 10px rgba(46,133,64,.30), inset 0 1px 0 rgba(255,255,255,.28); }
.flow-step.tone-amber  .flow-step-num { background: linear-gradient(135deg, #d97706, #f4b25a); box-shadow: 0 4px 10px rgba(217,119,6,.30), inset 0 1px 0 rgba(255,255,255,.28); }
.flow-step.tone-purple .flow-step-num { background: linear-gradient(135deg, #7357d3, #9a78ec); box-shadow: 0 4px 10px rgba(115,87,211,.30), inset 0 1px 0 rgba(255,255,255,.28); }
.flow-step.tone-red    .flow-step-num { background: linear-gradient(135deg, #b4232c, #ef6a72); box-shadow: 0 4px 10px rgba(180,35,44,.28), inset 0 1px 0 rgba(255,255,255,.28); }
.flow-step-line { width: 2px; min-height: 20px; background: #d8e2e9; margin-top: 6px; border-radius: 999px; }
.dark-console .flow-step-line { background: #253d51; }

.flow-step-body {
  border: 1px solid #dee5ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
  box-shadow: 0 4px 14px rgba(20,43,61,.05);
  overflow: hidden;
}
.dark-console .flow-step-body { border-color: #253d51; background: linear-gradient(180deg, #10273a, #0b1c2b); box-shadow: 0 8px 22px rgba(0,0,0,.24); }

.flow-step-head {
  display: grid;
  grid-template-columns: 28px auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #e8eef4;
  background: rgba(0,120,212,.04);
}
.flow-step.tone-green  .flow-step-head { background: rgba(46,133,64,.06); }
.flow-step.tone-amber  .flow-step-head { background: rgba(217,119,6,.06); }
.flow-step.tone-purple .flow-step-head { background: rgba(115,87,211,.07); }
.flow-step.tone-red    .flow-step-head { background: rgba(180,35,44,.06); }
.dark-console .flow-step-head { background: rgba(87,167,231,.05); border-color: #1d3448; }
.dark-console .flow-step.tone-green  .flow-step-head { background: rgba(78,196,116,.06); }
.dark-console .flow-step.tone-amber  .flow-step-head { background: rgba(255,184,84,.08); }
.dark-console .flow-step.tone-purple .flow-step-head { background: rgba(154,120,236,.08); }
.dark-console .flow-step.tone-red    .flow-step-head { background: rgba(224,86,96,.06); }

.flow-step-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,120,212,.14);
  color: #0067b8;
}
.flow-step-icon.tone-green  { background: rgba(46,133,64,.14); color: #217a48; }
.flow-step-icon.tone-amber  { background: rgba(217,119,6,.14); color: #b26005; }
.flow-step-icon.tone-purple { background: rgba(115,87,211,.16); color: #7357d3; }
.flow-step-icon.tone-red    { background: rgba(180,35,44,.14); color: #b4232c; }
.dark-console .flow-step-icon { background: rgba(87,167,231,.18); color: #7cc5ff; }
.dark-console .flow-step-icon.tone-green  { background: rgba(78,196,116,.18); color: #58d385; }
.dark-console .flow-step-icon.tone-amber  { background: rgba(255,184,84,.18); color: #ffb84e; }
.dark-console .flow-step-icon.tone-purple { background: rgba(154,120,236,.20); color: #b39cef; }
.dark-console .flow-step-icon.tone-red    { background: rgba(224,86,96,.18); color: #f18b93; }

.flow-step-type {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #cbd6df;
  border-radius: 7px;
  background: #ffffff;
  color: #1f2933;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.flow-step-type:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.dark-console .flow-step-type { background: #0d1e2b; border-color: #345064; color: #f0f6fa; color-scheme: dark; }

.flow-step-desc {
  font-size: 10.5px;
  color: #6e7781;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dark-console .flow-step-desc { color: #a5b7c4; }

.flow-step-actions { display: flex; gap: 4px; }
.flow-step-btn {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid #dbe4ea;
  border-radius: 6px;
  background: #ffffff;
  color: #52616d;
  cursor: pointer;
  transition: color .14s, border-color .14s, background .14s;
}
.flow-step-btn:hover:not([disabled]) { color: #0067b8; border-color: #a9c1d1; background: #eef7fd; }
.flow-step-btn[disabled] { opacity: .45; cursor: not-allowed; }
.flow-step-btn-danger { border-color: #f0c8cc; background: #fef2f2; color: #b4232c; }
.flow-step-btn-danger:hover:not([disabled]) { background: #b4232c; color: #ffffff; border-color: #b4232c; }
.dark-console .flow-step-btn { background: #0d1e2b; border-color: #2f4a5f; color: #cbdae4; }
.dark-console .flow-step-btn:hover:not([disabled]) { color: #7cc5ff; border-color: #4a7088; background: #14344c; }
.dark-console .flow-step-btn-danger { border-color: rgba(224,86,96,.35); background: rgba(224,86,96,.14); color: #f18b93; }
.dark-console .flow-step-btn-danger:hover:not([disabled]) { background: #b4232c; border-color: #b4232c; color: #ffffff; }

.flow-step-fields { padding: 12px 14px; display: grid; gap: 8px; }
.flow-step-fields input,
.flow-step-fields textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.flow-step-fields input::placeholder,
.flow-step-fields textarea::placeholder { color: #99a5b0; }
.flow-step-fields textarea { min-height: 68px; resize: vertical; }
.flow-step-fields input:focus,
.flow-step-fields textarea:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.dark-console .flow-step-fields input,
.dark-console .flow-step-fields textarea { background: #0a1a26; border-color: #2f4a5f; color: #e4edf4; color-scheme: dark; }
.dark-console .flow-step-fields input::placeholder,
.dark-console .flow-step-fields textarea::placeholder { color: #6a7f8f; }

.flow-step-branch {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.flow-step-branch label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #52616d;
}
.flow-step-branch input { max-width: 96px; }
.dark-console .flow-step-branch label { color: #a5b7c4; }

/* ── Flow canvas editor (Amazon-Connect-style) ───────────────────────── */
.flow-toolbar { align-items: center; gap: 16px; }
/* Title row is just [name input] [status pill] [info icon] — kept inline and
   sized to content so the action buttons on the right never get pushed onto
   a second line by a stretched title column. */
.flow-toolbar-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; }
.flow-hint { position: relative; display: inline-flex; }
.flow-hint-btn {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid #dbe4ea;
  background: #f4f8fb;
  color: #52616d;
  cursor: help;
  transition: color .14s ease, border-color .14s ease, background .14s ease;
}
.flow-hint-btn:hover { color: #0067b8; border-color: #b8dcee; background: #eef7fd; }
/* Popover: visible on hover of the wrapper (fast, no native title delay) and
   also togglable via click so touch users can see it without a hover. */
.flow-hint-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  width: max-content; min-width: 240px; max-width: 340px;
  padding: 10px 12px;
  border: 1px solid #dbe4ea; border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(9,52,84,.16);
  font-size: 11.5px; line-height: 1.5; color: #34434e;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
}
.flow-hint-panel strong { color: #0067b8; }
.flow-hint:hover .flow-hint-panel,
.flow-hint.is-open .flow-hint-panel,
.flow-hint-btn:focus-visible + .flow-hint-panel {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.dark-console .flow-hint-btn { background: #10273a; border-color: #294a63; color: #b3c1cc; }
.dark-console .flow-hint-btn:hover { color: #7cc5ff; border-color: rgba(74,168,232,.36); background: rgba(74,168,232,.14); }
.dark-console .flow-hint-panel { background: #10273a; border-color: #294a63; color: #dce7ef; box-shadow: 0 12px 28px rgba(0,0,0,.42); }
.dark-console .flow-hint-panel strong { color: #7cc5ff; }

/* View toggle (Canvas / Classic) — segmented control in the toolbar */
.flow-view-toggle {
  display: inline-flex; align-items: center; gap: 0;
  padding: 3px;
  border: 1px solid #dbe4ea; border-radius: 8px;
  background: #f4f8fb;
}
.flow-view-toggle button {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px; font-weight: 700; color: #52616d;
  background: transparent; border: 0;
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.flow-view-toggle button:hover { color: #24313c; }
.flow-view-toggle button.is-active {
  background: #ffffff; color: #0067b8;
  box-shadow: 0 1px 2px rgba(9,52,84,.10), 0 0 0 1px #cbd6df inset;
}
.dark-console .flow-view-toggle { background: #0e2233; border-color: #294a63; }
.dark-console .flow-view-toggle button { color: #93a9b8; }
.dark-console .flow-view-toggle button:hover { color: #cbdae4; }
.dark-console .flow-view-toggle button.is-active { background: #10273a; color: #7cc5ff; box-shadow: 0 0 0 1px #294a63 inset; }

/* Classic view (top-to-bottom step list) */
.flow-classic {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 12px;
  min-height: 560px;
  margin-top: 8px;
}
@media (max-width: 900px) { .flow-classic { grid-template-columns: 1fr; } }

.flow-classic-side {
  display: flex; flex-direction: column;
  border: 1px solid #dbe4ea; border-radius: 12px;
  background: #fff;
  overflow: hidden;
  align-self: start;
  position: sticky; top: 88px;
  max-height: calc(100vh - 140px);
}
.flow-classic-side-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5ebf0;
  font-size: 11px; font-weight: 700; color: #24313c;
  background: #f5f9fc;
}
.flow-classic-side-body { overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }

.flow-classic-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.flow-classic-card {
  border: 1px solid #dbe4ea; border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(9,52,84,.06);
  overflow: hidden;
}
.flow-classic-card.tone-green  { border-top: 3px solid #2e8540; }
.flow-classic-card.tone-blue   { border-top: 3px solid #0067b8; }
.flow-classic-card.tone-amber  { border-top: 3px solid #d97706; }
.flow-classic-card.tone-purple { border-top: 3px solid #7357d3; }
.flow-classic-card.tone-red    { border-top: 3px solid #b4232c; }
.flow-classic-card.tone-cyan   { border-top: 3px solid #0e7c93; }
.flow-classic-card.tone-gray   { border-top: 3px solid #7c8994; }

.flow-classic-card-head {
  display: grid; grid-template-columns: 28px 26px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: #f5f9fc;
  border-bottom: 1px solid #e5ebf0;
}
.flow-classic-card-num {
  display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 999px;
  background: linear-gradient(135deg, #0067b8, #4eb3ed);
  color: #fff; font-size: 11px; font-weight: 800;
  box-shadow: 0 3px 8px rgba(0,120,212,.28), inset 0 1px 0 rgba(255,255,255,.28);
}
.flow-classic-card.tone-green  .flow-classic-card-num { background: linear-gradient(135deg, #22a477, #58d385); box-shadow: 0 3px 8px rgba(46,133,64,.28); }
.flow-classic-card.tone-amber  .flow-classic-card-num { background: linear-gradient(135deg, #d97706, #f4b25a); box-shadow: 0 3px 8px rgba(217,119,6,.28); }
.flow-classic-card.tone-purple .flow-classic-card-num { background: linear-gradient(135deg, #7357d3, #9a78ec); box-shadow: 0 3px 8px rgba(115,87,211,.28); }
.flow-classic-card.tone-red    .flow-classic-card-num { background: linear-gradient(135deg, #b4232c, #ef6a72); box-shadow: 0 3px 8px rgba(180,35,44,.28); }
.flow-classic-card.tone-cyan   .flow-classic-card-num { background: linear-gradient(135deg, #0e7c93, #4bbfd6); box-shadow: 0 3px 8px rgba(14,124,147,.28); }
.flow-classic-card-icon {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: rgba(0,120,212,.14); color: #0067b8;
}
.flow-classic-card.tone-green  .flow-classic-card-icon { background: rgba(46,133,64,.14);  color: #217a48; }
.flow-classic-card.tone-amber  .flow-classic-card-icon { background: rgba(217,119,6,.14);  color: #b26005; }
.flow-classic-card.tone-purple .flow-classic-card-icon { background: rgba(115,87,211,.16); color: #7357d3; }
.flow-classic-card.tone-red    .flow-classic-card-icon { background: rgba(180,35,44,.14);  color: #b4232c; }
.flow-classic-card.tone-cyan   .flow-classic-card-icon { background: rgba(6,148,170,.14);  color: #0e7c93; }
.flow-classic-card-type { min-width: 0; }
.flow-classic-card-type .combobox-trigger { height: 32px; font-size: 12px; font-weight: 700; padding: 0 10px; border-radius: 7px; }
.flow-classic-card-connect .combobox-trigger { height: 34px; }
.flow-classic-card-badge {
  padding: 3px 8px; border-radius: 999px;
  font-size: 8.5px; font-weight: 800; letter-spacing: .1em;
  color: #256f3a; background: #edf7ed; border: 1px solid #9ec89f;
}
.flow-classic-card-actions { display: flex; align-items: center; gap: 4px; }
.flow-classic-card-btn {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid #dbe4ea; background: #fff; color: #52616d;
  transition: color .12s, border-color .12s, background .12s;
}
.flow-classic-card-btn:hover:not([disabled]) { color: #0067b8; border-color: #a9c1d1; background: #eef7fd; }
.flow-classic-card-btn[disabled] { opacity: .45; cursor: not-allowed; }
.flow-classic-card-btn-danger { color: #b4232c; border-color: #f0c8cc; background: #fef2f2; }
.flow-classic-card-btn-danger:hover:not([disabled]) { background: #b4232c; color: #fff; border-color: #b4232c; }

.flow-classic-card-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.flow-classic-card-fields { display: grid; gap: 8px; }
.flow-classic-card-fields label,
.flow-classic-card-connections label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.flow-classic-card-fields label > span,
.flow-classic-card-connections label > span { font-size: 10.5px; font-weight: 700; color: #52616d; }
.flow-classic-card-connections label > span.port-then { color: #2e8540; }
.flow-classic-card-connections label > span.port-else { color: #b4232c; }
.flow-classic-card-fields input,
.flow-classic-card-fields textarea,
.flow-classic-card-fields select,
.flow-classic-card-connections select {
  width: 100%; min-width: 0;
  padding: 7px 10px;
  border: 1px solid #cbd6df; border-radius: 7px;
  background: #fff; color: #1f2933;
  font: inherit; font-size: 12px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.flow-classic-card-fields textarea { min-height: 60px; resize: vertical; }
.flow-classic-card-fields input:focus,
.flow-classic-card-fields textarea:focus,
.flow-classic-card-fields select:focus,
.flow-classic-card-connections select:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.flow-classic-card-connections { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding-top: 8px; border-top: 1px dashed #e5ebf0; }
input[data-card-field-readonly] { background: #f5f9fc !important; color: #6e7781 !important; cursor: not-allowed; }

.dark-console .flow-classic-side { background: #0d1e2b; border-color: #253d51; }
.dark-console .flow-classic-side-head { background: #10273a; border-color: #1d3448; color: #f0f6fa; }
.dark-console .flow-classic-card { background: #10273a; border-color: #294a63; box-shadow: 0 4px 12px rgba(0,0,0,.28); }
.dark-console .flow-classic-card-head { background: #0e2233; border-color: #1d3448; }
.dark-console .flow-classic-card-type { background: transparent; }
.dark-console .flow-classic-card-btn { background: #0a1a26; border-color: #2f4a5f; color: #cbdae4; }
.dark-console .flow-classic-card-btn:hover:not([disabled]) { color: #7cc5ff; border-color: #4a7088; background: #14344c; }
.dark-console .flow-classic-card-btn-danger { color: #f18b93; border-color: rgba(224,86,96,.35); background: rgba(224,86,96,.14); }
.dark-console .flow-classic-card-btn-danger:hover:not([disabled]) { background: #b4232c; border-color: #b4232c; color: #fff; }
.dark-console .flow-classic-card-badge { color: #b6e6bd; background: rgba(46,133,64,.16); border-color: rgba(46,133,64,.36); }
.dark-console .flow-classic-card-fields label > span,
.dark-console .flow-classic-card-connections label > span { color: #a5b7c4; }
.dark-console .flow-classic-card-fields input,
.dark-console .flow-classic-card-fields textarea,
.dark-console .flow-classic-card-fields select,
.dark-console .flow-classic-card-connections select {
  background: #0a1a26; border-color: #2f4a5f; color: #e4edf4; color-scheme: dark;
}
.dark-console .flow-classic-card-fields input:focus,
.dark-console .flow-classic-card-fields textarea:focus,
.dark-console .flow-classic-card-fields select:focus,
.dark-console .flow-classic-card-connections select:focus { border-color: #4aa8e8; box-shadow: 0 0 0 3px rgba(74,168,232,.22); }
.dark-console input[data-card-field-readonly] { background: #0e2233 !important; color: #7f95a5 !important; }
.dark-console .flow-classic-card-connections { border-color: #294a63; }


.flow-editor {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 320px;
  gap: 12px;
  height: calc(100vh - 220px);
  min-height: 560px;
  margin-top: 8px;
}
@media (max-width: 1180px) { .flow-editor { grid-template-columns: 200px minmax(0, 1fr) 280px; } }
@media (max-width: 900px)  { .flow-editor { grid-template-columns: 1fr; grid-template-rows: auto minmax(400px, 60vh) auto; } }

/* Left palette */
.flow-palette {
  display: flex; flex-direction: column;
  border: 1px solid #dbe4ea; border-radius: 12px;
  background: #fff;
  overflow: hidden;
  min-height: 0;
}
.flow-palette-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5ebf0;
  font-size: 11px; font-weight: 700; color: #24313c;
  background: #f5f9fc;
}
.flow-palette-body { overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.flow-palette-group { display: flex; flex-direction: column; gap: 4px; }
.flow-palette-group-label {
  padding: 0 6px;
  font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #7c8994;
}
.flow-palette-item {
  display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: grab;
  transition: background .14s ease, border-color .14s ease, transform .12s ease;
}
.flow-palette-item:hover { background: #f5f9fc; border-color: #dbe4ea; }
.flow-palette-item:active { cursor: grabbing; transform: scale(.98); }
.flow-palette-icon {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(0,120,212,.10); color: #0067b8;
}
.flow-palette-icon.tone-green  { background: rgba(46,133,64,.12);  color: #217a48; }
.flow-palette-icon.tone-amber  { background: rgba(217,119,6,.12);  color: #b26005; }
.flow-palette-icon.tone-purple { background: rgba(115,87,211,.14); color: #7357d3; }
.flow-palette-icon.tone-red    { background: rgba(180,35,44,.12);  color: #b4232c; }
.flow-palette-icon.tone-cyan   { background: rgba(6,148,170,.14);  color: #0e7c93; }
.flow-palette-icon.tone-gray   { background: rgba(87,105,118,.12); color: #52616d; }
.flow-palette-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.flow-palette-name { font-size: 11.5px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.flow-palette-desc { font-size: 9.5px; color: #7c8994; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Canvas */
.flow-canvas {
  position: relative;
  border: 1px solid #dbe4ea; border-radius: 12px;
  background: #f9fbfd;
  overflow: hidden;
  outline: none;
  min-height: 0;
}
.flow-canvas-grid {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(120,140,155,.32) 1px, transparent 1.4px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
}
.flow-canvas.is-panning { cursor: grabbing; }
.flow-canvas.is-panreq  { cursor: grab; }
.flow-canvas.is-wiring  { cursor: crosshair; }
.flow-viewport { position: absolute; inset: 0; transform-origin: 0 0; z-index: 1; }
.flow-nodes { position: relative; z-index: 2; }
.flow-wires { position: absolute; left: 0; top: 0; z-index: 1; overflow: visible; pointer-events: none; }
.flow-wires * { pointer-events: auto; }
.flow-wire        { fill: none; stroke: #7a8b98; stroke-width: 2; transition: stroke .14s ease, stroke-width .14s ease; }
.flow-wire.is-then{ stroke: #2e8540; }
.flow-wire.is-else{ stroke: #b4232c; }
.flow-wire-hit    { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; }
.flow-wire-group:hover .flow-wire { stroke-width: 3; }
.flow-wire-drag   { fill: none; stroke-width: 2; pointer-events: none; }

/* Nodes on canvas */
.flow-node {
  position: absolute;
  border: 1px solid #cfd8df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(9,52,84,.08), 0 1px 0 rgba(0,0,0,.02);
  transition: box-shadow .14s ease, border-color .14s ease, transform .06s ease;
  user-select: none;
}
.flow-node:hover { box-shadow: 0 10px 20px rgba(9,52,84,.14); }
.flow-node.is-selected { border-color: #1685da; box-shadow: 0 0 0 3px rgba(22,133,218,.16), 0 12px 24px rgba(9,52,84,.16); }
.flow-node.tone-green  { border-top: 3px solid #2e8540; }
.flow-node.tone-blue   { border-top: 3px solid #0067b8; }
.flow-node.tone-amber  { border-top: 3px solid #d97706; }
.flow-node.tone-purple { border-top: 3px solid #7357d3; }
.flow-node.tone-red    { border-top: 3px solid #b4232c; }
.flow-node.tone-cyan   { border-top: 3px solid #0e7c93; }
.flow-node.tone-gray   { border-top: 3px solid #7c8994; }

.flow-node-head {
  display: grid; grid-template-columns: 24px 1fr auto auto; align-items: center; gap: 8px;
  padding: 10px 10px 8px;
  cursor: grab;
}
.flow-node-head:active { cursor: grabbing; }
.flow-node-icon {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  background: rgba(0,120,212,.12); color: #0067b8;
}
.flow-node.tone-green  .flow-node-icon { background: rgba(46,133,64,.14);  color: #217a48; }
.flow-node.tone-amber  .flow-node-icon { background: rgba(217,119,6,.14);  color: #b26005; }
.flow-node.tone-purple .flow-node-icon { background: rgba(115,87,211,.16); color: #7357d3; }
.flow-node.tone-red    .flow-node-icon { background: rgba(180,35,44,.14);  color: #b4232c; }
.flow-node.tone-cyan   .flow-node-icon { background: rgba(6,148,170,.14);  color: #0e7c93; }
.flow-node.tone-gray   .flow-node-icon { background: rgba(87,105,118,.14); color: #52616d; }
.flow-node-title { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.flow-node-name  { font-size: 12px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.flow-node-sub   { font-size: 10.5px; color: #6e7781; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-node-badge {
  padding: 2px 6px; border-radius: 999px;
  font-size: 8.5px; font-weight: 800; letter-spacing: .1em;
  color: #256f3a; background: #edf7ed; border: 1px solid #9ec89f;
}
.flow-node-close {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  color: #7c8994; background: transparent; border: 0;
  transition: background .14s, color .14s;
}
.flow-node-close:hover { color: #b4232c; background: rgba(180,35,44,.08); }

.flow-node-body { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.flow-node-port-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 4px 10px;
  border-radius: 7px;
  background: #f5f9fc;
  border: 1px dashed #d8e2e9;
}
.flow-node-port-row.is-terminal { justify-content: space-between; }
.flow-node-port-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .01em; color: #52616d;
}
.flow-node-port-label.port-then { color: #2e8540; }
.flow-node-port-label.port-else { color: #b4232c; }
.flow-node-terminal-dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: repeating-linear-gradient(45deg, #b4232c 0 3px, transparent 3px 6px);
}

/* Ports (in/out little circles) */
.flow-node-port {
  position: absolute;
  width: 14px; height: 14px; border-radius: 999px;
  background: #ffffff;
  border: 2px solid #7a8b98;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.flow-node-port-out { right: -8px; cursor: crosshair; }
.flow-node-port-out.port-then { border-color: #2e8540; background: #eafaf0; }
.flow-node-port-out.port-else { border-color: #b4232c; background: #fdecec; }
.flow-node-port-out:hover { transform: scale(1.25); background: #dcebf7; border-color: #1685da; }
.flow-node-port-in {
  left: -8px; top: 24px;
  background: #fff; border-color: #52616d;
}
.flow-canvas.is-wiring .flow-node-port-in { background: #dcebf7; border-color: #1685da; transform: scale(1.2); }

/* Position out-ports vertically against their row */
.flow-node .flow-node-port-out { top: 80px; }
.flow-node .flow-node-port-out.port-then { top: 80px; }
.flow-node .flow-node-port-out.port-else { top: 102px; }
/* Terminal nodes (no outputs) — no out-ports rendered */

/* Zoombar overlay */
.flow-zoombar {
  position: absolute; right: 12px; bottom: 12px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.92); border: 1px solid #dbe4ea;
  box-shadow: 0 8px 18px rgba(9,52,84,.10);
  backdrop-filter: blur(6px);
  font-size: 11px; font-weight: 700; color: #24313c;
}
.flow-zoombar button {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  color: #52616d; background: transparent; border: 0;
  transition: background .12s, color .12s;
}
.flow-zoombar button:hover { color: #0067b8; background: #eef7fd; }
.flow-zoombar-sep { width: 1px; height: 14px; background: #dbe4ea; }
[data-zoom-level] { min-width: 42px; text-align: center; }

.flow-canvas-tip {
  position: absolute; left: 12px; bottom: 12px; z-index: 5;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 10.5px; color: #52616d;
  background: rgba(255,255,255,.92); border: 1px solid #dbe4ea;
  box-shadow: 0 4px 10px rgba(9,52,84,.06);
  max-width: 60%;
}

/* Inspector */
.flow-inspector {
  display: flex; flex-direction: column;
  border: 1px solid #dbe4ea; border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  min-height: 0;
}
.flow-inspector-head {
  display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e5ebf0;
  background: #f5f9fc;
}
.flow-inspector-head.tone-green  { background: rgba(46,133,64,.06);  }
.flow-inspector-head.tone-amber  { background: rgba(217,119,6,.06);  }
.flow-inspector-head.tone-purple { background: rgba(115,87,211,.07); }
.flow-inspector-head.tone-red    { background: rgba(180,35,44,.06);  }
.flow-inspector-head.tone-cyan   { background: rgba(6,148,170,.07);  }
.flow-inspector-icon {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: rgba(0,120,212,.14); color: #0067b8;
}
.flow-inspector-head.tone-green  .flow-inspector-icon { background: rgba(46,133,64,.14);  color: #217a48; }
.flow-inspector-head.tone-amber  .flow-inspector-icon { background: rgba(217,119,6,.14);  color: #b26005; }
.flow-inspector-head.tone-purple .flow-inspector-icon { background: rgba(115,87,211,.16); color: #7357d3; }
.flow-inspector-head.tone-red    .flow-inspector-icon { background: rgba(180,35,44,.14);  color: #b4232c; }
.flow-inspector-head.tone-cyan   .flow-inspector-icon { background: rgba(6,148,170,.14);  color: #0e7c93; }
.flow-inspector-title { font-size: 13px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.flow-inspector-sub   { font-size: 10.5px; color: #6e7781; line-height: 1.4; }

.flow-inspector-body { padding: 12px 14px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.flow-inspector-field { display: flex; flex-direction: column; gap: 4px; }
.flow-inspector-field > span, .flow-inspector-field-label { font-size: 10.5px; font-weight: 700; color: #52616d; letter-spacing: .01em; }
.flow-inspector-field input,
.flow-inspector-field textarea,
.flow-inspector-field select {
  width: 100%; padding: 8px 10px;
  border: 1px solid #cbd6df; border-radius: 8px;
  background: #ffffff; color: #1f2933;
  font: inherit; font-size: 12px; outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.flow-inspector-field textarea { min-height: 68px; resize: vertical; }
.flow-inspector-field input:focus,
.flow-inspector-field textarea:focus,
.flow-inspector-field select:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.flow-inspector-note { padding: 8px 10px; border-radius: 8px; background: #f5f9fc; border: 1px dashed #cbd6df; font-size: 11px; color: #52616d; }

.flow-inspector-connections { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px dashed #e5ebf0; margin-top: 4px; }
.flow-inspector-connection { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; align-items: center; }
.flow-inspector-connection-label {
  font-size: 10.5px; font-weight: 700; color: #52616d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.flow-inspector-connection-label.port-then { color: #2e8540; }
.flow-inspector-connection-label.port-else { color: #b4232c; }
.flow-inspector-connection select {
  min-width: 0; width: 100%;
  padding: 6px 8px; font-size: 11px;
  border: 1px solid #cbd6df; border-radius: 7px; background: #fff; color: #1f2933;
  text-overflow: ellipsis;
}
.flow-inspector-connection select:focus { border-color: #1685da; outline: none; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.dark-console .flow-inspector-connection select { background: #0a1a26; border-color: #2f4a5f; color: #e4edf4; color-scheme: dark; }

.flow-inspector-kv { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid #e5ebf0; border-radius: 8px; background: #f9fbfd; }
.flow-inspector-kv-row { display: grid; grid-template-columns: 1fr 1fr 24px; gap: 6px; align-items: center; }
.flow-inspector-kv-row input { padding: 6px 8px; font-size: 11px; }
.flow-inspector-kv-row button {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  color: #b4232c; background: transparent; border: 1px solid transparent;
  transition: background .12s, border-color .12s;
}
.flow-inspector-kv-row button:hover { background: #fdecec; border-color: #f0c8cc; }
.flow-inspector-kv-empty { font-size: 10.5px; color: #7c8994; padding: 4px 2px; }
.flow-inspector-kv-add {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; color: #0067b8;
  background: #eef7fd; border: 1px dashed #b8dcee;
  transition: background .12s, border-color .12s;
  align-self: flex-start;
}
.flow-inspector-kv-add:hover { background: #dcebf7; border-color: #7ec1e6; }

.flow-inspector-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #e5ebf0;
  background: #f9fbfd;
}
.flow-inspector-foot .ui-button { justify-content: center; padding: 0 8px; font-size: 11px; }
.flow-inspector-foot [data-inspector-del] { grid-column: 1 / -1; color: #b4232c; border-color: #f0c8cc; background: #fef5f5; }
.flow-inspector-foot [data-inspector-del]:hover { background: #fbe1e3; border-color: #e3a4a9; }

.flow-inspector-empty {
  padding: 32px 20px;
  text-align: center;
  color: #6e7781;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 1px dashed transparent;
}
.flow-inspector-empty iconify-icon { color: #a3b2be; }
.flow-inspector-empty-title { font-size: 12px; font-weight: 700; color: #4d5966; }
.flow-inspector-empty p { font-size: 11px; line-height: 1.5; margin: 0; max-width: 220px; }

/* Dark mode */
.dark-console .flow-palette,
.dark-console .flow-canvas,
.dark-console .flow-inspector { border-color: #253d51; background: #0d1e2b; }
.dark-console .flow-palette-head,
.dark-console .flow-inspector-head { background: #10273a; border-color: #1d3448; color: #f0f6fa; }
.dark-console .flow-palette-item:hover { background: #14344c; border-color: #294a63; }
.dark-console .flow-palette-name { color: #f0f6fa; }
.dark-console .flow-palette-desc { color: #93a9b8; }
.dark-console .flow-palette-group-label { color: #93a9b8; }
.dark-console .flow-canvas-grid {
  background-image: radial-gradient(circle, rgba(120,168,200,.20) 1px, transparent 1.4px);
}
.dark-console .flow-canvas { background: #0a1a26; }
.dark-console .flow-canvas-tip,
.dark-console .flow-zoombar { background: rgba(16,39,58,.92); border-color: #294a63; color: #cbdae4; }
.dark-console .flow-zoombar button { color: #cbdae4; }
.dark-console .flow-zoombar button:hover { color: #7cc5ff; background: #14344c; }
.dark-console .flow-zoombar-sep { background: #294a63; }
.dark-console .flow-node { background: #10273a; border-color: #294a63; box-shadow: 0 6px 16px rgba(0,0,0,.32); }
.dark-console .flow-node:hover { box-shadow: 0 12px 24px rgba(0,0,0,.42); }
.dark-console .flow-node.is-selected { border-color: #4aa8e8; box-shadow: 0 0 0 3px rgba(74,168,232,.22), 0 12px 24px rgba(0,0,0,.42); }
.dark-console .flow-node-name { color: #f0f6fa; }
.dark-console .flow-node-sub  { color: #93a9b8; }
.dark-console .flow-node-port-row { background: #0a1a26; border-color: #294a63; }
.dark-console .flow-node-port-label { color: #a5b7c4; }
.dark-console .flow-node-port { background: #10273a; border-color: #93a9b8; }
.dark-console .flow-node-close:hover { color: #f18b93; background: rgba(224,86,96,.14); }
.dark-console .flow-node-badge { color: #b6e6bd; background: rgba(46,133,64,.16); border-color: rgba(46,133,64,.36); }
.dark-console .flow-wire { stroke: #6a8ba3; }
.dark-console .flow-wire.is-then { stroke: #78d891; }
.dark-console .flow-wire.is-else { stroke: #f18b93; }
.dark-console .flow-inspector-title { color: #f0f6fa; }
.dark-console .flow-inspector-sub   { color: #a5b7c4; }
.dark-console .flow-inspector-field > span,
.dark-console .flow-inspector-field-label { color: #a5b7c4; }
.dark-console .flow-inspector-field input,
.dark-console .flow-inspector-field textarea,
.dark-console .flow-inspector-field select {
  background: #0a1a26; border-color: #2f4a5f; color: #e4edf4; color-scheme: dark;
}
.dark-console .flow-inspector-field input:focus,
.dark-console .flow-inspector-field textarea:focus,
.dark-console .flow-inspector-field select:focus { border-color: #4aa8e8; box-shadow: 0 0 0 3px rgba(74,168,232,.22); }
.dark-console .flow-inspector-note { background: #10273a; border-color: #294a63; color: #a5b7c4; }
.dark-console .flow-inspector-connections { border-color: #294a63; }
.dark-console .flow-inspector-connection-label { color: #a5b7c4; }
.dark-console .flow-inspector-connection-target { color: #7f95a5; }
.dark-console .flow-inspector-kv { background: #0e2233; border-color: #294a63; }
.dark-console .flow-inspector-kv-add { background: rgba(74,168,232,.14); color: #78cafa; border-color: rgba(74,168,232,.32); }
.dark-console .flow-inspector-kv-add:hover { background: rgba(74,168,232,.22); border-color: rgba(74,168,232,.5); }
.dark-console .flow-inspector-foot { background: #0b1a26; border-color: #1d3448; }
.dark-console .flow-inspector-foot [data-inspector-del] { color: #f18b93; background: rgba(180,35,44,.14); border-color: rgba(224,86,96,.32); }
.dark-console .flow-inspector-foot [data-inspector-del]:hover { background: rgba(180,35,44,.24); border-color: rgba(224,86,96,.5); }
.dark-console .flow-inspector-empty { color: #93a9b8; }
.dark-console .flow-inspector-empty-title { color: #cbdae4; }
.dark-console .flow-inspector-empty iconify-icon { color: #5f7788; }

/* ── Guided tour overlay ─────────────────────────────────────────────── */
.tour-root { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.tour-backdrop { position: fixed; inset: 0; background: rgba(9,20,33,.55); pointer-events: auto; animation: tourFade .16s ease; }
.tour-spotlight { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(9,20,33,.55), 0 0 0 3px rgba(74,168,232,.45), 0 12px 32px rgba(74,168,232,.28); pointer-events: none; transition: top .28s cubic-bezier(.2,.7,.2,1), left .28s cubic-bezier(.2,.7,.2,1), width .28s cubic-bezier(.2,.7,.2,1), height .28s cubic-bezier(.2,.7,.2,1), opacity .18s ease; }
.tour-tooltip { position: fixed; z-index: 91; width: 372px; padding: 14px 16px 12px; border: 1px solid #cbd6df; border-radius: 12px; background: #fff; box-shadow: 0 22px 48px rgba(9,20,33,.32); pointer-events: auto; transition: opacity .18s ease, left .28s cubic-bezier(.2,.7,.2,1), top .28s cubic-bezier(.2,.7,.2,1); }
.tour-tooltip-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-tooltip-crumbs { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.tour-tooltip-crumb  { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.tour-tooltip-crumb-page { background: linear-gradient(140deg,#0072c6,#4eb3ed); color: #fff; }
.tour-tooltip-crumb-step { background: #eef6fb; color: #0872bd; border: 1px solid #c8e0f0; }
.tour-tooltip-crumb-sep  { font-size: 10px; color: #a3b2be; font-weight: 700; }
.tour-tooltip-close { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 6px; color: #7c8994; transition: background .14s ease, color .14s ease; }
.tour-tooltip-close:hover { background: #eef4f8; color: #24313c; }
.tour-tooltip-title { margin-top: 8px; font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: #1f2933; }
.tour-tooltip-body { margin-top: 6px; font-size: 11px; line-height: 1.55; color: #4d5966; }
.tour-tooltip-progressbar { position: relative; margin-top: 12px; height: 4px; border-radius: 999px; background: #e5ebf0; overflow: hidden; }
.tour-tooltip-progressbar span { display: block; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #0078d4, #4eb3ed 60%, #b7f23a); transition: width .28s cubic-bezier(.2,.7,.2,1); }
.tour-tooltip-jump { margin-top: 10px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f5f9fc; border: 1px solid #e0e7ed; border-radius: 9px; }
.tour-tooltip-jump label { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: #52616d; }
.tour-tooltip-jump label iconify-icon { color: #0872bd; }
.tour-tooltip-jump select { flex: 1; min-width: 0; height: 28px; padding: 0 8px; border: 1px solid #c0ccd5; border-radius: 7px; background: #fff; font-size: 11px; font-weight: 600; color: #24313c; cursor: pointer; transition: border-color .14s ease, box-shadow .14s ease; }
.tour-tooltip-jump select:hover  { border-color: #a1b5c3; }
.tour-tooltip-jump select:focus  { outline: none; border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.tour-tooltip-actions { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-tooltip-nav { display: flex; align-items: center; gap: 6px; }
.tour-tooltip [data-tour-options] { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px 5px 7px; border-radius: 7px; font-size: 10px; font-weight: 700; color: #52616d; background: #f1f5f9; border: 1px solid #d7e0e6; transition: background .14s ease, color .14s ease, border-color .14s ease; }
.tour-tooltip [data-tour-options]:hover { background: #eef4f8; color: #0872bd; border-color: #b8dcee; }
.tour-tooltip [data-tour-options] iconify-icon { color: currentColor; }
.tour-tooltip [data-tour-prev]:disabled { opacity: .45; cursor: not-allowed; }
@keyframes tourFade { from { opacity: 0; } to { opacity: 1; } }

/* ── Welcome overlay ────────────────────────────────────────────────── */
.tour-welcome-scrim { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 24px; background: rgba(9,20,33,.55); opacity: 0; transition: opacity .18s ease; }
.tour-welcome-scrim.is-open { opacity: 1; }
.tour-welcome-card { width: 100%; max-width: 460px; overflow: hidden; border-radius: 16px; background: #fff; border: 1px solid #cbd6df; box-shadow: 0 30px 70px rgba(9,20,33,.34); transform: translateY(14px) scale(.98); opacity: 0; transition: transform .28s cubic-bezier(.2,.7,.2,1), opacity .22s ease; position: relative; }
.tour-welcome-scrim.is-open .tour-welcome-card { transform: none; opacity: 1; }
.tour-welcome-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: rgba(255,255,255,.86); background: rgba(255,255,255,.10); backdrop-filter: blur(6px); transition: background .14s ease, color .14s ease; }
.tour-welcome-close:hover { background: rgba(255,255,255,.22); color: #fff; }
.tour-welcome-hero { position: relative; overflow: hidden; padding: 32px 28px 28px; color: #fff; background: radial-gradient(circle at 18% 20%, rgba(183,242,58,.35), transparent 42%), radial-gradient(circle at 82% 12%, rgba(78,179,237,.42), transparent 46%), linear-gradient(140deg, #0b1d2f 0%, #123c5e 55%, #0a223a 100%); text-align: left; }
.tour-welcome-orb { position: absolute; border-radius: 999px; filter: blur(38px); opacity: .55; pointer-events: none; }
.tour-welcome-orb-one   { top: -60px; right: -40px; width: 220px; height: 220px; background: #4eb3ed; }
.tour-welcome-orb-two   { bottom: -70px; left: -50px; width: 240px; height: 240px; background: #b7f23a; opacity: .28; }
.tour-welcome-orb-three { top: 30%;   left: 60%;    width: 140px; height: 140px; background: #a97cff; opacity: .28; }
.tour-welcome-eyebrow { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(183,242,58,.14); color: #d7ff9a; font-size: 9px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; border: 1px solid rgba(183,242,58,.28); }
.tour-welcome-pulse { display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: #b7f23a; box-shadow: 0 0 0 4px rgba(183,242,58,.16); animation: tourPulse 1.6s ease-in-out infinite; }
@keyframes tourPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .55; } }
.tour-welcome-avatar { position: relative; z-index: 1; margin-top: 18px; display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: linear-gradient(135deg,#2fa1ee,#0f6fbf); color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 12px 28px rgba(0,120,212,.45), inset 0 1px 0 rgba(255,255,255,.22); }
.tour-welcome-title { position: relative; z-index: 1; margin-top: 14px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: #f4f9fd; line-height: 1.2; }
.tour-welcome-sub   { position: relative; z-index: 1; margin-top: 8px; font-size: 12px; line-height: 1.55; color: #bcd0dd; max-width: 34ch; }
.tour-welcome-body  { padding: 18px 22px 4px; }
.tour-welcome-list  { display: grid; gap: 10px; }
.tour-welcome-list li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid #e0e7ed; border-radius: 10px; background: #f7fbfd; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.tour-welcome-list li:hover { transform: translateY(-1px); border-color: #b8dcee; box-shadow: 0 6px 14px rgba(9,52,84,.08); }
.tour-welcome-list li > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tour-welcome-list li strong { font-size: 11.5px; font-weight: 700; color: #1f2933; letter-spacing: -.005em; }
.tour-welcome-list li em     { font-style: normal; font-size: 10.5px; color: #5c6a76; line-height: 1.45; }
.tour-welcome-tile { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; flex: 0 0 32px; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.tour-welcome-tile.tone-blue  { background: linear-gradient(160deg,#dbe9ff,#eff6ff); color: #1d4ed8; }
.tour-welcome-tile.tone-green { background: linear-gradient(160deg,#d1fadf,#ecfdf5); color: #047857; }
.tour-welcome-tile.tone-amber { background: linear-gradient(160deg,#fee9c8,#fff7ed); color: #b45309; }
.tour-welcome-hint  { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; background: #eef6fb; border: 1px dashed #b8dcee; font-size: 10.5px; color: #245a80; }
.tour-welcome-hint iconify-icon { color: #0872bd; }
.tour-welcome-hint strong { color: #0872bd; }
.tour-welcome-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px 20px; }
.tour-welcome-later   { padding: 8px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #6e7781; background: transparent; border: 0; transition: background .14s ease, color .14s ease; }
.tour-welcome-later:hover { background: #eef4f8; color: #24313c; }
.tour-welcome-start   { min-width: 158px; justify-content: center; }

/* ── Resume overlay (compact) ───────────────────────────────────────── */
.tour-resume-scrim { position: fixed; z-index: 92; right: 18px; bottom: 18px; opacity: 0; transform: translateY(10px); transition: opacity .18s ease, transform .22s cubic-bezier(.2,.7,.2,1); }
.tour-resume-scrim.is-open { opacity: 1; transform: none; }
.tour-resume-card { position: relative; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; align-items: center; gap: 4px 14px; width: 350px; padding: 14px 16px 12px 14px; border-radius: 14px; border: 1px solid #cbd6df; background: linear-gradient(160deg,#ffffff, #f5fafd); box-shadow: 0 22px 44px rgba(9,20,33,.24); }
.tour-resume-close { position: absolute; top: 8px; right: 8px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 6px; color: #7c8994; transition: background .14s ease, color .14s ease; }
.tour-resume-close:hover { background: #eef4f8; color: #24313c; }
.tour-resume-icon { grid-row: 1 / span 2; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #0078d4, #4eb3ed); box-shadow: 0 8px 20px rgba(0,120,212,.35); }
.tour-resume-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 22px; }
.tour-resume-title { font-size: 12.5px; font-weight: 700; color: #1f2933; letter-spacing: -.01em; }
.tour-resume-meta  { font-size: 10.5px; color: #6e7781; }
.tour-resume-meta em { font-style: normal; font-weight: 700; color: #245a80; }
.tour-resume-actions { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.tour-resume-dismiss { padding: 8px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; color: #6e7781; background: transparent; border: 0; transition: background .14s ease, color .14s ease; }
.tour-resume-dismiss:hover { background: #eef4f8; color: #24313c; }

/* Dark mode */
.dark-console .tour-welcome-card { border-color: #294156; background: #0e2233; box-shadow: 0 32px 72px rgba(0,0,0,.62); }
.dark-console .tour-welcome-hero { background: radial-gradient(circle at 18% 20%, rgba(183,242,58,.28), transparent 42%), radial-gradient(circle at 82% 12%, rgba(78,179,237,.38), transparent 46%), linear-gradient(140deg, #06121f 0%, #0d2f4a 55%, #04101c 100%); }
.dark-console .tour-welcome-list li { background: #10273a; border-color: #294156; }
.dark-console .tour-welcome-list li strong { color: #f0f6fa; }
.dark-console .tour-welcome-list li em     { color: #93a9b8; }
.dark-console .tour-welcome-list li:hover { border-color: #34799f; box-shadow: 0 8px 22px rgba(0,0,0,.36); }
.dark-console .tour-welcome-tile.tone-blue  { background: linear-gradient(160deg, rgba(59,130,246,.28), rgba(59,130,246,.14)); color: #93c5fd; }
.dark-console .tour-welcome-tile.tone-green { background: linear-gradient(160deg, rgba(16,185,129,.28), rgba(16,185,129,.14)); color: #6ee7b7; }
.dark-console .tour-welcome-tile.tone-amber { background: linear-gradient(160deg, rgba(245,158,11,.28), rgba(245,158,11,.14)); color: #fbbf24; }
.dark-console .tour-welcome-hint { background: rgba(59,130,246,.12); border-color: rgba(78,179,237,.34); color: #cfe1ee; }
.dark-console .tour-welcome-hint iconify-icon,
.dark-console .tour-welcome-hint strong { color: #78cafa; }
.dark-console .tour-welcome-later:hover { background: #17364b; color: #f0f6fa; }
.dark-console .tour-resume-card { border-color: #294156; background: linear-gradient(160deg, #10273a, #0b1b28); box-shadow: 0 26px 52px rgba(0,0,0,.58); }
.dark-console .tour-resume-title { color: #f0f6fa; }
.dark-console .tour-resume-meta  { color: #93a9b8; }
.dark-console .tour-resume-meta em { color: #78cafa; }
.dark-console .tour-resume-close { color: #93a9b8; }
.dark-console .tour-resume-close:hover { background: #17364b; color: #f0f6fa; }
.dark-console .tour-resume-dismiss:hover { background: #17364b; color: #f0f6fa; }

/* Dark-mode overrides */
.dark-console .tour-backdrop { background: rgba(4,10,18,.72); }
.dark-console .tour-spotlight { box-shadow: 0 0 0 9999px rgba(4,10,18,.72), 0 0 0 3px rgba(102,194,255,.5), 0 12px 32px rgba(0,120,212,.32); }
.dark-console .tour-tooltip { border-color: #2b4353; background: #10273a; box-shadow: 0 24px 52px rgba(0,0,0,.55); }
.dark-console .tour-tooltip-title { color: #f0f6fa; }
.dark-console .tour-tooltip-body { color: #b3c1cc; }
.dark-console .tour-tooltip-crumb-page { background: linear-gradient(140deg,#0f5b8c,#3d9adc); color: #f4faff; }
.dark-console .tour-tooltip-crumb-step { background: rgba(59,130,246,.16); color: #93c5fd; border-color: rgba(78,179,237,.32); }
.dark-console .tour-tooltip-crumb-sep  { color: #52667a; }
.dark-console .tour-tooltip-progressbar { background: rgba(255,255,255,.08); }
.dark-console .tour-tooltip-jump { background: #0e2233; border-color: #2b4353; }
.dark-console .tour-tooltip-jump label { color: #a5b7c4; }
.dark-console .tour-tooltip-jump label iconify-icon { color: #78cafa; }
.dark-console .tour-tooltip-jump select { background: #10283a; border-color: #2f4a5f; color: #e7eef5; }
.dark-console .tour-tooltip-jump select:hover  { border-color: #4a7088; }
.dark-console .tour-tooltip-jump select:focus  { border-color: #4aa8e8; box-shadow: 0 0 0 3px rgba(74,168,232,.24); }
.dark-console .tour-tooltip-close { color: #93a9b8; }
.dark-console .tour-tooltip-close:hover { background: #17364b; color: #cbdae4; }
.dark-console .tour-tooltip [data-tour-options] { background: rgba(120,202,250,.10); color: #a5b7c4; border-color: rgba(120,202,250,.22); }
.dark-console .tour-tooltip [data-tour-options]:hover { background: rgba(120,202,250,.20); color: #78cafa; border-color: rgba(120,202,250,.42); }
.dark-console .tour-welcome-lead { color: #cbdae4; }
.dark-console .tour-welcome-list li { color: #d3dee6; }
.dark-console .tour-welcome-hint { border-color: #2b4353; color: #93a9b8; }
.dark-console .tour-welcome-hint strong { color: #78cafa; }
.dark-console .tour-welcome-badge.tone-blue  { background: rgba(59,130,246,.18); color: #93c5fd; }
.dark-console .tour-welcome-badge.tone-green { background: rgba(16,185,129,.18); color: #6ee7b7; }
.dark-console .tour-welcome-badge.tone-amber { background: rgba(245,158,11,.18); color: #fbbf24; }

/* Test-page training-notes cards — light + dark variants. */
.training-note { border: 1px solid #e0e7ec; border-radius: 8px; background: #fafcfd; padding: 12px; }
.training-note + .training-note { margin-top: 8px; }
.training-note-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.training-note-when { font-size: 10.5px; color: #7c8994; }
.training-note-del { font-size: 10.5px; color: #c04a4a; background: transparent; border: 0; cursor: pointer; padding: 0; }
.training-note-del:hover { text-decoration: underline; }
.training-note-body { font-size: 12px; color: #243441; white-space: pre-wrap; }
.training-note-attach { margin-top: 8px; }
.training-note-attach > summary { font-size: 10.5px; color: #5c6b76; cursor: pointer; }
.training-note-attach > pre { margin-top: 6px; font-size: 10.5px; color: #5c6b76; white-space: pre-wrap; background: transparent; border: 0; padding: 0; font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; }

.dark-console .training-note { border-color: #253d51; background: linear-gradient(180deg, #10273a, #0b1c2b); color: #dceaf3; box-shadow: 0 8px 22px rgba(0,0,0,.20); }
.dark-console .training-note-when { color: #94a8b6; }
.dark-console .training-note-del { color: #f28b8b; }
.dark-console .training-note-body { color: #e6eef4; }
.dark-console .training-note-attach > summary { color: #94a8b6; }
.dark-console .training-note-attach > pre { color: #b8c8d4; }

/* Toggle switch (iOS-style) — replaces raw checkboxes for on/off panel-head controls */
.ui-switch { position: relative; display: inline-flex; align-items: center; width: 40px; height: 22px; cursor: pointer; flex: none; }
.ui-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ui-switch > span {
  position: absolute; inset: 0;
  background: #cfd7de;
  border-radius: 999px;
  transition: background .16s ease;
}
.ui-switch > span::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(20, 45, 70, .3);
  transition: transform .16s ease;
}
.ui-switch input:checked + span { background: #2673d2; }
.ui-switch input:checked + span::after { transform: translateX(18px); }
.ui-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(38, 115, 210, .22); }

.dark-console .ui-switch > span { background: #2d3f4d; }
.dark-console .ui-switch > span::after { background: #eaf2f8; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.dark-console .ui-switch input:checked + span { background: #4a9be0; }

/* Availability — weekly schedule editor */
.wsched-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #e0e7ec;
  border-radius: 10px;
  background: #ffffff;
  transition: border-color .12s;
}
.wsched-row.is-open   { border-color: #cfdae3; }
.wsched-row.is-closed { background: #f8fafc; }
.wsched-row + .wsched-row { margin-top: 8px; }
.wsched-day { display: flex; align-items: center; gap: 12px; min-height: 34px; }
.wsched-day-name { font-size: 12.5px; font-weight: 600; color: #26333d; letter-spacing: -.005em; }
.wsched-closed {
  font-size: 11.5px;
  color: #7c8994;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4f6f8;
  border: 1px dashed #d8dfe6;
  display: inline-block;
}
.wsched-ranges { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wsched-range  { display: flex; align-items: center; gap: 8px; }
.wsched-time   { width: 118px; height: 34px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.wsched-to     { font-size: 11px; color: #7c8994; padding: 0 2px; }
.wsched-actions { display: flex; align-items: center; justify-content: flex-end; min-height: 34px; }
.wsched-add {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  font-size: 11.5px; font-weight: 600;
  color: #2673d2;
  background: transparent;
  border: 1px dashed #b8ccdd;
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.wsched-add:hover { background: #eef5fc; border-color: #7fb0dc; }
.wsched-icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid #dbe4ea;
  border-radius: 7px;
  color: #5c6b76;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.wsched-icon-btn:hover { background: #f2f6f9; }
.wsched-icon-btn--danger:hover { color: #c04a4a; border-color: #e6b9bd; background: #fbf1f2; }

@media (max-width: 640px) {
  .wsched-row { grid-template-columns: 1fr; }
  .wsched-day { justify-content: flex-start; }
  .wsched-actions { justify-content: flex-start; }
}

/* Providers page — collapsible team-member card. Collapsed state shows a
   compact summary row (name + email + custom-hours badge). Expanded state
   reveals the full editor (name/email/bio inputs + schedule). */
.prov-card { padding: 0; }
.prov-card.is-collapsed .svc-card-head,
.prov-card.is-expanded  .svc-card-head { display: none; }
.prov-card-summary {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  border-radius: 8px; transition: background .12s ease;
}
.prov-card-summary:hover { background: #f4f8fb; }
.prov-card.is-expanded .prov-card-summary { border-bottom: 1px solid #e2e8ee; border-radius: 8px 8px 0 0; }
.prov-card-summary-main { flex: 1 1 auto; min-width: 0; }
.prov-card-summary-name { font-size: 12px; font-weight: 700; color: #1f2c37; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prov-card-summary-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 10.5px; color: #5c6a76; flex-wrap: wrap; }
.prov-card-summary-muted { color: #94a3ad; font-style: italic; }
.prov-card-summary-badge {
  display: inline-flex; align-items: center;
  padding: 1px 8px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #0067b8; background: #dcebf7; border-radius: 999px;
}
.prov-card-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: 0 0 auto;
  background: transparent; border: 1px solid #d0dae2; border-radius: 8px;
  color: #4f5862; cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
.prov-card-chevron:hover { border-color: #8ba0af; background: #edf6fc; }
/* Override the form-context margin baked into `.editable-row-del` and
   `.editable-row-index` so the number badge, delete button, and chevron
   all sit vertically centered on the collapsed summary row. Applies to
   any collapsible card summary that uses .prov-card / .prov-card-summary. */
.prov-card-summary .editable-row-del,
.prov-card-summary .editable-row-index { margin-top: 0; }
/* Restore natural border-radius on `svc-card.prov-card` so the card doesn't
   inherit svc-card padding around the summary row. */
.svc-card.prov-card { padding: 0; }
.prov-card-body { padding: 14px; }

.dark-console .prov-card-summary:hover { background: #12293a; }
.dark-console .prov-card.is-expanded .prov-card-summary { border-bottom-color: #253d51; }
.dark-console .prov-card-summary-name { color: #e2ebf2; }
.dark-console .prov-card-summary-meta { color: #a5b7c4; }
.dark-console .prov-card-summary-muted { color: #6e808e; }
.dark-console .prov-card-summary-badge { color: #77c8fa; background: rgba(0,120,212,.22); }
.dark-console .prov-card-chevron { border-color: #365366; color: #b8c8d4; }
.dark-console .prov-card-chevron:hover { border-color: #4a7088; background: #16344a; }

/* Providers page — per-provider Date overrides section (below the weekly
   schedule editor). Uses named classes instead of inline hex so dark mode
   has proper overrides. */
.prov-overrides { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e2e8ee; }
.prov-overrides-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 12px; }
.prov-overrides-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #4f5862; }
.prov-overrides-sub { font-size: 10px; color: #7c8994; margin-top: 2px; }
.prov-overrides-row {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #e2e8ee; background: #ffffff;
  border-radius: 6px; padding: 6px 10px;
}
.prov-overrides-date { width: 150px; height: 28px; font-size: 11px; }
.prov-overrides-status { font-size: 10.5px; font-weight: 600; }
.prov-overrides-status.is-closed { color: #8a1a22; }
.prov-overrides-status.is-open   { color: #196a3f; }
.prov-overrides-note { font-size: 10px; color: #7c8994; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prov-overrides-empty {
  font-size: 11px; color: #7c8994;
  border: 1px dashed #d0dae2; border-radius: 6px; padding: 10px;
}
.dark-console .prov-overrides { border-top-color: #253d51; }
.dark-console .prov-overrides-title { color: #e2ebf2; }
.dark-console .prov-overrides-sub { color: #94a8b6; }
.dark-console .prov-overrides-row { border-color: #253d51; background: #0d1c29; }
.dark-console .prov-overrides-status.is-closed { color: #f5717c; }
.dark-console .prov-overrides-status.is-open   { color: #6fd598; }
.dark-console .prov-overrides-note { color: #94a8b6; }
.dark-console .prov-overrides-empty { color: #94a8b6; border-color: #365366; }

.dark-console .wsched-row { border-color: #253d51; background: #0d1c29; }
.dark-console .wsched-row.is-open { border-color: #365366; }
.dark-console .wsched-row.is-closed { background: #0a1621; }
.dark-console .wsched-day-name { color: #e2ebf2; }
.dark-console .wsched-closed { background: #0f2331; border-color: #365366; color: #94a8b6; }
.dark-console .wsched-to { color: #94a8b6; }
.dark-console .wsched-add { color: #7fb8e6; border-color: #365366; }
.dark-console .wsched-add:hover { background: #16344a; border-color: #4a7088; }
.dark-console .wsched-icon-btn { border-color: #365366; color: #b8c8d4; }
.dark-console .wsched-icon-btn:hover { background: #16344a; }
.dark-console .wsched-icon-btn--danger:hover { color: #ff9a9a; border-color: #6a3a3a; background: #2e1517; }

/* Availability — additions for body content (mode toggle, breaks, custom-slot grid) */
.wsched-row { grid-template-columns: 200px 1fr; }   /* body column takes the rest */
.wsched-body { min-width: 0; }
.wsched-date { width: 150px; }

.wsched-modeset {
  display: inline-flex; gap: 0; padding: 3px;
  border: 1px solid #cfdae3; border-radius: 8px;
  background: #f4f8fb; margin-bottom: 10px;
}
.wsched-mode {
  font: inherit; font-size: 11.5px; font-weight: 600;
  padding: 5px 12px;
  border: 0; background: transparent;
  color: #5c6b76; cursor: pointer;
  border-radius: 6px;
  transition: background .12s, color .12s;
}
.wsched-mode.is-on { background: #ffffff; color: #1a2530; box-shadow: 0 1px 2px rgba(20,45,70,.10); }
.wsched-mode:hover:not(.is-on) { color: #26333d; }

.wsched-subrow { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.wsched-sublabel { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #7c8994; min-width: 100px; }

.wsched-breaks { margin-top: 10px; }
.wsched-subheader { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.wsched-add-inline {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: #2673d2;
  background: transparent; border: 0;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 5px;
}
.wsched-add-inline:hover { background: #eef5fc; }
.wsched-emptyline { font-size: 11px; color: #94a1ab; padding: 4px 0; }

/* Custom-slot grid — compact chips so many slots fit in a row */
.wsched-slotgrid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.wsched-slotitem { display: flex; align-items: center; gap: 4px; }
.wsched-slotitem .wsched-time { width: 100%; }

.dark-console .wsched-modeset { background: #0f2331; border-color: #365366; }
.dark-console .wsched-mode { color: #94a8b6; }
.dark-console .wsched-mode.is-on { background: #16344a; color: #eaf2f8; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.dark-console .wsched-mode:hover:not(.is-on) { color: #cfdde8; }
.dark-console .wsched-sublabel { color: #94a8b6; }
.dark-console .wsched-add-inline { color: #7fb8e6; }
.dark-console .wsched-add-inline:hover { background: #16344a; }
.dark-console .wsched-emptyline { color: #7a8b98; }

/* Availability — date-override cards (their own layout, not the weekday grid) */
.wsched-override {
  border: 1px solid #cfdae3;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}
.wsched-override + .wsched-override { margin-top: 8px; }
.wsched-override.is-closed { background: #f8fafc; }
.wsched-ovhead {
  display: flex; align-items: flex-end; gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef3;
}
.wsched-override.is-closed .wsched-ovhead { border-bottom-color: transparent; }
.wsched-ovhead-date  { display: flex; flex-direction: column; gap: 4px; }
.wsched-ovhead-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #7c8994;
}
.wsched-date-lg {
  width: 180px; height: 36px;
  padding: 6px 12px;
  font-variant-numeric: tabular-nums;
  color-scheme: light;
}
.wsched-ovhead-status  { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wsched-ovhead-statustext { font-size: 11.5px; font-weight: 600; color: #26333d; }
.wsched-ovhead-del { margin-left: auto; margin-bottom: 4px; }
.wsched-ovbody { padding: 12px 14px 14px; }

@media (max-width: 640px) {
  .wsched-ovhead { flex-wrap: wrap; }
  .wsched-ovhead-del { margin-left: 0; }
}

.dark-console .wsched-override { border-color: #365366; background: #0d1c29; }
.dark-console .wsched-override.is-closed { background: #0a1621; }
.dark-console .wsched-ovhead { border-bottom-color: #253d51; }
.dark-console .wsched-ovhead-label { color: #94a8b6; }
.dark-console .wsched-ovhead-statustext { color: #e2ebf2; }
.dark-console .wsched-date-lg { color-scheme: dark; }

/* Semantic notice/status card — light + dark variants. Replaces the inline
   Tailwind color utilities used for the Web-form cert-status card and DNS
   instructions, which had no dark-mode fallback and looked white-on-dark. */
.notice-card { border: 1px solid; border-radius: 8px; padding: 12px; font-size: 11.5px; line-height: 1.45; }
.notice-card + .notice-card { margin-top: 8px; }
.notice-card code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: 10.5px; }
.notice-card--ok    { border-color: #b6d8be; background: #eaf7ed; color: #22633a; }
.notice-card--info  { border-color: #b8cee3; background: #eff6fd; color: #284772; }
.notice-card--error { border-color: #f0c3c7; background: #fdf1f2; color: #8a1a22; }
.notice-card--muted { border-color: #d7e0e8; background: #f6fafd; color: #324a5c; }

.dark-console .notice-card code { background: rgba(255,255,255,.10); }
.dark-console .notice-card--ok    { border-color: #365d40; background: #12291a; color: #7bd193; }
.dark-console .notice-card--info  { border-color: #2e4a6b; background: #0f2033; color: #93c5fd; }
.dark-console .notice-card--error { border-color: #6a2f34; background: #2a1618; color: #ff9a9a; }
.dark-console .notice-card--muted { border-color: #2a3f52; background: #0d1c29; color: #a8b8c6; }

/* Services page — provider expansion per service */
.svc-card { border: 1px solid #e0e7ec; border-radius: 12px; background: #fff; padding: 14px 16px; }
.svc-card + .svc-card { margin-top: 10px; }
.svc-card-head { display: flex; align-items: center; gap: 10px; }
.svc-card-providers { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #dbe4ea; }
.svc-card-providers-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.svc-card-providers-head > *:last-child { margin-left: auto; }
.svc-provider-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #4f5862; cursor: pointer; user-select: none; }
.svc-provider-toggle input { margin: 0; }
.svc-provider { border: 1px solid #e6ecf1; border-radius: 8px; padding: 10px 12px; background: #fafcfd; }
.svc-provider + .svc-provider { margin-top: 6px; }
.svc-provider-head { display: flex; align-items: center; gap: 10px; }
.svc-provider-name { flex: 1; height: 32px; }
.svc-provider-av { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #dbe4ea; }
.svc-provider-av-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.svc-provider-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.svc-provider-day { border: 1px solid #e6ecf1; border-radius: 8px; padding: 8px 10px; background: #fff; }
.svc-provider-day-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.svc-provider-day-label { font-size: 11.5px; font-weight: 600; }
.svc-provider-day-body { display: flex; align-items: center; gap: 6px; }

.dark-console .svc-card { border-color: #253d51; background: #0d1c29; }
.dark-console .svc-card-providers { border-top-color: #253d51; }
.dark-console .svc-provider { border-color: #253d51; background: #0a1621; }
.dark-console .svc-provider-av { border-top-color: #253d51; }
.dark-console .svc-provider-day { border-color: #253d51; background: #0d1c29; }
.dark-console .svc-provider-toggle { color: #94a8b6; }

/* Services page — provider picker chips + toggle rows */
.svc-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-picker-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  border: 1.5px solid #cfdae3; background: #fff;
  color: #26333d; font-size: 12px; cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.svc-picker-chip:hover { border-color: #2673d2; }
.svc-picker-chip.is-picked { background: rgba(38, 115, 210, .08); border-color: #2673d2; color: #1e4a80; }
.svc-picker-chip input { display: none; }
.svc-picker-chip-tag {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(38, 115, 210, .12); color: #1e4a80;
  font-style: normal;
}

.svc-card-toggles { display: grid; gap: 10px; }
.svc-toggle-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border-radius: 8px; border: 1px solid #e6ecf1; background: #fafcfd;
  cursor: pointer;
}
.svc-toggle-row .ui-switch { margin-top: 1px; flex: none; }
.svc-toggle-body { display: flex; flex-direction: column; }
.svc-toggle-body > strong { font-size: 12px; font-weight: 600; color: #26333d; }
.svc-toggle-body > span   { font-size: 10.5px; color: #6c7883; margin-top: 2px; line-height: 1.4; }

.dark-console .svc-picker-chip { background: #0d1c29; border-color: #365366; color: #dceaf3; }
.dark-console .svc-picker-chip:hover { border-color: #4aa8e8; }
.dark-console .svc-picker-chip.is-picked { background: rgba(74, 168, 232, .14); border-color: #4aa8e8; color: #cfe8f8; }
.dark-console .svc-picker-chip-tag { background: rgba(74, 168, 232, .18); color: #cfe8f8; }
.dark-console .svc-toggle-row { background: #0a1621; border-color: #253d51; }
.dark-console .svc-toggle-body > strong { color: #dceaf3; }
.dark-console .svc-toggle-body > span   { color: #94a8b6; }

/* Sidebar collapsible group — <details>-based accordion so extra items
   stay hidden by default. Router auto-opens the group containing the
   active page. Preserves keyboard access via native disclosure semantics. */
.sidebar-group { border: 0; padding: 0; margin: 0 0 6px; }
.sidebar-group[open] { margin-bottom: 10px; }
.sidebar-group-summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 10px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 6px;
  color: #82909c;
  font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  transition: background .12s, color .12s;
}
.sidebar-group-summary::-webkit-details-marker { display: none; }
.sidebar-group-summary:hover { background: rgba(0, 0, 0, .04); color: #4f5862; }
.sidebar-group-chevron { transition: transform .16s ease; }
.sidebar-group[open] > .sidebar-group-summary .sidebar-group-chevron { transform: rotate(180deg); }
.sidebar-group-body { padding-top: 2px; }

.dark-console .sidebar-group-summary { color: #6b7c8a; }
.dark-console .sidebar-group-summary:hover { background: rgba(255, 255, 255, .05); color: #9ba9b6; }

/* Pinned top-level sidebar item (Dashboard) — sits above the collapsible
   groups, always visible, subtly emphasised. */
.sidebar-pin { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.dark-console .sidebar-pin { border-bottom-color: rgba(255, 255, 255, .06); }

/* Group summary now has an icon + label pair */
.sidebar-group-label { display: inline-flex; align-items: center; gap: 6px; }
.sidebar-group-label iconify-icon { opacity: .75; }
.sidebar-group-summary:hover .sidebar-group-label iconify-icon { opacity: 1; }

/* Unified sidebar-item class — enterprise-console style. Replaces the
   repeated `relative flex h-10 w-full items-center …` inline classes.
   Pinned variant is slightly heavier so it visually anchors the top. */
.sidebar-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  text-align: left;
  font-size: 12px; font-weight: 500;
  color: #35424d;
  transition: background .1s, color .1s;
}
.sidebar-nav-item.is-pinned { height: 36px; font-weight: 600; color: #1a2530; }
.dark-console .sidebar-nav-item { color: #b8c8d4; }
.dark-console .sidebar-nav-item.is-pinned { color: #eaf2f8; }

.sidebar-pin-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #2ea855; margin-left: auto;
  box-shadow: 0 0 0 3px rgba(46, 168, 85, .18);
}

/* Muted mic — clearly distinct from listening (which shows brand-color).
   Uses a red tint so testers can see at a glance the mic is off. */
.flow-preview-mic.is-muted {
  color: #b8261f;
  border-color: #e6b9bd;
  background: #fbf1f2;
}
.flow-preview-mic.is-muted:hover { color: #8a1a22; border-color: #d99097; background: #f7dfe1; }
.flow-preview-mic.is-muted::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 2px rgba(184, 38, 31, .15);
  pointer-events: none;
}
/* Dark mode: drop the red tint entirely — the slashed-mic icon already
   communicates the muted state, and the red chrome fights the dark UI.
   Match the unmuted chrome and let the icon do the work, with the ::after
   halo suppressed. */
.dark-console .flow-preview-mic.is-muted { color: #cbdae4; border-color: #345064; background: #0a1a26; }
.dark-console .flow-preview-mic.is-muted:hover { color: #7cc5ff; border-color: #4a7088; background: #14344c; }
.dark-console .flow-preview-mic.is-muted::after { box-shadow: none; }

/* ═══════════════════════════════════════════════════════════════════════ */
/* Ask Octa — floating launcher, chat panel, chat bubbles, proposal card.  */
/* ═══════════════════════════════════════════════════════════════════════ */

.ai-assistant-launcher {
  position: fixed; right: 24px; bottom: 24px; z-index: 45;
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px 0 14px;
  border: 1px solid #0465b1; border-radius: 999px;
  background: linear-gradient(145deg, #168ce0 0%, #0874c9 52%, #0563ad 100%);
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: -.005em;
  box-shadow: 0 1px 1px rgba(255,255,255,.22) inset, 0 10px 24px rgba(0,103,184,.32), 0 2px 4px rgba(0,46,82,.24);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.ai-assistant-launcher:hover { transform: translateY(-1px); box-shadow: 0 1px 1px rgba(255,255,255,.22) inset, 0 14px 30px rgba(0,103,184,.36), 0 2px 4px rgba(0,46,82,.26); }
.ai-assistant-launcher.is-open { background: linear-gradient(145deg, #0d6bb4, #044f8f); }
.ai-assistant-launcher iconify-icon { color: #fff; }
.ai-assistant-launcher-glow {
  position: absolute; inset: -2px; border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 55%);
  pointer-events: none;
}
.ai-assistant-launcher-label { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .ai-assistant-launcher-label { display: none; }
  .ai-assistant-launcher { padding: 0; width: 44px; justify-content: center; }
}

.ai-assistant-panel {
  position: fixed; right: 24px; bottom: 80px; z-index: 46;
  width: 380px; height: min(560px, calc(100vh - 120px));
  display: flex; flex-direction: column;
  border: 1px solid #cfdae3; border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(9,24,39,.24), 0 4px 12px rgba(9,24,39,.10);
  overflow: hidden;
}
@media (max-width: 640px) {
  .ai-assistant-panel { right: 8px; left: 8px; bottom: 76px; width: auto; height: min(70vh, calc(100vh - 100px)); }
}
.ai-assistant-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #e2e8ec;
  background: linear-gradient(180deg, #f8fafc 0%, #eef3f7 100%);
}
.ai-assistant-panel-title { display: flex; align-items: center; gap: 10px; }
.ai-assistant-panel-title iconify-icon { color: #0874c9; }
.ai-assistant-panel-title strong { display: block; font-size: 12px; color: #1a2a37; font-weight: 700; }
.ai-assistant-panel-title span { display: block; font-size: 10px; color: #6e7781; }
.ai-assistant-panel-actions { display: flex; align-items: center; gap: 4px; }
.ai-assistant-panel-link,
.ai-assistant-panel-close {
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: #4f5862; cursor: pointer;
  text-decoration: none;
}
.ai-assistant-panel-link:hover,
.ai-assistant-panel-close:hover { background: rgba(15, 26, 40, .06); color: #1a2a37; }
.ai-assistant-panel-body { flex: 1; overflow: hidden; }

/* ── Chat surface ─────────────────────────────────────────────────────── */
.ai-chat { display: flex; flex-direction: column; height: 100%; }
.ai-chat-list {
  flex: 1; overflow-y: auto;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}

.ai-chat-msg { display: flex; }
.ai-chat-msg-user { justify-content: flex-end; }
.ai-chat-msg-assistant { justify-content: flex-start; }
.ai-chat-bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px; line-height: 1.55; color: #1a2a37;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(15,26,40,.04);
}
.ai-chat-msg-user .ai-chat-bubble {
  background: linear-gradient(145deg, #168ce0, #0874c9);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-chat-msg-assistant .ai-chat-bubble {
  background: #f3f6f9;
  border: 1px solid #e2e8ec;
  border-bottom-left-radius: 4px;
}

/* ── Empty state + starters ──────────────────────────────────────────── */
.ai-chat-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 22px 16px; gap: 6px;
}
.ai-chat-empty-icon {
  display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 999px; background: #edf4f8; color: #0874c9;
  margin-bottom: 4px;
}
.ai-chat-empty-title { font-size: 14px; font-weight: 700; color: #1a2a37; }
.ai-chat-empty-note { font-size: 11px; color: #6e7781; max-width: 280px; line-height: 1.5; }
.ai-chat-empty-banner {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 10px;
  border: 1px solid #cfe1ef; border-radius: 8px; background: #eaf4fb;
  color: #0f4b7f; font-size: 11px; text-align: left; width: 100%; cursor: pointer;
  transition: background .12s ease;
}
.ai-chat-empty-banner:hover { background: #dcecf7; }
.ai-chat-empty-banner strong { font-weight: 700; }
.ai-chat-starters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; width: 100%; }
.ai-chat-starter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border: 1px solid #d8e0e6; border-radius: 8px;
  background: #fff; color: #26333d; font-size: 11px; font-weight: 600;
  text-align: left; cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.ai-chat-starter:hover { border-color: #8ba0af; background: #f8fafc; }
.ai-chat-starter iconify-icon { color: #0874c9; flex-shrink: 0; }

/* ── Tool chips ───────────────────────────────────────────────────────── */
.ai-chat-tool-chip {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 600;
  background: #f3f6f9; border: 1px solid #e2e8ec; color: #4f5862;
}
.ai-chat-tool-chip.is-done { background: #eefaf4; border-color: #c8ecd8; color: #196a3f; }
.ai-chat-tool-chip.is-error { background: #fceded; border-color: #f0c3c7; color: #8a1a22; }
.ai-chat-tool-chip-spinner {
  width: 9px; height: 9px; border-radius: 999px;
  border: 1.5px solid #b3c3d0; border-top-color: #0874c9;
  animation: ai-chip-spin 0.8s linear infinite;
}
@keyframes ai-chip-spin { to { transform: rotate(360deg); } }

/* ── Thinking indicator — three-dot pulse, sits at the tail of the chat
   list while waiting on the model. Removed the moment content streams. */
.ai-chat-thinking {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  animation: ai-thinking-fade-in .18s ease;
}
.ai-chat-thinking-avatar {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 999px;
  background: linear-gradient(145deg, #eaf4fb, #d3e6f4);
  border: 1px solid #c1d8e9; color: #0874c9;
  box-shadow: 0 1px 2px rgba(0, 60, 110, .06);
}
.ai-chat-thinking-bubble {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 14px 14px 14px 4px;
  background: #f1f5f9; border: 1px solid #dce4ea;
  min-height: 30px;
}
.ai-chat-thinking-dot {
  width: 6px; height: 6px; border-radius: 999px; background: #6e8298;
  animation: ai-thinking-bounce 1.2s ease-in-out infinite;
}
.ai-chat-thinking-dot:nth-child(2) { animation-delay: .18s; }
.ai-chat-thinking-dot:nth-child(3) { animation-delay: .36s; }
@keyframes ai-thinking-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .55; }
  30%           { transform: translateY(-4px); opacity: 1; }
}
@keyframes ai-thinking-fade-in {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dark-console .ai-chat-thinking-avatar {
  background: linear-gradient(145deg, #142a3d, #0e1e2c);
  border-color: #29435c; color: #7dc8f5;
}
.dark-console .ai-chat-thinking-bubble {
  background: #122130; border-color: #26394c;
}
.dark-console .ai-chat-thinking-dot { background: #86a1b8; }

/* ── Proposal card ───────────────────────────────────────────────────── */
.ai-chat-proposal {
  align-self: stretch;
  border: 2px solid rgb(var(--_rgb));
  border-radius: 10px;
  background: linear-gradient(180deg, #f6faff 0%, #eef4fb 100%);
  --_rgb: 8 116 201;
  box-shadow: 0 0 0 4px rgb(var(--_rgb) / .10),
              0 12px 28px rgb(var(--_rgb) / .18);
  animation: ai-proposal-appear .28s ease, ai-proposal-pulse 2.4s ease-in-out .3s 2;
  position: relative;
  /* overflow: hidden intentionally omitted — inside a flex column with
     shrink-to-fit siblings it collapsed the card to its header line. */
}
.ai-chat-proposal::before {
  /* Left accent bar drives the eye to the card. Rounded to match the
     outer border-radius so no bleed since we dropped overflow: hidden. */
  content: ""; position: absolute; left: -2px; top: -2px; bottom: -2px;
  width: 4px; background: rgb(var(--_rgb));
  border-top-left-radius: 10px; border-bottom-left-radius: 10px;
}
.ai-chat-proposal.is-resolved { animation: none; box-shadow: 0 1px 2px rgba(15,26,40,.06); }
.ai-chat-proposal.is-applied {
  --_rgb: 46 133 64; border-color: rgb(var(--_rgb));
  background: linear-gradient(180deg,#f2fbf5,#eaf7ee);
}
.ai-chat-proposal.is-rejected {
  --_rgb: 108 117 125; border-color: rgb(var(--_rgb));
  background: #f6f7f8; opacity: .8;
}
.ai-chat-proposal.is-failed {
  --_rgb: 180 35 44; border-color: rgb(var(--_rgb));
  background: linear-gradient(180deg,#fef5f5,#fceded);
}
@keyframes ai-proposal-appear {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ai-proposal-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgb(var(--_rgb) / .10), 0 12px 28px rgb(var(--_rgb) / .18); }
  50%      { box-shadow: 0 0 0 8px rgb(var(--_rgb) / .16), 0 12px 32px rgb(var(--_rgb) / .28); }
}
.ai-chat-proposal-prompt {
  padding: 6px 12px 0;
  font-size: 10px; color: rgb(var(--_rgb));
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.ai-chat-proposal.is-resolved .ai-chat-proposal-prompt { display: none; }
.ai-chat-proposal-btn { min-width: 128px; }
.ai-chat-proposal-actions .ai-chat-proposal-btn { height: 36px; padding: 0 14px; font-size: 11px; }

/* Activity page — filter bar (search + source + range + refresh/export).
   Left group keeps its three controls on one line; only the buttons wrap
   to a new line on narrow viewports. */
.activity-filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 20px;
  border-bottom: 1px solid #d8e2e9;
  background: linear-gradient(90deg,#ffffff,#f8fbfd);
}
.activity-filter-group {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
  flex: 1 1 420px; min-width: 0;
}
.activity-filter-actions {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
  flex: 0 0 auto;
}
.activity-filter-select { flex: 0 0 auto; width: 150px; }
.activity-search {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px;
  border: 1px solid #c0ccd5; border-radius: 9px;
  background: rgba(255,255,255,.9); color: #25313b;
  flex: 1 1 180px; min-width: 140px; max-width: 360px;
}
.activity-search iconify-icon { color: #6e7781; flex: 0 0 auto; }
.activity-search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: none; background: transparent;
  font-size: 11px; font-weight: 500; color: inherit;
}
.activity-search input::placeholder { color: #7c8994; }
.activity-search:focus-within {
  border-color: #0874c9;
  box-shadow: 0 0 0 3px rgba(8,116,201,.14);
}
.dark-console .activity-filter-bar {
  background: linear-gradient(90deg,#0e1d2a,#12253363);
  border-bottom-color: #233949;
}
.dark-console .activity-search {
  border-color: #345064; background: #0d1e2b; color: #e4edf4;
}
.dark-console .activity-search iconify-icon { color: #98a7b4; }
.dark-console .activity-search input::placeholder { color: #7c8994; }

/* Safety-net banner: shown when the AI wrote about a pending action
   but never called the write tool this turn (so no card exists). */
.ai-chat-retry-notice {
  align-self: stretch;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px 8px 12px; border-radius: 10px;
  background: linear-gradient(180deg,#fff8ea,#fdefd0);
  border: 1px solid #f0dc9a; color: #8a5a15;
  font-size: 11px;
}
.ai-chat-retry-notice-body { display: inline-flex; align-items: center; gap: 8px; }
.ai-chat-retry-notice .ui-button { height: 30px; padding: 0 10px; font-size: 10px; }
.dark-console .ai-chat-retry-notice {
  background: linear-gradient(180deg,#2b2110,#20180b);
  border-color: #6b501b; color: #f0c982;
}

/* Success line dropped into the chat after a proposal is applied. */
.ai-chat-applied {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px;
  background: linear-gradient(180deg, #f2fbf5, #eaf7ee);
  border: 1px solid #c8ecd8;
  color: #196a3f; font-size: 11px; font-weight: 600;
  animation: ai-thinking-fade-in .22s ease;
}
.ai-chat-applied-icon { display: inline-grid; place-items: center; color: #2e8540; }
.dark-console .ai-chat-applied {
  background: linear-gradient(180deg, #10281c, #0b1f16);
  border-color: #1e5c39; color: #7cd9a5;
}
.dark-console .ai-chat-applied-icon { color: #4fd190; }
.ai-chat-proposal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid rgb(var(--_rgb) / .18);
}
.ai-chat-proposal-tool {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; color: rgb(var(--_rgb));
  text-transform: uppercase; letter-spacing: .04em;
}
.ai-chat-proposal-status { font-size: 10px; font-weight: 600; color: #4f5862; }
.ai-chat-proposal.is-applied .ai-chat-proposal-status { color: rgb(var(--_rgb)); }
.ai-chat-proposal-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-chat-proposal-summary { font-size: 12px; color: #1a2a37; font-weight: 600; line-height: 1.5; }
.ai-chat-proposal-diff {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px dashed rgb(var(--_rgb) / .28); border-radius: 6px;
  padding: 6px 8px; background: rgba(255,255,255,.7);
  font-size: 11px; color: #26333d;
}
.ai-chat-proposal-row { display: grid; grid-template-columns: 88px 1fr 12px 1fr; gap: 4px; align-items: center; }
.ai-chat-proposal-key { font-weight: 600; color: #4f5862; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.ai-chat-proposal-old { color: #8a1a22; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-proposal-new { color: #196a3f; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-proposal-warn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; color: #8a5a15; background: #fdf3d8;
  border: 1px solid #f0dc9a; border-radius: 6px;
  padding: 4px 8px;
}
.ai-chat-proposal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgb(var(--_rgb) / .18);
  background: rgb(var(--_rgb) / .04);
}
.ai-chat-proposal-actions .ui-button { height: 36px; padding: 0 14px; font-size: 11px; }

/* ── Inline error line ───────────────────────────────────────────────── */
.ai-chat-error {
  align-self: stretch;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 9px; border-radius: 8px;
  background: #fceded; border: 1px solid #f0c3c7; color: #8a1a22;
  font-size: 11px;
}

/* ── Composer ────────────────────────────────────────────────────────── */
.ai-chat-composer {
  display: flex; align-items: flex-end; gap: 6px;
  padding: 8px 10px; border-top: 1px solid #e2e8ec;
  background: #fbfcfd;
}
.ai-chat-composer textarea {
  flex: 1;
  min-height: 34px; max-height: 140px;
  padding: 8px 10px;
  border: 1px solid #c0ccd5; border-radius: 8px;
  background: #fff; color: #26333d;
  font-size: 12px; line-height: 1.45;
  resize: none; outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.ai-chat-composer textarea:focus { border-color: #1685da; box-shadow: 0 0 0 3px rgba(0,120,212,.14); }
.ai-chat-send {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid #0465b1;
  background: linear-gradient(145deg, #168ce0, #0874c9);
  color: #fff; cursor: pointer;
  transition: background .12s ease, transform .12s ease;
}
.ai-chat-send:hover:not([disabled]) { transform: translateY(-1px); }
.ai-chat-send[disabled] { opacity: .55; cursor: not-allowed; }

/* ── Profile wizard ──────────────────────────────────────────────────── */
.ai-wizard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ai-wizard-dots { display: inline-flex; gap: 6px; }
.ai-wizard-dot { width: 20px; height: 4px; border-radius: 999px; background: #d8e0e6; }
.ai-wizard-dot.is-done { background: #4dabf7; }
.ai-wizard-dot.is-active { background: #0874c9; }
.ai-wizard-step { font-size: 10px; color: #6e7781; font-weight: 600; }
.ai-wizard-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-wizard-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: #eef4fb; border: 1px solid #cfe1ef; color: #0f4b7f;
  font-size: 11px; font-weight: 600;
}
.ai-wizard-chip button {
  display: grid; place-items: center; width: 14px; height: 14px;
  border-radius: 999px; background: transparent; color: inherit; cursor: pointer;
}
.ai-wizard-chip button:hover { color: #8a1a22; }
.ai-wizard-chip-input input {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px dashed #c0ccd5; border-radius: 8px;
  background: #fff; font-size: 11px;
}
.ai-wizard-tones { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-wizard-tone {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid #c0ccd5; background: #fff; color: #4f5862;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.ai-wizard-tone.is-active { border-color: #0874c9; background: #eaf4fb; color: #0f4b7f; }
.ai-wizard-footer { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 8px; }
.ai-wizard-footer-left, .ai-wizard-footer-right { display: inline-flex; gap: 6px; }

/* ── Full page /assistant ────────────────────────────────────────────── */
/* Fixed height (viewport-bound) — the internal .ai-chat-list scrolls,
   otherwise incoming messages just grow the outer grid vertically and
   the whole page balloons. min-height keeps it usable on short viewports. */
.ai-assistant-page {
  display: grid; grid-template-columns: 280px 1fr; gap: 14px;
  margin-top: 14px;
  height: calc(100vh - 220px);
  min-height: 640px;
}
@media (max-width: 900px) {
  .ai-assistant-page {
    grid-template-columns: 1fr;
    grid-template-rows: 200px 1fr;
    height: calc(100vh - 200px);
    min-height: 560px;
  }
}
.ai-assistant-page-sidebar { display: flex; flex-direction: column; overflow: hidden; }
.ai-assistant-page-sidebar .panel-head { padding: 10px 14px; }
.ai-assistant-page-search {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-bottom: 1px solid #e2e8ec;
  color: #7c8994;
}
.ai-assistant-page-search input {
  flex: 1; height: 30px; padding: 0 8px;
  border: 1px solid #c0ccd5; border-radius: 6px;
  background: #fff; font-size: 11px; outline: none;
}
.ai-assistant-page-conv-list { flex: 1; overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.ai-assistant-page-conv {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 10px; border-radius: 8px;
  background: transparent; color: #26333d; border: 1px solid transparent;
  text-align: left; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.ai-assistant-page-conv:hover { background: #f3f6f9; }
.ai-assistant-page-conv.is-active { background: #eaf4fb; border-color: #cfe1ef; }
.ai-assistant-page-conv-title {
  font-size: 12px; font-weight: 600; color: #1a2a37;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}
.ai-assistant-page-conv-meta { font-size: 10px; color: #6e7781; }
.ai-assistant-page-empty {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 24px 12px; color: #7c8994; font-size: 11px;
}
.ai-assistant-page-main { display: flex; flex-direction: column; overflow: hidden; }
.ai-assistant-page-chat { flex: 1; min-height: 0; }
.ai-assistant-page-main-tabs { padding: 10px 14px 8px; border-bottom: 1px solid #e2e8ee; }
.dark-console .ai-assistant-page-main-tabs { border-bottom-color: #263c50; }
.ai-history-summary { font-size: 11px; color: #3c4a55; }
.dark-console .ai-history-summary { color: #c8d4de; }
.ai-history-panel { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; }
.ai-history-toolbar { margin-bottom: 8px; }

/* ── Dark mode overrides ─────────────────────────────────────────────── */
.dark-console .ai-assistant-panel { background: #0e1a25; border-color: #263c50; }
.dark-console .ai-assistant-panel-head { background: linear-gradient(180deg,#12212f 0%, #0d1a26 100%); border-color: #263c50; }
.dark-console .ai-assistant-panel-title strong { color: #e4edf4; }
.dark-console .ai-assistant-panel-title span { color: #98a7b4; }
.dark-console .ai-assistant-panel-link:hover,
.dark-console .ai-assistant-panel-close:hover { background: rgba(255,255,255,.08); color: #e4edf4; }
.dark-console .ai-chat-msg-assistant .ai-chat-bubble { background: #14283a; border-color: #29435c; color: #e4edf4; }
.dark-console .ai-chat-tool-chip { background: #14283a; border-color: #29435c; color: #b9c4d0; }
.dark-console .ai-chat-tool-chip.is-done { background: #163123; border-color: #285a3f; color: #7fdaa5; }
.dark-console .ai-chat-tool-chip.is-error { background: #331716; border-color: #6b2a2e; color: #f7a1a6; }
.dark-console .ai-chat-empty-title { color: #e4edf4; }
.dark-console .ai-chat-empty-note { color: #98a7b4; }
.dark-console .ai-chat-empty-banner { background: #14283a; border-color: #29435c; color: #b3d4f2; }
.dark-console .ai-chat-empty-banner:hover { background: #182f42; }
.dark-console .ai-chat-starter { background: #14283a; border-color: #29435c; color: #cbdae4; }
.dark-console .ai-chat-starter:hover { background: #182f42; border-color: #4a7088; }
.dark-console .ai-chat-composer { background: #0d1a26; border-color: #263c50; }
.dark-console .ai-chat-composer textarea { background: #14283a; border-color: #29435c; color: #e4edf4; }
.dark-console .ai-chat-proposal {
  background: linear-gradient(180deg,#12283b,#0d1e2c);
  border-color: rgb(var(--_rgb));
  box-shadow: 0 0 0 4px rgb(var(--_rgb) / .16),
              0 12px 32px rgba(0,0,0,.55);
}
.dark-console .ai-chat-proposal.is-applied {
  --_rgb: 79 209 144;
  background: linear-gradient(180deg,#0f2a1e,#0b1f16);
}
.dark-console .ai-chat-proposal.is-rejected {
  --_rgb: 158 168 178;
  background: #121a22; opacity: .78;
}
.dark-console .ai-chat-proposal.is-failed {
  --_rgb: 245 96 105;
  background: linear-gradient(180deg,#2b1418,#20101a);
}
.dark-console .ai-chat-proposal-head { border-bottom-color: rgb(var(--_rgb) / .28); }
.dark-console .ai-chat-proposal-tool { color: rgb(var(--_rgb)); }
.dark-console .ai-chat-proposal-status { color: #b9c4d0; }
.dark-console .ai-chat-proposal.is-applied .ai-chat-proposal-status { color: rgb(var(--_rgb)); }
.dark-console .ai-chat-proposal-summary { color: #eef4fa; font-weight: 700; }
.dark-console .ai-chat-proposal-prompt { color: rgb(var(--_rgb)); }
.dark-console .ai-chat-proposal-diff {
  background: rgba(255,255,255,.035);
  border-color: rgb(var(--_rgb) / .36);
  color: #d3dee7;
}
.dark-console .ai-chat-proposal-key { color: #98a7b4; }
.dark-console .ai-chat-proposal-old { color: #f5717c; }
.dark-console .ai-chat-proposal-new { color: #6fd598; font-weight: 700; }
.dark-console .ai-chat-proposal-warn {
  background: #3a2b0e; border-color: #6b501b; color: #f0c982;
}
.dark-console .ai-chat-proposal-actions {
  border-top-color: rgb(var(--_rgb) / .28);
  background: rgb(var(--_rgb) / .10);
}
/* Give the primary button the accent color in dark too so it POPS. */
.dark-console .ai-chat-proposal .ui-button-primary {
  background: linear-gradient(145deg, rgb(var(--_rgb)), rgb(var(--_rgb) / .78));
  border-color: rgb(var(--_rgb));
  box-shadow: 0 6px 18px rgb(var(--_rgb) / .32);
}
.dark-console .ai-chat-proposal .ui-button-secondary {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
  color: #dbe4ec;
}
.dark-console .ai-chat-proposal .ui-button-secondary:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
}
.dark-console .ai-assistant-page-conv:hover { background: #14283a; }
.dark-console .ai-assistant-page-conv.is-active { background: #182f42; border-color: #29435c; }
.dark-console .ai-assistant-page-conv-title { color: #e4edf4; }
.dark-console .ai-assistant-page-conv-meta { color: #98a7b4; }
.dark-console .ai-assistant-page-search { border-color: #263c50; }
.dark-console .ai-assistant-page-search input { background: #14283a; border-color: #29435c; color: #e4edf4; }

/* Sidebar always-dark override REVERTED — user later asked for the
 * sidebar to respect the theme (light in light mode, dark in dark mode).
 * The original .dark-console .sidebar-* rules elsewhere in this file
 * handle the dark case; light mode falls through to the base Tailwind
 * classes on the aside (white gradient bg, dark text). */

/* ═══ Call-history dialog: AI notes & handoff tile.
   Kept as CSS classes (not inline Tailwind hexes) so dark mode overrides
   apply. Renders inside a `.cc-tile` on the conversations detail dialog. ═══ */
.ainotes-tile-h {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #7c8994;
}
.ainotes-tile-muted { font-size: 10px; color: #7c8994; }
.ainotes-tile-muted-p { font-size: 10.5px; color: #7c8994; line-height: 1.5; }
.ainotes-tile-reason {
  border-radius: 6px;
  background: #eff6ff;
  padding: 6px 10px;
  font-size: 10.5px; line-height: 1.35; color: #0f172a;
}
.ainotes-tile-turn {
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10.5px; line-height: 1.35; color: #0f172a;
}
.ainotes-tile-turn.is-caller { background: #ecfdf5; }
.ainotes-tile-turn.is-ai     { background: #eff6ff; }
.ainotes-tile-turn-role {
  margin-right: 6px;
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  color: #7c8994;
}
.ainotes-tile-note {
  border: 1px solid #e2e8ee; background: #ffffff;
  border-radius: 6px; padding: 6px 10px;
}
.ainotes-tile-note-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 9.5px; color: #7c8994;
}
.ainotes-tile-note-who { font-weight: 600; color: #52616b; }
.ainotes-tile-note-body {
  margin-top: 2px;
  white-space: pre-wrap; word-wrap: break-word;
  font-size: 10.5px; line-height: 1.4; color: #0f172a;
}

/* Dark-mode overrides — pair the palette to the surrounding .cc-tile which
   is already dark (border #253d51, bg #0d1e2b, text #cbd8e1). */
.dark-console .ainotes-tile-h,
.dark-console .ainotes-tile-muted,
.dark-console .ainotes-tile-muted-p { color: #93a9b8; }
.dark-console .ainotes-tile-reason {
  background: #12324a; color: #dbe7ef;
}
.dark-console .ainotes-tile-turn { color: #dbe7ef; }
.dark-console .ainotes-tile-turn.is-caller { background: rgba(52,199,89,.14); }
.dark-console .ainotes-tile-turn.is-ai     { background: rgba(74,168,232,.14); }
.dark-console .ainotes-tile-turn-role { color: #93a9b8; }
.dark-console .ainotes-tile-note {
  border-color: #253d51; background: #12283a;
}
.dark-console .ainotes-tile-note-meta { color: #93a9b8; }
.dark-console .ainotes-tile-note-who  { color: #cbd8e1; }
.dark-console .ainotes-tile-note-body { color: #e4edf4; }
