:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-muted: #f8fafc;
  --line: #e4e9f0;
  --line-strong: #d5dde8;
  --text: #26364a;
  --text-strong: #142238;
  --muted: #758398;
  --muted-2: #97a3b3;
  --blue: #246bfe;
  --blue-dark: #1857d8;
  --blue-soft: #eaf2ff;
  --cyan: #18a8d8;
  --green: #18a875;
  --green-soft: #e8f8f2;
  --amber: #d58b18;
  --amber-soft: #fff6e5;
  --red: #d94b58;
  --red-soft: #fff0f2;
  --violet: #7857e8;
  --violet-soft: #f1edff;
  --pink: #bc4c88;
  --pink-soft: #fff0f7;
  --rail: #ffffff;
  --shadow-popover: 0 14px 38px rgba(26, 44, 72, .14), 0 2px 8px rgba(26, 44, 72, .08);
  --radius: 10px;
  --font-caption: 12px;
  --font-small: 13px;
  --font-control: 14px;
  --font-body: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--font-body);
  line-height: 1.45;
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea {
  font: inherit;
  font-family: inherit;
  font-synthesis: none;
}
button { border: 0; }
a { color: inherit; text-decoration: none; }
svg { fill: currentColor; display: block; shape-rendering: geometricPrecision; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Authentication */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, .78fr) minmax(520px, 1.22fr); background: #fff; }
.auth-brand-panel { position: relative; min-height: 100vh; padding: 34px 42px; display: flex; flex-direction: column; color: #fff; overflow: hidden; background: #12203a; }
.auth-brand-panel::before { content: ""; position: absolute; inset: auto -15% -25% 5%; height: 60%; background: radial-gradient(circle, rgba(56,131,255,.28), transparent 65%); pointer-events: none; }
.auth-brand { position: relative; display: flex; align-items: center; gap: 10px; }
.auth-brand-logo { width: min(320px, 88%); height: auto; display: block; object-fit: contain; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; box-shadow: inset 0 1px rgba(255,255,255,.2); }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: var(--font-body); }
.auth-brand small { margin-top: 1px; color: #93a9ca; font-size: var(--font-caption); font-weight: 700; letter-spacing: .16em; }
.auth-product-copy { position: relative; margin: auto 0; max-width: 560px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: var(--font-small); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.light { color: #7bb0ff; }
.auth-product-copy h1 { margin: 0; font-size: clamp(36px, 4vw, 58px); line-height: 1.03; letter-spacing: -.045em; }
.auth-product-copy h1 span { color: #8cb9ff; }
.auth-product-copy > p:last-child { max-width: 500px; margin: 20px 0 0; color: #adbad0; font-size: var(--font-body); line-height: 1.7; }
.auth-capabilities { position: relative; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-capabilities span { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; color: #c9d5e7; background: rgba(255,255,255,.045); font-size: var(--font-control); font-weight: 700; }
.auth-capabilities svg { width: 13px; }
.auth-form-panel { min-height: 100vh; display: grid; place-items: center; padding: 36px; background: #f8fafc; }
.auth-card { width: min(390px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 18px 60px rgba(36,54,82,.08); }
.auth-card-head { margin-bottom: 22px; }
.auth-card-head h2 { margin: 0; color: var(--text-strong); font-size: 26px; letter-spacing: -.035em; }
.auth-card-head > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: var(--font-control); }
.form-stack { display: grid; gap: 14px; }
.form-stack label, .form-grid label { display: grid; gap: 6px; color: #435269; font-size: var(--font-control); font-weight: 700; }
.form-stack input, .form-grid input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); outline: none; transition: border-color .14s, box-shadow .14s; }
.form-stack input:focus, .form-grid input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,254,.11); }

/* Shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 108px minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 50; top: 0; height: 100vh; padding: 8px 7px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--rail); border-right: 1px solid var(--line); }
.rail-brand, .rail-account { display: grid; place-items: center; border-radius: 10px; cursor: pointer; }
.rail-brand { width: 94px; height: 48px; margin-bottom: 8px; padding: 4px 5px; background: #fff; border: none; box-shadow: none; overflow: hidden; }
.rail-brand img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.rail-account { width: 42px; height: 42px; }
.rail-nav { width: 100%; display: grid; gap: 4px; }
.nav-item { position: relative; width: 44px; height: 40px; margin: 0 auto; display: grid; place-items: center; border-radius: 8px; background: transparent; color: #6d7c91; cursor: pointer; transition: background .14s, color .14s; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { color: var(--blue); background: #f2f6fc; }
.nav-item.active { color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(36,107,254,.08); }
.rail-spacer { flex: 1; }
.rail-health { width: 40px; height: 32px; display: grid; place-items: center; }
.rail-health i, .connection-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(24,168,117,.1); }
.rail-account { margin-top: 2px; background: #eef3f9; color: #38516f; border: 1px solid #dfe6ef; }
.rail-account span { font-size: var(--font-caption); font-weight: 700; }
.workspace { min-width: 0; }
.topbar { position: sticky; z-index: 35; top: 0; height: 58px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar-title { min-width: 0; display: flex; align-items: baseline; gap: 11px; }
.topbar-title h1 { margin: 0; color: var(--text-strong); font-size: 20px; letter-spacing: -.02em; }
.topbar-title > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--font-control); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.connection-pill { min-height: 30px; padding: 0 9px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #617187; font-size: var(--font-small); font-weight: 700; }
.content { width: 100%; padding: 12px 14px 20px; }
.mobile-nav { display: none; }

/* Shared components */
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 1px 1px rgba(29,46,73,.02); }
.panel-head { min-height: 52px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; color: var(--text-strong); font-size: var(--font-body); letter-spacing: -.015em; }
.panel-head div > span { display: block; margin-top: 2px; color: var(--muted); font-size: var(--font-small); }
.panel-body { padding: 12px 14px; }
.compact-stack { display: grid; gap: 10px; }
.btn { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; cursor: pointer; font-size: var(--font-control); font-weight: 700; white-space: nowrap; transition: background .14s, border-color .14s, color .14s, box-shadow .14s; }
.btn svg { width: 14px; height: 14px; }
.btn.compact { min-height: 32px; padding: 0 10px; }
.btn.wide { width: 100%; }
.btn.primary { color: #fff; background: var(--blue); box-shadow: 0 2px 6px rgba(36,107,254,.18); }
.btn.primary:hover { background: var(--blue-dark); }
.btn.secondary { color: #43546b; background: #fff; border: 1px solid var(--line-strong); }
.btn.secondary:hover { border-color: #b7c5d7; background: #f8fafc; color: #1f4f9f; }
.btn.danger-solid { color: #fff; background: var(--red); }
.btn.danger-solid:hover { background: #c63c49; }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.button-group { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: #64758c; cursor: pointer; transition: background .14s, color .14s, border-color .14s; }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { color: var(--blue); border-color: #b9cae2; background: #f8fbff; }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.danger { color: #bc5561; }
.icon-btn.danger:hover { color: var(--red); border-color: #f0c7cc; background: var(--red-soft); }
.link-btn { padding: 0; display: inline-flex; align-items: center; gap: 3px; background: transparent; color: var(--blue); cursor: pointer; font-size: var(--font-small); font-weight: 700; }
.link-btn svg { width: 12px; }
.table-muted { color: var(--muted-2); font-size: var(--font-control); }
.quiet-state { padding: 18px; color: var(--muted); font-size: var(--font-control); text-align: center; }
.mini-divider { height: 1px; margin: 11px 0; background: var(--line); }
.skeleton-card { padding: 16px; display: grid; gap: 9px; }
.skeleton { height: 11px; border-radius: 5px; background: linear-gradient(90deg, #edf1f5 25%, #f8fafc 45%, #edf1f5 65%); background-size: 220% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* Overview */
.overview-loading { display: grid; gap: 12px; }
.metric-strip { margin-bottom: 12px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); overflow: hidden; }
.metric-cell { min-width: 0; min-height: 80px; padding: 13px 15px; display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 10px; align-items: start; border-right: 1px solid var(--line); }
.metric-cell:last-child { border-right: 0; }
.metric-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 3px; background: var(--blue); }
.metric-dot.cyan { background: var(--cyan); }
.metric-dot.violet { background: var(--violet); }
.metric-dot.green { background: var(--green); }
.metric-dot.red { background: var(--red); }
.metric-cell small, .metric-cell strong, .metric-cell span { display: block; }
.metric-cell small { color: var(--muted); font-size: var(--font-small); font-weight: 700; }
.metric-cell strong { margin-top: 2px; color: var(--text-strong); font-size: 26px; line-height: 1.08; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-cell span { margin-top: 4px; color: var(--muted-2); font-size: var(--font-small); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(280px, .75fr); gap: 12px; align-items: start; }
.overview-side { display: grid; gap: 12px; }
.distribution-row { display: grid; grid-template-columns: 106px minmax(60px,1fr) 32px; align-items: center; gap: 8px; }
.distribution-label { min-width: 0; display: flex; align-items: center; gap: 6px; }
.distribution-label strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--font-small); color: #46556a; }
.distribution-bar { height: 7px; border-radius: 4px; background: #edf1f5; overflow: hidden; }
.distribution-bar i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.distribution-bar .bar-1 { background: var(--violet); }
.distribution-bar .bar-2 { background: var(--green); }
.distribution-bar .bar-3 { background: var(--pink); }
.distribution-value { text-align: right; color: var(--muted); font-size: var(--font-small); font-variant-numeric: tabular-nums; }
.health-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.health-mini-grid > div { padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-muted); }
.health-mini-grid span, .health-mini-grid strong { display: block; }
.health-mini-grid span { color: var(--muted); font-size: var(--font-caption); }
.health-mini-grid strong { margin-top: 2px; color: var(--text-strong); font-size: var(--font-control); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-stat-row { min-height: 27px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mini-stat-row > span { display: flex; align-items: center; gap: 7px; color: #526176; font-size: var(--font-small); }
.mini-stat-row strong { color: var(--text-strong); font-size: var(--font-small); font-variant-numeric: tabular-nums; }
.source-bullet { width: 7px; height: 7px; border-radius: 3px; background: var(--blue); }
.source-bullet.source-sip { background: var(--amber); }
.source-bullet.source-rtp { background: var(--violet); }
.source-bullet.source-upload { background: var(--pink); }
.dashboard-view-picker, .dashboard-range-picker { position: relative; height: 34px; padding: 0 27px 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: #758399; }
.dashboard-view-picker > span, .dashboard-range-picker > span { font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.dashboard-view-picker select, .dashboard-range-picker select { height: 100%; padding: 0; border: 0; outline: 0; appearance: none; background: transparent; color: #35475e; font-size: var(--font-small); font-weight: 700; cursor: pointer; }
.dashboard-view-picker svg, .dashboard-range-picker svg { position: absolute; right: 7px; width: 12px; pointer-events: none; }
.team-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(280px,.7fr); gap: 12px; align-items: start; }
.team-attention-list, .team-agent-list { display: grid; }
.team-attention-row { min-height: 66px; padding: 9px 11px; display: grid; grid-template-columns: 34px minmax(150px,1fr) minmax(150px,.7fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid #e9edf2; }
.team-attention-row:last-child, .team-agent-row:last-child { border-bottom: 0; }
.attention-indicator { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--amber-soft); color: #a66a0f; font-size: var(--font-small); font-weight: 700; }
.attention-indicator svg { width: 15px; }
.attention-indicator.critical { background: var(--red-soft); color: var(--red); }
.attention-call, .attention-owner { min-width: 0; display: grid; gap: 3px; }
.attention-call strong, .attention-owner strong { overflow: hidden; color: var(--text-strong); font-size: var(--font-small); text-overflow: ellipsis; white-space: nowrap; }
.attention-call span { overflow: hidden; color: #a05244; font-size: var(--font-caption); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.attention-owner .case-status { min-height: 22px; padding: 0 6px; font-size: 11px; }
.team-clear-state { min-height: 112px; padding: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #258164; text-align: left; }
.team-clear-state > svg { width: 25px; }
.team-clear-state div { display: grid; gap: 3px; }
.team-clear-state strong { color: #236e59; font-size: var(--font-small); }
.team-clear-state span { color: var(--muted); font-size: var(--font-caption); }
.team-outcome-row { min-height: 31px; display: grid; grid-template-columns: minmax(110px,1fr) minmax(70px,1fr) 24px; align-items: center; gap: 8px; }
.team-outcome-row > span { overflow: hidden; color: #526176; font-size: var(--font-small); text-overflow: ellipsis; white-space: nowrap; }
.team-outcome-row > i { height: 6px; overflow: hidden; border-radius: 999px; background: #edf1f5; }
.team-outcome-row > i b { display: block; height: 100%; min-width: 0; border-radius: inherit; background: var(--blue); }
.team-outcome-row > i .outcome-resolved { background: var(--green); }
.team-outcome-row > i .outcome-follow_up { background: var(--amber); }
.team-outcome-row > i .outcome-escalated { background: var(--red); }
.team-outcome-row > strong { color: var(--text-strong); font-size: var(--font-small); text-align: right; }
.team-agent-row { min-height: 64px; padding: 8px 11px; display: grid; grid-template-columns: 32px minmax(150px,1fr) repeat(4,minmax(54px,70px)); align-items: center; gap: 9px; border-bottom: 1px solid #e9edf2; }
.team-agent-row > .agent-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #edf3fb; color: #456382; font-size: var(--font-caption); font-weight: 700; }
.team-agent-row > div { min-width: 0; display: grid; gap: 2px; }
.team-agent-row > div strong { overflow: hidden; color: var(--text-strong); font-size: var(--font-small); text-overflow: ellipsis; white-space: nowrap; }
.team-agent-row > div small, .team-agent-row > span:not(.agent-avatar) small { color: var(--muted); font-size: 11px; }
.team-agent-row > span:not(.agent-avatar) { min-width: 0; display: grid; gap: 2px; text-align: right; }
.team-agent-row > span:not(.agent-avatar) b { color: #43546a; font-size: var(--font-small); font-variant-numeric: tabular-nums; }
.team-agent-row > span.needs-attention b { color: var(--red); }
.team-coaching-list { padding: 5px 10px 9px; display: grid; }
.coaching-item { min-height: 43px; padding: 0 4px; display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid #edf1f5; color: #526176; }
.coaching-item:last-child { border-bottom: 0; }
.coaching-item > i { width: 8px; height: 8px; border-radius: 3px; background: var(--blue); }
.coaching-item > i.red { background: var(--red); }
.coaching-item > i.amber { background: var(--amber); }
.coaching-item > span { overflow: hidden; font-size: var(--font-small); text-overflow: ellipsis; white-space: nowrap; }
.coaching-item > strong { color: var(--text-strong); font-size: var(--font-body); }
.team-recent-panel { grid-column: 1 / -1; }
.agent-dashboard-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(280px,.65fr); gap: 12px; align-items: start; }
.agent-follow-up-list, .agent-promise-list, .agent-quality-list { display: grid; }
.agent-follow-up-row { min-height: 62px; padding: 9px 11px; display: grid; grid-template-columns: minmax(150px,1fr) auto auto; align-items: center; gap: 10px; border-bottom: 1px solid #e9edf2; }
.agent-follow-up-row:last-child, .agent-promise-row:last-child { border-bottom: 0; }
.agent-follow-up-row > div { min-width: 0; display: grid; gap: 3px; }
.agent-follow-up-row > div strong, .agent-follow-up-row > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-follow-up-row > div strong { color: var(--text-strong); font-size: var(--font-small); }
.agent-follow-up-row > div span { color: #9a5947; font-size: var(--font-caption); }
.agent-quality-list { padding: 8px 11px 11px; gap: 9px; }
.agent-quality-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; align-items: center; }
.agent-quality-row > span { color: #5f6f84; font-size: var(--font-caption); font-weight: 700; }
.agent-quality-row > strong { color: var(--text-strong); font-size: var(--font-small); font-variant-numeric: tabular-nums; }
.agent-quality-row > i { height: 6px; grid-column: 1 / 3; overflow: hidden; border-radius: 999px; background: #edf1f5; }
.agent-quality-row > i b { display: block; height: 100%; border-radius: inherit; }
.agent-quality-row > i b.good { background: var(--green); }
.agent-quality-row > i b.warn { background: var(--amber); }
.agent-quality-row > i b.bad { background: var(--red); }
.agent-quality-row > i b.neutral { background: #a5b0bd; }
.panel-count { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: #edf2f8; color: #58708a; font-size: var(--font-caption); text-align: center; }
.agent-promise-row { min-height: 53px; padding: 8px 11px; display: grid; grid-template-columns: 25px minmax(0,1fr) 13px; align-items: center; gap: 9px; border-bottom: 1px solid #e9edf2; background: transparent; cursor: pointer; text-align: left; }
.agent-promise-row:hover { background: #f8fbff; }
.agent-promise-row > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--green-soft); color: #1b8161; }
.agent-promise-row > span svg, .agent-promise-row > svg { width: 12px; }
.agent-promise-row > div { min-width: 0; display: grid; gap: 3px; }
.agent-promise-row strong, .agent-promise-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-promise-row strong { color: #3f5065; font-size: var(--font-small); }
.agent-promise-row small { color: var(--muted); font-size: var(--font-caption); }
.agent-promise-row > svg { color: #91a0b2; }
.agent-recent-panel { grid-column: 1 / -1; }

/* Operations overview */
.operations-metric-strip { margin-bottom: 10px; }
.operations-metric-strip .metric-cell { min-height: 82px; padding-top: 12px; padding-bottom: 12px; }
.operations-metric-strip .metric-cell strong { font-size: 24px; }

.operations-overview-grid { margin-bottom: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-items: stretch; }
.overview-signals-panel, .overview-system-panel { min-height: 226px; display: flex; flex-direction: column; overflow: hidden; }
.overview-signals-panel .panel-head, .overview-system-panel .panel-head { min-height: 54px; padding-top: 10px; padding-bottom: 10px; }
.overview-signal-list, .overview-system-list { padding: 2px 14px 8px; display: grid; flex: 1; }
.overview-signal-row, .overview-system-row { min-height: 41px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #edf1f5; }
.overview-signal-row:last-child, .overview-system-row:last-child { border-bottom: 0; }
.overview-signal-row > span, .overview-system-row > span { min-width: 0; display: flex; align-items: center; gap: 8px; color: #65758a; font-size: var(--font-small); font-weight: 600; }
.overview-signal-row > span i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #c6ced8; }
.overview-signal-row > strong { color: #7f8c9c; font-size: var(--font-small); font-weight: 700; font-variant-numeric: tabular-nums; }
.overview-signal-row.active > strong { color: var(--text-strong); }
.overview-signal-row.active.signal-emergency > span i { background: #c4525f; }
.overview-signal-row.active.signal-service > span i { background: #b08738; }
.overview-signal-row.active.signal-safety > span i { background: #b67845; }
.overview-signal-row.active.signal-equipment > span i { background: #5d83b4; }

.overview-system-row > strong { display: inline-flex; align-items: center; gap: 7px; color: #526176; font-size: var(--font-small); font-weight: 700; text-align: right; }
.overview-system-row > strong i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #9ba8b7; }
.overview-system-row > strong.good { color: #26725b; }
.overview-system-row > strong.good i { background: var(--green); }
.overview-system-row > strong.warn { color: #8a651f; }
.overview-system-row > strong.warn i { background: var(--amber); }
.overview-system-row > strong.bad { color: #a44550; }
.overview-system-row > strong.bad i { background: var(--red); }
.overview-panel-note { margin: -2px 14px 10px; color: var(--muted); font-size: var(--font-caption); }

.overview-recent-panel { overflow: hidden; }
.overview-recent-panel .panel-head { min-height: 54px; padding-top: 10px; padding-bottom: 10px; }
.overview-recent-table { table-layout: fixed; }
.overview-recent-table thead th { height: 36px; padding-left: 12px; padding-right: 12px; }
.overview-recent-table tbody td { height: 52px; padding: 6px 12px; }
.overview-recent-table th.play-col, .overview-recent-table td.play-col { width: 46px; padding-left: 12px; padding-right: 4px; }
.overview-recent-table th:nth-child(2) { width: 165px; }
.overview-recent-table th:nth-child(3) { width: auto; }
.overview-recent-table th:nth-child(4) { width: 116px; }
.overview-recent-table th:nth-child(5) { width: 92px; }
.overview-recent-table th:nth-child(6) { width: 104px; }
.overview-call-route { min-width: 0; display: flex; align-items: center; gap: 8px; color: #8793a2; }
.overview-call-route strong { min-width: 0; max-width: 42%; overflow: hidden; color: #405167; font-size: var(--font-small); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.overview-call-route span { flex: 0 0 auto; color: #a2acb8; font-size: var(--font-small); }
.overview-recent-table .date-cell strong { font-size: var(--font-small); }
.overview-recent-table .date-cell span { margin-top: 1px; }

@media (max-width: 960px) {
  .operations-overview-grid { grid-template-columns: 1fr; }
  .overview-signals-panel, .overview-system-panel { min-height: 0; }
}

@media (max-width: 720px) {
  .operations-metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .operations-metric-strip .metric-cell:nth-child(2) { border-right: 0; }
  .operations-metric-strip .metric-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .overview-recent-table { min-width: 650px; }
}

@media (max-width: 460px) {
  .operations-metric-strip { grid-template-columns: 1fr; }
  .operations-metric-strip .metric-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .operations-metric-strip .metric-cell:last-child { border-bottom: 0; }
}

/* Table / recordings */
.recordings-workspace { overflow: visible; }
.table-toolbar { min-height: 50px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 9px; border-bottom: 1px solid var(--line); background: #fbfcfe; border-radius: 10px 10px 0 0; }
.recordings-toolbar { margin: 0; }
.toolbar-main, .toolbar-actions { display: flex; align-items: center; gap: 7px; min-width: 0; }
.toolbar-main { flex: 1; }
.search-field { min-width: 250px; max-width: 510px; height: 34px; flex: 1; display: flex; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: #8795a7; }
.search-field svg { width: 14px; flex: 0 0 auto; }
.search-field input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: var(--font-control); }
.search-field input::placeholder { color: #a0aab8; }
.search-field kbd { padding: 2px 5px; border: 1px solid #e0e6ee; border-radius: 4px; background: #f6f8fb; color: #8d98a7; font-size: var(--font-caption); font-family: inherit; }
.search-field.small { min-width: 180px; max-width: 310px; height: 32px; }
.compact-select { position: relative; min-width: 104px; height: 34px; padding: 0 27px 0 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: #66778d; }
.compact-select > svg:first-child { width: 13px; }
.compact-select > svg:last-child { position: absolute; right: 7px; width: 12px; pointer-events: none; }
.compact-select > span { color: #8995a5; font-size: var(--font-caption); font-weight: 700; }
.compact-select select { min-width: 0; max-width: 130px; height: 100%; border: 0; outline: 0; appearance: none; background: transparent; color: #46566b; font-size: var(--font-small); font-weight: 700; cursor: pointer; }
.sort-select { min-width: 112px; }
.filter-button span { min-width: 19px; height: 19px; padding: 0 4px; display: grid; place-items: center; border-radius: 5px; background: var(--blue); color: #fff; font-size: var(--font-caption); }
.filter-button.active { color: var(--blue); border-color: #c7d8f2; background: #f5f9ff; }
.table-summary { min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--font-small); }
.table-summary strong { color: var(--text-strong); }
.table-scroll { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table thead th { height: 40px; padding: 0 10px; position: sticky; top: 0; z-index: 2; background: #f8fafc; border-bottom: 1px solid var(--line); color: #5d6c80; text-align: left; font-size: var(--font-caption); font-weight: 700; letter-spacing: .025em; text-transform: uppercase; }
.data-table tbody td { height: 60px; padding: 7px 10px; border-bottom: 1px solid #e9edf2; color: #4b5b70; font-size: var(--font-small); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.recording-table-row { cursor: pointer; transition: background .12s; }
.recording-table-row:hover { background: #f8fbff; }
.data-table th.play-col, .data-table td.play-col { width: 45px; padding-left: 10px; padding-right: 5px; }
.data-table th:nth-child(2) { width: 138px; }
.data-table th:nth-child(3) { width: 28%; }
.data-table th:nth-child(4) { width: 90px; }
.data-table th:nth-child(5) { width: 155px; }
.data-table th:nth-child(6) { width: 82px; }
.data-table th:nth-child(7) { width: 100px; }
.data-table th.actions-col, .data-table td.actions-col { width: 43px; text-align: right; }
.data-table .numeric { text-align: right; }
.table-play, .table-action { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; cursor: pointer; transition: background .12s, color .12s, border-color .12s; }
.table-play { color: #4b6e9f; background: #f2f6fb; border: 1px solid #dfe6ef; }
.table-play:hover { color: #fff; background: var(--blue); border-color: var(--blue); }
.table-play svg { width: 13px; }
.table-action { margin-left: auto; color: #7a8798; background: transparent; }
.table-action:hover { color: var(--blue); background: var(--blue-soft); }
.table-action svg { width: 15px; }
.date-cell strong, .date-cell span, .participant-cell strong, .participant-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-cell strong { color: #35465d; font-size: var(--font-small); }
.date-cell span { margin-top: 2px; color: var(--muted-2); font-size: var(--font-caption); }
.participant-cell strong { color: var(--text-strong); font-size: var(--font-control); }
.participant-cell span { margin-top: 2px; color: var(--muted-2); font-size: var(--font-caption); }
.source-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; border-radius: 6px; background: #eef3f8; color: #526b88; font-size: var(--font-caption); font-weight: 700; }
.source-tag.source-siprec { background: #eaf2ff; color: #2b65ba; }
.source-tag.source-sip { background: var(--amber-soft); color: #a66a0f; }
.source-tag.source-rtp { background: var(--violet-soft); color: #6b4bc2; }
.source-tag.source-upload { background: var(--pink-soft); color: #a44878; }
.language-cell, .language-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.language-badge { min-height: 24px; padding: 0 8px; display: inline-flex; align-items: center; border-radius: 999px; background: #eef4fb; color: #5c6c81; border: 1px solid rgba(79,98,122,.06); font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.language-badge.compact { min-width: 30px; min-height: 22px; padding: 0 6px; justify-content: center; font-size: var(--font-caption); }
.language-badge.lang-en { background: #eaf3ff; color: #2364bf; }
.language-badge.lang-zh { background: #f1ebff; color: #704ac5; }
.language-badge.lang-ms { background: #e7f8f3; color: #147962; }
.language-badge.lang-ta { background: #fff0f7; color: #a44174; }
.duration-cell { color: #4d5d72 !important; font-variant-numeric: tabular-nums; }
.status-badge { min-height: 24px; padding: 0 7px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.status-badge i { width: 5px; height: 5px; border-radius: 50%; }
.status-ready { color: #117251; background: var(--green-soft); }.status-ready i { background: var(--green); }
.status-recording { color: #b33c45; background: var(--red-soft); }.status-recording i { background: var(--red); animation: blink 1.3s infinite; }
.status-queued, .status-transcribing { color: #2361bb; background: var(--blue-soft); }.status-queued i, .status-transcribing i { background: var(--blue); }
.status-failed { color: #b73d49; background: var(--red-soft); }.status-failed i { background: var(--red); }
@keyframes blink { 50% { opacity: .3; } }
.sort-head { padding: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.sort-head:hover { color: var(--blue); }
.compact-table tbody td { height: 51px; }
.compact-table th:nth-child(3) { width: 34%; }
.pagination-bar { min-height: 48px; padding: 0 10px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--font-small); background: #fbfcfe; border-radius: 0 0 10px 10px; }
.results-count { margin-right: auto; }
.pagination-controls { display: flex; align-items: center; gap: 8px; }
.pagination-controls strong { color: var(--text-strong); }
.pager-btn { width: 27px; height: 27px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: #5b6b80; cursor: pointer; font-size: 16px; }
.pager-btn:hover:not(:disabled) { color: var(--blue); background: #f7faff; }
.pager-btn:disabled { opacity: .4; cursor: default; }
.page-size { display: flex; align-items: center; gap: 6px; }
.page-size select { height: 32px; padding: 0 20px 0 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; color: #526176; outline: none; font-size: var(--font-small); }
.empty-state { min-height: 190px; padding: 26px; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; }
.empty-icon, .error-state-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.empty-icon svg, .error-state-icon svg { width: 17px; }
.empty-state h3, .error-state h2 { margin: 0; color: var(--text-strong); font-size: var(--font-body); }
.empty-state p, .error-state p { margin: 3px 0 0; color: var(--muted); font-size: var(--font-small); }

/* Recording detail */
.recording-header-row { min-height: 50px; margin-bottom: 12px; padding: 0 2px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 13px; }
.back-link { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: #617187; cursor: pointer; }
.back-link span { display: none; }
.back-link svg { width: 14px; }
.back-link:hover { color: var(--blue); border-color: #bfd0e8; }
.recording-heading { min-width: 0; }
.recording-heading-top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.recording-heading-top h2 { max-width: min(720px, 70vw); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); font-size: 20px; letter-spacing: -.025em; }
.recording-meta-inline { margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: var(--font-small); }
.recording-meta-inline i { width: 3px; height: 3px; border-radius: 50%; background: #c1c9d4; }
.recording-header-actions { justify-self: end; }
.recording-header-actions .button-group { flex-wrap: wrap; justify-content: flex-end; }
.alert { min-height: 46px; margin-bottom: 10px; padding: 9px 11px; display: flex; align-items: flex-start; gap: 9px; border-radius: 8px; }
.alert > span svg { width: 15px; }
.alert strong { display: block; font-size: var(--font-small); }
.alert p { margin: 2px 0 0; font-size: var(--font-small); }
.alert.error { border: 1px solid #f1ccd0; background: var(--red-soft); color: #ad3d48; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 10px; align-items: start; }
.recording-summary-layout { margin-bottom: 16px; display: grid; grid-template-columns: minmax(0,1.9fr) minmax(360px,.9fr); gap: 16px; align-items: stretch; }
.recording-summary-layout.no-ai { grid-template-columns: minmax(0,1fr); }
.recording-summary-layout .call-intelligence-panel { height: 100%; margin-bottom: 0; }
.recording-summary-layout .ai-live-summary { justify-content: space-between; }
.recording-summary-aside { min-width: 0; display: flex; }
.recording-call-details { width: 100%; height: 100%; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.recording-call-details .panel-head { min-height: 56px; padding: 12px 16px; background: #fff; }
.recording-call-details .metadata-list { flex: 1; }
.recording-call-details .call-details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(52px,1fr); }
.recording-call-details .call-details-grid > div { min-height: 52px; padding: 9px 14px; display: grid; grid-template-columns: 1fr; align-content: center; gap: 4px; border-bottom: 1px solid #eef2f6; }
.recording-call-details .call-details-grid > div:nth-child(odd):not(.wide) { border-right: 1px solid #eef2f6; }
.recording-call-details .call-details-grid > div.wide { grid-column: 1 / -1; min-height: 48px; }
.recording-call-details .call-details-grid dt { color: #7b899b; font-weight: 600; }
.recording-call-details .call-details-grid dd { color: #405167; font-weight: 500; text-align: left; }
.recording-call-details .call-details-grid .direction-badge { justify-self: start; }
.call-quality-inline { margin: 8px 14px 14px; padding: 10px 12px; border: 1px solid #edf1f5; border-radius: 9px; background: #fafbfd; }
.call-quality-inline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.call-quality-inline-head > span { color: #68798f; font-size: var(--font-caption); font-weight: 700; }
.call-quality-inline .quality-score { font-size: var(--font-caption); }
.call-quality-inline p { margin: 6px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #7b899a; font-size: var(--font-caption); }
.call-quality-inline p i { width: 3px; height: 3px; border-radius: 50%; background: #c7d0db; }

.transcript-panel { overflow: hidden; background: #fff; }
.transcript-head { min-height: 50px; }
.player { min-height: 54px; margin: 0; padding: 0; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; border: 0; border-radius: 0; background: transparent; }
.play-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(36,107,254,.2); }
.play-btn:hover { background: var(--blue-dark); }
.play-btn svg { width: 13px; }
.player-main { min-width: 0; }
.progress { position: relative; height: 5px; border-radius: 999px; background: #dfe6ef; cursor: pointer; overflow: hidden; }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); }
.player-time { margin-top: 5px; display: flex; align-items: center; justify-content: space-between; color: #8390a1; font-size: var(--font-caption); font-variant-numeric: tabular-nums; }
.transcript-toolbar { min-height: 50px; padding: 8px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.transcript-toolbar .search-field { margin-right: auto; }
.transcript-toolbar .compact-select { height: 32px; }
.translation-view-select { min-width: 112px; }
.translation-target-select { min-width: 126px; }
.compact-select.disabled { opacity: .55; background: #f6f8fa; }
.compact-select.disabled select { cursor: not-allowed; }
.translation-status { min-height: 22px; padding: 0 7px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; white-space: nowrap; font-size: 8px; font-weight: 700; }
.translation-status i { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; }
.translation-status.working { color: #2361bb; background: var(--blue-soft); }
.translation-status.working i { background: var(--blue); animation: blink 1.3s infinite; }
.translation-status.ready { color: #117251; background: var(--green-soft); }
.translation-status.ready i { background: var(--green); }
.translation-status.failed { color: #b73d49; background: var(--red-soft); }
.translation-status.failed i { background: var(--red); }
.translation-status.unavailable { color: #68788c; background: #f1f4f7; }
.translation-status.unavailable i { background: #8d99a8; }
.transcript { padding: 0; }
.transcript-line { width: 100%; min-height: 52px; padding: 10px 12px; display: grid; grid-template-columns: 64px 92px minmax(0,1fr) 74px; align-items: start; gap: 12px; border-radius: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; border-bottom: 1px solid #edf0f4; transition: background .11s; }
.transcript-line:last-child { border-bottom: 0; }
.transcript-line:hover { background: #f8fbff; }
.transcript-line.playing { background: #f0f6ff; box-shadow: inset 3px 0 0 var(--blue); }
.transcript-time { padding-top: 4px; color: #8b98a8; font-size: var(--font-caption); font-variant-numeric: tabular-nums; }
.speaker { max-width: 100%; min-height: 24px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; justify-self: start; overflow: hidden; border-radius: 6px; font-size: var(--font-caption); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.speaker-0 { background: #eee8ff; color: #6546bb; }.speaker-1 { background: #e7f2ff; color: #2564b3; }.speaker-2 { background: #e7f8f2; color: #15745f; }.speaker-3 { background: #fff0e7; color: #a56323; }
.transcript-text { padding: 1px 0; color: #2c3b50; font-size: var(--font-body); line-height: 1.65; overflow-wrap: anywhere; }
.transcript-turn .transcript-text { font-weight: 500; }
.transcript-turn .segment-language { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segment-language { padding-top: 4px; color: #8693a3; text-align: right; font-size: var(--font-caption); font-weight: 700; letter-spacing: .03em; }
.transcript-empty { min-height: 120px; display: grid; place-items: center; }
.detail-aside { display: grid; gap: 10px; }
.compact-panel .panel-head { min-height: 48px; }
.metadata-list { margin: 0; }
.metadata-list > div { min-height: 37px; padding: 7px 11px; display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; gap: 9px; border-bottom: 1px solid #edf0f4; }
.metadata-list > div:last-child { border-bottom: 0; }
.metadata-list dt { color: var(--muted); font-size: var(--font-caption); font-weight: 700; }
.metadata-list dd { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3f4f64; font-size: var(--font-small); text-align: right; }
.stream-list { padding: 2px 0; }
.stream-row { min-height: 62px; padding: 8px 10px; display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid #edf0f4; }
.stream-row:last-child { border-bottom: 0; }
.stream-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #edf3fb; color: #47617f; font-size: var(--font-caption); font-weight: 700; }
.stream-main { min-width: 0; }
.stream-main strong, .stream-main span, .stream-main small, .stream-format strong, .stream-format span { display: block; }
.stream-main strong { color: #35455a; font-size: var(--font-small); }
.stream-main span { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: var(--font-caption); }
.stream-main small { margin-top: 3px; font-size: var(--font-caption); font-weight: 700; }
.stream-quality.good { color: #16805f; }.stream-quality.warn { color: #a56b13; }.stream-quality.bad { color: var(--red); }
.stream-format { text-align: right; }
.stream-format strong { color: #53647a; font-size: var(--font-caption); }
.stream-format span { margin-top: 2px; color: var(--muted-2); font-size: var(--font-caption); }

/* Upload */
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr); gap: 12px; align-items: start; }
.upload-form { padding: 12px 14px 14px; }
.dropzone { min-height: 118px; padding: 15px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px dashed #b9c8da; border-radius: 8px; background: #fafcff; cursor: pointer; transition: border-color .14s, background .14s; text-align: left; }
.dropzone:hover { border-color: #7ba9ee; background: #f5f9ff; }
.dropzone input { display: none; }
.drop-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.drop-icon svg { width: 18px; }
.dropzone strong, .dropzone span, .dropzone small { display: block; }
.dropzone strong { color: var(--text-strong); font-size: 15px; }
.dropzone span { margin-top: 3px; color: var(--muted); font-size: var(--font-small); }
.dropzone small { margin-top: 7px; color: var(--blue); font-size: var(--font-caption); font-weight: 700; }
.form-grid { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
.process-list { margin: 0; padding: 5px 12px 10px; list-style: none; }
.process-list li { min-height: 58px; padding: 9px 2px; display: grid; grid-template-columns: 25px minmax(0,1fr); gap: 9px; border-bottom: 1px solid #edf0f4; }
.process-list li:last-child { border-bottom: 0; }
.process-list b { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: var(--font-caption); }
.process-list strong, .process-list span { display: block; }
.process-list strong { color: #3b4b60; font-size: var(--font-small); }
.process-list span { margin-top: 3px; color: var(--muted); font-size: var(--font-caption); line-height: 1.5; }

/* Integrations */
.integration-panel { overflow: hidden; }
.integration-list { display: grid; }
.integration-row { min-height: 90px; padding: 11px 13px; display: grid; grid-template-columns: 38px minmax(220px,1.1fr) minmax(220px,.9fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.integration-row:last-child { border-bottom: 0; }
.integration-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-size: var(--font-caption); font-weight: 700; }
.integration-icon.cyan { background: var(--cyan); }.integration-icon.violet { background: var(--violet); }.integration-icon.pink { background: var(--pink); }
.integration-main { min-width: 0; }
.integration-name { display: flex; align-items: center; gap: 6px; }
.integration-name strong { color: var(--text-strong); font-size: var(--font-control); }
.integration-name span { color: var(--muted); font-size: var(--font-caption); }
.integration-name em { margin-left: 2px; padding: 2px 5px; border-radius: 999px; background: var(--green-soft); color: #147454; font-size: var(--font-caption); font-style: normal; font-weight: 700; }
.integration-main p { margin: 5px 0 0; color: var(--muted); font-size: var(--font-caption); line-height: 1.5; }
.integration-endpoint { min-width: 0; }
.integration-endpoint code, .integration-endpoint span { display: block; }
.integration-endpoint code { padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 5px; background: #f1f4f8; color: #39506c; font-size: var(--font-caption); }
.integration-endpoint span { margin-top: 4px; color: var(--muted-2); font-size: var(--font-caption); }
.integration-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pipeline-panel { margin-top: 12px; }
.pipeline-flow { padding: 12px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #5b6b80; font-size: var(--font-caption); }
.pipeline-flow span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #f9fbfd; font-weight: 700; }
.pipeline-flow b { color: #9aa6b5; }
.code-result { max-height: 230px; margin: 0 12px 12px; padding: 10px; overflow: auto; border-radius: 7px; background: #17243a; color: #cfdaea; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: var(--font-caption); line-height: 1.6; }

/* System */
.system-strip { margin-bottom: 12px; }
.system-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .72fr); gap: 12px; align-items: start; }
.service-table th:nth-child(1) { width: 25%; }.service-table th:nth-child(2) { width: 90px; }.service-table th:nth-child(3) { width: 42%; }.service-table th:nth-child(4) { width: 110px; }
.service-table tbody td, .failure-table tbody td { height: 48px; }
.service-name { display: flex; align-items: center; gap: 8px; }
.service-light { width: 7px; height: 7px; border-radius: 50%; }
.service-light.online { background: var(--green); box-shadow: 0 0 0 3px rgba(24,168,117,.1); }.service-light.offline { background: var(--red); }
.health-label { min-height: 24px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 999px; font-size: var(--font-caption); font-weight: 700; }
.health-label.good { color: #147454; background: var(--green-soft); }.health-label.bad { color: #b13e4a; background: var(--red-soft); }
.storage-body { padding: 18px 14px; }
.storage-progress { height: 9px; border-radius: 999px; overflow: hidden; background: #edf1f5; }
.storage-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.storage-numbers { margin-top: 12px; display: flex; align-items: baseline; justify-content: space-between; }
.storage-numbers strong { color: var(--text-strong); font-size: 20px; letter-spacing: -.035em; }
.storage-numbers span { color: var(--muted); font-size: var(--font-caption); }
.error-text { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9e4450 !important; }
.baseline-body { padding: 13px 14px 15px; }
.baseline-name { display: inline-flex; padding: 5px 7px; border-radius: 6px; background: var(--blue-soft); color: #2a61b5; font-size: var(--font-caption); font-weight: 700; }
.baseline-body p { margin: 8px 0 0; color: var(--muted); font-size: var(--font-caption); line-height: 1.55; }
.baseline-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.baseline-tags span { padding: 4px 6px; border-radius: 5px; background: #f2f5f8; color: #68788c; font-size: var(--font-caption); font-weight: 700; }


/* Cross-platform custom selects */
.custom-select-control {
  position: relative;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}
.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  white-space: nowrap !important;
}
.custom-select-trigger {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(#fff, #fcfdff);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: var(--font-small);
  text-align: left;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
  -webkit-tap-highlight-color: transparent;
}
.custom-select-trigger:hover:not([aria-disabled="true"]) { border-color: #b9c8d9; background: #fff; }
.custom-select-trigger:focus-visible {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(36,107,254,.11);
}
.custom-select-trigger[aria-disabled="true"] { cursor: not-allowed; opacity: .56; background: #f6f8fa; }
.custom-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.custom-select-trigger > svg {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  color: #7c8a9c;
}
.custom-select-trigger[aria-expanded="true"] > svg { transform: rotate(180deg); }
.custom-select-legacy-chevron { display: none !important; }

.compact-select.custom-select-inline-host,
.dashboard-view-picker.custom-select-inline-host,
.dashboard-range-picker.custom-select-inline-host { padding-right: 9px; }
.compact-select .custom-select-control,
.dashboard-view-picker .custom-select-control,
.dashboard-range-picker .custom-select-control { height: 100%; flex: 1 1 auto; width: auto; }
.compact-select .custom-select-trigger,
.dashboard-view-picker .custom-select-trigger,
.dashboard-range-picker .custom-select-trigger {
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.compact-select .custom-select-trigger { color: #46566b; font-size: var(--font-small); font-weight: 700; }
.dashboard-view-picker .custom-select-trigger,
.dashboard-range-picker .custom-select-trigger { color: #35475e; font-size: var(--font-small); font-weight: 700; }
.compact-select .custom-select-trigger > svg,
.dashboard-view-picker .custom-select-trigger > svg,
.dashboard-range-picker .custom-select-trigger > svg { margin-left: 6px; }
.compact-select:focus-within,
.dashboard-view-picker:focus-within,
.dashboard-range-picker:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36,107,254,.1);
}

.filter-popover-content .custom-select-control,
.modal-form .custom-select-control,
.keyword-form-grid .custom-select-control { width: 100%; }
.filter-popover-content .custom-select-trigger { height: 36px; border-radius: 7px; color: #46566b; }
.modal-form .custom-select-trigger,
.keyword-form-grid .custom-select-trigger { height: 38px; }
.user-directory-toolbar .custom-select-control { min-width: 126px; }
.user-directory-toolbar .custom-select-trigger,
.role-control .custom-select-trigger { height: 36px; }
.role-control .custom-select-control { min-width: 150px; }
.page-size .custom-select-control { min-width: 64px; }
.page-size .custom-select-trigger { height: 32px; padding: 0 7px; border-radius: 6px; color: #526176; }

.custom-select-menu {
  position: fixed;
  z-index: 700;
  box-sizing: border-box;
  padding: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(21,38,61,.18), 0 2px 8px rgba(21,38,61,.08);
  scrollbar-width: thin;
}
.custom-select-option {
  min-height: 34px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 5px;
  color: #46576c;
  cursor: pointer;
  font-size: var(--font-small);
  line-height: 1.35;
}
.custom-select-option > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.custom-select-option:hover,
.custom-select-option.active { background: #f1f6ff; color: #245fae; }
.custom-select-option.selected { color: #244f87; font-weight: 700; }
.custom-select-option[aria-disabled="true"] { opacity: .46; cursor: not-allowed; background: transparent; color: #7d8998; }
.custom-select-check { width: 16px; flex: 0 0 16px; visibility: hidden; color: var(--blue); font-size: 13px; font-weight: 700; text-align: center; }
.custom-select-option.selected .custom-select-check { visibility: visible; }

@media (max-width: 520px) {
  .user-directory-toolbar .custom-select-control { width: 100%; }
}

/* Popovers and modal */
.floating-popover { position: fixed; z-index: 300; min-width: 190px; max-width: min(320px, calc(100vw - 20px)); border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; box-shadow: var(--shadow-popover); overflow: hidden; }
.account-popover { width: 230px; padding: 6px; }
.account-popover-head { padding: 8px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.account-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: var(--font-small); font-weight: 700; }
.account-popover-head strong, .account-popover-head small { display: block; }
.account-popover-head strong { color: var(--text-strong); font-size: var(--font-small); }
.account-popover-head small { margin-top: 2px; color: var(--muted); font-size: var(--font-caption); text-transform: capitalize; }
.action-menu-list { width: 210px; padding: 5px; }
.menu-item { width: 100%; min-height: 38px; padding: 0 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 6px; background: transparent; color: #46576c; cursor: pointer; font-size: var(--font-small); font-weight: 700; text-align: left; }
.menu-item svg { width: 13px; color: #8794a5; }
.menu-item:hover { background: #f4f7fb; color: var(--blue); }
.menu-item.danger { color: #b64652; }
.menu-item.danger:hover { background: var(--red-soft); color: var(--red); }
.menu-separator { height: 1px; margin: 4px 0; background: var(--line); }
.filter-popover { width: 320px; }
.filter-popover-content { padding: 10px; display: grid; gap: 9px; }
.popover-title { min-height: 25px; display: flex; align-items: center; justify-content: space-between; }
.popover-title strong { color: var(--text-strong); font-size: var(--font-control); }
.filter-popover-content label { display: grid; gap: 5px; color: #5b6a7f; font-size: var(--font-caption); font-weight: 700; }
.filter-popover-content select, .filter-popover-content input[type="date"] { width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: #46566b; outline: none; font: inherit; font-size: var(--font-small); }
.filter-popover-content select:focus, .filter-popover-content input[type="date"]:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,254,.1); }
.date-range-fields { margin: 0; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #f8faff; }
.date-range-fields legend { padding: 0 4px; color: #53647a; font-size: var(--font-caption); font-weight: 700; }
.date-range-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.date-range-fields small { display: block; margin-top: 7px; color: var(--muted); font-size: var(--font-caption); line-height: 1.35; }
.modal-backdrop { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(16,29,48,.36); }
.modal-card { width: min(420px, 100%); border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; box-shadow: 0 24px 70px rgba(20,37,61,.22); overflow: hidden; }
.modal-head { padding: 15px 15px 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.modal-head h2 { margin: 0; color: var(--text-strong); font-size: 18px; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: var(--font-control); line-height: 1.55; }
.modal-actions { padding: 10px 12px; display: flex; justify-content: flex-end; gap: 7px; border-top: 1px solid var(--line); background: #fafbfd; }

/* Toast / fatal */
.toast { position: fixed; z-index: 700; right: 16px; bottom: 16px; max-width: min(360px, calc(100vw - 32px)); min-height: 46px; padding: 8px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid #273d5c; border-radius: 9px; background: #17263c; color: #fff; box-shadow: var(--shadow-popover); font-size: var(--font-small); font-weight: 700; transform: translateY(8px); opacity: 0; transition: .18s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: #b74a55; background: #8f3440; }
.toast-icon { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; background: rgba(255,255,255,.08); }
.toast-icon svg { width: 12px; }
.fatal { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.fatal-card { width: min(400px, 100%); padding: 26px; display: grid; justify-items: start; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 18px 60px rgba(36,54,82,.08); }
.fatal-card > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--red-soft); color: var(--red); }
.fatal-card > span svg { width: 17px; }
.fatal-card h1 { margin: 0; color: var(--text-strong); font-size: 20px; }
.fatal-card p { margin: 0 0 6px; color: var(--muted); font-size: var(--font-control); }
.error-state { min-height: 110px; padding: 14px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; }

/* Banking audit workflow */
.recordings-controls { border-bottom: 1px solid var(--line); background: #fbfcfe; border-radius: 10px 10px 0 0; }
.recordings-controls .table-toolbar { border-bottom: 0; border-radius: 0; }
.recording-view-tabs { min-height: 48px; padding: 7px 10px 0; display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line); background: #fff; border-radius: 10px 10px 0 0; }
.view-tab { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 7px; border-bottom: 2px solid transparent; background: transparent; color: #64748a; cursor: pointer; font-size: var(--font-control); font-weight: 700; }
.view-tab svg { width: 15px; height: 15px; }
.view-tab > span { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #edf2f7; color: #526176; font-size: var(--font-caption); }
.view-tab:hover { color: var(--blue); }
.view-tab.active { border-bottom-color: var(--blue); color: var(--blue); }
.view-tab.active > span { background: var(--blue-soft); color: var(--blue); }
.summary-helper { color: var(--muted-2); }
.review-list-intro { min-height: 64px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: #f7faff; }
.review-list-intro strong, .review-list-intro span { display: block; }
.review-list-intro strong { color: var(--text-strong); font-size: var(--font-body); }
.review-list-intro div > span { margin-top: 2px; color: var(--muted); font-size: var(--font-small); }
.queue-count { padding: 6px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: var(--font-small); font-weight: 700; white-space: nowrap; }
.bulk-selection-bar {
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #d9e7fb;
  background: #f5f9ff;
}
.bulk-selection-bar > div:first-child { min-width: 0; }
.bulk-selection-bar strong, .bulk-selection-bar span { display: block; }
.bulk-selection-bar strong { color: #244f87; font-size: var(--font-small); }
.bulk-selection-bar span { margin-top: 1px; color: #6c7d92; font-size: var(--font-caption); }
.bulk-selection-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.bulk-selection-actions .link-btn { min-height: 32px; padding: 0 5px; }
.bulk-export-options { padding: 2px 14px 14px; display: grid; gap: 8px; }
.export-option {
  min-height: 64px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  align-items: start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.export-option:has(input:checked) { border-color: #a9c6ef; background: #f5f9ff; }
.export-option.disabled { opacity: .5; cursor: not-allowed; }
.export-option input { margin: 2px 0 0; accent-color: var(--blue); }
.export-option strong, .export-option small { display: block; }
.export-option strong { color: var(--text-strong); font-size: var(--font-small); }
.export-option small { margin-top: 3px; color: var(--muted); font-size: var(--font-caption); line-height: 1.4; }
.export-permission-note { margin: 2px 0 0; color: #7d6a50; font-size: var(--font-caption); line-height: 1.4; }
.bulk-export-modal { width: min(460px, 100%); }

.audit-table { min-width: 1280px; table-layout: fixed; }
.audit-table th.play-col, .audit-table td.play-col { width: 52px; padding-left: 10px; padding-right: 8px; }
.audit-table th.select-col, .audit-table td.select-col { width: 38px; padding-left: 6px; padding-right: 6px; text-align: center; }
.audit-table th.date-col, .audit-table td.date-col { width: 150px; }
.audit-table th.from-col, .audit-table td.from-col { width: 90px; padding-right: 6px; }
.audit-table th.to-col, .audit-table td.to-col { width: 170px; padding-left: 6px; }
.audit-table th.direction-col, .audit-table td.direction-col { width: 110px; }
.audit-table th.language-col, .audit-table td.language-col { width: 120px; }
.audit-table th.summary-col, .audit-table td.summary-col { width: auto; }
.audit-table th.attention-col, .audit-table td.attention-col { width: 130px; }
.audit-table th.review-col, .audit-table td.review-col { width: 190px; }
.audit-table .select-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}
.audit-table thead th { padding-left: 8px; padding-right: 8px; }
.audit-table tbody td { height: 116px; padding: 12px 8px; vertical-align: middle; }
.audit-table .play-col { padding-top: 12px; }
.audit-table .table-play { width: 32px; height: 32px; }
.audit-table .review-col { text-align: left; }
.audit-table .direction-col { white-space: nowrap; }
.audit-table .attention-col { white-space: nowrap; }
.review-cell { display: grid; align-content: center; justify-items: start; gap: 5px; }
.attention-badge {
  width: fit-content;
  min-height: 25px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #f0f3f6;
  color: #6a788a;
  font-size: var(--font-caption);
  font-weight: 700;
  white-space: nowrap;
}
.attention-badge i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}
.attention-danger { background: var(--red-soft); color: #b1414d; }
.attention-warning { background: var(--amber-soft); color: #956116; }
.attention-info { background: var(--blue-soft); color: #2865b9; }
.attention-success { background: var(--green-soft); color: #177457; }
.attention-neutral { background: #f0f3f6; color: #7a8797; }
.audit-table tr.queued-for-review { background: #f8fbff; }
.audit-table tr.bulk-selected { background: #f4f8ff; }
.audit-table tr.bulk-selected td:first-child { box-shadow: inset 3px 0 #7aa8ef; }
.audit-table tr.queued-for-review td:first-child { box-shadow: inset 3px 0 var(--blue); }
.caller-cell strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caller-cell strong { color: var(--text-strong); font-size: var(--font-control); }
.caller-meta { margin-top: 5px; display: flex; align-items: center; flex-wrap: nowrap; gap: 5px; color: var(--muted); font-size: var(--font-caption); font-variant-numeric: tabular-nums; }
.caller-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caller-cell > .direction-badge { margin-top: 7px; }
.date-cell .date-duration { margin-top: 7px; display: inline-flex; align-items: center; gap: 4px; overflow: visible; color: #53667e; font-weight: 700; }
.date-duration svg { width: 12px; height: 12px; color: var(--muted); }
.direction-badge { width: fit-content; min-height: 22px; display: inline-flex; align-items: center; gap: 4px; color: #52657d; font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.direction-badge .direction-icon { width: 16px; height: 16px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 4px; background: #eaf3ff; color: #2764af; }
.direction-badge.outbound { color: #5f557a; }
.direction-badge.outbound .direction-icon { background: var(--violet-soft); color: #694db7; }
.direction-badge svg { width: 10px; height: 10px; }
.agent-cell { display: flex; align-items: center; gap: 9px; }
.agent-cell > .agent-avatar { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #edf3fb; color: #456382; font-size: var(--font-caption); font-weight: 700; line-height: 1; text-align: center; }
.agent-cell strong, .agent-cell span { display: block; }
.agent-cell strong { color: var(--text-strong); font-size: var(--font-control); }
.agent-cell div > span { margin-top: 2px; color: var(--muted); font-size: var(--font-caption); }
.summary-cell { min-width: 0; }
.ai-summary-hover { margin: -5px; padding: 5px; border-radius: 7px; cursor: help; transition: background .12s, box-shadow .12s; }
.ai-summary-hover:hover, .ai-summary-hover:focus-visible { background: #f7fbff; box-shadow: inset 0 0 0 1px #dce9f8; }
.summary-cell > strong { display: -webkit-box; overflow: hidden; color: #34475f; font-size: var(--font-small); font-weight: 600; line-height: 1.45; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.summary-cell .ai-summary-hover > strong { display: -webkit-box; overflow: hidden; color: #34475f; font-size: var(--font-small); font-weight: 600; line-height: 1.45; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.summary-cell.has-keywords .ai-summary-hover > strong { -webkit-line-clamp: 2; }
.recording-keywords { margin-top: 7px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.recording-keywords-label { margin-right: 1px; color: #8793a2; font-size: 10px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.recording-keyword-chip { max-width: 142px; min-height: 22px; padding: 2px 7px 2px 4px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid color-mix(in srgb, var(--keyword-color) 24%, white); border-radius: 999px; background: color-mix(in srgb, var(--keyword-color) 7%, white); color: var(--keyword-color); cursor: pointer; font-size: 10px; font-weight: 700; line-height: 1; }
.recording-keyword-chip:hover, .recording-keyword-chip:focus-visible { border-color: color-mix(in srgb, var(--keyword-color) 50%, white); background: color-mix(in srgb, var(--keyword-color) 12%, white); outline: none; }
.recording-keyword-chip.active { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--keyword-color) 50%, white); }
.recording-keyword-chip > i { width: 15px; height: 15px; padding: 3px; flex: 0 0 15px; display: grid; place-items: center; border-radius: 50%; background: var(--keyword-color); color: #fff; }
.recording-keyword-chip > i svg { width: 9px; height: 9px; }
.recording-keyword-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-keyword-chip > strong { flex: 0 0 auto; color: inherit; font-size: inherit; }

.insight-chip { min-height: 22px; padding: 0 6px; display: inline-flex; align-items: center; gap: 4px; border-radius: 5px; background: #f0f3f7; color: #657489; font-size: var(--font-caption); white-space: nowrap; }
.insight-chip strong { color: inherit; }
.insight-chip.good { background: var(--green-soft); color: #197457; }
.insight-chip.warn { background: var(--amber-soft); color: #9a6415; }
.insight-chip.bad { background: var(--red-soft); color: #ad424d; }
.risk-label { margin-top: 6px; display: block; overflow: hidden; color: #7c6670; font-size: var(--font-caption); text-overflow: ellipsis; white-space: nowrap; }
.ai-list-status { width: fit-content; min-height: 25px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: #eef2f6; color: #65758a; font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.ai-list-status i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.ai-list-done { background: var(--green-soft); color: #197457; }
.ai-list-running, .ai-list-queued { background: var(--blue-soft); color: #2865b9; }
.ai-list-running i { animation: blink 1.3s infinite; }
.ai-list-failed { background: var(--red-soft); color: #b1414d; }
.ai-list-unavailable, .ai-list-not_started { background: #eef2f6; color: #6f7d90; }
.case-status { width: fit-content; min-height: 27px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: #edf2f7; color: #5e6e82; font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.case-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.case-resolved, .case-closed { background: var(--green-soft); color: #177457; }
.case-investigating, .case-pending { background: var(--blue-soft); color: #2865b9; }
.case-follow_up { background: var(--amber-soft); color: #9b6514; }
.case-escalated { background: var(--red-soft); color: #b1414d; }
.reviewed-label { width: fit-content; margin-top: 0; display: flex; align-items: center; gap: 4px; color: #228064; font-size: var(--font-caption); font-weight: 700; }
.reviewed-label svg { width: 13px; }
.row-review-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn.review-toggle.selected, .btn.review-selected { border: 1px solid #bfd4f3; background: var(--blue-soft); color: var(--blue); }
.open-recording svg { width: 14px; }

.hover-tooltip { position: fixed; z-index: 1000; max-width: min(260px, calc(100vw - 16px)); padding: 6px 8px; border-radius: 6px; background: #17243a; color: #fff; box-shadow: var(--shadow-popover); font-size: var(--font-caption); font-weight: 700; line-height: 1.25; text-align: center; overflow-wrap: anywhere; pointer-events: none; opacity: 0; transition: opacity .12s; }
.hover-tooltip.show { opacity: 1; }
.ai-summary-popover { position: fixed; z-index: 990; width: min(460px, calc(100vw - 24px)); max-height: min(520px, calc(100vh - 24px)); display: flex; flex-direction: column; border: 1px solid #cfe3db; border-radius: 12px; background: #fff; color: var(--text); box-shadow: 0 22px 56px rgba(25,47,72,.22); overflow: hidden; pointer-events: auto; opacity: 1; }
.ai-hover-head { min-height: 44px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; border-bottom: 1px solid var(--line); background: linear-gradient(135deg,#f1fbf6,#f7fcfa); }
.ai-hover-title { color: #14785c; font-size: var(--font-caption); font-weight: 700; letter-spacing: .05em; }
.ai-hover-label { max-width: 145px; color: #238163; font-size: var(--font-caption); font-weight: 700; line-height: 1.35; text-align: right; }
.ai-hover-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ai-hover-summary { margin: 0; padding: 11px 12px 9px; color: #283a51; font-size: var(--font-small); line-height: 1.45; }
.ai-hover-section { padding: 9px 10px; border-top: 1px solid var(--line); }
.ai-hover-section > strong { display: block; margin-bottom: 7px; color: #68788c; font-size: var(--font-caption); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ai-hover-indicators { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-hover-outcome { margin: 0 12px 2px; padding: 9px 10px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; border: 1px solid #d9eee6; border-radius: 8px; background: #f2fbf7; }
.ai-hover-outcome p { margin: 0; color: #40566a; font-size: var(--font-small); line-height: 1.4; }
.ai-hover-actions ul,
.ai-hover-promises ul { margin: 0; padding-left: 17px; color: #40566a; font-size: var(--font-small); line-height: 1.45; }
.ai-hover-actions li + li,
.ai-hover-promises li + li { margin-top: 4px; }
.ai-hover-actions > strong,
.ai-hover-promises > strong { display: flex; align-items: center; gap: 6px; }
.ai-hover-actions > strong span,
.ai-hover-promises > strong span { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #edf2f8; color: #58708a; font-size: 11px; line-height: 16px; text-align: center; }
.ai-hover-promises { margin: 0 10px 10px; padding: 10px; border: 1px solid #d6eee4; border-radius: 8px; background: #f1fbf7; }
.ai-hover-promises > strong { color: #237b5e; }
.ai-hover-promises > strong span { background: #dff5eb; color: #237b5e; }
.ai-hover-followups { margin: 0 10px 10px; padding: 10px; border: 1px solid #e5dfcf; border-radius: 8px; background: #fffaf0; }
.ai-hover-followups > strong { display: flex; align-items: center; gap: 6px; color: #9a6a1e; }
.ai-hover-followups > strong span { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #fff0ce; color: #9a6a1e; font-size: 11px; line-height: 16px; text-align: center; }
.ai-hover-followups ul { margin: 0; padding-left: 17px; color: #40566a; font-size: var(--font-small); line-height: 1.45; }
.ai-hover-followups li + li { margin-top: 4px; }
.ai-hover-entity-section { margin: 0 10px 10px; padding: 10px; border: 1px solid #e2e4f2; border-radius: 8px; background: #f8f7ff; }
.ai-hover-entities { display: grid; gap: 7px; }
.ai-hover-entities > div { min-width: 0; display: grid; gap: 4px; }
.ai-hover-entities > div > strong { color: #6b6f89; font-size: var(--font-caption); }
.ai-hover-entities span { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-hover-entities b { max-width: 100%; padding: 3px 6px; overflow: hidden; border: 1px solid #dedff0; border-radius: 6px; background: #fff; color: #555f7a; font-size: var(--font-caption); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ai-hover-empty { margin: 0; color: var(--muted); font-size: var(--font-small); line-height: 1.45; }
.ai-hover-meta { padding: 0 12px 10px; color: var(--muted-2); font-size: 11px; text-align: right; }
.ai-hover-detail-grid { padding: 0 12px 12px; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.ai-hover-stack { min-width: 0; display: grid; align-content: start; gap: 10px; }
.ai-hover-detail-grid .ai-hover-section { margin: 0; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; }
.ai-hover-detail-grid .ai-hover-actions { background: #f8fbff; }
.ai-hover-detail-grid .ai-hover-followups { background: #fffaf0; }
.ai-hover-detail-grid .ai-hover-entity-section { background: #f8f7ff; }
.ai-hover-detail-grid .ai-hover-topics { background: #fbfcfe; }
.ai-grounded-signals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
.ai-grounded-chip, .ai-risk-chip { min-width: 0; min-height: 36px; padding: 6px 7px; display: grid; align-content: center; gap: 1px; border: 1px solid #dfe6ee; border-radius: 8px; background: #f7f9fb; }
.ai-grounded-chip small, .ai-risk-chip small { color: #78869a; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ai-grounded-chip strong, .ai-risk-chip strong { min-width: 0; overflow: hidden; color: #45566d; font-size: var(--font-caption); text-overflow: ellipsis; white-space: nowrap; }
.ai-grounded-chip.good { border-color: #d2ebdf; background: #f2faf6; }
.ai-grounded-chip.good strong { color: #23785e; }
.ai-grounded-chip.warn { border-color: #f0dfb7; background: #fff9ec; }
.ai-grounded-chip.warn strong { color: #94631a; }
.ai-grounded-chip.bad { border-color: #efd5d8; background: #fff5f6; }
.ai-grounded-chip.bad strong { color: #a94450; }
.ai-risk-chip.risk-none { border-color: #dce5ee; background: #f8fafc; }
.ai-risk-chip.risk-none strong { color: #617187; }
.ai-risk-chip.risk-low { border-color: #e8e0bd; background: #fffbef; }
.ai-risk-chip.risk-low strong { color: #8b6a1a; }
.ai-risk-chip.risk-medium, .ai-risk-chip.risk-high { border-color: #efd5d8; background: #fff5f6; }
.ai-risk-chip.risk-medium strong, .ai-risk-chip.risk-high strong { color: #a94450; }
.ai-hover-outcome-card { margin: 0 12px 8px; padding: 8px 9px; display: grid; gap: 7px; border: 1px solid #dce6f2; border-radius: 9px; background: #f7faff; }
.ai-hover-outcome-card > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ai-hover-outcome-card p { margin: 0; color: #40566a; font-size: var(--font-small); line-height: 1.45; }
.ai-priority { min-height: 24px; padding: 0 7px; display: inline-flex; align-items: center; border-radius: 999px; background: #eef2f6; color: #65758a; font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.ai-priority.priority-low { background: #f0f5f3; color: #547365; }
.ai-priority.priority-normal { background: var(--blue-soft); color: #3167ad; }
.ai-priority.priority-high, .ai-priority.priority-urgent { background: var(--red-soft); color: #ac414d; }
.ai-topic-list { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-topic-list span { max-width: 100%; padding: 4px 7px; overflow: hidden; border: 1px solid #dce5f0; border-radius: 999px; background: #f7f9fc; color: #53667e; font-size: var(--font-caption); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ai-detail-signals { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.ops-signals { margin-top: 14px; display: grid; gap: 8px; }
.ops-signals-head { display: flex; align-items: baseline; gap: 8px; }
.ops-signals-label { color: #7a899b; font-size: var(--font-caption); font-weight: 700; }
.ops-signals-count { color: #9aa5b3; font-size: var(--font-caption); font-weight: 600; }
.ops-signal-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.ops-signal { min-width: 0; min-height: 30px; padding: 5px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e3e8ef; border-radius: 999px; background: #fafbfd; color: #66778b; white-space: nowrap; }
.ops-signal > i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #c4ccd6; }
.ops-signal > span { font-size: var(--font-caption); font-weight: 700; }
.ops-signal.detected.signal-emergency { border-color: #edcfd3; background: #fff7f8; color: #8f4b54; }
.ops-signal.detected.signal-emergency > i { background: #c4525f; }
.ops-signal.detected.signal-service { border-color: #eadbb8; background: #fffaf0; color: #7c622f; }
.ops-signal.detected.signal-service > i { background: #b08738; }
.ops-signal.detected.signal-safety { border-color: #ecd7c2; background: #fff8f2; color: #805b3b; }
.ops-signal.detected.signal-safety > i { background: #b67845; }
.ops-signal.detected.signal-equipment { border-color: #cfdef1; background: #f5f9ff; color: #4e6788; }
.ops-signal.detected.signal-equipment > i { background: #5d83b4; }
.ops-signals-clear, .ops-signals-none { margin: 0; color: #8b97a6; font-size: var(--font-caption); line-height: 1.45; }
.ops-signals-none { color: #758397; }
.ai-hover-section .ops-signals { margin-top: 8px; }
.ai-hover-section .ops-signals-head { display: none; }
.ai-hover-section .ops-signal-row { gap: 5px; }
.ai-hover-section .ops-signal { min-height: 27px; padding: 4px 7px; }
.ai-outcome-copy { margin: 14px 0 0; color: #5b6b7f; font-size: var(--font-small); line-height: 1.5; }
.ai-outcome-copy strong { color: #2c3a4e; }
.ai-topic-list.detail { margin-top: 12px; }
.recording-summary-layout .ai-grounded-chip { min-height: 34px; padding: 5px 9px; border-color: #e2e7ee; border-radius: 8px; background: #f8fafc; }
.recording-summary-layout .ai-grounded-chip small { color: #7c899a; font-size: 10px; }
.recording-summary-layout .ai-grounded-chip strong { color: #47586d; }
.recording-summary-layout .ai-grounded-chip.good,
.recording-summary-layout .ai-grounded-chip.warn,
.recording-summary-layout .ai-grounded-chip.bad { background: #f8fafc; }
.recording-summary-layout .ai-grounded-chip.good { border-color: #dce8e2; }
.recording-summary-layout .ai-grounded-chip.warn { border-color: #ebe4d2; }
.recording-summary-layout .ai-grounded-chip.bad { border-color: #eadfe1; }
.recording-summary-layout .ai-grounded-chip.good strong { color: #3f6e5f; }
.recording-summary-layout .ai-grounded-chip.warn strong { color: #806737; }
.recording-summary-layout .ai-grounded-chip.bad strong { color: #98515a; }
.recording-summary-layout .ai-topic-list span { padding: 4px 8px; border-color: #e1e6ed; background: #f8fafc; color: #5c6c80; font-weight: 600; }
.no-next-step { margin: 0; color: #238163; font-size: var(--font-small); }

.call-intelligence-panel { margin-bottom: 12px; padding: 0; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.ai-summary-panel-head { min-height: 56px; padding: 12px 18px; background: #fff; }
.ai-summary-panel-head h2 { font-size: var(--font-body); }
.ai-kicker { color: var(--blue); font-size: var(--font-caption); font-weight: 700; letter-spacing: .08em; }
.intelligence-summary h2 { margin: 5px 0 0; color: var(--text-strong); font-size: var(--font-body); font-weight: 700; line-height: 1.5; }
.ai-summary-copy { max-width: 920px; margin: 0; color: #1f2d42; font-size: 15px; font-weight: 600; line-height: 1.58; }
.intelligence-context { margin-top: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: var(--font-small); }
.intelligence-context i { width: 4px; height: 4px; border-radius: 50%; background: #bdc6d2; }
.intelligence-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.intelligence-scores > div { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; }
.intelligence-scores span { color: #5f6f84; font-size: var(--font-caption); font-weight: 700; }
.intelligence-scores strong { color: var(--text-strong); font-size: var(--font-small); font-variant-numeric: tabular-nums; }
.intelligence-scores i { height: 5px; grid-column: 1 / 3; overflow: hidden; border-radius: 999px; background: #edf1f5; }
.intelligence-scores b { display: block; height: 100%; border-radius: inherit; }
.intelligence-scores b.good { background: var(--green); }
.intelligence-scores b.warn { background: var(--amber); }
.intelligence-scores b.bad { background: var(--red); }
.ai-live-panel { align-items: stretch; background: #fff; }
.ai-live-summary { min-width: 0; padding: 18px 20px 20px; display: flex; flex: 1; flex-direction: column; justify-content: flex-start; }
.ai-live-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ai-status-pill { min-height: 23px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; font-size: var(--font-caption); font-weight: 700; white-space: nowrap; }
.ai-status-pill i { width: 6px; height: 6px; border-radius: 50%; }
.ai-status-pill.ready { color: #117251; background: var(--green-soft); }
.ai-status-pill.ready i { background: var(--green); }
.ai-status-pill.working { color: #2361bb; background: var(--blue-soft); }
.ai-status-pill.working i { background: var(--blue); animation: blink 1.3s infinite; }
.ai-status-pill.failed { color: #b73d49; background: var(--red-soft); }
.ai-status-pill.failed i { background: var(--red); }
.ai-live-grid { min-width: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.ai-live-grid.single { grid-template-columns: minmax(0,1fr); }
.ai-insight-card { min-width: 0; padding: 11px; border: 1px solid #dfe7f1; border-radius: 10px; background: rgba(255,255,255,.9); }
.ai-insight-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-insight-card header > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: #edf4ff; color: var(--blue); }
.ai-insight-card.followups header > span { background: #fff4df; color: #a76b15; }
.ai-insight-card.entities header > span { background: #eeeaff; color: #6953ba; }
.ai-insight-card header svg { width: 14px; }
.ai-insight-card header div { min-width: 0; }
.ai-insight-card header strong, .ai-insight-card header small { display: block; }
.ai-insight-card header strong { color: var(--text-strong); font-size: var(--font-small); }
.ai-insight-card header small { margin-top: 1px; color: var(--muted-2); font-size: var(--font-caption); }
.ai-analysis-list { margin: 0; padding: 0; display: grid; gap: 6px; list-style: none; }
.ai-analysis-list li { display: grid; grid-template-columns: 17px minmax(0,1fr); align-items: start; gap: 6px; color: #46576d; font-size: var(--font-small); line-height: 1.4; }
.ai-analysis-list li > span { margin-top: 2px; color: var(--green); }
.ai-analysis-list li svg { width: 12px; }
.ai-analysis-list p { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.ai-empty { margin: 2px 0 0; color: var(--muted); font-size: var(--font-small); line-height: 1.45; }
.ai-entity-groups { display: grid; gap: 7px; }
.ai-entity-groups > div { min-width: 0; display: grid; gap: 4px; }
.ai-entity-groups strong { color: var(--muted); font-size: var(--font-caption); }
.ai-entity-groups span { display: flex; flex-wrap: wrap; gap: 4px; }
.ai-entity-groups b { max-width: 100%; padding: 3px 6px; overflow: hidden; border: 1px solid #dce5f0; border-radius: 6px; background: #f7f9fc; color: #4d5e74; font-size: var(--font-caption); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ai-pending-panel { background: #fff; }
.ai-pending-body { padding: 18px 20px 20px; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(280px,.85fr); gap: 16px; align-items: center; }
.ai-pending-copy-block h3 { margin: 0; color: var(--text-strong); font-size: 15px; }
.ai-pending-copy { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: var(--font-small); line-height: 1.5; }
.ai-pending-actions { min-width: 0; padding: 12px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid #dfe7f1; border-radius: 10px; background: rgba(255,255,255,.86); }
.ai-processing-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--blue-soft); color: var(--blue); }
.ai-processing-mark svg { width: 17px; }
.ai-pending-actions > div:nth-child(2) { min-width: 0; }
.ai-pending-actions strong, .ai-pending-actions span { display: block; }
.ai-pending-actions strong { color: var(--text-strong); font-size: var(--font-small); }
.ai-pending-actions span { margin-top: 2px; color: var(--muted); font-size: var(--font-caption); line-height: 1.4; }
.enhanced-player { min-height: 106px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 13px; }
.transport-controls {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.transport-btn {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #62748a;
  cursor: pointer;
  line-height: 1;
}
.transport-btn:hover { background: #eaf0f7; color: var(--text-strong); }
.seek10-icon {
  width: 30px;
  height: 30px;
  display: block;
  overflow: visible;
}
.seek10-arc,
.seek10-digit {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.seek10-arc { stroke-width: 2.5; }
.seek10-arrowhead {
  fill: currentColor;
  stroke: none;
}
.seek10-digit {
  stroke-width: 1.8;
  pointer-events: none;
}

.waveform { position: relative; height: 58px; overflow: visible; border: 1px solid #dce5f0; border-radius: 10px; background: linear-gradient(180deg, #fbfdff, #f2f6fb); cursor: pointer; isolation: isolate; }
.waveform::after { content: ""; position: absolute; z-index: 0; left: 9px; right: 9px; top: 50%; height: 1px; background: #d8e1ec; pointer-events: none; }
.waveform canvas { position: absolute; inset: 0; display: block; pointer-events: none; }
.waveform > .waveform-unplayed { z-index: 1; }
.waveform-played { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 0; overflow: hidden; border-radius: 9px 0 0 9px; background: rgba(36,107,254,.035); pointer-events: none; }
.waveform-played canvas { max-width: none; }
.waveform-playhead { position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 2px; border-radius: 999px; background: var(--blue); box-shadow: 0 0 0 1px rgba(255,255,255,.8), 0 0 7px rgba(36,107,254,.2); pointer-events: none; }
.waveform-status { position: absolute; z-index: 1; inset: 0; display: none; place-items: center; color: #8290a2; font-size: var(--font-caption); pointer-events: none; }
.waveform.loading .waveform-status, .waveform.unavailable .waveform-status { display: grid; }
.wave-track-list { display: grid; gap: 0; }
.wave-track { min-width: 0; overflow: hidden; border: 0; border-top: 1px solid #e6ebf1; border-radius: 0; background: transparent; transition: background .15s, box-shadow .15s; }
.speaker-track-head { min-height: 50px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #edf0f4; background: transparent; }
.wave-track-label { min-width: 0; display: grid; align-content: center; gap: 3px; overflow: hidden; color: #66788d; text-align: left; }
.wave-track-label strong, .wave-track-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wave-track-label strong { color: #1f61cf; font-size: 16px; line-height: 1.15; }
.wave-track:nth-child(even) .wave-track-label strong { color: #c34b16; }
.wave-track-label span { color: #8b97a7; font-size: var(--font-small); }
.wave-track .waveform { height: 108px; border: 0; border-bottom: 1px solid #edf0f4; border-radius: 0; background: transparent; }
.wave-track .waveform::after { left: 12px; right: 12px; height: 1px; background: repeating-linear-gradient(90deg, #cad3df 0 5px, transparent 5px 12px); }
.wave-track.active { background: #fbfdff; }
.wave-track.transcript-seek-target {
  background: #f8fbff;
  box-shadow: inset 3px 0 var(--blue);
}
.wave-track.transcript-seek-target .waveform-playhead {
  width: 3px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.9), 0 0 0 4px rgba(36,107,254,.10);
}
.speaker-track-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex: 0 0 auto; }
.track-controls {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.track-controls .play-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}
.track-time {
  min-width: 76px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: #8996a7;
  font-size: var(--font-caption);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.track-time b { color: #53657b; }
.track-time i { font-style: normal; }
.track-mute { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 7px; background: transparent; color: #65758a; cursor: pointer; }
.track-mute:hover, .track-mute.muted { background: #edf2f7; color: var(--blue); }
.track-mute svg { width: 18px; }
.track-volume { width: 84px; height: 4px; accent-color: var(--blue); cursor: pointer; }
.track-time-axis { height: 28px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: #8b98a9; background: transparent; font-size: var(--font-caption); font-variant-numeric: tabular-nums; }
.speaker-track-player { min-height: 0; padding: 0; display: block; background: transparent; }
.speaker-player-head { min-height: 54px; margin: 0; padding: 9px 14px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; border-top: 1px solid var(--line); }
.speaker-player-head > span { color: #617287; font-size: var(--font-small); font-weight: 700; }
.full-call-control { display: flex; align-items: center; gap: 9px; }
#play-full-call {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #62748a;
  box-shadow: none;
  line-height: 0;
}
#play-full-call:hover {
  background: #eaf0f7;
  color: var(--text-strong);
}
#play-full-call svg {
  width: 32px;
  height: 32px;
  display: block;
  flex: 0 0 32px;
}
.full-call-time { color: #8794a5; font-size: var(--font-caption); font-variant-numeric: tabular-nums; white-space: nowrap; }
.full-call-time b { color: #52647a; }
.timeline-marker { position: absolute; top: -7px; z-index: 2; width: 20px; height: 20px; padding: 0; display: grid; place-items: center; translate: -50% 0; border: 2px solid #fff; border-radius: 50%; color: #fff; box-shadow: 0 2px 7px rgba(30,48,72,.25); cursor: pointer; font-size: 11px; font-weight: 700; line-height: 1; }
.timeline-marker.frustration { background: #d94b58; }
.timeline-marker.action { top: 19px; background: #3979d8; }
.timeline-marker.promise { top: 37px; background: #18a875; }
.timeline-marker:hover, .timeline-marker:focus-visible { z-index: 3; scale: 1.15; }
.timeline-legend { margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; color: #697a8f; font-size: var(--font-caption); }
.timeline-legend > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.timeline-legend i { width: 14px; height: 14px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 8px; font-style: normal; font-weight: 700; }
.timeline-legend .frustration i { background: #d94b58; }
.timeline-legend .action i { background: #3979d8; }
.timeline-legend .promise i { background: #18a875; }
.timeline-legend small { margin-left: auto; color: #8a97a8; font-size: inherit; }
.player-options { display: flex; align-items: center; gap: 14px; justify-content: flex-start; }
.full-call-seek-controls { display: flex; align-items: center; gap: 4px; }
.full-call-seek-controls .transport-btn { width: 36px; height: 36px; flex-basis: 36px; }
.full-call-seek-controls #play-full-call { width: 36px; height: 36px; flex-basis: 36px; }
.translate-audio.active { border-color: #aac9f7; background: var(--blue-soft); color: var(--blue); }
.playback-speed-slider {
  min-width: 190px;
  display: grid;
  grid-template-columns: auto minmax(96px, 1fr) 44px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 700;
}
.playback-speed-slider input[type="range"] {
  --speed-progress: 50%;
  width: 100%;
  height: 28px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.playback-speed-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--blue) 0 var(--speed-progress), #dbe3ed var(--speed-progress) 100%);
}
.playback-speed-slider input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 1px 4px rgba(30,50,80,.22);
}
.playback-speed-slider input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #dbe3ed;
}
.playback-speed-slider input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--blue);
}
.playback-speed-slider input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 1px 4px rgba(30,50,80,.22);
}
.playback-speed-slider input[type="range"]:focus-visible {
  outline: none;
}
.playback-speed-slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(36,107,254,.16);
}
.playback-speed-slider output {
  min-width: 44px;
  color: #43546a;
  font-size: var(--font-small);
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.transcript-view-toggle { padding: 3px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #f1f4f8; }
.transcript-view-toggle button { min-height: 28px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; background: transparent; color: #65758a; cursor: pointer; font-size: var(--font-caption); font-weight: 700; }
.transcript-view-toggle button svg { width: 13px; }
.transcript-view-toggle button.active { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(29,46,73,.09); }
.transcript-line.translated { background: #fbfdff; }
.transcript-text small { margin-top: 4px; display: block; color: var(--muted); font-size: var(--font-caption); }
.audit-review-body { padding: 12px; display: grid; gap: 10px; }
.audit-review-body label { display: grid; gap: 6px; color: #53647a; font-size: var(--font-caption); font-weight: 700; }
.audit-review-body textarea { width: 100%; padding: 9px 10px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); outline: none; font: inherit; font-size: var(--font-small); line-height: 1.45; }
.audit-review-body textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,254,.1); }
#note-save-status { margin-top: -6px; color: var(--muted-2); font-size: var(--font-caption); }
.review-complete-badge { display: inline-flex; align-items: center; gap: 4px; color: #187558; font-size: var(--font-caption); font-weight: 700; }
.review-complete-badge svg { width: 14px; }
.quality-score { padding: 5px 7px; border-radius: 6px; font-size: var(--font-small); }
.quality-score.good { background: var(--green-soft); color: #177457; }
.quality-score.warn { background: var(--amber-soft); color: #9a6415; }
.quality-score.bad { background: var(--red-soft); color: #ad424d; }

.access-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 10px; align-items: start; }
.access-roles { overflow: hidden; }
.access-section-links { padding: 7px; display: grid; gap: 6px; }
.access-section-link { width: 100%; min-height: 62px; padding: 9px 10px; display: grid; grid-template-columns: 20px minmax(0,1fr) 14px; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #607188; cursor: pointer; text-align: left; }
.access-section-link:hover { background: #f5f8fc; }
.access-section-link.active { border-color: #cbdcf5; background: var(--blue-soft); color: var(--blue); }
.access-section-link > svg:first-child { width: 18px; height: 18px; }
.access-section-link > svg:last-child { width: 13px; height: 13px; color: #91a0b2; }
.access-section-link > span { min-width: 0; display: grid; gap: 2px; }
.access-section-link strong, .access-section-link small { overflow: hidden; text-overflow: ellipsis; }
.access-section-link strong { color: var(--text-strong); font-size: var(--font-control); white-space: nowrap; }
.access-section-link small { color: var(--muted); font-size: var(--font-caption); line-height: 1.35; }
.access-section-link.active > svg:last-child { color: var(--blue); }
.access-role-tab { width: 100%; padding: 10px; display: grid; gap: 3px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.access-role-tab:hover { background: #f5f8fc; }
.access-role-tab.active { border-color: #cbdcf5; background: var(--blue-soft); }
.access-role-tab strong { font-size: var(--font-control); }
.access-role-tab span { color: var(--muted); font-size: var(--font-caption); line-height: 1.35; }
.access-matrix { overflow: hidden; }
.role-picker { padding: 10px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.role-picker .access-role-tab { min-width: 0; min-height: 66px; border-color: var(--line); background: #fff; }
.role-picker .access-role-tab span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.role-picker .access-role-tab.active { border-color: #abc8f1; background: var(--blue-soft); box-shadow: 0 1px 3px rgba(36,107,254,.08); }
.protected-role-note { margin: 10px 12px 0; padding: 9px 10px; border: 1px solid #cfe5dc; border-radius: 8px; background: var(--green-soft); color: #20775c; font-size: var(--font-small); }
.permission-groups { padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.permission-group { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.permission-group-head { min-height: 45px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f7f9fc; border-bottom: 1px solid var(--line); }
.permission-group-head > div { display: grid; }
.permission-group-head strong { color: var(--text-strong); font-size: var(--font-small); }
.permission-group-head span, .permission-group-head label { color: var(--muted); font-size: var(--font-caption); }
.permission-group-head label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.permission-list { display: grid; }
.permission-row { min-height: 48px; padding: 8px 10px; display: grid; grid-template-columns: 18px minmax(0,1fr); align-items: center; gap: 8px; border-bottom: 1px solid #edf1f5; cursor: pointer; }
.permission-row:last-child { border-bottom: 0; }
.permission-row:hover { background: #fbfdff; }
.permission-row > span { display: grid; gap: 1px; }
.permission-row strong { color: #35475e; font-size: var(--font-small); }
.permission-row small { color: #8a97a7; font-size: 11px; }
.permission-row input, .permission-group-head input, .access-switch input { accent-color: var(--blue); }
.access-user { display: flex; align-items: center; gap: 9px; }
.access-user > span { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 10px; background: #edf3fb; color: #46617f; font-size: var(--font-caption); font-weight: 700; }
.access-user > span.role-admin { background: #f0eafe; color: #6950b8; }
.access-user > span.role-manager { background: #e7f2ff; color: #2867ad; }
.access-user > span.role-call_agent { background: #e8f7f2; color: #19785d; }
.access-user div { display: grid; }
.access-user strong { color: var(--text-strong); font-size: var(--font-small); }
.access-user small { color: var(--muted); font-size: var(--font-caption); }
.user-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.user-directory-main { min-width: 0; }
.user-summary > div { min-width: 0; min-height: 72px; padding: 14px 18px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; border-right: 1px solid var(--line); }
.user-summary > div:last-child { border-right: 0; }
.user-summary small { min-width: 0; overflow: hidden; color: var(--muted); font-size: var(--font-small); font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.user-summary strong { color: var(--text-strong); font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.user-summary .active strong { color: #18805f; }
.user-directory { margin-top: 10px; overflow: hidden; }
.user-directory-head > strong { padding: 4px 8px; border-radius: 999px; background: #f0f4f8; color: #66788d; font-size: var(--font-caption); }
.user-directory-toolbar { min-height: 58px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.user-directory-toolbar .search-field { width: min(360px,100%); }
.user-directory-toolbar select, .user-role-select { height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: var(--font-small); }
.user-directory-toolbar .btn.tertiary { height: 36px; margin-left: auto; padding: 0 8px; background: transparent; color: #607188; }
.user-directory-toolbar .btn.tertiary:hover { background: #eef3f8; color: #285eaa; }
.user-role-select { min-width: 150px; }
.data-table.user-table { min-width: 620px; }
.user-table th:nth-child(1), .user-table td:nth-child(1) { width: 44%; }
.user-table th:nth-child(2), .user-table td:nth-child(2) { width: 28%; }
.user-table th:nth-child(3), .user-table td:nth-child(3) { width: 180px; }
.user-table th:last-child, .user-table td:last-child { width: 48px; padding-left: 4px; padding-right: 10px; text-align: right; }
.user-table td { height: 58px; vertical-align: middle; }
.user-actions .icon-btn { margin-left: auto; }
.role-control { display: inline-flex; align-items: center; gap: 8px; }
.role-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #8a98a9; }
.role-dot.role-admin { background: #765bd1; }
.role-dot.role-manager { background: #397fd0; }
.role-dot.role-call_agent { background: #20a178; }
.user-access-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.user-access-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; width: 34px; height: 20px; flex: 0 0 34px; border-radius: 999px; background: #c7d0dc; transition: background .15s ease; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(31,47,68,.25); transition: translate .15s ease; }
.user-access-toggle input:checked + .toggle-track { background: #20a978; }
.user-access-toggle input:checked + .toggle-track::after { translate: 14px 0; }
.user-access-toggle input:focus-visible + .toggle-track { outline: 2px solid rgba(36,107,254,.65); outline-offset: 2px; }
.user-access-toggle input:disabled + .toggle-track { opacity: .55; cursor: not-allowed; }
.user-access-toggle strong { color: #52647a; font-size: var(--font-small); }
.user-access-toggle input:checked ~ strong { color: #187558; }
.you-badge { display: inline-block; margin-left: 4px; padding: 2px 5px; border-radius: 5px; background: var(--blue-soft); color: #2764b6; font-size: 11px; font-style: normal; vertical-align: 1px; }
.access-switch { display: inline-flex; align-items: center; gap: 6px; color: #53657a; font-size: var(--font-small); }
.user-form-modal { width: min(480px,100%); }
.modal-form { padding: 2px 15px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-form label { display: grid; gap: 5px; color: #53647a; font-size: var(--font-caption); font-weight: 700; }
.modal-form label:nth-child(4), .modal-form .modal-check { grid-column: 1 / -1; }
.modal-form input, .modal-form select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); font: inherit; font-size: var(--font-small); }
.modal-form input:focus, .modal-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,254,.1); outline: none; }
.modal-form label > small { color: var(--muted); font-weight: 500; }
.modal-form .modal-check { display: flex; align-items: center; gap: 7px; }
.modal-form .modal-check input { width: 16px; height: 16px; accent-color: var(--blue); }

@media (max-width: 1180px) {
  .overview-grid, .system-layout { grid-template-columns: minmax(0,1fr) 270px; }
  .detail-layout { grid-template-columns: minmax(0,1fr) 275px; }
  .integration-row { grid-template-columns: 38px minmax(210px,1fr) minmax(180px,.85fr) auto; }
  .data-table th:nth-child(5) { width: 120px; }
  .call-intelligence-panel { grid-template-columns: 1fr; gap: 16px; }
  .ai-pending-panel { grid-template-columns: 1fr; }
  .ai-live-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 960px) {
  .access-layout { grid-template-columns: 1fr; }
  .access-roles { position: static; }
  .access-section-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .role-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .user-summary { grid-template-columns: 1fr 1fr; }
  .user-summary > div:nth-child(2) { border-right: 0; }
  .user-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .recording-header-row { grid-template-columns: auto minmax(0,1fr); }
  .recording-header-actions { grid-column: 2; justify-self: start; }
  .recording-header-actions .button-group { justify-content: flex-start; }
  .app-shell { display: block; padding-bottom: 55px; }
  .sidebar { display: none; }
  .mobile-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: 55px; padding: 4px 8px max(4px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--line); background: #fff; }
  .mobile-nav .nav-item { width: auto; height: 44px; }
  .topbar { height: 54px; padding: 0 12px; }
  .content { padding: 10px 10px 16px; }
  .overview-grid, .system-layout, .detail-layout, .upload-layout { grid-template-columns: 1fr; }
  .recording-summary-layout { grid-template-columns: 1fr; align-items: start; }
  .recording-summary-layout.no-ai { grid-template-columns: 1fr; }
  .recording-summary-layout .call-intelligence-panel,
  .recording-call-details { height: auto; }
  .recording-summary-layout .ai-live-summary { justify-content: flex-start; }
  .recording-summary-aside { display: block; }
  .recording-call-details .metadata-list { flex: 0 0 auto; }
  .recording-call-details .call-details-grid { grid-auto-rows: auto; }
  .ai-pending-body { grid-template-columns: 1fr; }
  .team-dashboard-grid, .agent-dashboard-grid { grid-template-columns: 1fr; }
  .team-recent-panel, .agent-recent-panel { grid-column: 1; }
  .overview-side { grid-template-columns: 1fr 1fr; }
  .detail-aside { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .integration-row { grid-template-columns: 38px minmax(0,1fr) auto; }
  .integration-endpoint { grid-column: 2 / 4; }
}

@media (max-width: 760px) {
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric-cell:nth-child(2) { border-right: 0; }
  .metric-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .overview-side, .detail-aside { grid-template-columns: 1fr; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-main, .toolbar-actions { width: 100%; }
  .search-field { max-width: none; flex: 1; }
  .toolbar-actions { justify-content: flex-end; }
  .transcript-toolbar { flex-wrap: wrap; }
  .transcript-toolbar .search-field { min-width: 100%; max-width: none; }
  .transcript-line { min-height: 82px; padding: 10px; grid-template-columns: 62px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 7px; }
  .transcript-time { grid-column: 1; grid-row: 1; padding-top: 0; }
  .speaker { grid-column: 2; grid-row: 1; }
  .transcript-text { grid-column: 1 / -1; grid-row: 2; padding: 0; }
  .segment-language { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .integration-row { grid-template-columns: 38px minmax(0,1fr); }
  .integration-endpoint, .integration-actions { grid-column: 2; }
  .integration-actions { justify-content: flex-start; }
  .pagination-bar { flex-wrap: wrap; padding: 7px 10px; }
  .results-count { width: 100%; }
  .data-table { min-width: 720px; }
  .audit-table { min-width: 1280px; }
  .compact-table { min-width: 660px; }
  .recording-view-tabs { overflow-x: auto; }
  .view-tab { white-space: nowrap; }
  .summary-helper { display: none; }
  .call-intelligence-panel { padding: 0; }
  .ai-live-grid { grid-template-columns: 1fr; }
  .ai-pending-actions { grid-template-columns: 36px minmax(0,1fr); }
  .ai-pending-actions .btn { grid-column: 2; justify-self: start; }
  .team-attention-row { grid-template-columns: 34px minmax(0,1fr) auto; }
  .attention-owner { grid-column: 2; }
  .team-attention-row > .btn { grid-column: 3; grid-row: 1 / 3; }
  .intelligence-scores { grid-template-columns: 1fr 1fr; }
  .enhanced-player { grid-template-columns: auto minmax(0, 1fr); }
  .player-options { grid-column: 1 / 3; justify-self: end; }
}

@media (max-width: 520px) {
  .permission-groups { grid-template-columns: 1fr; }
  .access-section-links { grid-template-columns: 1fr; }
  .role-picker { grid-template-columns: 1fr; }
  .user-directory-toolbar { align-items: stretch; flex-direction: column; }
  .user-directory-toolbar .search-field, .user-directory-toolbar select { width: 100%; }
  .modal-form { grid-template-columns: 1fr; }
  .modal-form label:nth-child(4), .modal-form .modal-check { grid-column: 1; }
  .topbar-title > span, .connection-pill { display: none; }
  .topbar-title { flex: 1; }
  .topbar-actions { flex: 0 0 auto; }
  .topbar-actions .button-group { gap: 5px; }
  .dashboard-view-picker > span, .dashboard-range-picker > span { display: none; }
  .topbar-actions .btn { width: 38px; padding: 0; gap: 0; overflow: hidden; font-size: 0; }
  .topbar-actions .btn svg { width: 15px; height: 15px; }
  .content { padding: 8px 7px 14px; }
  .metric-cell { min-height: 72px; padding: 10px; }
  .metric-cell strong { font-size: 24px; }
  .recording-header-row { grid-template-columns: auto minmax(0,1fr); }
  .recording-heading-top { align-items: flex-start; }
  .recording-heading-top h2 { max-width: 100%; white-space: normal; font-size: 18px; line-height: 1.25; }
  .recording-meta-inline { line-height: 1.45; }
  .transcript-line { padding: 10px 8px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { padding: 20px; }
  .auth-card { padding: 22px; }
  .error-state { grid-template-columns: 38px minmax(0,1fr); }
  .error-state .btn { grid-column: 2; justify-self: start; }
  .recordings-controls .table-toolbar { padding-top: 10px; }
  .recording-view-tabs { padding-left: 7px; padding-right: 7px; }
  .view-tab { padding: 0 10px; }
  .review-list-intro { align-items: flex-start; flex-direction: column; }
  .intelligence-scores { grid-template-columns: 1fr; }
  .ai-live-panel { padding: 12px; gap: 13px; }
  .ai-live-heading { align-items: flex-start; }
  .ai-status-pill { white-space: normal; }
  .ai-insight-card { padding: 10px; }
  .ai-pending-actions { grid-template-columns: 32px minmax(0,1fr); }
  .ai-processing-mark { width: 32px; height: 32px; }
  .team-attention-row { grid-template-columns: 30px minmax(0,1fr); }
  .attention-owner { grid-column: 2; }
  .team-attention-row > .btn { grid-column: 2; grid-row: auto; justify-self: start; }
  .agent-follow-up-row { grid-template-columns: minmax(0,1fr) auto; }
  .agent-follow-up-row > .btn { grid-column: 1; justify-self: start; }
  .team-agent-row { grid-template-columns: 32px repeat(4,minmax(0,1fr)); gap: 7px; }
  .team-agent-row > div { grid-column: 2 / -1; }
  .team-agent-row > .agent-avatar { grid-column: 1; grid-row: 1; }
  .team-agent-row > span:not(.agent-avatar) { grid-row: 2; padding-top: 6px; border-top: 1px solid #edf1f5; text-align: left; }
  .team-agent-row > span:nth-of-type(2) { grid-column: 2; }
  .team-agent-row > span:nth-of-type(3) { grid-column: 3; }
  .team-agent-row > span:nth-of-type(4) { grid-column: 4; }
  .team-agent-row > span:nth-of-type(5) { grid-column: 5; }
  .intelligence-summary h2 { overflow-wrap: anywhere; }
  .enhanced-player > .translate-audio { max-width: 100%; }
  .enhanced-player { grid-template-columns: 1fr; align-items: center; }
  .transport-controls { justify-self: center; }
  .player-main, .player-options { width: 100%; grid-column: 1; }
  .player-options { justify-content: space-between; }
  .speaker-player-head { align-items: center; }
  .player-options { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .full-call-seek-controls { margin-left: 0; }
  .full-call-control { width: 100%; display: flex; justify-content: flex-end; }
  .speaker-track-head { min-height: 0; padding: 9px; align-items: center; flex-direction: row; gap: 8px; }
  .wave-track-label { width: 100%; }
  .wave-track-label strong { font-size: 15px; }
  .speaker-track-actions { width: 100%; justify-content: space-between; gap: 5px; }
  .track-time { min-width: 68px; justify-content: flex-start; }
  .track-volume { width: 70px; }
  .wave-track .waveform { height: 82px; }
  .track-time-axis { padding: 0 8px; }
  .timeline-legend small { width: 100%; margin-left: 0; }
  .recording-meta-inline .direction-badge { width: fit-content; }
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid rgba(36,107,254,.65);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .ai-summary-popover { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .ai-hover-detail-grid { grid-template-columns: 1fr; }
  .ai-grounded-signals { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 460px) {
  .call-details-grid { grid-template-columns: 1fr !important; }
  .recording-call-details .call-details-grid > div { min-height: 54px; border-right: 0 !important; }
  .recording-call-details .call-details-grid > div.wide { grid-column: auto; }
  .ops-signal-row { gap: 6px; }
  .ops-signal { white-space: normal; }
  .ai-hover-head { align-items: flex-start; }
  .ai-hover-label { max-width: 120px; }
  .ai-grounded-signals { grid-template-columns: 1fr 1fr; }
  .ai-hover-detail-grid { padding-left: 8px; padding-right: 8px; }
}

/* Keyword detection */
.keyword-help-pill { min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfe9dc; border-radius: 999px; background: #f3fbf7; color: #20775a; font-size: var(--font-caption); font-weight: 700; }
.keyword-help-pill svg { width: 14px; }
.keyword-page-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(330px,.65fr); gap: 10px; align-items: start; }
.keyword-main-column, .keyword-side-column { min-width: 0; display: grid; gap: 10px; }
.keyword-editor-panel { overflow: hidden; }
.keyword-editor { padding: 14px; display: grid; gap: 14px; }
.keyword-editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.keyword-editor-head h2 { margin: 3px 0 3px; color: var(--text-strong); font-size: 18px; }
.keyword-editor-head p { margin: 0; color: var(--muted); font-size: var(--font-small); line-height: 1.45; }
.keyword-form-grid { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(130px,.6fr) minmax(160px,.7fr) minmax(160px,.7fr); gap: 10px; }
.keyword-form-grid label { min-width: 0; display: grid; align-content: start; gap: 6px; color: #55667b; font-size: var(--font-caption); font-weight: 700; }
.keyword-form-grid input[type="text"], .keyword-form-grid input:not([type]), .keyword-form-grid select, .keyword-form-grid textarea { width: 100%; min-height: 38px; padding: 8px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text); outline: none; font: inherit; font-size: var(--font-small); }
.keyword-form-grid textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
.keyword-form-grid input:focus, .keyword-form-grid select:focus, .keyword-form-grid textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,254,.1); }
.keyword-terms-field { grid-column: 1 / -1; }
.keyword-form-grid small { color: var(--muted-2); font-size: 11px; font-weight: 600; line-height: 1.4; }
.keyword-color-field { min-height: 38px; display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 6px; }
.keyword-color-field input[type="color"] { width: 40px; height: 38px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; }
.keyword-enabled { padding: 8px 9px; grid-template-columns: auto 1fr !important; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.keyword-enabled > span { grid-column: 1; grid-row: 1; }
.keyword-enabled input { grid-column: 2; grid-row: 1; justify-self: end; width: 18px; height: 18px; accent-color: var(--blue); }
.keyword-enabled small { grid-column: 1 / -1; }
.keyword-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.keyword-editor-actions > span { color: var(--muted); font-size: var(--font-caption); }
.keyword-rule-list { padding: 8px; display: grid; gap: 7px; }
.keyword-rule-card { min-width: 0; padding: 10px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; }
.keyword-rule-card.disabled { opacity: .62; background: #f7f8fa; }
.keyword-rule-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--keyword-color) 12%, white); color: var(--keyword-color); }
.keyword-rule-icon svg { width: 20px; height: 20px; }
.keyword-rule-main { min-width: 0; }
.keyword-rule-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.keyword-rule-title h3 { margin: 0; color: var(--text-strong); font-size: var(--font-body); }
.keyword-rule-state { min-height: 21px; padding: 0 6px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 11px; font-weight: 700; }
.keyword-rule-state.on { background: var(--green-soft); color: #197457; }
.keyword-rule-state.off { background: #eef2f6; color: #78869a; }
.keyword-rule-main > small { margin-top: 5px; display: block; color: var(--muted); font-size: var(--font-caption); }
.keyword-term-list { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.keyword-term-list span { padding: 3px 6px; border: 1px solid #dfe6ee; border-radius: 6px; background: #f7f9fc; color: #586a80; font-size: var(--font-caption); }
.keyword-rule-actions { display: flex; align-items: center; gap: 5px; }
.keyword-badge { width: fit-content; max-width: 100%; min-height: 27px; padding: 3px 8px 3px 5px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid color-mix(in srgb, var(--keyword-color) 28%, white); border-radius: 999px; background: color-mix(in srgb, var(--keyword-color) 9%, white); color: var(--keyword-color); }
.keyword-badge > i, .keyword-badge > svg { width: 20px; height: 20px; padding: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--keyword-color); color: #fff; stroke: currentColor; }
.keyword-badge > i svg { width: 11px; height: 11px; }
.keyword-badge strong { overflow: hidden; font-size: var(--font-caption); text-overflow: ellipsis; white-space: nowrap; }
.keyword-badge.compact { min-height: 23px; padding-right: 6px; }
.keyword-badge.compact > i, .keyword-badge.compact > svg { width: 17px; height: 17px; padding: 3px; }
.keyword-event-list { display: grid; }
.keyword-event-row { width: 100%; padding: 9px 10px; display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #edf0f4; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.keyword-event-row:last-child { border-bottom: 0; }
.keyword-event-row:hover { background: #f8fbff; }
.keyword-event-time { display: grid; gap: 2px; color: #65758a; }
.keyword-event-time strong { font-size: var(--font-caption); }
.keyword-event-time small { font-size: 11px; }
.keyword-event-main { min-width: 0; display: grid; gap: 4px; }
.keyword-event-main > span:not(.keyword-badge) { overflow: hidden; color: #405168; font-size: var(--font-small); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.keyword-event-main > small { overflow: hidden; color: var(--muted); font-size: var(--font-caption); text-overflow: ellipsis; white-space: nowrap; }
.keyword-event-position { min-width: 54px; display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--blue); }
.keyword-event-position svg { width: 12px; }
.keyword-event-position strong { font-size: var(--font-caption); font-variant-numeric: tabular-nums; }
.keyword-overview-panel .keyword-event-row { grid-template-columns: 58px minmax(0,1fr) auto; padding-left: 9px; padding-right: 9px; }
.keyword-turn-hits { margin-top: 7px !important; display: flex !important; flex-wrap: wrap; gap: 5px; }
.keyword-turn-hits span { min-height: 22px; padding: 2px 6px 2px 4px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid color-mix(in srgb, var(--keyword-color) 26%, white); border-radius: 999px; background: color-mix(in srgb, var(--keyword-color) 8%, white); color: var(--keyword-color); font-size: 11px; font-weight: 700; }
.keyword-turn-hits i, .keyword-turn-hits > span > svg { width: 16px; height: 16px; padding: 3px; flex: 0 0 auto; border-radius: 50%; background: var(--keyword-color); color: #fff; stroke: currentColor; }
.keyword-turn-hits i svg { width: 9px; height: 9px; }
.keyword-wave-marker { position: absolute; z-index: 6; width: 24px; height: 24px; padding: 0; display: grid; place-items: center; translate: -50% 0; border: 2px solid #fff; border-radius: 50%; background: var(--keyword-color); color: #fff; box-shadow: 0 2px 7px rgba(30,48,72,.3); cursor: pointer; }
.keyword-wave-marker span { display: grid; place-items: center; pointer-events: none; }
.keyword-wave-marker svg { width: 12px; height: 12px; }
.keyword-wave-marker.lane-0 { top: 5px; }
.keyword-wave-marker.lane-1 { top: 39px; }
.keyword-wave-marker.lane-2 { top: 73px; }
.keyword-wave-marker:hover, .keyword-wave-marker:focus-visible { z-index: 8; scale: 1.18; outline: none; }
.waveform .tooltip-bubble { z-index: 20; }

@media (max-width: 1100px) {
  .keyword-page-grid { grid-template-columns: 1fr; }
  .keyword-side-column { grid-template-columns: 1fr; }
  .keyword-form-grid { grid-template-columns: 1fr 1fr; }
  .keyword-terms-field { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  .keyword-form-grid { grid-template-columns: 1fr; }
  .keyword-terms-field { grid-column: 1; }
  .keyword-rule-card { grid-template-columns: 38px minmax(0,1fr); }
  .keyword-rule-actions { grid-column: 2; justify-content: flex-start; }
  .keyword-event-row { grid-template-columns: 58px minmax(0,1fr); }
  .keyword-event-position { grid-column: 2; justify-content: flex-start; }
  .keyword-wave-marker { width: 21px; height: 21px; }
}

.keyword-icon-picker-button { width: 100%; min-height: 38px; padding: 5px 8px; display: grid; grid-template-columns: 27px minmax(0,1fr) 16px; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: #43566e; cursor: pointer; text-align: left; }
.keyword-icon-picker-button:hover { border-color: #aebdd0; background: #fbfcfe; }
.keyword-icon-picker-button:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,107,254,.1); }
.keyword-icon-picker-button > span:nth-child(2) { overflow: hidden; font-size: var(--font-small); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.keyword-icon-picker-button > svg:last-child { width: 15px; color: #8a98a9; }
.keyword-icon-picker-preview { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 7px; background: #f2f5fa; color: #405a78; }
.keyword-icon-picker-preview svg { width: 17px; height: 17px; }
.keyword-icon-picker-popover { width: min(560px, calc(100vw - 20px)); padding: 0; overflow: hidden; border-radius: 12px; }
.keyword-icon-picker-shell { display: grid; grid-template-rows: auto minmax(0,1fr); max-height: min(610px, calc(100vh - 30px)); }
.keyword-icon-picker-head { padding: 12px; display: grid; grid-template-columns: auto minmax(180px,260px); align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.keyword-icon-picker-head > div { min-width: 0; display: grid; gap: 2px; }
.keyword-icon-picker-head strong { color: var(--text-strong); font-size: var(--font-body); }
.keyword-icon-picker-head span { color: var(--muted); font-size: var(--font-caption); }
.keyword-icon-picker-head .search-field { min-width: 0; }
.keyword-icon-grid { min-height: 260px; max-height: 480px; padding: 10px; display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); align-content: start; gap: 6px; overflow-y: auto; overscroll-behavior: contain; background: #fff; }
.keyword-icon-option { min-width: 0; aspect-ratio: 1; padding: 6px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #4e6077; cursor: pointer; }
.keyword-icon-option:hover { border-color: #d9e3f0; background: #f6f9fd; color: #225da8; }
.keyword-icon-option.selected { border-color: #a9c8fb; background: #edf4ff; color: #1f63c4; box-shadow: inset 0 0 0 1px rgba(36,107,254,.08); }
.keyword-icon-option svg { width: 24px; height: 24px; }
.keyword-icon-empty { grid-column: 1 / -1; min-height: 180px; display: grid; place-items: center; }
.keyword-lucide-icon { display: inline-block; stroke: currentColor; fill: none; }

@media (max-width: 650px) {
  .keyword-icon-picker-head { grid-template-columns: 1fr; }
  .keyword-icon-grid { grid-template-columns: repeat(7,minmax(0,1fr)); }
}

@media (max-width: 430px) {
  .keyword-icon-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
}


/* Cross-platform playback control rendering.
   Keep this control independent of OS-specific variable-font metrics so
   Windows and macOS produce the same compact geometry. */
#play-full-call {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  font-variation-settings: normal;
  font-feature-settings: normal;
  line-height: 1;
  letter-spacing: 0;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}
#play-full-call > span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
#play-full-call svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  shape-rendering: geometricPrecision;
}

.ai-hover-compact-signals { border-bottom: 0; }

.transcript-panel > .panel-head { border-bottom: 0; }
.transcript-panel .language-chips { align-self: center; }
.transcript-panel .wave-track:first-child { border-top-color: var(--line); }

@media (max-width: 720px) {
  .bulk-selection-bar { align-items: flex-start; flex-direction: column; }
  .bulk-selection-actions { width: 100%; }
}

.ops-signal.detected[style*="--signal-color"] { border-color: color-mix(in srgb, var(--signal-color) 28%, white); background: color-mix(in srgb, var(--signal-color) 7%, white); color: var(--signal-color); }
.ops-signal.detected[style*="--signal-color"] > i { background: var(--signal-color); }
.overview-signal-row.active[style*="--signal-color"] > span i { background: var(--signal-color); }
.signal-config-section { margin-top: 10px; }
.signal-rule-description { margin: 3px 0 0; color: var(--muted); font-size: var(--font-small); line-height: 1.45; }
