:root {
  --bg: #07100f;
  --bg-2: #0b1513;
  --panel: rgba(248, 251, 248, 0.95);
  --panel-soft: rgba(255, 255, 255, 0.74);
  --text: #101817;
  --muted: #62716e;
  --line: rgba(16, 24, 23, 0.13);
  --brand: #008f72;
  --brand-dark: #005f50;
  --accent: #e5aa4c;
  --danger: #bb3f45;
  --ok: #087a50;
  --white: #f8fbf8;
  --glow: rgba(94, 222, 166, 0.35);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

/* Administrator-only Asterisk realtime console */
.realtime-console { display: grid; gap: 18px; }
.realtime-hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding: 28px; border: 1px solid #153a4a; border-radius: 24px; color: #f4fbff;
  background: radial-gradient(circle at 85% 10%, rgba(44, 211, 170, .17), transparent 34%), linear-gradient(135deg, #071b25 0%, #0b2935 64%, #103847 100%);
  box-shadow: 0 18px 45px rgba(6, 29, 39, .18);
}
.realtime-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -140px; bottom: -190px; border: 1px solid rgba(125, 231, 205, .2); border-radius: 50%; box-shadow: 0 0 0 40px rgba(125, 231, 205, .035), 0 0 0 80px rgba(125, 231, 205, .025); }
.realtime-hero > * { position: relative; z-index: 1; }
.realtime-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 11px; color: #86ead1; font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.realtime-eyebrow i, .realtime-call-state i { width: 8px; height: 8px; border-radius: 50%; background: #3ee3af; box-shadow: 0 0 0 5px rgba(62, 227, 175, .12); animation: realtime-pulse 1.8s ease-out infinite; }
.realtime-hero h2 { margin: 0 0 8px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; }
.realtime-hero p { max-width: 720px; margin: 0; color: #b7cdd6; line-height: 1.6; }
.realtime-connection { min-width: 285px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(2, 16, 22, .35); backdrop-filter: blur(12px); }
.realtime-connection-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: #f0ad4e; box-shadow: 0 0 0 6px rgba(240, 173, 78, .1); }
.realtime-connection.is-online .realtime-connection-dot { background: #3ee3af; box-shadow: 0 0 0 6px rgba(62, 227, 175, .12); }
.realtime-connection.is-error .realtime-connection-dot { background: #ff6b6b; box-shadow: 0 0 0 6px rgba(255, 107, 107, .12); }
.realtime-connection div { display: grid; gap: 3px; }
.realtime-connection strong { font-size: 13px; }
.realtime-connection small { color: #9eb7c1; font-size: 11px; }
.realtime-toolbar { display: flex; justify-content: space-between; align-items: stretch; gap: 18px; }
.realtime-summary { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #dbe7eb; border-radius: 18px; background: #dbe7eb; }
.realtime-summary div { display: grid; gap: 4px; padding: 18px 20px; background: #fff; }
.realtime-summary strong { color: #0b6b65; font-size: 26px; line-height: 1; letter-spacing: -.04em; }
.realtime-summary span { color: #63747c; font-size: 12px; font-weight: 650; }
.realtime-listener-select { width: min(420px, 40%); display: grid; gap: 6px; padding: 13px 15px; border: 1px solid #d7e4e8; border-radius: 18px; background: #f8fbfc; }
.realtime-listener-select > span { color: #263d47; font-size: 12px; font-weight: 800; }
.realtime-listener-select select { width: 100%; min-height: 39px; border: 1px solid #cbdde2; border-radius: 10px; background: #fff; color: #14313d; font-weight: 700; }
.realtime-listener-select small { color: #71838b; line-height: 1.35; }
.realtime-notice { position: sticky; top: 10px; z-index: 25; padding: 13px 16px; border: 1px solid #9edecb; border-radius: 13px; color: #0c5e50; background: #e9faf4; box-shadow: 0 12px 25px rgba(19, 88, 75, .12); font-weight: 700; }
.realtime-notice.is-error { border-color: #f1b8b8; color: #8b2626; background: #fff0f0; }
.realtime-call-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.realtime-call-card { display: grid; gap: 16px; min-width: 0; padding: 18px; border: 1px solid #d9e5e8; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(22, 56, 68, .07); transition: border-color .2s, transform .2s, box-shadow .2s; }
.realtime-call-card:hover { transform: translateY(-2px); border-color: #a7cdc7; box-shadow: 0 16px 34px rgba(22, 56, 68, .11); }
.realtime-call-card.state-connected { border-color: #9dd9c7; background: linear-gradient(145deg, #fff 55%, #f0fbf7); }
.realtime-call-head, .realtime-call-route, .realtime-call-actions, .realtime-call-identity { display: flex; align-items: center; }
.realtime-call-head, .realtime-call-actions { justify-content: space-between; gap: 12px; }
.realtime-call-route { gap: 7px; flex-wrap: wrap; }
.realtime-direction, .realtime-call-state { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.realtime-direction { color: #385461; background: #edf3f5; }
.realtime-direction.direction-inbound { color: #3b4f96; background: #eef0ff; }
.realtime-direction.direction-outbound { color: #80551a; background: #fff4dd; }
.realtime-call-state { color: #0d6b5a; background: #e8f8f3; }
.realtime-call-state i { width: 6px; height: 6px; }
.realtime-call-timer { color: #183947; font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 850; letter-spacing: -.02em; }
.realtime-call-identity { gap: 12px; min-width: 0; }
.realtime-call-avatar { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 15px; color: #fff; background: linear-gradient(145deg, #0d766d, #21a890); font-size: 19px; font-weight: 850; box-shadow: 0 9px 18px rgba(22, 139, 122, .2); }
.realtime-call-identity > div { min-width: 0; display: grid; gap: 3px; }
.realtime-call-identity a, .realtime-call-identity strong { overflow: hidden; color: #122f3b; font-size: 16px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.realtime-call-identity a:hover { color: #0b776b; }
.realtime-call-identity span { color: #657b84; font-size: 13px; font-weight: 650; }
.realtime-call-meta { display: grid; grid-template-columns: 1.4fr .8fr; gap: 9px; }
.realtime-call-meta-item { display: grid; gap: 4px; min-width: 0; padding: 10px 11px; border-radius: 12px; background: #f5f8f9; }
.realtime-call-meta-item span { color: #7a8c93; font-size: 10px; font-weight: 750; text-transform: uppercase; }
.realtime-call-meta-item strong { overflow: hidden; color: #29434e; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.realtime-call-actions { padding-top: 2px; }
.realtime-call-actions small { color: #7a8b92; text-align: right; }
.realtime-listen-button { min-height: 38px; border-radius: 11px; }
.realtime-listen-button:disabled { opacity: .55; cursor: not-allowed; }
.realtime-empty { display: grid; justify-items: center; gap: 8px; padding: 56px 20px; border: 1px dashed #c7d9de; border-radius: 22px; color: #61777f; text-align: center; background: #f9fbfc; }
.realtime-empty[hidden] { display: none; }
.realtime-empty h3, .realtime-empty p { margin: 0; }
.realtime-empty h3 { color: #29434e; }
.realtime-empty p { max-width: 550px; }
.realtime-empty-radar { position: relative; display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 5px; border: 1px solid #9fd4c9; border-radius: 50%; }
.realtime-empty-radar::before, .realtime-empty-radar::after { content: ""; position: absolute; inset: 9px; border: 1px solid #c2e5dd; border-radius: 50%; }
.realtime-empty-radar::after { inset: 19px; background: #42caaa; border: 0; }
.realtime-privacy-note { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 13px; color: #697b82; background: #f1f5f6; font-size: 12px; }
.realtime-privacy-note strong { color: #324b55; white-space: nowrap; }
@keyframes realtime-pulse { 0% { box-shadow: 0 0 0 0 rgba(62, 227, 175, .35); } 75%, 100% { box-shadow: 0 0 0 8px rgba(62, 227, 175, 0); } }
@media (max-width: 900px) { .realtime-hero, .realtime-toolbar { align-items: stretch; flex-direction: column; } .realtime-connection, .realtime-listener-select { width: auto; min-width: 0; } }
@media (max-width: 560px) { .realtime-hero { padding: 21px; border-radius: 19px; } .realtime-summary { grid-template-columns: 1fr; } .realtime-call-grid { grid-template-columns: 1fr; } .realtime-call-meta { grid-template-columns: 1fr; } .realtime-call-actions { align-items: stretch; flex-direction: column; } .realtime-call-actions small { text-align: left; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  background: radial-gradient(circle at 9% 4%, rgba(0, 143, 114, 0.28), transparent 30%), radial-gradient(circle at 88% 10%, rgba(229, 170, 76, 0.22), transparent 24%), linear-gradient(135deg, #07100f 0%, #101716 56%, #16130e 100%);
  color: var(--text);
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  z-index: 0;
}

.icon-sprite { display: none; }
.ambient-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.ambient-bg::before,
.ambient-bg::after {
  content: "";
  position: absolute;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.28;
  animation: drift 16s ease-in-out infinite alternate;
}
.ambient-bg::before { left: -12vw; top: 10vh; background: #00a884; }
.ambient-bg::after { right: -18vw; bottom: 4vh; background: #e5aa4c; animation-delay: -5s; }
#pbx-signal-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.35; z-index: 0; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(0.95); } to { transform: translate3d(4vw, -3vh, 0) scale(1.08); } }

body > aside,
body > main { position: relative; z-index: 1; }
a { color: var(--brand-dark); text-decoration: none; font-weight: 700; }
a:hover { color: #003f37; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.sidebar {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  color: var(--white);
  padding: 24px 18px 142px;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  background: rgba(7, 16, 15, 0.72);
  border-right: 1px solid rgba(255,255,255,0.13);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--brand), #63d59d);
  color: #04100e;
  font-weight: 900;
  box-shadow: 0 0 36px rgba(94, 222, 166, 0.34);
}
.brand strong { display: block; font-size: 15px; }
.brand span { display: block; color: rgba(248,251,248,0.62); font-size: 12px; margin-top: 3px; }
.primary-nav {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 209, 158, .38) transparent;
}
.primary-nav a {
  color: rgba(248,251,248,0.78);
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 260ms ease, background 260ms ease, border-color 260ms ease, color 260ms ease;
}
.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--white);
  background: rgba(102, 209, 158, 0.14);
  border-color: rgba(102, 209, 158, 0.28);
  transform: translateX(4px);
}
.pbx-marquee {
  overflow: hidden;
  border-block: 1px solid rgba(255,255,255,0.10);
  padding: 12px 0;
  color: rgba(248,251,248,0.48);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  flex: 0 0 auto;
}
.pbx-marquee div { display: flex; gap: 18px; width: max-content; animation: marquee 18s linear infinite; }
.pbx-marquee span { white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
.sidebar-footer {
  position: fixed;
  z-index: 500;
  left: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: 256px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(7, 16, 15, .94);
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
  backdrop-filter: blur(18px);
}
.user-info { margin-bottom: 10px; font-size: 13px; color: rgba(248,251,248,0.66); }
.logout-form { margin: 0; padding: 0; border: 0; }
.logout-form button { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.20); font-size: 12px; min-height: 38px; justify-content: center; }
.logout-form button:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.38); }

.app-shell { min-width: 0; padding: 26px clamp(18px, 3vw, 38px) 34px; }
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  min-height: 220px;
  padding: clamp(24px, 5vw, 64px);
  margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: linear-gradient(105deg, rgba(7,16,15,0.92) 0%, rgba(10,28,25,0.80) 54%, rgba(67,47,20,0.58) 100%), url("https://picsum.photos/seed/ip-pbx-switchboard/1920/1080") center / cover;
  background-blend-mode: normal, luminosity;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.top-bar::after {
  content: "";
  position: absolute;
  inset: auto 4% -34% auto;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%;
  box-shadow: inset 0 0 44px rgba(102,209,158,0.12), 0 0 70px rgba(102,209,158,0.12);
}
.top-bar-left { max-width: min(980px, 100%); position: relative; z-index: 1; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--white); font-size: clamp(2.1rem, 4vw, 4.6rem); line-height: 0.98; letter-spacing: 0; margin: 0 0 14px; font-weight: 800; }
h2 { font-size: 18px; margin-bottom: 0; letter-spacing: 0; }
h3 { letter-spacing: 0; }
p, .empty, label, td, th { font-size: 14px; }
.top-bar-subtitle { max-width: 650px; color: rgba(248,251,248,0.72); font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.55; margin: 0; }
.top-bar-right { position: relative; z-index: 1; display: flex; gap: 12px; align-items: flex-start; }
.localized-date-picker { display: inline-flex; position: relative; }
.localized-date-input { cursor: pointer; }
.localized-calendar { position: absolute; z-index: 1000; width: 244px; padding: 10px; border: 1px solid rgba(19,61,53,.20); border-radius: 12px; background: #fff; color: #173b35; box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.localized-calendar[hidden] { display: none; }
.localized-calendar-head, .localized-calendar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.localized-calendar-head { margin-bottom: 8px; font-size: 13px; }
.localized-calendar-head button, .localized-calendar-foot button { width: auto; min-height: 25px; padding: 2px 7px; border: 0; border-radius: 6px; background: transparent; color: #087f67; font-size: 12px; }
.localized-calendar-head button { font-size: 20px; line-height: 1; }
.localized-calendar-week, .localized-calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.localized-calendar-week { margin-bottom: 4px; color: #71827e; font-size: 10px; font-weight: 800; }
.localized-calendar-days button { min-height: 27px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #173b35; font-size: 12px; }
.localized-calendar-days button:hover, .localized-calendar-days button.is-selected { background: #087f67; color: #fff; }
.localized-calendar-foot { margin-top: 8px; border-top: 1px solid #e5eeeb; padding-top: 7px; }
.language-switcher { display: inline-flex; align-items: center; gap: 6px; }
.language-switcher label { color: rgba(248,251,248,0.62); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.language-switcher select { min-height: 32px; padding: 0 26px 0 9px; border: 1px solid rgba(255,255,255,0.22); border-radius: 999px; background: rgba(255,255,255,0.10); color: var(--white); font-size: 12px; font-weight: 750; }
.language-switcher option { color: var(--text); background: white; }
.content-stage { position: relative; }

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin: 0 0 24px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  backdrop-filter: blur(14px);
}
.page-header h1 { font-size: clamp(2rem, 3.4vw, 3.8rem); margin-bottom: 8px; }
.page-header p { color: rgba(248,251,248,0.70); }
.page-header p, .empty, .task span, .timeline-item span { color: var(--muted); }

section, .metrics > div, .grid > div {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 14px 44px rgba(0,0,0,0.12);
}
section { overflow: hidden; }
.metrics {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
  margin-bottom: 18px;
}
.metrics > div {
  grid-column: span 3;
  min-height: 142px;
  margin: 0;
  display: grid;
  align-content: space-between;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(248,251,248,0.98), rgba(223,239,231,0.94));
  transition: transform 520ms cubic-bezier(.2,.8,.2,1), filter 520ms ease;
}
.metrics > div::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -48px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: rgba(0,143,114,0.13);
}
.metrics > div:hover { transform: translateY(-7px) scale(1.012); filter: contrast(1.04); }
.metrics span { display: block; font-size: clamp(2rem, 3.2vw, 4rem); line-height: 0.95; font-weight: 850; letter-spacing: 0; }
.metrics label { color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 12px; }

.grid { display: grid; gap: 18px; background: transparent; border: 0; padding: 0; box-shadow: none; }
.grid.two { grid-template-columns: minmax(0, 1.5fr) minmax(320px, .9fr); align-items: start; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.section-title a, .section-title .muted { white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 12px 8px; vertical-align: middle; }
th { color: #5b6966; font-size: 11px; text-transform: uppercase; letter-spacing: 0; font-weight: 850; }
tbody tr { transition: background 220ms ease, transform 220ms ease; }
tbody tr:hover { background: rgba(0,143,114,0.07); }

input, select, textarea, button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  letter-spacing: 0;
}
input, select, textarea { background: rgba(255,255,255,0.94); color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(0,143,114,0.62); box-shadow: 0 0 0 4px rgba(0,143,114,0.12); }
textarea { resize: vertical; }
button, .button-like {
  background: #0b1715;
  color: white;
  border-color: #0b1715;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}
button:hover { background: #132622; transform: translateY(-1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.accent-button { background: var(--accent); border-color: var(--accent); color: #161006; }
.accent-button:hover { background: #d99b37; }
.secondary-button { background: white; color: var(--text); border-color: var(--line); }
.secondary-button:hover { background: #f4f8f6; color: var(--brand-dark); }

.header-dialer {
  display: grid;
  grid-template-columns: 86px minmax(150px, 1fr) auto;
  gap: 8px;
  min-width: min(420px, 100%);
  background: rgba(248,251,248,0.95);
  padding: 6px;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
}
.header-dialer select { border: 0; background: transparent; font-weight: 800; }
.header-dialer input { border: 0; background: transparent; min-width: 0; }
.header-dialer button { width: auto; padding: 0 16px; min-height: 36px; border-radius: 8px; white-space: nowrap; }

.filters { background: var(--panel); padding: 18px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.20); margin-bottom: 24px; box-shadow: var(--shadow); }
.filters .search, .search, .inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .stacked { flex: 1; min-width: 150px; }
.filters button { width: auto; min-width: 120px; }
.search input { min-width: 280px; }
.search button, .inline-form button { width: auto; white-space: nowrap; }
.inline-form { margin-bottom: 12px; }
.stacked { display: grid; gap: 12px; }
.stacked label { display: grid; gap: 6px; color: #52615e; font-weight: 750; }

.dashboard-builder { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.dashboard-builder button { width: auto; min-width: 170px; }
.check-option { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,0.74); color: var(--text); font-weight: 800; }
.check-option input { width: auto; min-height: 0; padding: 0; }

.pill { display: inline-flex; min-height: 25px; align-items: center; padding: 4px 9px; border-radius: 999px; background: rgba(0,143,114,0.10); color: var(--brand-dark); font-size: 12px; font-weight: 850; }
.task { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task span { display: block; margin-top: 4px; }
.task form { margin: 0; }
.task button { width: auto; min-height: 34px; padding: 6px 10px; }
.timeline-item { border-bottom: 1px solid var(--line); padding: 13px 0; }
.timeline-item p { margin: 8px 0 0; white-space: pre-wrap; }
audio { width: 230px; max-width: 100%; height: 34px; filter: saturate(0.86); }
.operator-statistics { min-width: 0; }
.operator-statistics-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.operator-statistics-scroll:focus-visible { outline: 3px solid rgba(0,143,114,0.24); outline-offset: 2px; }
.operator-statistics-scroll table { min-width: 660px; table-layout: auto; }
.operator-statistics-scroll th, .operator-statistics-scroll td { white-space: nowrap; }
.operator-statistics-scroll th:first-child, .operator-statistics-scroll td:first-child { min-width: 150px; white-space: normal; }
.report-calls { min-width: 0; }
.recent-calls table { table-layout: fixed; }
.recent-calls th:nth-child(1), .recent-calls td:nth-child(1) { width: 72px; }
.recent-calls th:nth-child(2), .recent-calls td:nth-child(2) { width: 96px; }
.recent-calls th:nth-child(3), .recent-calls td:nth-child(3) { width: 72px; }
.recent-calls th:nth-child(5), .recent-calls td:nth-child(5), .recent-calls th:nth-child(6), .recent-calls td:nth-child(6) { width: 88px; }
.recent-calls th:nth-child(7), .recent-calls td:nth-child(7) { width: 180px; }
.recent-calls td { overflow-wrap: anywhere; }
.report-audio { display: block; width: clamp(128px, 100%, 180px); min-width: 0; }
.recent-calls-title { margin-bottom: 10px; }
.recent-calls-title h2 { margin-bottom: 0; }
.recent-calls-scroll {
  max-height: clamp(320px, 52vh, 620px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  scrollbar-gutter: stable;
}
.recent-calls-scroll:focus-visible { outline: 3px solid rgba(0,143,114,0.24); outline-offset: 2px; }
.recent-calls-scroll table { min-width: 820px; }
.recent-calls-scroll thead { position: sticky; top: 0; z-index: 2; background: #f8fbf8; box-shadow: 0 1px 0 var(--line); }
.recent-calls-scroll tbody tr:last-child td { border-bottom: 0; }
.table-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 12px; }
.pagination-actions { display: flex; gap: 8px; }
.pagination-actions:last-child { justify-content: flex-end; }
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}
.pagination-link:hover { border-color: rgba(0,143,114,0.45); color: var(--brand-dark); }
.pagination-link.disabled { opacity: 0.42; cursor: default; }
.pagination-status { color: var(--muted); font-size: 13px; font-weight: 750; white-space: nowrap; }

.flash-list { margin-bottom: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 14px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; box-shadow: 0 12px 34px rgba(0,0,0,0.10); }
.flash.ok, .flash.success { background: #ecfdf3; border-color: #abefc6; color: var(--ok); }
.flash.error { background: #fef3f2; border-color: #fecdca; color: var(--danger); }
.incoming-call-panel { position: sticky; top: 14px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid rgba(102,209,158,0.38); border-radius: 8px; background: rgba(236,253,243,0.96); color: var(--ok); box-shadow: 0 18px 42px rgba(16, 24, 32, .14); }
.incoming-call-panel[hidden] { display: none; }
.incoming-call-panel span { display: block; margin-top: 3px; color: var(--text); font-size: 14px; }
.incoming-call-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.incoming-call-actions a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: white; font-weight: 800; }
.incoming-call-actions button { width: auto; min-width: 104px; }

.app-footer { display: flex; justify-content: space-between; gap: 12px; color: rgba(248,251,248,0.56); font-size: 13px; padding: 20px 2px 0; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 22px; }
.login-page { display: grid; grid-template-columns: 1fr; place-items: center; padding: 24px; position: relative; }
.login-language-switcher { position: absolute; top: 18px; right: 18px; }
.login-shell { width: min(440px, 100%); padding: 0; }
.login-panel { margin: 0; }
.login-brand { color: var(--text); margin-bottom: 20px; }
.login-brand span { color: var(--muted); }

@media (max-width: 1180px) {
  body { grid-template-columns: 248px minmax(0, 1fr); }
  .sidebar-footer { width: 212px; }
  .top-bar { display: grid; }
  .metrics > div { grid-column: span 6; }
  .grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  body { grid-template-columns: 1fr; padding-bottom: 118px; }
  .sidebar { position: relative; height: auto; min-height: auto; max-height: none; padding-bottom: 24px; overflow: visible; }
  .primary-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .sidebar-footer { left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: min(270px, calc(100vw - 24px)); }
  .pbx-marquee { display: none; }
  .app-shell { padding: 16px; }
  .top-bar { min-height: auto; padding: 24px; }
  .top-bar-right, .header-dialer { width: 100%; }
  .header-dialer { grid-template-columns: 76px minmax(0, 1fr); }
  .header-dialer button { grid-column: 1 / -1; width: 100%; }
  .metrics { grid-template-columns: 1fr; }
  .metrics > div { grid-column: auto; }
  .page-header, .search, .inline-form, .filters .search { flex-direction: column; align-items: stretch; }
  .search input { min-width: 0; }
  table { display: block; overflow-x: auto; }
  .incoming-call-panel { position: static; align-items: stretch; flex-direction: column; }
  .incoming-call-actions { align-items: stretch; }
  .incoming-call-actions a, .incoming-call-actions button { flex: 1; justify-content: center; }
  .recent-calls table { table-layout: auto; min-width: 820px; }
  .report-audio { width: 170px; }
  .recent-calls-scroll { max-height: min(58vh, 520px); }
  .table-pagination { grid-template-columns: 1fr; }
  .pagination-actions, .pagination-actions:last-child { justify-content: center; }
  .pagination-status { grid-row: 1; text-align: center; }
  .app-footer { display: grid; }
}

.pbx-admin-hero {
  align-items: center;
}

.pbx-guide > div span {
  color: var(--brand-dark);
}
.pbx-guide { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pbx-guide > div { grid-column: auto; min-height: 112px; padding: 14px; }

.pbx-board {
  background: rgba(248, 251, 248, 0.96);
}

.pbx-form-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.pbx-form-card ul,
.pbx-form-card .errorlist {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: 12px;
}

.pbx-form-card label:has(input[type="checkbox"]) {
  align-items: center;
}

.pbx-form-card label > div,
.pbx-form-card label > ul {
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
}

.pbx-form-card label li {
  list-style: none;
  margin: 6px 0;
}

.pbx-form-card label li label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-transform: none;
}

.pbx-form-card input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.pbx-advanced-fields { display: grid; gap: 10px; margin: 4px 0; padding: 12px; border: 1px solid #cbded7; border-radius: 10px; background: rgba(239,248,244,.82); }
.pbx-advanced-fields legend { padding: 0 7px; color: #315c50; font-size: 11px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.pbx-boolean-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.pbx-boolean-grid .check-option { min-width: 0; }
.pbx-form-card [data-dial-target].is-hidden,
.pbx-row-form [data-dial-target].is-hidden { display: none; }

.pbx-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.pbx-list h3 {
  margin: 8px 0 4px;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
}

.pbx-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.74);
  transition: transform 220ms ease, border-color 220ms ease;
}

.pbx-item:hover {
  transform: translateY(-2px);
  border-color: rgba(0,143,114,0.34);
}

.pbx-item strong,
.pbx-item span,
.pbx-item small {
  display: block;
  overflow-wrap: anywhere;
}

.pbx-item span,
.pbx-item small {
  color: var(--muted);
  margin-top: 4px;
}

.pbx-item form {
  margin: 0;
}

.pbx-item button {
  width: auto;
  min-width: 86px;
}

.pbx-import-item { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.pbx-import-summary small { color: #315f53; font-weight: 750; }
.pbx-import-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pbx-import-actions form { flex: 1 1 120px; }
.pbx-import-actions button { width: 100%; min-width: 0; }
.pbx-import-editor { width: 100%; }
.pbx-import-editor .pbx-row-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pbx-import-editor label:has(textarea[name="content"]), .pbx-import-editor label:has(textarea[name="notes"]) { grid-column: 1 / -1; }
.pbx-import-editor textarea[name="content"] { min-height: 280px; color: #17322c; background: #f8fbfa; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.45; }

.pbx-item-tall {
  align-items: start;
}

@media (max-width: 820px) {
  .pbx-item {
    grid-template-columns: 1fr;
  }
  .pbx-item button {
    width: 100%;
  }
  .pbx-boolean-grid, .pbx-import-editor .pbx-row-form { grid-template-columns: 1fr; }
}

.pbx-workspace {
  padding: 0;
  background: rgba(248, 251, 248, 0.96);
}

.pbx-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.62);
}

.pbx-tab {
  width: auto;
  min-width: 104px;
  min-height: 38px;
  background: rgba(255,255,255,0.74);
  color: var(--text);
  border-color: var(--line);
  white-space: nowrap;
}

.pbx-tab.is-active {
  background: #0b1715;
  color: white;
  border-color: #0b1715;
}

.pbx-tab-panel {
  display: none;
  padding: 18px;
}

.pbx-tab-panel.is-active {
  display: block;
}

.pbx-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.pbx-panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.pbx-compact-grid {
  margin: 0;
}

.pbx-editor-stack {
  display: grid;
  gap: 10px;
}

.pbx-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.66);
  overflow: hidden;
}

.pbx-editor summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 850;
  color: var(--text);
  background: rgba(255,255,255,0.78);
  border-bottom: 1px solid transparent;
}

.pbx-editor[open] summary {
  border-bottom-color: var(--line);
}

.pbx-editor .pbx-form-card {
  border: 0;
  border-radius: 0;
  margin: 0;
  background: transparent;
}

.pbx-workspace .pbx-list {
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

@media (max-width: 820px) {
  .pbx-tab-panel {
    padding: 12px;
  }
  .pbx-tabs {
    padding-bottom: 12px;
  }
  .pbx-tab {
    min-width: 92px;
  }
}

.pbx-inline-action {
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}


.pbx-item-editable {
  align-items: stretch;
  display: grid;
  gap: 10px;
}

.pbx-row-editor {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.pbx-row-editor summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--accent);
  width: fit-content;
}

.pbx-row-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.pbx-row-form label,
.pbx-check-block {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pbx-row-form input,
.pbx-row-form textarea,
.pbx-row-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.88);
  color: var(--text);
}

.pbx-row-form textarea {
  resize: vertical;
}

.pbx-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  grid-column: 1 / -1;
}

.pbx-row-actions button {
  min-height: 40px;
}

.pbx-wide-row-form {
  grid-template-columns: 1fr;
}

.pbx-check-block {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.58);
}

.pbx-check-block > span {
  color: var(--text);
}

@media (max-width: 820px) {
  .pbx-row-form {
    grid-template-columns: 1fr;
  }
}


.pbx-inline-form {
  margin: 0;
  display: flex;
  align-items: center;
}


.pbx-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pbx-realtime-metrics {
  margin: 0 0 14px;
}

.pbx-status-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.68);
}

.pbx-status-row small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.pbx-status-badge {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.8);
}

.pbx-status-badge.is-up {
  color: #0f7a4d;
  border-color: rgba(34,197,94,0.38);
  background: rgba(34,197,94,0.12);
}

.pbx-status-badge.is-down {
  color: #9a3412;
  border-color: rgba(249,115,22,0.36);
  background: rgba(249,115,22,0.12);
}

.pbx-raw-status {
  margin-top: 12px;
}

.pbx-raw-status pre {
  margin: 0;
  padding: 12px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text);
}


.pbx-trunk-form [data-trunk-field].is-hidden {
  display: none;
}

.operator-status-control {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.operator-status-control button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
  opacity: .68;
}

.operator-status-control button.is-active {
  opacity: 1;
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 0 0 2px rgba(255,255,255,.16), 0 8px 18px rgba(0,0,0,.18);
}

.operator-status-control button.status-online.is-active {
  background: #15803d;
}
.operator-status-control button[value="smoke_break"].is-active {
  background: #c2410c;
  border-color: #fb923c;
  color: #fff7ed;
}
.operator-status-control button[value="lunch"].is-active {
  background: #a16207;
  border-color: #facc15;
  color: #fefce8;
}
.operator-status-control button[value="offline"].is-active {
  background: #475569;
  border-color: #94a3b8;
  color: #f8fafc;
}

.sidebar-link {
  color: var(--muted);
  font-size: 12px;
}

.metrics-wide {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.customers-table-scroll {
  max-height: clamp(360px, 62vh, 720px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.customers-table-scroll:focus-visible { outline: 3px solid rgba(0,143,114,0.24); outline-offset: 2px; }
.customers-table-scroll table { min-width: 760px; }
.customers-table-scroll thead { position: sticky; top: 0; z-index: 3; background: #f8fbf8; box-shadow: 0 1px 0 var(--line); }
.customers-table-scroll tbody tr:last-child td { border-bottom: 0; }
.customers-table-scroll tbody tr.customer-search-match td {
  background: linear-gradient(90deg, rgba(62, 207, 151, .2), rgba(232, 250, 243, .72));
  box-shadow: 0 1px 0 rgba(36, 157, 113, .18) inset, 0 -1px 0 rgba(36, 157, 113, .12) inset;
}
.customers-table-scroll tbody tr.customer-search-match td:first-child { box-shadow: 4px 0 0 #15966b inset, 0 1px 0 rgba(36, 157, 113, .18) inset, 0 -1px 0 rgba(36, 157, 113, .12) inset; }
.customers-table-scroll tbody tr.customer-search-match:hover td { background: rgba(205, 245, 229, .88); }
.customer-select-column { width: 42px; text-align: center; }
.customer-select-column input { width: 17px; height: 17px; accent-color: var(--brand); }
.portfolio-assignment-bar { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(210px, .8fr) auto; align-items: end; gap: 12px; margin: 0 0 12px; padding: 12px; border: 1px solid #b7dcd2; border-radius: 12px; background: linear-gradient(110deg, #effaf6, #f9fcfb); }
.portfolio-assignment-bar > div, .portfolio-assignment-bar label { display: grid; gap: 4px; }
.portfolio-assignment-bar strong { color: #164a40; font-size: 13px; }
.portfolio-assignment-bar small, .portfolio-assignment-bar label span { color: #678078; font-size: 10px; font-weight: 750; }
.portfolio-assignment-bar select { min-height: 39px; }
.portfolio-assignment-bar button { min-height: 39px; white-space: nowrap; }
.operator-portfolios-section { margin-top: 22px; padding: 18px; border: 1px solid rgba(56, 151, 126, .3); border-radius: 18px; background: linear-gradient(145deg, rgba(236, 249, 245, .98), rgba(247, 250, 249, .94)); box-shadow: 0 14px 36px rgba(7, 68, 57, .08); }
.operator-portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 11px; }
.operator-portfolio-card { min-width: 0; overflow: hidden; border: 1px solid #cce1dc; border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(18, 73, 62, .07); }
.operator-portfolio-card > header { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid #e2ece9; }
.operator-portfolio-avatar { display: grid; place-items: center; width: 44px; height: 40px; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #126e61, #29ad91); font-size: 12px; font-weight: 850; }
.operator-portfolio-card header div { min-width: 0; display: grid; gap: 2px; }
.operator-portfolio-card header strong, .operator-portfolio-card header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-portfolio-card header strong { color: #173c34; font-size: 13px; }
.operator-portfolio-card header small { color: #758a84; font-size: 10px; }
.operator-portfolio-card header > b { min-width: 29px; padding: 6px 8px; border-radius: 10px; color: #126454; background: #e5f6f0; font-size: 12px; text-align: center; }
.operator-portfolio-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; color: #687e78; background: #f7faf9; font-size: 10px; }
.operator-portfolio-summary strong { color: #214a40; font-size: 12px; }
.operator-portfolio-search { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px; padding: 9px 10px; border-top: 1px solid #edf2f0; border-bottom: 1px solid #e4eeeb; background: #fbfdfc; }
.operator-portfolio-search label { min-width: 0; }
.operator-portfolio-search input { width: 100%; min-height: 34px; padding: 7px 9px; border-radius: 9px; font-size: 10px; }
.operator-portfolio-search button, .operator-portfolio-search > a { display: grid; place-items: center; min-width: 34px; min-height: 34px; padding: 6px 9px; border-radius: 9px; font-size: 10px; }
.operator-portfolio-search .operator-portfolio-search-clear { border: 1px solid #d4e2de; color: #6f827d; background: #fff; font-size: 17px; }
.operator-portfolio-search-clear[hidden], .operator-portfolio-match-count[hidden], .operator-portfolio-pagination[hidden] { display: none; }
.operator-portfolio-match-count { display: flex; align-items: center; gap: 5px; padding: 6px 11px; color: #607973; background: #eaf7f2; font-size: 9px; }
.operator-portfolio-match-count strong { color: #08705d; font-size: 11px; }
.operator-portfolio-list { height: 258px; max-height: 258px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #9bc9bd #edf5f2; }
.operator-portfolio-list > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid #edf2f0; }
.operator-portfolio-list > a:first-child { border-top: 0; }
.operator-portfolio-list > a:hover { background: #f0faf6; }
.operator-portfolio-list > a.operator-portfolio-search-match { background: linear-gradient(90deg, rgba(72, 205, 158, .22), rgba(240, 251, 247, .82)); box-shadow: 3px 0 #199473 inset; }
.operator-portfolio-list mark { padding: 0 2px; border-radius: 3px; color: #123f35; background: #ffe47a; box-shadow: 0 0 0 1px rgba(181, 137, 0, .12); font-weight: 850; }
.operator-portfolio-list .operator-portfolio-live-state { display: grid; place-items: center; min-height: 92px; text-align: center; }
.operator-portfolio-card.is-searching .operator-portfolio-list { opacity: .58; }
.operator-portfolio-list a span { min-width: 0; display: grid; gap: 2px; }
.operator-portfolio-list a strong, .operator-portfolio-list a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-portfolio-list a strong { color: #1a4037; font-size: 12px; }
.operator-portfolio-list a small, .operator-portfolio-list a > b { color: #738781; font-size: 9px; }
.operator-portfolio-list p, .operator-portfolio-card footer { margin: 0; padding: 12px; color: #788b85; font-size: 10px; }
.operator-portfolio-pagination { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 8px; border-top: 1px solid #dfeae7; background: #f8fbfa; text-align: center; }
.operator-portfolio-pagination a, .operator-portfolio-pagination > span { display: grid; place-items: center; min-height: 30px; border: 1px solid #cce0da; border-radius: 9px; color: #126d5d; background: #fff; font-size: 17px; }
.operator-portfolio-pagination > span.disabled { opacity: .38; }
.operator-portfolio-pagination strong { color: #526d66; font-size: 9px; }
.customer-call-actions { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 8px; }
.customer-forward-form { display: flex; align-items: end; gap: 6px; padding: 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: rgba(0,0,0,.18); }
.customer-forward-form label { display: grid; gap: 3px; }
.customer-forward-form label span { color: rgba(255,255,255,.65); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.customer-forward-form input { min-width: 180px; min-height: 36px; }
.customer-forward-form button { min-height: 36px; }
@media (max-width: 760px) { .portfolio-assignment-bar { grid-template-columns: 1fr; } .customer-call-actions { justify-content: stretch; } .customer-forward-form { width: 100%; } .customer-forward-form label { flex: 1; } .customer-forward-form input { width: 100%; min-width: 0; } }

.outcome-form {
  display: grid;
  min-width: 280px;
  gap: 6px;
}

.outcome-form-fields { display: grid; grid-template-columns: minmax(120px, .85fr) minmax(150px, 1.15fr); gap: 6px; align-items: end; }
.outcome-form label { display: grid; gap: 4px; }
.outcome-form label > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.outcome-form-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.call-outcome-editor { display: grid; gap: 5px; }
.call-result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ai-analysis-readonly {
  padding: 7px 8px;
  border: 1px solid rgba(37, 99, 235, .24);
  border-radius: 8px;
  background: rgba(239, 246, 255, .82);
}
.ai-analysis-readonly summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 7px; list-style: none; cursor: pointer; }
.ai-analysis-readonly summary::-webkit-details-marker { display: none; }
.ai-analysis-result { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.ai-analysis-result strong { color: var(--ink); }
.ai-analysis-preview { grid-column: 1 / -1; display: -webkit-box; overflow: hidden; color: var(--ink); font-size: 12px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.ai-analysis-readonly[open] .ai-analysis-preview { display: none; }
.ai-analysis-body { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(37, 99, 235, .16); }
.ai-analysis-body p { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.calls-table-scroll {
  max-height: clamp(420px, 68vh, 780px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.calls-table-scroll table { min-width: 1360px; }
.calls-table-scroll thead { position: sticky; top: 0; z-index: 3; background: #f8fbf8; box-shadow: 0 1px 0 var(--line); }
.calls-table-scroll th, .calls-table-scroll td { padding: 7px 6px; vertical-align: top; }
.calls-table-scroll tbody td { font-size: 13px; line-height: 1.35; }
.calls-table-scroll .outcome-form { min-width: 330px; }
.calls-table-scroll .outcome-form-actions button { min-height: 28px; padding: 4px 8px; font-size: 11px; }
.calls-table-scroll .outcome-form textarea { height: 32px; min-height: 32px; resize: vertical; }
.calls-table-scroll audio { width: 170px; height: 28px; }
.call-transcript-button { width: auto; min-height: 30px; padding: 5px 9px; white-space: nowrap; }
.call-transcript-modal[hidden] { display: none; }
.call-transcript-modal {
  position: fixed;
  z-index: 1800;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 28, 24, .58);
  backdrop-filter: blur(5px);
}
.call-transcript-dialog {
  width: min(860px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(45, 139, 103, .28);
  border-radius: 16px;
  background: #fbfdfc;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}
.call-transcript-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.call-transcript-head h2 { margin: 3px 0 0; font-size: 22px; }
.call-transcript-close {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.call-transcript-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.call-transcript-meta span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f2f7f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.call-transcript-conclusion {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, .2);
  border-radius: 10px;
  background: rgba(239, 246, 255, .78);
}
.call-transcript-conclusion p { margin: 5px 0 0; white-space: pre-wrap; }
.call-transcript-content {
  min-height: 180px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.call-transcript-content p { margin: 0; color: var(--muted); }
.call-transcript-dialogue { display: grid; gap: 10px; }
.call-transcript-message {
  width: min(76%, 620px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 15px 5px;
  background: #f1f5f3;
  box-shadow: 0 4px 13px rgba(20, 50, 40, .06);
}
.call-transcript-message--operator {
  justify-self: end;
  border-color: rgba(0, 143, 114, .26);
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(145deg, #dcf7eb, #eafaf3);
}
.call-transcript-message--customer { justify-self: start; background: #f1f4f7; }
.call-transcript-message--participant { justify-self: center; background: #f6f4ef; }
.call-transcript-message-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.call-transcript-message-meta strong { color: var(--ink); font-size: 12px; }
.call-transcript-message-meta time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.call-transcript-message p { margin: 0; color: var(--ink); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .call-transcript-message { width: 92%; } }
.call-transcript-open { overflow: hidden; }

.outcome-form input,
.outcome-form select,
.outcome-form textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
}

@media (max-width: 760px) {
  .outcome-form-fields { grid-template-columns: 1fr; }
  .calls-table-scroll .outcome-form { min-width: 250px; }
}

.compact-form p {
  display: grid;
  gap: 5px;
  margin: 0 0 10px;
}

.attention-panel {
  border-color: rgba(249, 115, 22, .48);
  background: rgba(255, 247, 237, .88);
}

.attention-panel > a {
  display: block;
  padding: 7px 0;
}

.auth-card {
  max-width: 620px;
  margin: 40px auto;
}

.client-page-header {
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.client-page-header h1 {
  font-size: clamp(1.65rem, 2.7vw, 2.75rem);
  margin-bottom: 5px;
}

.client-page-header p {
  margin-bottom: 5px;
}

.client-kpi-strip {
  padding: 0;
  gap: 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  margin-bottom: 12px;
}

.client-kpi-strip > div {
  grid-column: span 2;
  min-height: 76px;
  padding: 12px 14px;
  border-color: rgba(255,255,255,.32);
}

.client-kpi-strip > div::after {
  width: 78px;
  height: 78px;
  right: -32px;
  bottom: -34px;
}

.client-kpi-strip > div:hover {
  transform: translateY(-2px) scale(1.006);
}

.client-kpi-strip span {
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.client-kpi-strip label {
  font-size: 10px;
}

.client-card-shell,
.client-utility-stack {
  padding: 14px !important;
}

.client-card-form {
  display: grid;
  gap: 8px;
}

.client-card-section,
.client-tool {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.68);
  transition: border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.client-card-section[open],
.client-tool[open] {
  border-color: rgba(0,143,114,.3);
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.client-card-section summary,
.client-tool summary {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 12px 42px 12px 14px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 820;
  user-select: none;
}

.client-card-section summary::-webkit-details-marker,
.client-tool summary::-webkit-details-marker {
  display: none;
}

.client-card-section summary::after,
.client-tool summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  translate: 0 -50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,143,114,.1);
  color: var(--brand-dark);
  font-size: 17px;
  transition: rotate 220ms ease, background 220ms ease;
}

.client-card-section[open] summary::after,
.client-tool[open] summary::after {
  content: "−";
  rotate: 180deg;
  background: rgba(0,143,114,.17);
}

.client-card-section summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.client-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 9px 10px;
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(16,24,23,.07);
}

.client-form-grid label {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  color: #52615e;
  font-size: 11px;
  font-weight: 760;
}

.client-form-grid .span-4 { grid-column: span 4; }
.client-form-grid .span-6 { grid-column: span 6; }
.client-form-grid .span-12 { grid-column: span 12; }

.client-form-grid input,
.client-form-grid select,
.client-form-grid textarea {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 13px;
}

.client-form-grid textarea {
  min-height: 54px;
  max-height: 110px;
}

.client-form-grid .errorlist,
.client-card-form > .errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}

.client-save-rail {
  position: sticky;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 12px;
  border: 1px solid rgba(0,143,114,.3);
  border-radius: 8px;
  background: rgba(248,251,248,.92);
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
  backdrop-filter: blur(12px);
}

.client-save-rail span {
  color: var(--muted);
  font-size: 11px;
}

.client-save-rail button {
  width: auto;
  min-height: 36px;
  padding: 7px 14px;
  white-space: nowrap;
}

.client-utility-stack {
  display: grid;
  gap: 8px;
}

.client-tool summary {
  display: block;
}

.client-tool form {
  padding: 2px 12px 12px;
  border-top: 1px solid rgba(16,24,23,.07);
}

.client-tool .stacked {
  gap: 8px;
}

.client-tool .stacked p {
  display: grid;
  gap: 4px;
  margin: 0;
}

.client-tool input,
.client-tool select,
.client-tool textarea,
.client-tool button {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .client-kpi-strip > div { grid-column: span 4; }
}

@media (max-width: 720px) {
  .client-page-header { align-items: stretch; }
  .client-kpi-strip > div { grid-column: span 6; }
  .client-form-grid .span-4,
  .client-form-grid .span-6 { grid-column: span 12; }
  .client-save-rail span { display: none; }
  .client-save-rail button { width: 100%; }
}

.customers-page-header {
  align-items: center;
}

.customer-search {
  flex-wrap: nowrap;
  align-items: center;
}

.customer-search > input {
  min-width: 210px;
}

.static-range {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto 60px auto 60px auto;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(248,251,248,.94);
  color: var(--muted);
}

.static-range span,
.static-range small {
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.static-range b {
  color: #9aa7a4;
}

.static-range input {
  min-width: 0;
  min-height: 32px;
  padding: 5px 6px;
  border: 0;
  background: transparent;
  text-align: center;
}

.portfolio-kpi-strip > div {
  grid-column: span 2;
}

.portfolio-grid {
  grid-template-columns: minmax(0, 1.7fr) minmax(360px, .72fr) !important;
  align-items: start;
}

.portfolio-list-panel {
  min-width: 0;
}

.static-phone {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.customer-create-panel {
  position: sticky;
  top: 14px;
  min-width: 0;
  max-height: calc(100vh - 28px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  background: linear-gradient(155deg, rgba(248,251,248,.98), rgba(230,241,235,.96));
  box-shadow: 0 18px 52px rgba(0,0,0,.16);
  scrollbar-gutter: stable;
}

.create-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.create-panel-heading h2 {
  margin-bottom: 3px;
}

.create-panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.create-panel-heading > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(0,143,114,.22);
  border-radius: 999px;
  background: rgba(0,143,114,.09);
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.customer-create-form {
  display: grid;
  gap: 8px;
}

.create-essential-grid,
.create-detail-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 8px;
}

.create-essential-grid {
  padding: 10px;
  border: 1px solid rgba(0,143,114,.2);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
}

.customer-create-form .span-4 { grid-column: span 4; }
.customer-create-form .span-5 { grid-column: span 5; }
.customer-create-form .span-6 { grid-column: span 6; }
.customer-create-form .span-7 { grid-column: span 7; }
.customer-create-form .span-12 { grid-column: span 12; }

.customer-create-form label,
.segmented-field > span {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  color: #52615e;
  font-size: 10px;
  font-weight: 780;
}

.customer-create-form input,
.customer-create-form select,
.customer-create-form textarea,
.customer-create-form button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
}

.customer-actions-column {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.customer-delete-form {
  display: inline-flex;
  margin: 0;
}

.customer-delete-form button {
  min-height: 28px;
  padding: 4px 9px;
  color: #9a2e42;
  border: 1px solid #edc0c8;
  border-radius: 7px;
  background: #fff3f5;
  font-size: 9px;
}

.customer-delete-form button:hover {
  color: white;
  border-color: #aa3149;
  background: #aa3149;
}

.customer-create-form textarea {
  min-height: 48px;
  max-height: 90px;
}

.create-phone-control,
.static-number-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,.94);
}

.create-phone-control > span,
.static-number-control > span {
  display: grid;
  place-items: center;
  min-width: 40px;
  padding: 0 7px;
  border-right: 1px solid var(--line);
  background: rgba(0,143,114,.08);
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 900;
}

.create-phone-control input,
.static-number-control input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.create-debt-block {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: #0b1715;
}

.create-debt-block label {
  color: rgba(248,251,248,.68);
}

.create-debt-block input {
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.1);
  color: white;
}

.create-detail-block {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.62);
}

.create-detail-block[open] {
  border-color: rgba(0,143,114,.3);
  background: rgba(255,255,255,.92);
}

.create-detail-block summary {
  position: relative;
  display: grid;
  gap: 1px;
  padding: 9px 36px 9px 10px;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 820;
}

.create-detail-block summary::-webkit-details-marker { display: none; }

.create-detail-block summary small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 570;
}

.create-detail-block summary::after {
  content: "+";
  position: absolute;
  right: 10px;
  top: 50%;
  translate: 0 -50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,143,114,.1);
  color: var(--brand-dark);
}

.create-detail-block[open] summary::after { content: "−"; }

.create-detail-block .create-detail-grid {
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(16,24,23,.07);
}

.create-management-block {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.74);
}

.segmented-field {
  display: grid;
  gap: 5px;
}

.segmented-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(7,16,15,.07);
}

.segmented-options label {
  display: block;
  cursor: pointer;
}

.segmented-options input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented-options span {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.segmented-options label:hover span {
  color: var(--text);
  transform: translateY(-1px);
}

.segmented-options input:checked + span {
  background: #0b1715;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.segmented-options input:focus-visible + span {
  outline: 3px solid rgba(0,143,114,.24);
}

.management-grid {
  gap: 7px;
}

.customer-create-form .errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 9px;
  font-weight: 750;
}

.create-action-rail {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 7px 7px 10px;
  border: 1px solid rgba(0,143,114,.28);
  border-radius: 8px;
  background: rgba(248,251,248,.94);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  backdrop-filter: blur(12px);
}

.create-action-rail span {
  color: var(--muted);
  font-size: 9px;
}

.create-action-rail button {
  width: auto;
  padding-inline: 13px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .portfolio-grid { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .8fr) !important; }
  .customer-search { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: 1fr !important; }
  .customer-create-panel { position: static; max-height: none; }
}

@media (max-width: 620px) {
  .static-range { width: 100%; grid-template-columns: auto 1fr auto 1fr auto; }
  .customer-search > input { width: 100%; min-width: 0; }
  .create-essential-grid .span-5,
  .create-essential-grid .span-7,
  .create-detail-grid .span-4,
  .create-detail-grid .span-6,
  .management-grid .span-5,
  .management-grid .span-7 { grid-column: span 12; }
  .create-debt-block { grid-template-columns: 1fr; }
  .segmented-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .create-action-rail span { display: none; }
  .create-action-rail button { width: 100%; }
}

/* Daily call blueprint */
.workspace-day-control {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-day-control label,
.workspace-start-static {
  display: grid;
  gap: 3px;
}

.workspace-day-control label > span,
.workspace-start-static > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.workspace-day-control input { min-width: 132px; }
.workspace-day-control button,
.workspace-day-control .secondary-button { min-height: 36px; display: inline-flex; align-items: center; }
.workspace-check-day { border-color: #b8cce9; background: #edf5ff; color: #173a68; }
.workspace-check-day:hover { border-color: #7fa7db; background: #dfeeff; color: #0c2c56; }
.workspace-start-static strong { min-height: 36px; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px; }

.dialer-blueprint {
  position: relative;
  overflow: hidden;
  padding: 12px;
  color: #e5f3ff;
  border: 1px solid rgba(107, 174, 232, .42);
  border-radius: 16px;
  background-color: #0b1b31;
  background-image: radial-gradient(circle at 88% 0, rgba(39, 150, 213, .24), transparent 34%), linear-gradient(rgba(104, 177, 226, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(104, 177, 226, .07) 1px, transparent 1px);
  background-size: auto, 16px 16px, 16px 16px;
  box-shadow: inset 0 0 50px rgba(2, 10, 25, .3), 0 10px 26px rgba(15, 54, 94, .13);
}

.dialer-blueprint::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(#55c7ff, #6e87ff);
}

.blueprint-heading,
.blueprint-summary,
.blueprint-node-top,
.blueprint-node-bottom,
.blueprint-dialog-head,
.blueprint-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.blueprint-heading { margin-bottom: 9px; }
.blueprint-heading h2 { margin: 1px 0 0; color: #f2fffb; font-size: 17px; }
.blueprint-kicker,
.blueprint-dialog-head > div > span {
  color: #74d2ff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.blueprint-summary span { padding: 4px 7px; border: 1px solid rgba(116,210,255,.28); border-radius: 7px; color: #b9d8ed; font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.blueprint-apply-button { min-height: 27px; padding: 5px 9px; color: #07253a; border: 1px solid #83deff; border-radius: 8px; background: linear-gradient(135deg, #8ee5ff, #65c7f2); box-shadow: 0 5px 14px rgba(44,175,224,.2); font-size: 9px; font-weight: 850; white-space: nowrap; }
.blueprint-apply-button:hover { color: #031927; border-color: #b7efff; background: #a9ebff; }
.blueprint-apply-button:disabled { color: #7794a7; border-color: rgba(116,210,255,.14); background: rgba(116,210,255,.07); box-shadow: none; cursor: not-allowed; }

.blueprint-track {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 7px;
  scrollbar-color: rgba(116,210,255,.42) transparent;
}

.blueprint-node {
  flex: 0 0 184px;
  min-height: 102px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 9px 10px;
  color: #f2f8ff;
  text-align: left;
  border: 1px solid rgba(120, 190, 239, .42);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(22, 51, 83, .96), rgba(11, 31, 55, .96));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 8px 18px rgba(0,0,0,.16);
  cursor: pointer;
}
.blueprint-node-wrap { position: relative; flex: 0 0 184px; }
.blueprint-node-wrap .blueprint-node { width: 100%; min-width: 0; min-height: 122px; padding-bottom: 34px; }
.blueprint-quick-delete { position: absolute; z-index: 2; top: 28px; right: 7px; }
.blueprint-quick-delete button { width: 20px; height: 20px; min-height: 0; padding: 0; display: grid; place-items: center; color: #ffbcc5; border: 1px solid rgba(255,120,140,.36); border-radius: 7px; background: rgba(73,20,36,.74); font-size: 15px; line-height: 1; }
.blueprint-quick-delete button:hover { color: white; border-color: #ff8093; background: #a62d48; }
.blueprint-block-voice { position: absolute; z-index: 2; right: 8px; bottom: 7px; left: 8px; }
.blueprint-block-voice select { width: 100%; min-height: 23px; padding: 3px 22px 3px 7px; color: #dff3ff; border: 1px solid rgba(116,210,255,.34); border-radius: 7px; background-color: #132e4c; font-size: 8px; font-weight: 700; text-overflow: ellipsis; }
.blueprint-voice-display { overflow: hidden; padding: 3px 6px; color: #cceaff; border: 1px solid rgba(116,210,255,.22); border-radius: 6px; background: rgba(77,169,222,.08); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.blueprint-node:hover,
.blueprint-node:focus-visible { border-color: #7bd7ff; box-shadow: 0 0 0 2px rgba(123,215,255,.13), 0 10px 24px rgba(0,0,0,.25); }
.blueprint-node > strong { overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.blueprint-node-top b { color: #74d2ff; font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.blueprint-node-top em { color: #aac5d8; font-size: 8px; font-style: normal; text-transform: uppercase; }
.blueprint-data { color: #b6ccdc; font: 600 9px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; }
.blueprint-node-bottom { margin-top: auto; padding-top: 5px; border-top: 1px dashed rgba(116,210,255,.19); color: #d2e3ef; font-size: 8px; }
.blueprint-node--completed { opacity: .62; border-color: rgba(116,210,255,.24); }
.blueprint-node--in_progress { border-color: #ffd66b; box-shadow: inset 3px 0 #ffd66b; }
.blueprint-node--skipped { opacity: .55; border-style: dashed; }
.blueprint-node--add { min-height: 102px; align-items: center; justify-content: center; text-align: center; border-style: dashed; background: rgba(84,177,235,.075); }
.blueprint-node--add > span { color: #74d2ff; font-size: 22px; line-height: 1; }
.blueprint-node--add small { color: #9ab7cb; }

.blueprint-arrow { flex: 0 0 32px; height: 18px; display: flex; align-items: center; }
.blueprint-arrow i { position: relative; width: 100%; height: 1px; background: #74d2ff; }
.blueprint-arrow i::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid #74d2ff; border-right: 1px solid #74d2ff; transform: rotate(45deg); }
.blueprint-arrow--muted { opacity: .45; }
.blueprint-empty { flex: 1 0 260px; display: grid; gap: 3px; color: #d8f6ed; }
.blueprint-empty span { color: #89aaa1; font-size: 11px; }

.blueprint-modal[hidden] { display: none; }
.blueprint-modal.is-open { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 18px; }
.blueprint-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: rgba(2, 10, 10, .72); backdrop-filter: blur(5px); }
.blueprint-dialog { position: relative; width: min(680px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; padding: 17px; border: 1px solid rgba(91,224,184,.36); border-radius: 8px; background: #f8fbf9; box-shadow: 0 28px 80px rgba(0,0,0,.44); }
.blueprint-dialog--small { width: min(580px, 100%); }
.blueprint-dialog-head { margin-bottom: 14px; }
.blueprint-dialog-head h2 { margin: 2px 0 0; font-size: 20px; }
.blueprint-close { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; color: var(--text); border: 1px solid var(--border); background: transparent; font-size: 23px; }
.blueprint-edit-form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 9px; }
.blueprint-edit-form label { display: grid; gap: 4px; }
.blueprint-edit-form label > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.blueprint-edit-form .span-3 { grid-column: span 3; }
.blueprint-edit-form .span-4 { grid-column: span 4; }
.blueprint-edit-form .span-6 { grid-column: span 6; }
.blueprint-edit-form .span-8 { grid-column: span 8; }
.blueprint-edit-form .span-9 { grid-column: span 9; }
.blueprint-edit-form .span-12 { grid-column: span 12; }
.blueprint-dialog-actions { justify-content: flex-end; padding-top: 4px; }
.blueprint-dialog-actions button { width: auto; }
.blueprint-modal-open { overflow: hidden; }

.dialer-live-panel { overflow: hidden; padding: 12px; border: 1px solid #c3d9e8; border-radius: 14px; background: linear-gradient(145deg, #f8fbfd, #eef5f9); box-shadow: 0 10px 26px rgba(29,75,111,.08); }
.dialer-live-panel.is-running { border-color: rgba(56,168,217,.55); box-shadow: 0 10px 28px rgba(29,120,166,.13); }
.dialer-live-head,
.dialer-live-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialer-live-head h2 { margin: 2px 0 0; font-size: 15px; }
.dialer-live-signal { display: flex; align-items: center; gap: 6px; color: #277ba6; font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.dialer-live-signal i { width: 7px; height: 7px; border-radius: 50%; background: #7d9aaa; }
.is-running .dialer-live-signal i { background: #27c887; box-shadow: 0 0 0 5px rgba(39,200,135,.12); animation: voice-pulse 1.2s ease-in-out infinite; }
.dialer-live-controls > span { padding: 4px 7px; color: #17658d; border: 1px solid #b6d8e9; border-radius: 7px; background: #e8f6fc; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.dialer-live-controls small { color: var(--muted); font-size: 9px; }
.dialer-live-controls button { min-height: 28px; padding: 4px 8px; font-size: 9px; }
.dialer-live-list { display: grid; gap: 5px; margin-top: 10px; }
.dialer-live-row { display: grid; grid-template-columns: 32px minmax(170px, 1.4fr) minmax(120px, .8fr) 100px minmax(150px, .9fr); align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px; border: 1px solid #d2e1ea; border-radius: 10px; background: rgba(255,255,255,.86); }
.dialer-live-row.is-current { border-color: #67bde5; box-shadow: inset 3px 0 #43b4e5; }
.dialer-live-sequence { color: #5d7a8b; font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.dialer-live-customer,
.dialer-live-meta { min-width: 0; display: grid; gap: 2px; }
.dialer-live-customer strong { overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.dialer-live-customer span,
.dialer-live-meta span { overflow: hidden; color: var(--muted); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.dialer-live-state { justify-self: start; padding: 4px 7px; color: #607887; border: 1px solid #cfdee6; border-radius: 7px; background: #f4f8fa; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.dialer-live-row.status-dialing .dialer-live-state { color: #075a82; border-color: #9dd7ee; background: #e2f6ff; }
.dialer-live-row.status-waiting .dialer-live-state { color: #725812; border-color: #e8cd89; background: #fff8dc; }
.dialer-live-row.status-answered .dialer-live-state { color: #087146; border-color: #9dddd0; background: #e6f8f1; }
.dialer-live-row.status-no_answer .dialer-live-state { color: #936216; border-color: #efd29c; background: #fff7e6; }
.dialer-live-row.status-failed .dialer-live-state { color: #9c2941; border-color: #efb8c4; background: #fff0f3; }
.dialer-live-audio { width: 100%; height: 28px; }
.dialer-live-audio-pending { color: #8aa0ad; font-size: 8px; }
.dialer-live-loading,
.dialer-live-empty { display: grid; gap: 2px; padding: 14px; color: var(--muted); text-align: center; border: 1px dashed #c6d9e4; border-radius: 10px; font-size: 9px; }
.dialer-live-empty strong { color: var(--text); font-size: 10px; }

@media (max-width: 680px) {
  .workspace-day-control { width: 100%; }
  .workspace-day-control label { flex: 1 1 130px; }
  .workspace-day-control input { width: 100%; min-width: 0; }
  .blueprint-heading { align-items: flex-start; }
  .blueprint-summary { display: grid; gap: 4px; }
  .blueprint-node { flex-basis: 174px; }
  .blueprint-node-wrap { flex-basis: 174px; }
  .blueprint-edit-form .span-3,
  .blueprint-edit-form .span-4,
  .blueprint-edit-form .span-6,
  .blueprint-edit-form .span-8,
  .blueprint-edit-form .span-9 { grid-column: span 12; }
  .dialer-live-head,
  .dialer-live-controls { align-items: flex-start; flex-wrap: wrap; }
  .dialer-live-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .dialer-live-meta { grid-column: 2 / -1; }
  .dialer-live-audio,
  .dialer-live-audio-pending { grid-column: 2 / -1; }
}

/* Operator IVR calls */
.voice-page-header { align-items: end; }
.voice-page-header > div:first-child { max-width: 760px; }
.voice-format-note { min-width: 190px; display: grid; gap: 3px; padding: 10px 12px; color: #eaf7ff; border: 1px solid rgba(102,184,232,.36); border-radius: 12px; background: linear-gradient(135deg, #153b61, #10253d); }
.voice-format-note strong { font-size: 12px; letter-spacing: .08em; }
.voice-format-note span { color: #b7d3e5; font-size: 9px; }
.voice-form-errors { margin-bottom: 12px; padding: 10px 12px; color: #8f2034; border: 1px solid #f2b8c2; border-radius: 10px; background: #fff1f3; font-size: 11px; }
.voice-form-errors .errorlist { margin: 0; padding-left: 18px; }

.voice-studio-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(310px, 5fr); grid-auto-flow: dense; gap: 0; overflow: hidden; padding: 0; border: 1px solid #bdd4e5; border-radius: 16px; background: #f7fafc; box-shadow: 0 14px 34px rgba(29,75,111,.1); }
.voice-studio-panel { min-width: 0; padding: 16px; }
.voice-upload-panel { border-right: 1px solid #c9dce9; background: linear-gradient(145deg, #fbfdff, #eef6fb); }
.voice-mic-panel { color: #eaf7ff; background: radial-gradient(circle at 90% 0, rgba(61,170,226,.24), transparent 42%), linear-gradient(145deg, #102c49, #0b1d31); }
.voice-mic-panel h2 { color: white; }
.voice-mic-panel .muted { color: #a9c6d9; }
.voice-upload-form,
.voice-recorder-form { display: grid; gap: 10px; }
.voice-upload-form label,
.voice-recorder-form label { display: grid; gap: 4px; }
.voice-upload-form label > span,
.voice-recorder-form label > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.voice-recorder-form label > span { color: #a9c6d9; }
.voice-file-drop { padding: 12px; border: 1px dashed #8db7d3; border-radius: 11px; background: rgba(255,255,255,.72); }
.voice-file-drop input { padding: 6px; background: white; }
.voice-file-drop small { color: var(--muted); font-size: 9px; }
.voice-recorder-console { display: grid; gap: 9px; padding: 11px; border: 1px solid rgba(134,203,240,.24); border-radius: 12px; background: rgba(5,20,35,.34); }
.voice-record-status { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 7px; color: #c8e0ef; font-size: 10px; }
.voice-record-status i { width: 7px; height: 7px; border-radius: 50%; background: #68c8f1; box-shadow: 0 0 0 4px rgba(104,200,241,.1); }
.is-recording .voice-record-status i { background: #ff5773; box-shadow: 0 0 0 5px rgba(255,87,115,.15); animation: voice-pulse 1s ease-in-out infinite; }

.ai-result-badge {
  display: inline-flex;
  align-items: center;
  margin-left: .55rem;
  padding: .18rem .48rem;
  border: 1px solid rgba(92, 116, 255, .28);
  border-radius: 999px;
  background: rgba(92, 116, 255, .1);
  color: #5365d8;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .01em;
}
.result-change-badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .48rem;
  border: 1px solid rgba(217, 119, 6, .32);
  border-radius: 999px;
  background: rgba(245, 158, 11, .11);
  color: #a15c05;
  font-size: .72rem;
  font-weight: 800;
}
.voice-record-status time { font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.voice-recorder-console audio { width: 100%; height: 30px; }
.voice-recorder-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.voice-mic-panel input { color: #eff9ff; border-color: rgba(137,199,233,.32); background: rgba(4,18,31,.48); }
.voice-mic-panel .secondary-button { color: #d9ecf7; border-color: rgba(137,199,233,.35); background: rgba(255,255,255,.05); }
@keyframes voice-pulse { 50% { transform: scale(.72); opacity: .65; } }

.voice-library { border-radius: 16px; background: linear-gradient(180deg, rgba(232,244,251,.7), rgba(249,251,252,.9)); }
.voice-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: dense; gap: 8px; }
.voice-record-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 10px; border: 1px solid #c7dce9; border-radius: 12px; background: white; transition: transform .2s ease, box-shadow .2s ease; }
.voice-record-card:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(29,75,111,.11); }
.voice-record-card > div { min-width: 0; display: grid; gap: 2px; }
.voice-record-card strong { overflow: hidden; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.voice-record-card span { color: var(--muted); font-size: 8px; }
.voice-record-card audio { grid-column: 1 / -1; width: 100%; height: 29px; }
.voice-delete-button { min-height: 27px; padding: 4px 8px; color: #9a2e42; border: 1px solid #edc0c8; background: #fff3f5; font-size: 9px; }
.voice-delete-button:hover { color: white; border-color: #aa3149; background: #aa3149; }
.voice-library-empty { grid-column: 1 / -1; display: grid; gap: 3px; padding: 24px; color: var(--text); text-align: center; border: 1px dashed #b8d2e2; border-radius: 12px; }
.voice-library-empty span { color: var(--muted); font-size: 10px; }

@media (max-width: 980px) {
  .voice-studio-grid { grid-template-columns: 1fr; }
  .voice-upload-panel { border-right: 0; border-bottom: 1px solid #c9dce9; }
  .voice-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .voice-format-note { width: 100%; }
  .voice-library-grid { grid-template-columns: 1fr; }
}

/* Administrative customer groups */
.admin-groups-header { align-items: end; }
.admin-groups-header > div:first-child { max-width: 76rem; }
.groups-health-strip { display: flex; gap: 5px; flex-wrap: wrap; }
.groups-health-strip span { display: flex; align-items: baseline; gap: 5px; min-height: 34px; padding: 7px 10px; color: #496477; border: 1px solid #c7dbe7; border-radius: 10px; background: rgba(255,255,255,.8); font-size: 11px; font-weight: 650; }
.groups-health-strip b { color: #102d43; font-size: 15px; }

.overdue-group-manager { overflow: hidden; margin-bottom: 9px; border: 1px solid #bfd5e1; border-radius: 13px; background: rgba(247,251,252,.96); box-shadow: 0 7px 20px rgba(23,66,96,.065); }
.overdue-group-manager > summary { position: relative; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 44px 9px 13px; cursor: pointer; list-style: none; background: linear-gradient(135deg, #f8fcfd, #eaf4f7); }
.overdue-group-manager > summary::-webkit-details-marker { display: none; }
.overdue-group-manager > summary::after { position: absolute; right: 14px; content: "+"; color: #27647e; font-size: 20px; font-weight: 700; }
.overdue-group-manager[open] > summary::after { content: "−"; }
.overdue-group-manager > summary > span { display: grid; gap: 1px; }
.overdue-group-manager > summary strong { color: #17384d; font-size: 13px; }
.overdue-group-manager > summary small { color: #647b87; font-size: 9px; }
.overdue-group-manager > summary > b { min-width: 28px; padding: 4px 7px; color: #145a76; text-align: center; border: 1px solid #afd0dd; border-radius: 8px; background: white; font-size: 10px; }
.overdue-group-manager-body { display: grid; grid-template-columns: minmax(0, 1fr) 225px; align-items: start; gap: 8px; padding: 8px; border-top: 1px solid #d3e2e8; }
.overdue-group-list { min-width: 0; max-height: 292px; display: grid; align-content: start; gap: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #9dbbc9 transparent; }
.overdue-group-editor { position: relative; min-width: 0; display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; align-items: end; gap: 7px; padding: 6px 7px; border: 1px solid #d3e2e8; border-radius: 9px; background: white; }
.overdue-group-editor > header { min-width: 0; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 6px; padding-bottom: 3px; }
.overdue-group-editor > header i { display: grid; place-items: center; width: 25px; height: 25px; color: #26725e; border-radius: 7px; background: #e7f7f0; font-size: 8px; font-style: normal; font-weight: 850; }
.overdue-group-editor > header div { min-width: 0; display: grid; gap: 2px; }
.overdue-group-editor > header strong { overflow: hidden; color: #17384d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.overdue-group-editor > header span { overflow: hidden; color: #678078; font-size: 8px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.overdue-group-edit-form { min-width: 0; display: grid; grid-template-columns: minmax(105px, 1fr) 68px 68px 54px auto; align-items: end; gap: 4px; }
.overdue-group-edit-form label, .overdue-group-create-form label { min-width: 0; display: grid; gap: 3px; color: #5b727f; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.overdue-group-edit-form input, .overdue-group-create-form input { width: 100%; min-width: 0; min-height: 29px; padding: 4px 6px; border-radius: 6px; font-size: 10px; }
.overdue-group-edit-form button { width: auto; min-height: 29px; padding: 4px 8px; font-size: 8px; }
.overdue-group-delete-form { display: flex; align-items: end; justify-content: flex-end; margin: 0 0 1px; }
.overdue-group-delete-form button { width: auto; min-height: 27px; padding: 3px 6px; color: #9a3540; border-color: #e9c0c4; background: #fff5f5; font-size: 8px; white-space: nowrap; }
.overdue-group-create-form { align-content: start; display: grid; gap: 6px; padding: 9px; border: 1px solid #9ccfc0; border-radius: 9px; background: linear-gradient(145deg, #f5fdf9, #e7f7f1); }
.overdue-group-create-form header { display: grid; gap: 2px; }
.overdue-group-create-form header strong { color: #155b48; font-size: 13px; }
.overdue-group-create-form header small { color: #5f7d72; font-size: 9px; }
.overdue-group-create-form > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.overdue-group-create-form button { min-height: 30px; font-size: 9px; }
.overdue-group-empty { display: grid; place-items: center; min-height: 120px; padding: 20px; color: #647b87; border: 1px dashed #bfd3dc; border-radius: 12px; text-align: center; }

.operator-group-rail { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 12px; padding: 3px 1px 9px; scrollbar-color: #a9c4d6 transparent; }
.operator-group-card { flex: 1 0 146px; min-width: 0; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 58px; padding: 9px 10px; color: #17374c; border: 1px solid #c8dce8; border-radius: 13px; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,247,251,.94)); box-shadow: 0 7px 18px rgba(29,75,111,.06); transition: border-color .2s ease, box-shadow .2s ease; }
.operator-group-card:hover { color: #0c5e7f; border-color: #7dbbd8; }
.operator-group-card.is-active { flex-grow: 1.35; color: white; border-color: #246f99; background: radial-gradient(circle at 100% 0, rgba(87,193,236,.24), transparent 46%), linear-gradient(145deg, #153e5b, #0d2b41); box-shadow: 0 12px 26px rgba(18,73,107,.2); }
.operator-group-card > div { min-width: 0; display: grid; gap: 2px; }
.operator-group-card strong { font-size: 13px; }
.operator-group-card small { overflow: hidden; color: #586f7d; font-size: 10px; font-weight: 550; white-space: nowrap; text-overflow: ellipsis; }
.operator-group-card.is-active small { color: #b9d6e7; }
.operator-group-card > b { min-width: 25px; padding: 4px 6px; text-align: center; border: 1px solid rgba(79,128,155,.24); border-radius: 8px; font-size: 10px; }
.operator-group-card--common { border-color: #b8d9cc; background: linear-gradient(145deg, #f8fffc, #eaf7f1); }
.operator-group-card--common.is-active { border-color: #197257; background: radial-gradient(circle at 100% 0, rgba(93,221,173,.22), transparent 46%), linear-gradient(145deg, #174c3e, #0b3027); }
.group-presence { width: 8px; height: 8px; border-radius: 50%; background: #8da4b2; box-shadow: 0 0 0 4px rgba(141,164,178,.12); }
.group-presence--online { background: #21bb7d; box-shadow: 0 0 0 4px rgba(33,187,125,.13); }
.group-presence--lunch, .group-presence--smoke_break { background: #e5ad3f; box-shadow: 0 0 0 4px rgba(229,173,63,.13); }

.risk-health--soft { border-color: #afd9c7 !important; background: #f1fbf6 !important; }
.risk-health--hard { border-color: #efc3bd !important; background: #fff5f2 !important; }
.risk-health--soft b { color: #126a4c !important; }
.risk-health--hard b { color: #a83d35 !important; }

.risk-search-panel { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 9px; padding: 10px 12px; border: 1px solid #bfd4e1; border-radius: 13px; background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(235,245,250,.92)); box-shadow: 0 8px 22px rgba(26,72,104,.07); }
.risk-search-panel > label { flex: 1; display: grid; gap: 4px; }
.risk-search-panel > label > span { color: #496877; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.risk-search-panel input { width: 100%; min-height: 38px; padding: 8px 11px; color: #102f43; border-color: #a9c7d7; border-radius: 9px; background: white; font-size: 13px; font-weight: 550; }
.risk-search-panel input:focus { border-color: #418fb5; box-shadow: 0 0 0 3px rgba(65,143,181,.12); }
.risk-search-feedback { flex: 0 0 auto; min-height: 38px; display: flex; align-items: center; gap: 5px; padding: 6px 9px; color: #526e7d; border: 1px solid #bdd3df; border-radius: 9px; background: rgba(255,255,255,.82); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.risk-search-feedback strong { color: #173d54; font-size: 13px; }
.risk-search-feedback kbd { margin-left: 5px; padding: 3px 5px; color: #3f6173; border: 1px solid #b8ceda; border-bottom-width: 2px; border-radius: 5px; background: #f6fafb; font: 750 9px/1 Geist, sans-serif; }
.risk-search-submit { width: auto; min-width: 92px; min-height: 38px; padding: 7px 12px; color: #17445d; border-color: #9fc2d4; background: #fff; font-weight: 750; }

.risk-portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: 0; overflow: hidden; margin-bottom: 12px; border: 1px solid #bfd5e1; border-radius: 18px; background: #edf4f7; box-shadow: 0 16px 38px rgba(23,66,96,.11); }
.risk-registry-card { position: relative; min-width: 0; overflow: hidden; border-right: 1px solid #d1e0e6; border-bottom: 1px solid #d1e0e6; background: #fbfdfe; }
.risk-registry-card--soft { border-right: 1px solid #bcd9cd; background: radial-gradient(circle at 0 0, rgba(54,185,130,.1), transparent 35%), #fbfefc; }
.risk-registry-card--hard { background: radial-gradient(circle at 100% 0, rgba(222,93,76,.11), transparent 35%), #fffdfc; }
.risk-registry-card::before { position: absolute; z-index: 2; inset: 0 0 auto; height: 3px; content: ""; }
.risk-registry-card--soft::before { background: linear-gradient(90deg, #27a978, #74d2ad); }
.risk-registry-card--hard::before { background: linear-gradient(90deg, #f09270, #c94b49); }
.risk-registry-card--tone-1::before { background: linear-gradient(90deg, #27a978, #74d2ad); }
.risk-registry-card--tone-2::before { background: linear-gradient(90deg, #3b96c4, #7bc8e8); }
.risk-registry-card--tone-3::before { background: linear-gradient(90deg, #d5a12b, #f1cf71); }
.risk-registry-card--tone-4::before { background: linear-gradient(90deg, #e17856, #efa283); }
.risk-registry-card--tone-5::before { background: linear-gradient(90deg, #bd4b55, #e38488); }
.risk-registry-head { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 15px 12px; border-bottom: 1px solid rgba(125,158,176,.2); }
.risk-registry-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.risk-registry-title h2 { margin: 0; color: #17384d; font-size: 18px; letter-spacing: -.03em; }
.risk-registry-title p { margin: 3px 0 0; color: #566f7d; font-size: 11px; font-weight: 550; }
.risk-registry-title p span { display: inline; }
.risk-registry-title p i { padding: 0 3px; font-style: normal; }
.risk-signal { flex: 0 0 12px; width: 12px; height: 34px; border-radius: 999px; }
.risk-registry-card--soft .risk-signal { background: linear-gradient(#55d39e, #16845d); box-shadow: 0 0 0 5px rgba(52,177,125,.09); }
.risk-registry-card--hard .risk-signal { background: linear-gradient(#ff9b76, #bd373d); box-shadow: 0 0 0 5px rgba(205,72,67,.09); }
.risk-registry-card--tone-1 .risk-signal { background: #2eaa7d; box-shadow: 0 0 0 5px rgba(46,170,125,.1); }
.risk-registry-card--tone-2 .risk-signal { background: #3b96c4; box-shadow: 0 0 0 5px rgba(59,150,196,.1); }
.risk-registry-card--tone-3 .risk-signal { background: #d5a12b; box-shadow: 0 0 0 5px rgba(213,161,43,.1); }
.risk-registry-card--tone-4 .risk-signal { background: #dc7554; box-shadow: 0 0 0 5px rgba(220,117,84,.1); }
.risk-registry-card--tone-5 .risk-signal { background: #bd4b55; box-shadow: 0 0 0 5px rgba(189,75,85,.1); }
.risk-registry-metrics { flex: 0 0 auto; display: flex; gap: 5px; }
.risk-registry-metrics span { min-width: 78px; display: grid; gap: 2px; padding: 7px 9px; color: #5b7482; text-align: right; border: 1px solid rgba(126,158,175,.28); border-radius: 9px; background: rgba(255,255,255,.78); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.risk-registry-metrics b { overflow: hidden; color: #133449; font-size: 12px; text-overflow: ellipsis; }
.risk-assignment-form { display: grid; }
.risk-customer-scroll { min-height: 238px; max-height: 370px; overflow: auto; overscroll-behavior: contain; scrollbar-color: #8bb7ca #edf4f7; scrollbar-width: thin; background: rgba(255,255,255,.64); }
.risk-customer-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.risk-customer-scroll::-webkit-scrollbar-track { background: #edf4f7; }
.risk-customer-scroll::-webkit-scrollbar-thumb { border: 2px solid #edf4f7; border-radius: 999px; background: #8bb7ca; }
.risk-customer-table { min-width: 720px; margin: 0; }
.risk-customer-table thead { position: sticky; z-index: 1; top: 0; }
.risk-customer-table th { padding: 9px 9px; color: #405e6e; background: rgba(237,245,248,.97); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.risk-registry-card--hard .risk-customer-table th { background: rgba(251,241,238,.97); }
.risk-customer-table td { padding: 9px; color: #17384c; border-bottom-color: rgba(135,165,181,.2); font-size: 12px; font-weight: 550; line-height: 1.3; transition: background .18s ease; }
.risk-customer-table tbody tr:hover td { background: rgba(70,152,191,.055); }
.risk-customer-table tbody tr:has([data-risk-customer]:checked) td { background: rgba(43,153,111,.09); }
.risk-registry-card--hard .risk-customer-table tbody tr:has([data-risk-customer]:checked) td { background: rgba(203,74,65,.08); }
.risk-customer-table tbody tr.is-search-muted { opacity: .28; }
.risk-customer-table tbody tr.is-search-match td { position: relative; background: #fff4b8; box-shadow: inset 0 1px #e6c75d, inset 0 -1px #e6c75d; }
.risk-customer-table tbody tr.is-search-match td:first-child { box-shadow: inset 3px 0 #d69a18, inset 0 1px #e6c75d, inset 0 -1px #e6c75d; }
.risk-customer-table tbody tr.is-search-focus td { animation: risk-search-pulse .7s ease-out; }
@keyframes risk-search-pulse { 35% { background: #ffe071; } }
.risk-check-cell { width: 32px; text-align: center; }
.risk-check-cell input { width: 14px; height: 14px; margin: 0; accent-color: #197b5a; }
.risk-registry-card--hard .risk-check-cell input { accent-color: #bd4542; }
.risk-customer-identity { min-width: 135px; }
.risk-customer-identity a { display: block; overflow: hidden; color: #183d53; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.risk-customer-table td > small { display: block; overflow: hidden; margin-top: 3px; color: #5d7583; font-size: 10px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.risk-customer-table td > small i { padding: 0 2px; font-style: normal; }
.risk-days { display: inline-grid; min-width: 35px; padding: 5px 7px; color: #176f52; text-align: center; border-radius: 7px; background: #e5f6ee; font: 850 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.risk-registry-card--hard .risk-days { color: #a53939; background: #fee9e4; }
.risk-registry-card--tone-4 .risk-days, .risk-registry-card--tone-5 .risk-days { color: #a53939; background: #fee9e4; }
.risk-registry-empty { grid-column: 1 / -1; min-height: 180px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 30px; color: #657c88; text-align: center; background: #f8fbfc; }
.risk-registry-empty strong { color: #24475a; font-size: 16px; }
.assignment-chip { display: inline-flex; max-width: 96px; padding: 5px 8px; overflow: hidden; color: #145b7d; border: 1px solid #a9cfe2; border-radius: 7px; background: #eef8fc; font-size: 10px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.assignment-chip--common { color: #17694f; border-color: #b4ddcc; background: #edfaf4; }
.assignment-chip--empty { color: #6f7e87; border-color: #d4dfe4; background: #f5f8f9; }
.risk-assignment-bar { min-height: 64px; display: grid; grid-template-columns: auto minmax(145px, .65fr) minmax(280px, 1fr); align-items: end; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(123,157,176,.24); background: rgba(244,249,251,.92); }
.risk-registry-card--hard .risk-assignment-bar { background: rgba(252,246,244,.94); }
.risk-selection-status { min-width: 62px; display: grid; place-items: center; align-self: stretch; padding: 5px 8px; color: #536f7e; border: 1px solid rgba(119,156,176,.34); border-radius: 9px; background: white; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.risk-selection-status b { color: #173e55; font-size: 15px; line-height: 1; }
.risk-assignment-bar > label { display: grid; gap: 3px; }
.risk-assignment-bar > label > span { color: #526d7c; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.risk-assignment-bar select { min-height: 34px; padding: 6px 24px 6px 8px; font-size: 11px; font-weight: 600; }
.risk-assignment-actions { display: grid; grid-template-columns: 1.2fr 1fr .72fr; gap: 5px; }
.risk-assignment-actions button { min-height: 34px; padding: 6px 8px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.risk-assignment-actions button:disabled { opacity: .45; cursor: not-allowed; }
.risk-pagination { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 12px; color: #526e7e; border-top: 1px solid rgba(123,157,176,.22); background: rgba(248,251,252,.92); font-size: 10px; font-weight: 700; }
.risk-pagination > div { display: flex; align-items: center; gap: 3px; }
.risk-pagination a, .risk-pagination i { min-width: 27px; min-height: 27px; display: grid; place-items: center; padding: 4px; color: #315b70; border: 1px solid #c3d7e1; border-radius: 7px; background: #fff; font-style: normal; text-decoration: none; }
.risk-pagination a:hover { color: #0d6388; border-color: #7fb8d1; }
.risk-pagination a.is-current { color: #fff; border-color: #236e92; background: #236e92; }
.risk-registry-card--hard .risk-pagination a.is-current { border-color: #b94a47; background: #b94a47; }
.risk-pagination i { border-color: transparent; background: transparent; }

.admin-group-blueprint { margin-bottom: 12px; }
.admin-blueprint-date-form { display: flex; align-items: end; gap: 5px; }
.admin-blueprint-date-form label { display: grid; gap: 2px; color: #a9c6d8; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.admin-blueprint-date-form input { min-width: 116px; min-height: 29px; padding: 4px 7px; color: #e6f5ff; border-color: rgba(124,199,239,.3); background: rgba(6,25,43,.7); }
.admin-blueprint-date-form button { min-height: 29px; padding: 4px 8px; color: #d9eef9; border-color: rgba(124,199,239,.32); background: rgba(255,255,255,.06); }

.common-group-blueprint { border-color: rgba(73,198,151,.42); background-color: #0b2721; background-image: radial-gradient(circle at 88% 0, rgba(46,190,139,.22), transparent 34%), linear-gradient(rgba(102,210,169,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(102,210,169,.07) 1px, transparent 1px); }
.common-group-blueprint::before { background: linear-gradient(#59d7aa, #42aee2); }

@media (max-width: 980px) {
  .overdue-group-manager-body { grid-template-columns: 1fr; }
  .overdue-group-create-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
  .overdue-group-create-form header { grid-column: 1 / -1; }
  .overdue-group-create-form > div { display: contents; }
  .risk-portfolio-grid { grid-template-columns: 1fr; }
  .risk-registry-card--soft { border-right: 0; border-bottom: 1px solid #bcd9cd; }
  .blueprint-heading { flex-wrap: wrap; }
}

@media (max-width: 680px) {
  .groups-health-strip { width: 100%; }
  .overdue-group-list { max-height: none; grid-template-columns: 1fr; overflow: visible; }
  .overdue-group-editor { grid-template-columns: 1fr; }
  .overdue-group-editor > header { grid-template-columns: 25px minmax(0, 1fr); }
  .overdue-group-edit-form { grid-template-columns: 1fr 1fr; }
  .overdue-group-edit-form label:first-of-type { grid-column: 1 / -1; }
  .overdue-group-delete-form { justify-content: flex-start; }
  .overdue-group-create-form { grid-template-columns: 1fr 1fr; }
  .overdue-group-create-form label:first-of-type, .overdue-group-create-form header, .overdue-group-create-form button { grid-column: 1 / -1; }
  .operator-group-card { flex-basis: 132px; }
  .risk-portfolio-grid { border-radius: 12px; }
  .risk-search-panel { align-items: stretch; flex-direction: column; }
  .risk-search-feedback { justify-content: center; }
  .risk-search-submit { width: 100%; }
  .risk-registry-head { align-items: flex-start; flex-direction: column; }
  .risk-registry-metrics { width: 100%; }
  .risk-registry-metrics span { flex: 1; text-align: left; }
  .risk-assignment-bar { grid-template-columns: auto minmax(0, 1fr); }
  .risk-assignment-actions { grid-column: 1 / -1; }
  .admin-blueprint-date-form { width: 100%; flex-wrap: wrap; }
  .admin-blueprint-date-form label { flex: 1 1 120px; }
  .admin-blueprint-date-form input { width: 100%; min-width: 0; }
}

/* Live team dashboard */
.team-live-bar { min-height: 42px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 12px; color: #365c6b; border: 1px solid #b9ddcf; border-radius: 12px; background: linear-gradient(100deg, #effbf6, #f8fcfd); box-shadow: 0 8px 22px rgba(28,106,79,.07); font-size: 11px; font-weight: 600; }
.team-dashboard-intro { margin: 0 0 14px; color: rgba(238,248,244,.78); font-size: 14px; font-weight: 550; }
.team-live-bar strong { color: #116647; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.team-live-bar time { margin-left: auto; color: #617a85; font-size: 10px; font-weight: 650; }
.team-live-signal { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #1fba78; box-shadow: 0 0 0 5px rgba(31,186,120,.12); animation: team-live-pulse 1.7s ease-in-out infinite; }
.is-live-stale .team-live-bar { border-color: #e8c99c; background: #fff9ef; }
.is-live-stale .team-live-signal { background: #d28a29; box-shadow: 0 0 0 5px rgba(210,138,41,.12); animation-duration: .7s; }
.operator-live-status { min-width: 82px; justify-content: center; color: #fff; border: 0; font-size: 10px; font-weight: 800; }
.operator-live-status.status-online { background: #16835a; }
.operator-live-status.status-lunch { background: #a86d08; }
.operator-live-status.status-smoke_break { background: #c0521c; }
.operator-live-status.status-offline { background: #5c6c78; }
.team-operator-scroll { max-height: 390px; overflow: auto; }
.team-operator-scroll thead, .team-calls-scroll thead { position: sticky; z-index: 1; top: 0; }
.team-calls-scroll { max-height: 390px; overflow: auto; }
.team-calls-scroll tr.is-active-call td:first-child { box-shadow: inset 3px 0 #1c9c6a; }
.team-calls-scroll tr.is-active-call td { background: rgba(46,177,125,.06); }
.metrics-wide > div { grid-column: auto; min-height: 112px; padding: 14px; }
.metrics-wide span { font-size: clamp(2rem, 2.5vw, 3rem); }
@keyframes team-live-pulse { 50% { transform: scale(.76); box-shadow: 0 0 0 9px rgba(31,186,120,0); } }

@media (max-width: 680px) {
  .team-live-bar { align-items: flex-start; flex-wrap: wrap; }
  .team-live-bar time { width: 100%; margin-left: 17px; }
}

/* Global typography readability */
html { text-rendering: optimizeLegibility; -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
body, button, input, select, textarea { font-synthesis: none; }
.content-stage { color: #0d1c1a; font-size: 15px; line-height: 1.5; }
.content-stage p, .content-stage label, .content-stage td, .content-stage th, .content-stage button, .content-stage input, .content-stage select, .content-stage textarea { line-height: 1.4; }
.content-stage table th { color: #344b47; font-size: 12px; font-weight: 800; }
.content-stage table td { color: #13211f; font-size: 13px; font-weight: 550; }
.content-stage button, .content-stage input, .content-stage select, .content-stage textarea { font-size: 13px; font-weight: 600; }
.content-stage input::placeholder, .content-stage textarea::placeholder { color: #697a77; opacity: 1; }
.content-stage small { font-size: 11px; line-height: 1.4; }
.content-stage .muted { color: #506460; }
.primary-nav a span { font-size: 14px; font-weight: 650; }
.sidebar-link, .user-info { font-size: 13px; }
.blueprint-kicker,
.blueprint-dialog-head > div > span,
.blueprint-node-top em,
.blueprint-node-bottom,
.blueprint-voice-display,
.blueprint-block-voice select,
.dialer-live-signal,
.dialer-live-controls small,
.dialer-live-meta span,
.dialer-live-state,
.dialer-live-audio-pending,
.voice-recorder-form label > span,
.voice-file-drop small,
.voice-record-card span,
.admin-blueprint-date-form label { font-size: 11px; line-height: 1.4; }
.blueprint-summary span,
.blueprint-node-top b,
.blueprint-data,
.dialer-live-controls > span,
.dialer-live-controls button,
.dialer-live-sequence,
.dialer-live-empty,
.voice-format-note span,
.voice-delete-button { font-size: 11px; line-height: 1.35; }

/* Movable customer card */
.customer-card-window {
  position: fixed;
  z-index: 1500;
  width: min(1040px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
  overflow: hidden;
  color: #13211f;
  border: 1px solid rgba(77, 176, 145, .55);
  border-radius: 16px;
  background: #f5faf8;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48), 0 0 0 1px rgba(255, 255, 255, .55) inset;
}
.customer-card-window[hidden] { display: none; }
.customer-card-window.is-dragging { box-shadow: 0 34px 100px rgba(0, 0, 0, .56), 0 0 0 2px rgba(75, 205, 163, .28); }
.customer-card-window-head {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px 7px 12px;
  color: #eafff8;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(110deg, #0a302a, #105344 62%, #183b47);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.customer-card-window.is-dragging .customer-card-window-head { cursor: grabbing; }
.customer-card-window-identity, .customer-card-window-actions { display: flex; align-items: center; }
.customer-card-window-identity { min-width: 0; gap: 9px; }
.customer-card-window-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  color: #063028;
  border-radius: 9px;
  background: linear-gradient(145deg, #8bf0ca, #53c9a1);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.customer-card-window-identity > div { min-width: 0; }
.customer-card-window-identity strong, .customer-card-window-identity small { overflow: hidden; display: block; white-space: nowrap; text-overflow: ellipsis; }
.customer-card-window-identity strong { font-size: 13px; }
.customer-card-window-identity small { margin-top: 1px; color: rgba(234, 255, 248, .62); font-size: 9px; }
.customer-card-window-actions { gap: 5px; }
.customer-card-window-actions button {
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  display: grid;
  place-items: center;
  color: #eafff8;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.customer-card-window-actions button:hover { border-color: rgba(255, 255, 255, .42); background: rgba(255, 255, 255, .16); }
#customer-card-close:hover { border-color: rgba(255, 139, 151, .7); background: rgba(185, 50, 66, .65); }
.customer-card-window-body { position: relative; height: calc(100% - 52px); background: #edf5f2; }
.customer-card-window iframe { position: relative; z-index: 1; width: 100%; height: 100%; display: block; border: 0; background: #edf5f2; }
.customer-card-window-loading { position: absolute; z-index: 0; inset: 0; display: grid; place-items: center; color: #51716a; font-size: 12px; font-weight: 750; }
.customer-card-window.is-loading iframe { opacity: 0; }
.customer-card-window.is-minimized {
  width: 330px;
  height: 240px;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42), 0 0 0 1px rgba(255, 255, 255, .5) inset;
}
.customer-card-window.is-minimized .customer-card-window-head { height: 44px; cursor: grab; }
.customer-card-window.is-minimized.is-dragging .customer-card-window-head { cursor: grabbing; }
.customer-card-window.is-minimized .customer-card-window-mark { width: 30px; height: 30px; flex-basis: 30px; }
.customer-card-window.is-minimized .customer-card-window-actions button { width: 30px; height: 30px; }
.customer-card-window.is-minimized .customer-card-window-body { height: 196px; overflow: hidden; cursor: zoom-in; }
.customer-card-window.is-minimized iframe {
  width: 1100px;
  height: 654px;
  max-width: none;
  transform: scale(.3);
  transform-origin: left top;
  pointer-events: none;
}
.customer-card-window.is-minimized .customer-card-window-loading { font-size: 10px; }

html.is-embedded-card body { display: block; min-height: 100vh; overflow-x: hidden; background: #edf5f2; }
html.is-embedded-card body::before,
html.is-embedded-card .ambient-bg,
html.is-embedded-card #pbx-signal-canvas,
html.is-embedded-card .sidebar,
html.is-embedded-card .top-bar,
html.is-embedded-card .incoming-call-panel,
html.is-embedded-card .app-footer,
html.is-embedded-card .customer-card-window { display: none !important; }
html.is-embedded-card .app-shell { width: 100%; min-width: 0; padding: 12px; }
html.is-embedded-card .content-stage { width: 100%; }
html.is-embedded-card .flash-list { margin: 0 0 10px; }

@media (max-width: 720px) {
  .customer-card-window { width: calc(100vw - 12px); height: calc(100vh - 12px); border-radius: 12px; }
  .customer-card-window-head { height: 48px; }
  .customer-card-window-body { height: calc(100% - 48px); }
  .customer-card-window.is-minimized { width: min(330px, calc(100vw - 16px)); }
  html.is-embedded-card .app-shell { padding: 8px; }
}

/* Realtime calls master-detail browser listening */
.realtime-toolbar-summary .realtime-summary { width: 100%; }
.realtime-workbench { display: grid; grid-template-columns: minmax(310px, 390px) minmax(0, 1fr); gap: 16px; min-height: 510px; }
.realtime-operator-panel, .realtime-listening-panel { overflow: hidden; border: 1px solid #d7e4e8; border-radius: 22px; background: #fff; box-shadow: 0 13px 34px rgba(22, 56, 68, .08); }
.realtime-operator-panel { display: flex; flex-direction: column; min-height: 0; }
.realtime-operator-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #e1e9ec; background: #f8fbfc; }
.realtime-operator-panel > header div { display: grid; gap: 3px; }
.realtime-operator-panel > header span { color: #6f838b; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.realtime-operator-panel > header strong { color: #1b3945; font-size: 15px; }
.realtime-operator-panel > header b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; color: #fff; background: #0c756a; font-size: 13px; }
.realtime-operator-list { display: grid; align-content: start; gap: 7px; max-height: 640px; padding: 10px; overflow-y: auto; scrollbar-width: thin; }
.realtime-operator-row { width: 100%; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid transparent; border-radius: 15px; color: inherit; background: transparent; text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.realtime-operator-row:hover { border-color: #c7dedb; background: #f3f9f7; transform: translateX(2px); }
.realtime-operator-row.is-selected { border-color: #8fcfc0; background: linear-gradient(100deg, #eaf9f4, #f8fcfb); box-shadow: inset 3px 0 #15947d; }
.realtime-operator-row.is-listening { border-color: #63c9ad; }
.realtime-operator-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #153e4d, #147a73); font-size: 16px; font-weight: 850; }
.realtime-operator-row.is-listening .realtime-operator-avatar { background: linear-gradient(145deg, #05725f, #2fc7a2); box-shadow: 0 0 0 5px rgba(47, 199, 162, .1); }
.realtime-operator-identity { min-width: 0; display: grid; gap: 4px; }
.realtime-operator-identity strong, .realtime-operator-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.realtime-operator-identity strong { color: #173744; font-size: 13px; }
.realtime-operator-identity small { color: #72858d; font-size: 11px; }
.realtime-operator-live { display: grid; justify-items: end; gap: 6px; }
.realtime-operator-live b { padding: 4px 7px; border-radius: 999px; color: #8b641f; background: #fff2d8; font-size: 9px; text-transform: uppercase; }
.realtime-operator-live b.state-connected { color: #08705d; background: #e2f8f0; }
.realtime-operator-live b.state-held { color: #815616; background: #fff0ca; }
.realtime-operator-live time { color: #31515d; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 800; }
.realtime-operator-empty { display: grid; flex: 1; align-content: center; justify-items: center; gap: 8px; min-height: 300px; padding: 30px; color: #71858d; text-align: center; }
.realtime-operator-empty[hidden] { display: none; }
.realtime-operator-empty h3, .realtime-operator-empty p { margin: 0; }
.realtime-operator-empty h3 { color: #2b4954; font-size: 15px; }
.realtime-operator-empty p { max-width: 230px; font-size: 12px; line-height: 1.5; }
.realtime-listening-panel { position: relative; display: grid; min-height: 510px; background: radial-gradient(circle at 50% 15%, rgba(40, 192, 157, .11), transparent 38%), linear-gradient(150deg, #071b24, #0d303c 65%, #0b2530); color: #f1fbff; }
.realtime-listening-placeholder { align-self: center; display: grid; justify-items: center; gap: 10px; padding: 40px; text-align: center; }
.realtime-listening-placeholder[hidden], .realtime-listening-session[hidden] { display: none; }
.realtime-listening-placeholder h3, .realtime-listening-placeholder p { margin: 0; }
.realtime-listening-placeholder h3 { font-size: 20px; }
.realtime-listening-placeholder p { max-width: 470px; color: #a7c0ca; line-height: 1.55; }
.realtime-headphones { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid rgba(105, 224, 193, .35); border-radius: 50%; color: #66dfbf; background: rgba(55, 209, 170, .08); font-size: 25px; letter-spacing: 8px; }
.realtime-listening-session { display: grid; grid-template-rows: auto 1fr auto auto; gap: 20px; padding: 26px; }
.realtime-listening-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.realtime-listening-head > div { display: grid; gap: 5px; }
.realtime-listening-head h3, .realtime-listening-head p { margin: 0; }
.realtime-listening-head h3 { margin-top: 5px; font-size: 25px; letter-spacing: -.03em; }
.realtime-listening-head p { color: #9eb8c2; }
.realtime-listening-head time { color: #72e2c2; font-size: 29px; font-weight: 850; font-variant-numeric: tabular-nums; }
.realtime-audio-visual { align-self: center; display: flex; align-items: center; justify-content: center; gap: 7px; height: 150px; padding: 20px; }
.realtime-audio-visual span { width: 7px; height: 9%; border-radius: 999px; background: linear-gradient(#6ce4c4, #1d8c7d); opacity: .38; transform-origin: center; }
.realtime-audio-visual.is-listening span { opacity: 1; animation: realtime-audio-bar .85s ease-in-out infinite alternate; }
.realtime-audio-visual span:nth-child(2n) { animation-delay: -.25s; }
.realtime-audio-visual span:nth-child(3n) { animation-delay: -.48s; }
.realtime-audio-visual span:nth-child(4n) { animation-delay: -.63s; }
.realtime-listening-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 15px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(0,0,0,.16); }
.realtime-listening-route > div { min-width: 0; display: grid; gap: 4px; }
.realtime-listening-route > div:last-child { text-align: right; }
.realtime-listening-route span { color: #82a2ae; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.realtime-listening-route strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.realtime-listening-route > i { color: #57d5b6; font-style: normal; }
.realtime-admin-controls { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(117, 226, 198, .16); border-radius: 16px; background: rgba(0, 0, 0, .2); }
.realtime-control-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.realtime-admin-controls button { min-height: 38px; padding: 8px 11px; border: 1px solid rgba(118, 222, 196, .32); border-radius: 10px; color: #e8fbf6; background: rgba(43, 156, 133, .18); font-size: 11px; }
.realtime-admin-controls button:hover { background: rgba(43, 185, 153, .3); }
.realtime-admin-controls button:disabled { opacity: .42; cursor: not-allowed; }
.realtime-admin-controls button.danger-button { border-color: rgba(255, 126, 137, .38); color: #ffdce0; background: rgba(174, 48, 62, .24); }
.realtime-control-grid { display: grid; grid-template-columns: minmax(145px, 1fr) auto minmax(145px, 1fr) auto; align-items: end; gap: 7px; }
.realtime-control-grid label { display: grid; gap: 4px; }
.realtime-control-grid label span { color: #8caab4; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.realtime-control-grid select { width: 100%; min-height: 38px; border-color: rgba(255,255,255,.18); color: #eaf9fb; background: #123943; }
.realtime-control-grid option { color: #17343d; background: #fff; }
.realtime-whisper-note { color: #7f9ea8; line-height: 1.45; }
.realtime-listening-controls { display: flex; align-items: center; gap: 14px; padding-top: 3px; }
.realtime-listening-controls button { min-width: 175px; min-height: 44px; border-radius: 13px; }
.realtime-listening-controls > div { display: grid; gap: 3px; }
.realtime-listening-controls strong { color: #d8e8ed; font-size: 12px; }
.realtime-listening-controls small { color: #7899a5; }
@keyframes realtime-audio-bar { from { height: 12%; } to { height: 88%; } }
@media (max-width: 1100px) { .realtime-control-grid { grid-template-columns: minmax(150px, 1fr) auto; } }
@media (max-width: 950px) { .realtime-workbench { grid-template-columns: 1fr; } .realtime-operator-list { max-height: 330px; } .realtime-listening-panel { min-height: 460px; } }
@media (max-width: 560px) { .realtime-listening-session { padding: 19px; } .realtime-listening-head h3 { font-size: 20px; } .realtime-listening-head time { font-size: 22px; } .realtime-listening-controls { align-items: stretch; flex-direction: column; } .realtime-listening-controls button { width: 100%; } .realtime-control-row, .realtime-control-grid { grid-template-columns: 1fr; } }
