:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafe;
  --surface-3: #eef3fa;
  --text: #15203a;
  --muted: #6d7890;
  --faint: #98a2b5;
  --line: #e2e8f1;
  --primary: #315bea;
  --primary-strong: #2444bc;
  --primary-soft: #e9efff;
  --cyan: #20bad6;
  --violet: #7656e8;
  --danger: #d94f62;
  --warning: #bd731e;
  --success: #168568;
  --success-soft: #e2f5ef;
  --shadow: 0 18px 48px rgba(29, 49, 87, .08);
  --radius: 18px;
  --sidebar: #111a33;
  --sidebar-text: #eaf0ff;
  --sidebar-muted: #8e9bbd;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111a2d;
  --surface-2: #151f34;
  --surface-3: #1c2941;
  --text: #eff4ff;
  --muted: #a1aec5;
  --faint: #75819a;
  --line: #24314a;
  --primary: #6e8cff;
  --primary-strong: #91a7ff;
  --primary-soft: #1d2b58;
  --success: #55d5ae;
  --success-soft: #14392f;
  --shadow: 0 22px 56px rgba(0, 0, 0, .23);
  --sidebar: #080d19;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); font-size: 16px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 2px; }

.app-frame { min-height: 100vh; display: grid; grid-template-columns: 186px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 12px 18px; display: flex; flex-direction: column; color: var(--sidebar-text); background:
  radial-gradient(circle at 18% 4%, rgba(74, 108, 255, .22), transparent 26%),
  linear-gradient(180deg, #131d38 0%, var(--sidebar) 72%); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 29px; }
.brand strong { display: block; font-size: 1.07rem; letter-spacing: .03em; }
.brand small { display: block; margin-top: 2px; color: var(--sidebar-muted); font-size: .74rem; letter-spacing: .04em; }
.brand-mark { width: 38px; height: 38px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; gap: 3px; padding: 8px; border-radius: 12px; background: linear-gradient(140deg, #315bea, #734fe4); box-shadow: 0 10px 22px rgba(37, 72, 205, .35); }
.brand-mark i { display: block; width: 100%; border-radius: 5px; background: #fff; }
.brand-mark i:nth-child(1) { height: 9px; opacity: .7; }
.brand-mark i:nth-child(2) { height: 20px; }
.brand-mark i:nth-child(3) { height: 13px; opacity: .82; }
.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav-section { margin: 14px 10px 4px; color: #657393; font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-section:first-child { margin-top: 0; }
.nav-item { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 11px; padding: 6px 10px; border: 0; border-radius: 9px; color: var(--sidebar-muted); background: transparent; cursor: pointer; text-align: left; font-weight: 650; font-size: .82rem; }
.nav-item.child { padding-left: 24px; }
.nav-item.child::before { content: ''; width: 8px; height: 1px; margin-left: -12px; background: currentColor; opacity: .45; }
.nav-item:hover { color: var(--sidebar-text); background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(74,107,239,.27), rgba(74,107,239,.1)); box-shadow: inset 3px 0 #7291ff; }
.nav-item b { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 20px; background: rgba(255,255,255,.12); font-size: .7rem; text-align: center; }
.sidebar-foot { min-width: 0; margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.user-menu-wrap { position: relative; min-width: 0; }
.system-state, .user-chip { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.035); }
.system-state strong, .user-chip strong { display: block; font-size: .78rem; }
.system-state small, .user-chip small { display: block; margin-top: 3px; max-width: 155px; color: var(--sidebar-muted); font-size: .69rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-beacon { width: 10px; height: 10px; border: 2px solid #8af0d2; border-radius: 50%; box-shadow: 0 0 0 5px rgba(65,207,165,.12); }
.user-chip > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #dfe7ff; background: #263558; font-size: .72rem; font-weight: 800; }
.user-chip { width: 100%; color: inherit; cursor: pointer; text-align: left; }
.user-chip > div { min-width: 0; flex: 1; }
.user-chip strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-chip > span, .user-chip > b { flex-shrink: 0; }
.user-chip { padding: 10px 8px; gap: 8px; }
.user-chip > b { color: var(--sidebar-muted); font-size: .72rem; }
.user-popover { position: absolute; z-index: 5; left: 0; right: 0; bottom: calc(100% + 8px); padding: 6px; display: grid; gap: 3px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: #151f39; box-shadow: 0 18px 38px rgba(0,0,0,.32); opacity: 0; transform: translateY(5px); pointer-events: none; transition: opacity .15s ease, transform .15s ease; }
.user-popover::after { content: ''; position: absolute; right: 0; bottom: -10px; left: 0; height: 10px; }
.user-menu-wrap:hover .user-popover, .user-menu-wrap:focus-within .user-popover { opacity: 1; transform: translateY(0); pointer-events: auto; }
.user-popover button { min-height: 36px; padding: 8px 10px; border: 0; border-radius: 8px; color: var(--sidebar-text); background: transparent; cursor: pointer; text-align: left; font-size: .76rem; }
.user-popover button:hover, .user-popover button:focus-visible { background: rgba(255,255,255,.08); }
.workspace { min-width: 0; padding: 31px clamp(24px, 4vw, 58px) 48px; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 0 0 28px; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.tenant-scope { display: grid; gap: 4px; min-width: 0; }
.tenant-scope-label, .tenant-switcher > span { color: var(--muted); font-size: .7rem; font-weight: 750; }
.tenant-scope-label { text-transform: uppercase; letter-spacing: .09em; }
.tenant-scope strong { font-size: 1rem; overflow-wrap: anywhere; }
.tenant-scope small { color: var(--muted); font-size: .78rem; }
.tenant-switcher { position: relative; display: grid; gap: 6px; width: min(480px, 55%); flex-shrink: 0; }
.tenant-picker-toggle { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-size: .85rem; text-align: left; cursor: pointer; }
.tenant-picker-toggle > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tenant-picker-toggle svg { flex-shrink: 0; color: var(--muted); }
.tenant-picker-toggle:disabled { cursor: default; opacity: 1; }
.tenant-picker-toggle:disabled svg { display: none; }
.tenant-picker-toggle[aria-expanded="true"] { border-color: var(--primary); }
.tenant-picker-popup { position: absolute; z-index: 40; top: calc(100% + 7px); right: 0; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.tenant-picker-popup[hidden] { display: none; }
.tenant-picker-popup input { width: 100%; min-width: 0; min-height: 40px; margin: 0 0 7px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface-2); font-size: .82rem; }
.tenant-picker-options { max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain; }
.tenant-picker-options button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 0; border-radius: 8px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.tenant-picker-options button:hover, .tenant-picker-options button.is-highlighted { background: var(--primary-soft); }
.tenant-picker-options button > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.tenant-picker-options strong { display: block; font-size: .82rem; font-weight: 650; }
.tenant-picker-options small { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.tenant-choice-check { color: var(--primary); flex-shrink: 0; }
#tenant-picker-result { display: block; padding: 8px 10px 2px; color: var(--muted); font-size: .71rem; }
@media (max-width: 760px) { .workspace-header { align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 22px; } .tenant-switcher { width: 100%; } }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.eyebrow { margin: 0 0 6px; color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.1; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 1.05rem; letter-spacing: -.015em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.button, .icon-button, .row-action { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: .84rem; font-weight: 750; }
.button { padding: 0 16px; }
.button.primary { border-color: var(--primary); color: #fff; background: var(--primary); box-shadow: 0 9px 20px color-mix(in srgb, var(--primary) 24%, transparent); }
.button.primary:hover { background: var(--primary-strong); }
.button.quiet { min-height: 34px; color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.icon-button { width: 40px; color: var(--primary); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.metric-card { position: relative; min-height: 145px; padding: 21px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.metric-card > span, .metric-card > div > span { display: block; color: var(--muted); font-size: .8rem; font-weight: 700; }
.metric-card strong { display: block; margin: 14px 0 10px; color: var(--text); font-size: 2rem; line-height: 1; letter-spacing: -.04em; }
.metric-card small { color: var(--faint); font-size: .72rem; }
.metric-card.accent { color: #fff; background: linear-gradient(140deg, #284ac2 0%, #4d65df 52%, #6850d4 100%); border: 0; }
.metric-card.accent span, .metric-card.accent strong, .metric-card.accent small { color: #fff; }
.metric-card.accent span { opacity: .78; }
.metric-card.accent small { opacity: .7; }
.signal-bars { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: end; gap: 4px; opacity: .5; }
.signal-bars i { width: 5px; height: 12px; border-radius: 4px; background: #fff; }
.signal-bars i:nth-child(2), .signal-bars i:nth-child(4) { height: 25px; }
.signal-bars i:nth-child(3) { height: 38px; }
.content-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 18px; }
.content-split.single-panel { grid-template-columns: 1fr; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-head { min-height: 82px; padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-head .eyebrow { margin-bottom: 4px; }
.agent-row { min-height: 78px; display: grid; grid-template-columns: 42px minmax(140px, 1fr) auto minmax(94px, auto) 36px; align-items: center; gap: 13px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.agent-row:last-child { border-bottom: 0; }
.agent-avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #fff; font-size: .81rem; font-weight: 800; }
.agent-avatar.blue { background: linear-gradient(140deg, #2e66df, #40bdd5); }
.agent-avatar.violet { background: linear-gradient(140deg, #7155dd, #bb69c6); }
.agent-avatar.slate { color: var(--muted); background: var(--surface-3); }
.agent-main strong { display: block; font-size: .84rem; }
.agent-main small { display: block; margin-top: 4px; color: var(--muted); font-size: .72rem; }
.badge, .priority, .count-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.badge { padding: 5px 9px; }
.badge::before { content: ''; width: 6px; height: 6px; flex: 0 0 auto; border: 2px solid currentColor; border-radius: 50%; }
.badge.online { color: var(--success); background: var(--success-soft); }
.badge.offline { color: var(--muted); background: var(--surface-3); }
.agent-meta { color: var(--muted); font-size: .72rem; text-align: right; }
.row-action { width: 34px; min-height: 34px; color: var(--muted); background: transparent; }
.intent-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--primary); background: var(--primary-soft); font-size: .66rem; font-weight: 850; }
.priority { padding: 5px 8px; color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); }
.priority.high { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.count-pill { padding: 6px 10px; color: var(--primary); background: var(--primary-soft); }
.fatal-notice { padding: 16px; color: #fff; background: #b42338; text-align: center; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 8px; }
.app-loading { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--muted); }
.app-loading .brand-mark { width: 48px; height: 48px; }
.app-loading.error { color: var(--danger); }
.page-topbar { align-items: center; }
.page-description { max-width: 650px; margin: 8px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.full { width: 100%; }
.text-button { padding: 4px; border: 0; color: var(--primary); background: none; font-size: .8rem; font-weight: 700; cursor: pointer; }
.button:disabled, .icon-button:disabled { opacity: .48; cursor: not-allowed; }
.button.compact, .icon-button.compact { min-height: 32px; padding: 0 10px; border-radius: 8px; font-size: .74rem; }
.icon-button.compact { width: 34px; }
.button.danger-quiet { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 18%, var(--line)); }

.auth-body { overflow: auto; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .92fr) minmax(420px, 1.08fr); background: var(--surface); }
.auth-brand-panel { position: relative; min-height: 100vh; padding: 42px clamp(38px, 5vw, 78px); display: flex; flex-direction: column; color: #eaf0ff; background:
  radial-gradient(circle at 18% 18%, rgba(68,108,255,.3), transparent 29%),
  radial-gradient(circle at 88% 78%, rgba(112,71,212,.25), transparent 26%),
  linear-gradient(145deg, #0b1226 0%, #111d3d 54%, #10172c 100%); overflow: hidden; }
.auth-brand-panel::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom right, black, transparent 75%); }
.auth-brand { position: relative; z-index: 1; padding: 0; }
.auth-message { position: relative; z-index: 1; max-width: 520px; margin: auto 0; }
.auth-message .eyebrow { color: #82a0ff; }
.auth-message h2 { max-width: 500px; margin: 0 0 22px; color: #fff; font-size: clamp(2.2rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.055em; }
.auth-message p:not(.eyebrow) { max-width: 440px; color: #9eaccd; font-size: 1rem; line-height: 1.7; }
.auth-foot { position: relative; z-index: 1; margin: auto 0 0; color: #7382a6; font-size: .76rem; }
.waveform { height: 84px; display: flex; align-items: center; gap: 7px; margin-top: 42px; }
.waveform i { width: 5px; height: 34px; display: block; border-radius: 6px; background: linear-gradient(#71e2ff, #5f6dff); opacity: .7; animation: wave 2.8s ease-in-out infinite alternate; }
.waveform i:nth-child(3n+1) { height: 18px; animation-delay: -.4s; }
.waveform i:nth-child(3n+2) { height: 54px; animation-delay: -1.1s; }
.waveform i:nth-child(4n) { height: 68px; animation-delay: -1.8s; }
@keyframes wave { to { transform: scaleY(.42); opacity: .35; } }
.auth-form-panel { padding: 34px; display: grid; place-items: center; background: var(--bg); }
.auth-card { width: min(100%, 430px); padding: clamp(28px, 5vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 12px; font-size: 1.85rem; }
.auth-card > p:not(.eyebrow) { margin-bottom: 30px; color: var(--muted); line-height: 1.6; }
.auth-security { display: block; margin-top: 24px; color: var(--faint); text-align: center; line-height: 1.5; }

.form-stack { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }
.field { min-width: 0; display: grid; gap: 7px; color: var(--text); font-size: .8rem; font-weight: 750; }
.field > span { display: block; }
.field small { color: var(--muted); font-size: .7rem; font-weight: 500; line-height: 1.45; }
.field-error { color: var(--danger) !important; }
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface-2); font-size: .84rem; font-weight: 500; }
.field textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.api-key-input-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.api-key-input-row input { flex: 1 1 0; min-width: 0; }
.api-key-input-row .button { flex: 0 0 auto; width: auto; white-space: nowrap; }
.field-static { margin: 0; padding: 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.destination-form-grid { align-items: stretch; }
.destination-form-grid > .field { align-self: stretch; align-content: start; }
.destination-form-grid > .field > span { min-height: 18px; display: flex; align-items: flex-end; }
.destination-form-grid > .field > input,
.destination-form-grid > .field > select { height: 44px; }
.destination-form-grid > .field.span-2 { min-height: 92px; }
.destination-form-grid > .destination-transfer-type,
.destination-form-grid > .destination-permission-toggle { min-height: 104px; height: 100%; align-self: stretch; }
.destination-delete-button { margin-right: auto; }
.quick-destination-card > .form-grid > .field:has([data-quick-field="type"]) { grid-column: span 2; }
.quick-destination-card > .form-grid > .field:has([data-quick-field="technical_value"]) { grid-column: span 4; }
.form-inline { display: flex; gap: 14px; align-items: center; }
.form-inline.between { justify-content: space-between; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .75rem; }
.checkbox input { accent-color: var(--primary); }
.code-input { font-size: 1.8rem !important; letter-spacing: .34em; text-align: center; }

.modal { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal.wide { width: min(1120px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(6, 12, 28, .62); backdrop-filter: blur(4px); }
#modal-content { padding: 26px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.modal-head .eyebrow { margin-bottom: 5px; }
.modal-head h2 { font-size: 1.35rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 8px; }
.agent-form-tabs { position: relative; height: clamp(390px, calc(100vh - 190px), 620px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; }
.agent-tabs { height: 56px; min-height: 56px; display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 5px; padding: 7px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.agent-tab { width: auto; height: 40px; min-height: 40px; max-height: 40px; padding: 8px 14px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font: inherit; font-size: .74rem; font-weight: 750; line-height: 1; white-space: nowrap; cursor: pointer; }
.agent-tab.active { color: var(--primary); background: var(--surface); box-shadow: 0 1px 4px rgba(15,23,42,.09); }
.agent-tab-panel { display: none; }
.agent-tab-panel.active { display: block; }
.agent-tab-content { min-height: 0; padding: 4px 14px 10px 5px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.agent-tab-panel > .form-grid > .field,
.agent-tab-panel > .form-grid > .toggle-field { grid-column: span 2; align-self: start; }
.agent-tab-panel > .form-grid > .span-4 { grid-column: span 4; }
.tool-editor-grid > .field { grid-column: span 2; }
.tool-editor-grid > .field.span-4 { grid-column: span 4; }
.agent-tab-panel .field > span { min-height: 18px; display: flex; align-items: flex-end; }
.agent-tab-panel .field > input,
.agent-tab-panel .field > select,
.agent-tab-panel .field-with-action > select { height: 44px; }
.agent-edit-page { width: 100%; max-width: 1500px; margin: 0 auto; }
.agent-edit-header { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.agent-edit-header h1 { margin-bottom: 0; }
.agent-edit-surface { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: visible; }
.agent-edit-page .agent-form-tabs { height: auto; min-height: calc(100vh - 185px); display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
.agent-edit-page .agent-form-tabs > .agent-tabs { flex: 0 0 56px; }
.agent-edit-page .agent-tabs { position: sticky; top: 0; z-index: 8; padding: 8px; border-width: 0 0 1px; border-radius: var(--radius) var(--radius) 0 0; }
.agent-edit-page .agent-tab-content { flex: 1 0 auto; min-height: 560px; padding: 24px clamp(22px,3vw,44px) 32px; overflow: visible; }
.agent-edit-page .agent-tab-panel > .form-grid { align-content: start; align-items: start; }
.agent-edit-page .agent-tab-panel .field { align-content: start; }
.agent-edit-page .agent-tab-panel > .form-grid { max-width: 1180px; }
.agent-edit-page .agent-tab-panel[data-agent-panel="tools"] > .form-grid,
.agent-edit-page .agent-tab-panel[data-agent-panel="context"] > .form-grid,
.agent-edit-page .agent-tab-panel[data-agent-panel="knowledge"] > .form-grid { max-width: none; }
.agent-page-actions { position: sticky; z-index: 7; bottom: 12px; flex: 0 0 auto; height: max-content; margin: 0 18px 18px; padding: 14px 16px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb,var(--surface) 94%,transparent); box-shadow: 0 14px 36px rgba(15,23,42,.13); backdrop-filter: blur(12px); }
.agent-edit-status { margin-top: 12px; min-height: 22px; }
.agent-edit-page .button { width: auto; flex: 0 0 auto; }
.agent-page-actions [data-delete-current-agent] { margin-right: auto; }
.agent-context-block { padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.agent-context-block .field { width: 100%; }
.agent-context-block textarea[name="first_message"] { min-height: 68px; }
.agent-context-panel { --context-text-size: .84rem; display: grid; align-content: start; gap: 12px; font-size: var(--context-text-size); line-height: 1.5; }
.context-accordion { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.context-accordion > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-radius: 12px; cursor: pointer; list-style: none; }
.context-accordion > summary::-webkit-details-marker { display: none; }
.context-accordion > summary:hover { background: var(--surface-2); }
.context-accordion > summary:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 35%,transparent); outline-offset: 2px; }
.context-accordion-heading { min-width: 0; display: grid; gap: 2px; }
.context-accordion-heading strong { font-size: inherit; font-weight: 750; }
.context-accordion-heading > span { color: var(--muted); font-weight: 400; }
.context-accordion-chevron { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); transition: transform .15s ease; }
.context-accordion[open] > summary { border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; }
.context-accordion[open] > summary .context-accordion-chevron { transform: rotate(180deg); color: var(--primary); }
.context-accordion-body { min-width: 0; padding: 18px; }
.context-accordion-body > .instruction-section { padding: 0; border: 0; border-radius: 0; }
.context-accordion-body > .instruction-section > .instruction-section-head { display: none; }
.context-accordion-body > .agent-context-block { padding: 0; border: 0; }
.context-accordion-body > .context-hints { margin-top: 20px; }
.agent-context-panel .context-field-heading > div { display: grid; gap: 4px; min-width: 0; }
.agent-context-panel :is(.field, .field input, .field select, .field textarea, small, .instruction-choice legend, .segmented-options span, .instruction-check strong, .preset-card strong, .toggle-field strong, .text-button, .context-hints strong, .context-hint-group > span, .copy-token, .compiled-context-preview summary, .compiled-context-preview pre, .inline-alert strong, .inline-alert p) { font-size: var(--context-text-size); line-height: 1.5; }
.agent-context-panel .context-hint-group { grid-template-columns: 145px minmax(0,1fr); }
.agent-context-panel .context-hint-group > div { min-width: 0; }
.agent-context-panel .copy-token { max-width: 100%; overflow-wrap: anywhere; }
.agent-context-panel [hidden] { display: none; }
.agent-context-panel :is(.preset-card, .segmented-options label) input:focus-visible + span { outline: 3px solid color-mix(in srgb,var(--primary) 35%,transparent); outline-offset: 2px; }
.agent-post-call-panel .form-grid { align-content: start; align-items: start; }
.agent-post-call-panel .form-grid > .field,
.agent-post-call-panel .form-grid > .toggle-field { grid-column: span 2; align-self: start; }
.agent-post-call-panel .form-grid > .span-4 { grid-column: span 4; }
.agent-post-call-panel .evaluation-snapshot-note { font-size: var(--context-text-size); }
.instruction-section { display: grid; gap: 20px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.instruction-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.instruction-section-head > div { display: grid; gap: 5px; }
.instruction-section-head strong { font-size: 1.05rem; }
.instruction-section-head small, .context-field-heading small { color: var(--muted); line-height: 1.45; }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.preset-card { position: relative; cursor: pointer; }
.preset-card input { position: absolute; opacity: 0; pointer-events: none; }
.preset-card span { display: grid; min-height: 86px; align-content: center; gap: 5px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.preset-card small { color: var(--muted); }
.preset-card input:checked + span { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.instruction-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.instruction-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.instruction-choice legend { margin-bottom: 8px; font-weight: 700; }
.segmented-options { display: flex; width: 100%; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.segmented-options label { position: relative; flex: 1 1 0; min-width: 0; cursor: pointer; }
.segmented-options input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-options span { display: grid; min-height: 40px; place-items: center; padding: 7px 9px; border-radius: 9px; color: var(--muted); font-size: .88rem; font-weight: 700; text-align: center; }
.segmented-options input:checked + span { color: var(--primary); background: var(--surface); box-shadow: var(--shadow-soft); }
.instruction-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.instruction-check { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.instruction-check input { margin-top: 3px; }
.instruction-check span { display: grid; gap: 3px; }
.instruction-check small { color: var(--muted); line-height: 1.35; }
.compiled-context-preview { border-top: 1px solid var(--line); padding-top: 16px; }
.compiled-context-preview summary { cursor: pointer; color: var(--primary); font-weight: 750; }
.compiled-context-preview pre { max-height: 420px; margin: 14px 0 8px; padding: 16px; overflow: auto; white-space: pre-wrap; border-radius: 12px; background: var(--surface-2); color: var(--text); font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.routing-directory { min-width: 0; display: grid; gap: 14px; }
.routing-section { min-width: 0; padding: 18px; gap: 16px; }
.routing-directory-toolbar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.routing-search { width: min(420px,100%); min-width: 0; display: grid; gap: 7px; font-size: .8rem; font-weight: 650; }
.routing-search input { width: 100%; min-width: 0; height: 44px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface-2); font: inherit; font-weight: 400; }
.routing-search input:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 25%,transparent); outline-offset: 1px; }
.routing-result-count { padding-bottom: 12px; color: var(--muted); font-size: .76rem; }
.routing-table-wrap { border: 1px solid var(--line); border-radius: 12px; }
.routing-destinations-table { table-layout: fixed; min-width: 840px; }
.routing-destinations-table > caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.routing-destinations-table th, .routing-destinations-table td { padding: 9px 10px; }
.routing-destinations-table th { white-space: nowrap; }
.routing-destinations-table td { vertical-align: top; }
.routing-destinations-table th:nth-child(1) { width: 170px; }
.routing-destinations-table th:nth-child(2) { width: 140px; }
.routing-destinations-table th:nth-child(3) { width: 235px; }
.routing-destinations-table th:nth-child(5) { width: 76px; text-align: right; }
.routing-alias { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.routing-destinations-table .copy-token { display: block; max-width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); background: transparent; font-size: inherit; font-weight: 650; text-align: left; }
.routing-destinations-table .copy-token:hover, .routing-destinations-table .copy-token:focus-visible { color: var(--primary); text-decoration: underline dotted; text-underline-offset: 3px; }
.routing-number { font-variant-numeric: tabular-nums; }
.routing-transfer-type { display: inline-block; padding: 2px 7px; border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-size: .76rem; font-weight: 750; }
.routing-transfer-details { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.routing-transfer-details:empty { display: none; }
.routing-setting { padding: 1px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface-2); font-size: .7rem; line-height: 1.5; white-space: nowrap; }
.routing-destinations-table small { color: var(--muted); font-size: .72rem; line-height: 1.45; }
.routing-rule { line-height: 1.5; }
.routing-rule-preview { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.routing-actions { text-align: right; }
.routing-empty { padding: 28px 16px !important; color: var(--muted); text-align: center; }
.destination-attended-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.destination-attended-settings[hidden] { display: none; }
.destination-attended-settings > .field,
.destination-attended-settings > .toggle-field { min-height: 108px; height: 100%; margin: 0; align-self: stretch; }
.agent-edit-page [data-agent-panel="context"] .context-field textarea { min-height: 520px; }
.invalid-field > input,
.invalid-field > select,
.invalid-field > textarea,
.invalid-field .field-with-action > select { border-color: var(--danger) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.locked-field { color: var(--muted) !important; background: var(--surface-3) !important; cursor: not-allowed; }
.field-with-action { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.field-with-action .button { min-height: 44px; }
.agent-name-link { padding: 0; border: 0; color: var(--primary); background: transparent; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 800; text-align: left; }
.routing-selection { padding: 15px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.routing-selection > div:first-child strong, .routing-selection > div:first-child small { display: block; }
.routing-selection > div:first-child strong { font-size: .8rem; }
.routing-selection > div:first-child small { margin-top: 4px; color: var(--muted); font-size: .68rem; }
.context-field-heading { min-height: 18px; display: flex; align-items: flex-end; gap: 12px; }
.context-field-heading > label { cursor: text; }
.field-actions { margin-left: auto; display: inline-flex; gap: 9px; }
.field-actions .text-button { font-size: .7rem; }
.context-hints { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.context-hints strong { font-size: .72rem; }
.context-hint-group { margin-top: 9px; display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: start; gap: 8px; }
.context-hint-group > span, .context-hint-group small { padding-top: 5px; color: var(--muted); font-size: .66rem; }
.context-hint-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.copy-token { min-height: 28px; padding: 4px 8px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; color: var(--primary); background: var(--surface); cursor: pointer; font-size: .68rem; font-weight: 750; }
.copy-token:hover { border-color: color-mix(in srgb,var(--primary) 45%,var(--line)); background: var(--primary-soft); }
.copy-token:focus-visible { outline: 2px solid color-mix(in srgb,var(--primary) 40%,transparent); outline-offset: 2px; }
.copy-token[data-copy-state] { color: var(--success); border-color: var(--success); background: color-mix(in srgb,var(--success) 7%,var(--surface)); }
.context-fullscreen { position: fixed; z-index: 20; inset: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 30px 90px rgba(0,0,0,.38); }
.context-fullscreen textarea { min-height: calc(100vh - 180px); }
.context-revisions-list { display: grid; gap: 13px; }
.context-revisions-list article { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.context-revisions-list header { padding: 11px 13px; display: flex; justify-content: space-between; gap: 12px; background: var(--surface-2); }
.context-revisions-list header strong, .context-revisions-list header small { font-size: .7rem; }
.context-revisions-list header small { color: var(--muted); }
.context-revision-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.context-revisions-list pre { max-height: 300px; margin: 0; padding: 13px; overflow: auto; white-space: pre-wrap; font: .68rem/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
.context-revisions-list del, .context-revisions-list ins { display: block; text-decoration: none; }
.context-revisions-list del { color: #a1283b; background: color-mix(in srgb,var(--danger) 8%,transparent); }
.context-revisions-list ins { color: var(--success); background: color-mix(in srgb,var(--success) 8%,transparent); }
.quick-destination-backdrop, .credential-confirm-backdrop { position: fixed; z-index: 10; inset: 0; padding: 24px; display: grid; place-items: center; border-radius: 20px; background: rgba(6,12,28,.58); backdrop-filter: blur(3px); }
.quick-destination-backdrop[hidden], .credential-confirm-backdrop[hidden] { display: none; }
.quick-destination-card { width: min(620px,100%); max-height: calc(100vh - 80px); padding: 24px; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.credential-confirm-card { width: min(500px,100%); padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.credential-confirm-card > p { margin: -8px 0 18px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.agent-section { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); overflow: hidden; }
.agent-section summary { min-height: 68px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; background: var(--surface); }
.agent-section summary::-webkit-details-marker { display: none; }
.agent-section summary strong, .agent-section summary small { display: block; }
.agent-section summary strong { font-size: .86rem; }
.agent-section summary small { margin-top: 5px; color: var(--muted); font-size: .7rem; font-weight: 500; }
.agent-section summary b { color: var(--muted); transition: transform .16s ease; }
.agent-section[open] summary b { transform: rotate(180deg); }
.agent-section-grid { padding: 17px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; border-top: 1px solid var(--line); }
.toggle-field { min-height: 62px; padding: 11px 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.toggle-field input { width: 18px; height: 18px; accent-color: var(--primary); }
.toggle-field strong, .toggle-field small { display: block; }
.toggle-field strong { font-size: .76rem; }
.toggle-field small { margin-top: 3px; color: var(--muted); font-size: .66rem; font-weight: 500; }
.evaluation-snapshot-note { margin: -2px 0 2px; padding: 10px 12px; border-radius: 9px; color: var(--muted); background: var(--surface-2); font-size: .72rem; line-height: 1.5; }
.evaluation-tab-settings { align-items: stretch; }
.agent-post-call-panel .evaluation-tab-settings > .toggle-field,
.agent-post-call-panel .evaluation-tab-settings > .evaluation-model-field { min-height: 96px; height: 100%; margin: 0; align-self: stretch; }
.evaluation-instructions-field textarea { min-height: 220px; }
.knowledge-manager { padding: 16px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.knowledge-manager-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.knowledge-manager-head strong, .knowledge-manager-head small { display: block; }
.knowledge-manager-head strong { font-size: .8rem; }
.knowledge-manager-head small, .knowledge-new-note { margin-top: 4px; color: var(--muted); font-size: .68rem; }
.knowledge-drop { min-height: 90px; padding: 16px; display: grid; place-items: center; gap: 5px; border: 1px dashed color-mix(in srgb,var(--primary) 45%,var(--line)); border-radius: 11px; color: var(--primary); background: var(--primary-soft); text-align: center; cursor: pointer; }
.knowledge-drop input { width: min(100%, 340px); color: var(--text); font-size: .72rem; }
.knowledge-drop span { font-size: .78rem; font-weight: 750; }
.knowledge-drop small { color: var(--muted); font-size: .66rem; }
.knowledge-file-list { display: grid; gap: 7px; }
.knowledge-file-row { padding: 10px 11px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.knowledge-file-row strong, .knowledge-file-row small { display: block; }
.knowledge-file-row > div { min-width: 0; overflow-wrap: anywhere; }
.knowledge-file-row .test-error { color: var(--danger); }
[data-knowledge-notice] { display: grid; gap: 8px; margin: 12px 0; color: var(--muted); }
[data-knowledge-notice] > small { font-size: .75rem; }
.knowledge-file-row strong { overflow-wrap: anywhere; font-size: .73rem; }
.knowledge-file-row small, .knowledge-empty { margin-top: 3px; color: var(--muted); font-size: .65rem; }
.memory-tab-settings { align-items: stretch; margin-bottom: 16px; }
.agent-tab-panel > .memory-tab-settings > .field,
.agent-tab-panel > .memory-tab-settings > .toggle-field { min-height: 96px; height: 100%; margin: 0; align-self: stretch; }
.memory-manager { display: grid; gap: 12px; }
.memory-manager > header { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.memory-manager > header strong, .memory-manager > header small { display: block; }
.memory-manager > header strong { font-size: .82rem; }
.memory-manager > header small { margin-top: 4px; color: var(--muted); font-size: .68rem; }
.memory-manager-actions { display: flex; align-items: flex-end; gap: 10px; }
.memory-number-search { width: min(290px, 32vw); display: grid; gap: 5px; color: var(--text); font-size: .7rem; font-weight: 750; }
.memory-number-search input { width: 100%; height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); font: inherit; font-size: .76rem; font-weight: 500; }
.memory-number-search input::placeholder { color: var(--faint); }
.memory-entry-list { display: grid; gap: 10px; }
.memory-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.memory-caller-table { width: 100%; font-size: .76rem; }
.memory-caller-table th, .memory-caller-table td { padding: 12px 16px; vertical-align: middle; }
.memory-caller-table td:first-child small { display: block; margin-top: 4px; color: var(--muted); }
.memory-caller-table td:nth-child(2), .memory-caller-table td:last-child { white-space: nowrap; width: 1%; }
.memory-caller-link { padding: 0; border: 0; background: none; color: var(--primary); font: inherit; font-weight: 750; cursor: pointer; white-space: nowrap; }
.memory-caller-link:hover { text-decoration: underline; }
.memory-row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.memory-history-description { margin: 8px 0 0; color: var(--muted); font-size: .76rem; }
.memory-history-list { display: grid; gap: 10px; max-height: 55vh; overflow-y: auto; padding: 2px; }
.memory-entry { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.memory-entry header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.memory-entry header strong, .memory-entry header small { display: block; }
.memory-entry header strong { font-size: .8rem; }
.memory-entry header small { margin-top: 3px; color: var(--muted); font-size: .65rem; }
.memory-entry p { margin: 12px 0 0; color: var(--text); font-size: .76rem; line-height: 1.55; }
.memory-facts { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.memory-facts span { padding: 4px 8px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: .62rem; font-weight: 750; text-transform: capitalize; }
.knowledge-empty { padding: 12px; border-radius: 9px; background: var(--surface-2); text-align: center; }
.tool-collection { padding: 16px; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tool-collection-head, .tool-editor-head, .tool-test-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tool-collection-head strong, .tool-collection-head small, .tool-editor-head strong, .tool-editor-head small { display: block; }
.tool-collection-head strong, .tool-editor-head strong { font-size: .8rem; }
.tool-collection-head small, .tool-editor-head small { margin-top: 4px; color: var(--muted); font-size: .68rem; }
.tool-collection [data-tool-list] { display: grid; gap: 12px; }
.tool-editor { padding: 15px; display: grid; gap: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.tool-card-actions { display: flex; align-items: center; gap: 10px; }
.tool-editor-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.tool-editor .field input, .tool-editor .field select { min-height: 40px; }
.tool-editor .field textarea { min-height: 84px; font: .72rem/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; }
.tool-pairs, .tool-test-values { padding: 12px; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tool-pairs > strong, .tool-test-values > strong { font-size: .75rem; }
.tool-pairs > small, .tool-test-values > small { color: var(--muted); font-size: .66rem; }
.tool-pair-list { display: grid; gap: 7px; }
.tool-pair-row { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(180px,1.3fr) 34px; gap: 7px; }
.tool-pair-row input, .tool-test-values input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface-2); font-size: .72rem; }
.tool-parameters { display: grid; gap: 9px; }
.tool-parameters > strong, .tool-parameters > small { display: block; }
.tool-parameters > small { margin-top: -5px; color: var(--muted); font-size: .68rem; }
.tool-parameter-list { display: grid; gap: 8px; }
.tool-parameter-row { display: grid; grid-template-columns: minmax(115px,.7fr) minmax(220px,1.7fr) 105px minmax(130px,.8fr) auto auto 34px; gap: 7px; align-items: end; }
.tool-parameter-row label { display: grid; gap: 4px; min-width: 0; }
.tool-parameter-row label > span { color: var(--muted); font-size: .63rem; font-weight: 700; }
.tool-parameter-row input, .tool-parameter-row select { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface-2); font-size: .72rem; }
.tool-parameter-row .parameter-required { display: flex; align-items: center; gap: 6px; min-height: 38px; }
.tool-parameter-row .parameter-required input { width: auto; min-height: 0; }
.tool-test-values > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; }
.tool-test-values label { display: grid; grid-template-columns: 115px minmax(0,1fr); align-items: center; gap: 8px; color: var(--muted); font-size: .66rem; }
.response-paths { padding: 12px; border: 1px solid color-mix(in srgb,var(--primary) 24%,var(--line)); border-radius: 9px; background: var(--primary-soft); }
.response-paths > strong { font-size: .74rem; }
.response-paths > p { margin: 3px 0 9px; color: var(--muted); font-size: .66rem; }
.response-paths > div { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-test-actions { justify-content: flex-start; color: var(--muted); font-size: .7rem; }
.tool-test-result { max-height: 260px; margin: 0; padding: 13px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); white-space: pre-wrap; overflow-wrap: anywhere; font: .7rem/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
.test-success { color: var(--success); }
.test-error { color: var(--danger); }
.destination-picker { display: grid; gap: 8px; }
.destination-owned-list { display: grid; gap: 8px; }
.callback-directory, .callback-recipient-editor { --callback-text-size: .84rem; font-size: var(--callback-text-size); line-height: 1.5; }
.callback-directory :is(.modal-description, .button, .empty-state p),
.callback-recipient-editor :is(.modal-description, .button, .field, .field input, .field small) { font-size: var(--callback-text-size); line-height: 1.5; }
.callback-directory .modal-description, .callback-recipient-editor .modal-description { margin: 6px 0 0; color: var(--muted); }
.callback-directory-note { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: var(--surface-2); }
.callback-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.callback-list-heading > span { color: var(--muted); }
.callback-recipient-list { display: grid; gap: 10px; margin-bottom: 22px; }
.callback-recipient-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface); font: inherit; text-align: left; cursor: pointer; }
.callback-recipient-row:hover { border-color: color-mix(in srgb,var(--primary) 35%,var(--line)); background: var(--surface-2); }
.callback-recipient-row:focus-visible { outline: 3px solid color-mix(in srgb,var(--primary) 30%,transparent); outline-offset: 3px; }
.callback-recipient-avatar { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; color: var(--primary); background: var(--primary-soft); font-weight: 750; }
.callback-recipient-details { display: grid; flex: 1 1 0; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.callback-recipient-details > strong { font-size: inherit; font-weight: 750; }
.callback-recipient-details > span { color: var(--muted); }
.callback-edit-label { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--primary); background: var(--surface); font-weight: 650; }
.callback-delete-button { margin-right: auto; }
.destination-owned-row { min-height: 78px; padding: 13px 14px; display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,auto) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.destination-owned-main { min-width: 0; }
.destination-owned-title { display: flex; align-items: center; gap: 8px; }
.destination-owned-title > span { padding: 3px 7px; border-radius: 999px; color: var(--primary); background: var(--primary-soft); font-size: .58rem; font-weight: 800; text-transform: uppercase; }
.destination-owned-copy { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.destination-owned-row strong, .destination-owned-row small { display: block; }
.destination-owned-row strong { font-size: .8rem; }
.destination-owned-row small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.destination-edit-button { min-height: 28px !important; padding: 0 9px !important; font-size: .68rem !important; }
.destination-picker > label { min-height: 62px; padding: 10px 12px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.destination-picker input { width: 17px; height: 17px; accent-color: var(--primary); }
.destination-picker strong, .destination-picker small { display: block; }
.destination-picker strong { font-size: .8rem; }
.destination-picker small { margin-top: 3px; color: var(--muted); font-size: .68rem; }

.table-panel { overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th { padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--surface-2); font-size: .68rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--primary) 2.5%, var(--surface)); }
td small { display: block; margin-top: 4px; color: var(--muted); }
td a { color: var(--primary); text-decoration: none; }
td code, .role-pill { padding: 4px 7px; border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; }
.align-right { text-align: right; }
.table-identity { display: flex; align-items: center; gap: 10px; }
.table-identity .agent-avatar, .user-avatar { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; }
.user-avatar { display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); font-size: .68rem; font-weight: 800; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; }
.row-actions .lifecycle-button { min-width: 66px; }
.table-name-link { padding: 0; border: 0; color: var(--primary); background: transparent; cursor: pointer; font: inherit; font-weight: 750; text-align: left; overflow-wrap: anywhere; }
.table-name-link:hover, .agent-name-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-count-link { font-weight: 550; }
.organization-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 17px; color: var(--muted); font-size: .76rem; }
.organization-breadcrumbs button { padding: 0; border: 0; color: var(--primary); background: transparent; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.organization-breadcrumbs button:hover { text-decoration: underline; }
.organization-breadcrumbs [aria-current="page"] { color: var(--text); font-weight: 650; }
.breadcrumb-separator { color: var(--muted); opacity: .6; }
.agents-table { table-layout: fixed; min-width: 700px; }
.agents-table .agent-name-col { width: 17%; }
.agents-table .agent-customer-col { width: 11%; }
.agents-table .agent-status-col { width: 130px; }
.agents-table .agent-licences-col { width: 74px; }
.agents-table .agent-dc-col { width: 94px; }
.agents-table th, .agents-table td { padding: 13px 12px; overflow-wrap: anywhere; }
.agents-table th { white-space: nowrap; }
.agents-table th:nth-child(4), .agents-table th:nth-child(5), .agents-table .agent-licences-cell, .agents-table .agent-dc-cell { padding-left: 8px; padding-right: 8px; }
.agents-table th:nth-child(4), .agents-table th:nth-child(5) { font-size: .63rem; letter-spacing: .025em; }
.agents-table .table-identity { gap: 8px; }
.agents-table .table-identity > div { min-width: 0; }
.agents-table .agent-name-link { overflow-wrap: anywhere; }
.agents-table .agent-status-cell { overflow-wrap: normal; }
.agents-table .agent-status-cell .badge { max-width: 100%; white-space: normal; line-height: 1.35; border-radius: 12px; }
.agents-table .row-actions { width: 100%; flex-wrap: wrap; justify-content: flex-end; }
.agents-table .row-actions .button { flex: 0 0 auto; white-space: nowrap; }
.resellers-table th:first-child { width: 45%; }
.customers-table td, .resellers-table td { overflow-wrap: anywhere; }
.status-form { display: grid; gap: 22px; }
.status-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.status-section legend { margin-bottom: 10px; font-size: .82rem; font-weight: 800; }
.status-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.status-option { min-height: 82px; padding: 13px 14px; display: grid; grid-template-columns: 19px minmax(0,1fr); align-items: start; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); cursor: pointer; }
.status-option:has(input:checked) { border-color: color-mix(in srgb,var(--primary) 54%,var(--line)); background: var(--primary-soft); box-shadow: 0 0 0 2px color-mix(in srgb,var(--primary) 8%,transparent); }
.status-option:has(input:disabled) { opacity: .48; cursor: not-allowed; }
.status-option input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--primary); }
.status-option strong, .status-option small { display: block; }
.status-option strong { font-size: .8rem; }
.status-option small { margin-top: 5px; color: var(--muted); font-size: .69rem; font-weight: 500; line-height: 1.45; }
.modal-description { max-width: 470px; margin: 7px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.empty-state { min-height: 250px; padding: 38px 24px; display: grid; place-items: center; align-content: center; text-align: center; }
.empty-state h3 { margin: 8px 0 7px; font-size: 1rem; }
.empty-state p { max-width: 420px; margin-bottom: 18px; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.empty-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--primary); background: var(--primary-soft); font-size: 1.5rem; }
.loading-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.loading-grid i { height: 145px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.badge.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.badge.pending { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.entity-card { min-height: 150px; padding: 20px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.entity-card h3 { margin: 0 0 5px; font-size: .93rem; }
.entity-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.entity-card .button { grid-column: 2 / -1; justify-self: end; }
.entity-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg,var(--primary),var(--violet)); font-size: .75rem; font-weight: 800; }
.security-banner { margin-bottom: 16px; padding: 16px 19px; display: flex; gap: 13px; align-items: center; border: 1px solid color-mix(in srgb, var(--cyan) 28%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--cyan) 7%, var(--surface)); }
.security-banner > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, transparent); font-size: 1.3rem; }
.security-banner strong { font-size: .82rem; }
.security-banner p { margin: 4px 0 0; color: var(--muted); font-size: .74rem; }

.filter-bar { margin-bottom: 15px; padding: 11px; display: grid; grid-template-columns: minmax(240px,1fr) auto auto; gap: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.filter-bar input, .filter-bar select { min-height: 38px; }
.call-history-filters { grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px); }
.call-search-status { margin: 0 0 12px; min-height: 1.25em; color: var(--muted); font-size: .76rem; }
.call-caller-number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.search-field { position: relative; }
.search-field span { position: absolute; left: 12px; top: 9px; color: var(--muted); }
.search-field input { padding-left: 33px; }
.detail-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.evaluation-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.detail-metrics > div, .evaluation-grid > div { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.detail-metrics > div > span:not(.badge), .evaluation-grid > div > span, .review-summary span { display: block; margin-bottom: 6px; color: var(--muted); font-size: .67rem; }
.detail-metrics strong, .evaluation-grid strong { font-size: .78rem; }
.evaluation-status-row { margin-bottom: 10px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.evaluation-status-row > span:first-child { color: var(--muted); font-size: .67rem; }
.evaluation-status-row + .evaluation-grid, .evaluation-status-row + .call-summary { margin-top: 10px; }
.detail-section { margin-top: 24px; }
.detail-section h3 { margin-bottom: 12px; font-size: .9rem; }
.call-summary { padding: 15px; border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0; background: var(--primary-soft); font-size: .8rem; line-height: 1.6; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; gap: 12px; padding: 0 0 17px; }
.timeline li > span { width: 9px; height: 9px; margin-top: 4px; border: 2px solid var(--primary); border-radius: 50%; }
.timeline li > span::after { content: ''; position: absolute; left: 3px; top: 15px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child > span::after { display: none; }
.timeline strong { display: block; font-size: .76rem; }
.timeline small { display: block; margin-top: 3px; color: var(--muted); font-size: .67rem; }
.transcript summary { color: var(--primary); cursor: pointer; font-size: .8rem; font-weight: 750; }
.transcript pre { max-height: 260px; overflow: auto; padding: 15px; white-space: pre-wrap; border-radius: 10px; background: var(--surface-2); font: .74rem/1.6 ui-monospace, monospace; }
.call-transcript-grid { display: grid; gap: 14px; }
.call-transcript-block { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.call-transcript-block header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.call-transcript-block header span { display: block; margin-bottom: 2px; color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.call-transcript-block h4 { margin: 0; font-size: .9rem; }
.call-transcript-block header small { color: var(--muted); font-weight: 750; text-transform: capitalize; }
.call-transcript-block pre { max-height: 300px; margin: 0; overflow: auto; padding: 16px; white-space: pre-wrap; font: .76rem/1.65 ui-monospace, monospace; }
.call-history-route { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.call-history-route > div { min-width: 0; }
.call-history-route span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .67rem; }
.call-history-route strong { display: block; overflow-wrap: anywhere; font-size: .78rem; }
.call-history-route small { display: block; margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; font-size: .72rem; }
.call-transcript-empty { margin: 0; padding: 16px; color: var(--muted); font-size: .76rem; }
.call-step > div { min-width: 0; flex: 1; }
.call-step-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.call-step-heading strong { overflow-wrap: anywhere; }
.call-step-status { display: inline-flex; padding: 3px 7px; border-radius: 5px; font-size: .64rem; font-weight: 750; }
.call-step-status.success { color: var(--success); background: var(--success-soft); }
.call-step-status.danger { color: var(--danger); background: color-mix(in srgb,var(--danger) 10%,var(--surface)); }
.call-step-status.neutral { color: var(--muted); background: var(--surface-2); }
.call-step-failed > span { border-color: var(--danger); }
.call-step-meta { margin: 5px 0 0; color: var(--muted); overflow-wrap: anywhere; font-size: .7rem; line-height: 1.5; }
.modal:has(.call-detail-layout) { overflow: hidden; }
#modal-content:has(.call-detail-layout) { padding: 0; }
.call-detail-layout { height: min(900px, calc(100vh - 42px)); max-height: calc(100vh - 42px); display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.call-detail-scroll { min-height: 0; padding: 26px; overflow-y: auto; scrollbar-gutter: stable; }
.call-recording-dock { position: sticky; z-index: 2; bottom: 0; padding: 15px 26px; display: grid; grid-template-columns: minmax(155px, .3fr) minmax(0, 1fr); align-items: center; gap: 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 96%, var(--primary-soft)); box-shadow: 0 -10px 28px rgba(15,23,42,.08); }
.call-recording-dock strong { display: block; font-size: .82rem; }
.call-recording-dock small { display: block; margin-top: 4px; color: var(--muted); font-size: .68rem; }
.recording-download { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; }
.recording-download svg { flex: 0 0 auto; width: 16px; height: 16px; }
.call-recording-dock audio { width: 100%; min-width: 0; }
.call-recording-player { min-width: 0; }
.recording-waveform { min-width: 0; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.recording-waveform-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 21px; margin-bottom: 7px; color: var(--muted); font-size: .65rem; }
.recording-waveform-legend { display: flex; flex-wrap: wrap; gap: 12px; font-weight: 750; }
.recording-waveform-legend span::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--primary); }
.recording-waveform-legend .waveform-caller::before { background: #169c83; }
.recording-waveform-legend .waveform-agent::before { background: #5375f7; }
.recording-waveform-times { flex: 0 0 auto; margin-left: auto; font-variant-numeric: tabular-nums; }
.recording-waveform-track { position: relative; height: 88px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.recording-waveform-track:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.recording-waveform-track canvas { display: block; width: 100%; height: 100%; }
.recording-waveform-track [data-waveform-seek] { position: absolute; inset: 0; z-index: 1; cursor: pointer; touch-action: none; user-select: none; }
.recording-waveform-track [aria-disabled=true] { cursor: default; }
.recording-waveform-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; color: var(--muted); font-size: .72rem; text-align: center; pointer-events: none; }
.recording-waveform-status[hidden], .recording-waveform-legend[hidden] { display: none; }
.recording-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-top: 8px; }
.recording-transport, .recording-volume, .recording-speed { display: flex; align-items: center; gap: 6px; }
.recording-control { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; color: var(--text); background: transparent; cursor: pointer; }
.recording-control:hover { color: var(--primary); background: var(--primary-soft); }
.recording-control:disabled { opacity: .4; cursor: default; }
.recording-control svg { display: block; width: 22px; height: 22px; }
.recording-control [hidden], .recording-waveform[hidden], .call-recording-player audio[hidden] { display: none; }
.recording-play { width: 38px; height: 38px; color: #fff; background: var(--primary); }
.recording-play:hover { color: #fff; background: color-mix(in srgb, var(--primary) 88%, #000); }
.recording-volume { margin-left: auto; }
.recording-volume input[type=range] { width: 82px; min-height: 0; height: 20px; margin: 0; padding: 0; accent-color: var(--primary); cursor: pointer; }
.recording-speed { color: var(--muted); font-size: .65rem; }
.recording-speed select { width: 68px; height: 32px; min-height: 0; padding: 0 5px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); }
.recording-unavailable { margin: 0; color: var(--muted); font-size: .74rem; }

.call-control-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.control-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.control-card.connected { border-color: color-mix(in srgb,var(--success) 38%,var(--line)); }
.control-head { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.control-head h3 { margin: 0 0 4px; font-size: .9rem; }
.control-head p { margin: 0; color: var(--muted); font-size: .72rem; }
.connection-state { margin: 20px 0; padding: 14px; display: flex; gap: 10px; align-items: center; border-radius: 10px; background: var(--surface-2); font-size: .76rem; }
.state-orb { width: 10px; height: 10px; border: 2px solid var(--muted); border-radius: 50%; }
.connected .state-orb { border-color: var(--success); box-shadow: 0 0 0 5px color-mix(in srgb,var(--success) 12%,transparent); }
.call-control-call { margin: -6px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.call-control-call label { display: grid; gap: 7px; }
.call-control-call label > span { color: var(--muted); font-size: .68rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.call-control-call select { width: 100%; min-height: 40px; padding: 0 36px 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); font: inherit; }
.call-control-call > div { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--muted); font-size: .68rem; }
.call-control-empty { min-height: 38px; margin: -6px 0 18px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.live-call-overview { margin: 0 0 20px; }
.live-call-overview-head { min-height: 52px; margin-bottom: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.live-call-overview-head h4 { margin: 3px 0 0; font-size: .9rem; }
.live-call-overview-head > span { padding: 5px 9px; border-radius: 20px; color: var(--success); background: var(--success-soft); font-size: .65rem; font-weight: 800; }
.section-kicker { display: block; color: var(--muted); font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.live-call-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,430px),1fr)); gap: 14px; }
.live-call-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 24px color-mix(in srgb,var(--text) 6%,transparent); }
.live-call-item.listening { border-color: color-mix(in srgb,var(--primary) 48%,var(--line)); box-shadow: 0 0 0 2px color-mix(in srgb,var(--primary) 9%,transparent),0 8px 24px color-mix(in srgb,var(--text) 6%,transparent); }
.live-call-header { min-height: 68px; padding: 14px 16px; display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 12px; }
.live-call-identity strong, .live-call-identity small, .live-call-time span, .live-call-time strong { display: block; }
.live-call-identity strong { font-size: .8rem; }
.live-call-identity small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.live-call-time { text-align: right; }
.live-call-time span { color: var(--muted); font-size: .58rem; text-transform: uppercase; letter-spacing: .05em; }
.live-call-time strong { margin-top: 4px; font-size: .7rem; }
.live-call-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.live-call-context { margin: 0 16px 14px 38px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: .68rem; }
.live-call-context-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; color: var(--muted); }
.live-call-type { color: var(--primary); font-weight: 750; }
.live-call-context dl { display: grid; gap: 6px; margin: 10px 0 0; }
.live-call-context dl > div { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 10px; align-items: baseline; }
.live-call-context dt { color: var(--muted); }
.live-call-context dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.live-call-actions { padding: 0 16px 14px 38px; display: flex; flex-wrap: wrap; gap: 7px; }
.live-transcript-heading { padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.live-transcript-heading span { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.live-transcript-heading small { color: var(--muted); font-size: .62rem; }
.live-transcript { min-height: 150px; max-height: 390px; overflow: auto; padding: 16px; display: grid; align-content: start; gap: 13px; background: color-mix(in srgb,var(--surface-2) 62%,var(--surface)); scrollbar-gutter: stable; }
.live-transcript-line { width: fit-content; max-width: min(88%,760px); margin-right: auto; display: flex; align-items: flex-end; gap: 8px; justify-self: start; }
.live-transcript-line.assistant { margin-right: 0; margin-left: auto; justify-self: end; flex-direction: row-reverse; }
.live-transcript-avatar { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(145deg,var(--success),#20a98a); box-shadow: 0 5px 12px color-mix(in srgb,var(--success) 22%,transparent); font-size: .55rem; font-weight: 850; letter-spacing: .02em; }
.live-transcript-line.assistant .live-transcript-avatar { background: linear-gradient(145deg,var(--primary),var(--violet)); box-shadow: 0 5px 12px color-mix(in srgb,var(--primary) 24%,transparent); }
.live-transcript-line.callee .live-transcript-avatar { background: linear-gradient(145deg,var(--warning),#df9a38); box-shadow: 0 5px 12px color-mix(in srgb,var(--warning) 22%,transparent); }
.live-transcript-bubble { min-width: 120px; padding: 10px 12px; position: relative; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; background: var(--surface); box-shadow: 0 5px 14px color-mix(in srgb,var(--text) 5%,transparent); }
.live-transcript-line.assistant .live-transcript-bubble { border-radius: 14px 14px 4px 14px; border-color: color-mix(in srgb,var(--primary) 24%,var(--line)); background: var(--primary-soft); }
.live-transcript-line.callee .live-transcript-bubble { border-color: color-mix(in srgb,var(--warning) 28%,var(--line)); background: color-mix(in srgb,var(--warning) 10%,var(--surface)); }
.live-transcript-bubble::after { content: ''; position: absolute; bottom: 8px; left: -7px; width: 8px; height: 12px; background: inherit; clip-path: polygon(100% 0,100% 100%,0 100%); }
.live-transcript-line.assistant .live-transcript-bubble::after { right: -7px; left: auto; clip-path: polygon(0 0,100% 100%,0 100%); }
.live-transcript-meta { min-height: 16px; margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.live-transcript-meta strong { color: var(--success); font-size: .59rem; text-transform: uppercase; letter-spacing: .06em; }
.live-transcript-line.assistant .live-transcript-meta strong { color: var(--primary); }
.live-transcript-line.callee .live-transcript-meta strong { color: var(--warning); }
.live-transcript-line p { margin: 0; font-size: .73rem; line-height: 1.5; overflow-wrap: anywhere; }
.live-transcript-line time { flex: 0 0 auto; color: var(--muted); font-size: .56rem; }
.live-transcript-empty { margin: 5px 0; color: var(--muted); font-size: .7rem; }
.control-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.speak-call-summary { display: flex; justify-content: space-between; gap: 16px; margin: 18px 0; padding: 14px 16px; border-radius: 11px; background: var(--surface-2); }
.speak-call-summary span, .live-speak-panel span { color: var(--muted); }
.live-speak-panel { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; }
.live-speak-panel p { grid-column: 1 / -1; min-height: 20px; margin: 0; color: var(--text); font-size: .76rem; }
.speech-language { grid-column: 1 / -1; display: grid; gap: 6px; }
.speech-language > span { font-size: .7rem; font-weight: 750; }
.speech-language small { color: var(--muted); font-size: .64rem; line-height: 1.45; }
.speech-language select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); font: inherit; }

.modal:has(.agent-wizard) { width: min(760px,calc(100vw - 28px)); }
.agent-wizard { font-size: .84rem; line-height: 1.5; }
.agent-wizard-progress { display: flex; gap: 6px; margin: 0 0 22px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.agent-wizard-progress button { flex: 1; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.agent-wizard-progress button[aria-current="step"] { color: var(--primary); background: var(--surface); box-shadow: 0 2px 7px rgba(10,20,40,.08); }
.agent-wizard-progress button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.agent-wizard [data-wizard-panel] { min-height: 335px; }
.agent-wizard [hidden] { display: none; }
.agent-wizard h3 { margin: 0 0 16px; font-size: 1rem; }
.wizard-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 20px; align-items: start; }
.wizard-fields :is(.field,input,select,small) { font-size: inherit; }
.wizard-fields .field { min-width: 0; }
.wizard-fields input,.wizard-fields select { width: 100%; min-height: 42px; }
.wizard-step-description { margin: -8px 0 16px; color: var(--muted); }
.wizard-actions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.wizard-actions [data-wizard-back] { margin-right: auto; }
.wizard-review-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.wizard-review-grid section { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.wizard-review-grid h4 { margin: 0 0 12px; font: inherit; font-weight: 750; }
.wizard-review-grid dl { display: grid; gap: 8px; margin: 0; }
.wizard-review-grid dl > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 12px; align-items: start; }
.wizard-review-grid dt { color: var(--muted); }
.wizard-review-grid dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.wizard-review-grid .wizard-review-sip { grid-column: 1 / -1; }
.wizard-review-sip dl { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 22px; }
.wizard-ready-note { margin: 14px 0 0; color: var(--muted); }
.wizard-password-dialog { width: min(480px,calc(100vw - 28px)); }
.wizard-password-content { padding: 24px; font-size: .84rem; }
.wizard-password-content > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.wizard-password-content [data-wizard-password-error] { color: var(--danger); }
@media(max-width:600px){
  .agent-wizard [data-wizard-panel] { min-height: 0; }
  .wizard-fields,.wizard-review-grid,.wizard-review-sip dl { grid-template-columns: minmax(0,1fr); }
  .agent-wizard-progress button { padding: 8px 5px; font-size: .78rem; }
  .wizard-actions { flex-wrap: wrap; gap: 8px; }
  .wizard-actions [data-wizard-next] { flex: 1; }
}

.wizard-overview, .wizard-progress { display: flex; align-items: center; }
.wizard-overview { margin-bottom: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.wizard-overview > div { display: flex; align-items: center; gap: 7px; font-size: .7rem; }
.wizard-overview span, .wizard-progress span { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.wizard-overview > i, .wizard-progress i { height: 1px; flex: 1; margin: 0 10px; background: var(--line); }
.wizard-progress { margin: -4px 0 24px; }
.wizard-progress span { color: var(--muted); background: var(--surface-3); }
.wizard-progress span.active { color: #fff; background: var(--primary); }
.analysis-card, .completion-card { padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); text-align: center; }
.analysis-card h3, .completion-card h3 { margin: 10px 0 8px; }
.analysis-card p, .completion-card p { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.analysis-card ul { width: fit-content; margin: 18px auto 0; padding-left: 18px; color: var(--muted); font-size: .74rem; line-height: 1.8; text-align: left; }
.analysis-domain { padding: 5px 9px; border-radius: 20px; color: var(--primary); background: var(--primary-soft); font-size: .7rem; font-weight: 750; }
.inline-alert { margin: 18px 0; padding: 14px; border: 1px solid color-mix(in srgb,var(--primary) 20%,var(--line)); border-radius: 10px; background: var(--primary-soft); font-size: .76rem; }
.inline-alert.error { color: var(--danger); border-color: color-mix(in srgb,var(--danger) 25%,var(--line)); background: color-mix(in srgb,var(--danger) 8%,var(--surface)); }
.inline-alert p { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.review-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-summary > div { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.review-summary strong { font-size: .8rem; }
.completion-mark { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: #fff; background: linear-gradient(145deg,var(--primary),var(--violet)); font-size: 1.2rem; font-weight: 850; }

.settings-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 16px; }
.settings-nav { padding: 8px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); align-self: start; }
.settings-nav button { min-height: 39px; padding: 0 11px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; font-size: .78rem; font-weight: 700; }
.settings-nav button.active { color: var(--primary); background: var(--primary-soft); }
.settings-panel { padding: 24px; }
.theme-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 22px; }
.theme-card { padding: 12px; border: 2px solid var(--line); border-radius: 13px; cursor: pointer; }
.theme-card.selected { border-color: var(--primary); }
.theme-card input { position: absolute; opacity: 0; }
.theme-card > strong, .theme-card > small { display: block; }
.theme-card > strong { margin-top: 10px; font-size: .8rem; }
.theme-card > small { margin-top: 3px; color: var(--muted); font-size: .65rem; }
.theme-preview { height: 86px; display: grid; grid-template-columns: 28% 1fr; grid-template-rows: 28% 1fr; gap: 5px; padding: 8px; border: 1px solid #dce2ec; border-radius: 8px; background: #f6f8fc; }
.theme-preview i { grid-row: 1/-1; background: #18213a; border-radius: 4px; }
.theme-preview b, .theme-preview em { background: #fff; border-radius: 4px; }
.theme-preview.dark { border-color: #28344b; background: #0c1322; }
.theme-preview.dark i { background: #060a13; }.theme-preview.dark b,.theme-preview.dark em { background: #17223a; }
.theme-preview.system { background: linear-gradient(135deg,#f6f8fc 50%,#0c1322 50%); }
.settings-actions { grid-column: 1/-1; margin-top: 8px; }
.toast { min-width: 260px; max-width: 390px; padding: 13px 15px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); }
.toast > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--success); background: var(--success-soft); font-weight: 850; }
.toast.error > span { color: var(--danger); background: color-mix(in srgb,var(--danger) 10%,transparent); }
.toast p { margin: 0; font-size: .76rem; font-weight: 650; }

@media (max-width: 1080px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-split { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .agents-table .row-actions { gap: 5px; }
  .agents-table .row-actions .button { min-height: 30px; padding: 0 8px; font-size: .7rem; }
}

@media (max-width: 760px) {
  .app-frame { display: block; }
  .sidebar { position: sticky; z-index: 20; width: 100%; height: auto; padding: 12px 15px; flex-direction: row; align-items: center; overflow-x: auto; }
  .brand { padding: 0 12px 0 0; flex: 0 0 auto; }
  .brand small, .sidebar-foot, .nav-item b { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .nav-list { flex-direction: row; }
  .nav-section { display: none; }
  .nav-item { width: auto; min-height: 40px; flex: 0 0 auto; padding: 6px 10px; }
  .nav-item.active { box-shadow: inset 0 -3px #7291ff; }
  .workspace { padding: 23px 16px 35px; }
  .topbar { align-items: center; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric-card { min-height: 132px; padding: 17px; }
  .agent-row { grid-template-columns: 39px minmax(120px, 1fr) auto auto; }
  .agent-meta { display: none; }
  .auth-layout { display: block; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 18px; }
  .auth-card { padding: 28px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2, .span-4 { grid-column: span 1; }
  .agent-section-grid { grid-template-columns: 1fr; }
  .agent-section-grid .span-2, .agent-section-grid .span-4 { grid-column: span 1; }
  .agent-tabs { margin-inline: -4px; }
  .preset-grid, .instruction-choice-grid, .instruction-check-grid, .destination-attended-settings { grid-template-columns: 1fr; }
  .context-accordion > summary, .context-accordion-body { padding: 13px 14px; }
  .agent-context-panel .context-hint-group { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .agent-tab { flex: 0 0 auto; }
  .agent-form-tabs { height: calc(100vh - 155px); min-height: 0; }
  .agent-edit-header { align-items: flex-start; flex-direction: column; }
  .agent-edit-page .agent-form-tabs { height: auto; min-height: calc(100vh - 150px); }
  .agent-edit-page .agent-tab-content { min-height: 480px; padding: 22px 16px 32px; }
  .agent-edit-page .agent-page-actions { bottom: 8px; margin: 0 10px 10px; }
  .agent-tab-panel > .form-grid > .field,
  .agent-tab-panel > .form-grid > .toggle-field,
  .agent-tab-panel > .form-grid > .span-4 { grid-column: span 1; }
  .agent-post-call-panel .form-grid > .field,
  .agent-post-call-panel .form-grid > .toggle-field,
  .agent-post-call-panel .form-grid > .span-4 { grid-column: span 1; }
  .tool-editor-grid { grid-template-columns: 1fr; }
  .tool-editor-grid > .field, .tool-editor-grid .span-2, .tool-editor-grid .span-4 { grid-column: span 1; }
  .tool-pairs, .tool-test-values { grid-column: span 1; }
  .tool-pair-row { grid-template-columns: 1fr 1fr 34px; }
  .tool-parameter-row { grid-template-columns: 1fr 1fr; }
  .tool-parameter-row .parameter-description { grid-column: span 2; }
  .tool-test-values > div { grid-template-columns: 1fr; }
  .tool-collection-head, .tool-editor-head { align-items: flex-start; }
  .destination-owned-row { grid-template-columns: minmax(0,1fr) auto; }
  .destination-owned-copy { grid-column: 1; justify-content: flex-start; }
  .destination-edit-button { grid-column: 2; grid-row: 1 / span 2; }
  .memory-manager > header { align-items: stretch; flex-direction: column; }
  .memory-manager-actions { width: 100%; align-items: flex-end; }
  .memory-number-search { width: auto; flex: 1 1 auto; }
  .quick-destination-backdrop, .credential-confirm-backdrop { padding: 10px; }
  .modal { max-height: calc(100vh - 18px); }
  #modal-content { padding: 20px; }
  .cards-grid, .call-control-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1/-1; }
  .detail-metrics, .evaluation-grid { grid-template-columns: 1fr 1fr; }
  .call-detail-layout { height: calc(100vh - 20px); max-height: calc(100vh - 20px); }
  .call-detail-scroll { padding: 20px; }
  .call-recording-dock { padding: 13px 20px; grid-template-columns: 1fr; gap: 10px; }
  .wizard-overview strong { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; }
  .theme-options { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .status-choice-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 122px; }
  .top-actions .icon-button { display: none; }
  .priority { grid-column: 2; justify-self: start; }
  .filter-bar { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .detail-metrics, .evaluation-grid, .review-summary { grid-template-columns: 1fr; }
  .wizard-overview { padding: 13px; }
  .wizard-overview > i { margin: 0 4px; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .nav-item, .metric-card, .row-action { transition: transform .16s ease, background-color .16s ease, border-color .16s ease; }
  .metric-card:hover { transform: translateY(-2px); }
}

.calendar-integrations-panel { padding: 28px; }
.calendar-integration-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; align-items: stretch; }
.calendar-integration-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); min-width: 0; }
.calendar-integration-card > header { display: flex; gap: 16px; align-items: center; min-height: 62px; }
.calendar-integration-card img { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; }
.calendar-integration-card h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.35; }
.calendar-integration-card > p, .calendar-privacy-note, .calendar-agent-toggle small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.calendar-integration-card > p { margin: 20px 0; }
.calendar-connection-status { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; color: var(--muted); }
.calendar-connection-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.calendar-connection-status.connected { color: #118568; }
.calendar-agent-toggle { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 22px; }
.calendar-agent-toggle input { flex: 0 0 18px; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--primary); }
.calendar-agent-toggle strong, .calendar-agent-toggle small { display: block; }
.calendar-agent-toggle strong { margin-bottom: 4px; font-size: 13px; }
.calendar-integration-card footer { margin-top: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding-top: 4px; }
.calendar-integration-card footer .button { justify-content: center; width: 100%; min-height: 42px; padding: 10px 12px; font-size: 13px; white-space: normal; }
.calendar-privacy-note { margin: 22px 0 0; }
.calendar-loading, .calendar-load-error { padding: 28px 0; color: var(--muted); }
.calendar-tool-note { margin: 0 0 22px; line-height: 1.6; color: var(--muted); font-size: 14px; }
.calendar-selection { margin: 0 0 20px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.calendar-selection > strong { font-size: 13px; }
.calendar-selection > p { margin: 8px 0 12px; font-size: 13px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.calendar-selection .button { font-size: 12px; min-height: 36px; padding: 8px 12px; }
.calendar-choice-list { display: grid; gap: 12px; max-height: 280px; overflow-y: auto; margin: 16px 0; }
.calendar-choice-list label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; overflow-wrap: anywhere; }
.calendar-choice-list input { width: 17px; height: 17px; flex: 0 0 17px; margin: 3px 0 0; accent-color: var(--primary); }
.calendar-choice-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
@media (max-width: 800px) { .calendar-integration-grid { grid-template-columns: 1fr; } .calendar-integrations-panel { padding: 18px; } }
