:root {
  --page: #edf4fb;
  --page-deep: #e3edf8;
  --surface: rgb(255 255 255 / 86%);
  --surface-solid: #ffffff;
  --surface-blue: #f3f8fe;
  --ink: #102a4c;
  --ink-soft: #1f3a6b;
  --muted: #687b96;
  --muted-light: #8ca0b9;
  --brand: #035ecf;
  --brand-deep: #034da8;
  --signal: #00c8cd;
  --signal-soft: #e8fbfc;
  --border: rgb(3 94 207 / 12%);
  --border-strong: rgb(3 94 207 / 22%);
  --positive: #1fa879;
  --positive-soft: #eaf8f3;
  --warning: #e19532;
  --warning-soft: #fff6e8;
  --danger: #dc5b66;
  --danger-soft: #fff0f2;
  --shadow: 0 18px 55px rgb(27 72 126 / 10%), 0 2px 8px rgb(27 72 126 / 5%);
  --shadow-soft: 0 10px 30px rgb(27 72 126 / 7%);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
  /* Accessible UI type scale: 12 / 14 / 16 / 18 / 20 / 24 / 32 / 40 px. */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-display: 2.5rem;
  color: var(--ink);
  font-family: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 82% -10%, rgb(0 200 205 / 13%), transparent 34%),
    linear-gradient(145deg, #f8fbff 0%, var(--page) 50%, #e8f1fa 100%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgb(0 200 205 / 28%);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 2px;
  font-size: clamp(var(--text-2xl), 2vw, var(--text-3xl));
}

h2 {
  margin-bottom: 0;
  font-size: clamp(var(--text-xl), 1.6vw, var(--text-2xl));
}

h3 {
  margin-bottom: 0;
  font-size: var(--text-lg);
}

.muted,
.meta,
.empty-state {
  color: var(--muted);
}

.eyebrow,
.section-kicker,
.nav-label {
  margin-bottom: 5px;
  color: var(--brand);
  font-size: var(--text-xs);
  font-weight: 760;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.button,
.filter-button,
.nav-item,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 650;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled,
.filter-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button-primary {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--brand), #0878dc);
  box-shadow: 0 9px 22px rgb(3 94 207 / 20%);
  color: white;
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
}

.button-secondary {
  padding: 0 15px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--brand);
}

.button-ghost {
  padding: 0 13px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-soft);
}

.button-ghost:hover:not(:disabled),
.button-secondary:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--surface-blue);
}

.button-full {
  width: 100%;
}

.icon-button {
  width: 42px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.surface,
.glass-card {
  border: 1px solid rgb(255 255 255 / 72%);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.surface {
  border-radius: var(--radius-lg);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted-light);
  box-shadow: 0 0 0 4px rgb(140 160 185 / 12%);
}

.status-dot.is-positive {
  background: var(--positive);
  box-shadow: 0 0 0 4px rgb(31 168 121 / 12%);
}

.status-dot.is-warning,
.connection-status.is-reconnecting .status-dot {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgb(225 149 50 / 12%);
}

/* Login */
.login-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 28px;
}

.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: -14vw;
  right: -9vw;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgb(0 200 205 / 19%), rgb(0 200 205 / 0%) 68%);
}

.ambient-two {
  bottom: -18vw;
  left: -10vw;
  width: 52vw;
  height: 52vw;
  background: radial-gradient(circle, rgb(3 94 207 / 16%), rgb(3 94 207 / 0%) 68%);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 450px);
  padding: 36px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-family: Comfortaa, ui-rounded, "SF Pro Rounded", sans-serif;
  font-size: var(--text-lg);
  font-weight: 750;
  letter-spacing: -0.04em;
}

.brand img {
  width: 32px;
  height: 32px;
}

.brand > span > span {
  color: var(--signal);
}

.brand-login {
  margin-bottom: 42px;
  font-size: var(--text-xl);
}

.brand-login img {
  width: 38px;
  height: 38px;
}

.login-copy h1 {
  margin-bottom: 9px;
  font-size: var(--text-3xl);
}

.login-copy > p:last-child {
  margin-bottom: 28px;
  color: var(--muted);
}

.login-card form {
  display: grid;
  gap: 11px;
}

label {
  color: var(--ink-soft);
  font-size: var(--text-base);
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: rgb(255 255 255 / 72%);
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder {
  color: var(--muted-light);
}

input:hover,
input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgb(3 94 207 / 7%);
}

.login-card .button-primary {
  margin-top: 5px;
}

.form-error {
  margin: 3px 0 0;
  color: var(--danger);
  font-size: var(--text-sm);
}

.login-security {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
}

.login-security span {
  margin-right: 5px;
  color: var(--positive);
}

/* Application shell */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 24px 18px 18px;
  border-right: 1px solid rgb(3 94 207 / 9%);
  background: rgb(247 251 255 / 78%);
  box-shadow: 8px 0 35px rgb(38 78 125 / 4%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.sidebar-brand {
  padding: 2px 7px 22px;
}

.practice-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 68%);
}

.practice-avatar,
.user-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--signal));
  color: white;
  font-weight: 760;
}

.practice-avatar {
  width: 36px;
  height: 36px;
  font-size: var(--text-sm);
}

.practice-card div {
  min-width: 0;
}

.practice-card strong,
.practice-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-card strong {
  font-size: var(--text-sm);
}

.practice-card small {
  margin-top: 1px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.main-nav {
  min-height: 0;
  overflow-y: auto;
}

.nav-label {
  margin: 0 10px 7px;
  color: var(--muted-light);
  font-size: var(--text-xs);
}

.nav-label-spaced {
  margin-top: 24px;
}

.nav-item {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 44px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-item + .nav-item {
  margin-top: 4px;
}

.nav-item::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  content: "";
}

.nav-item:hover,
.nav-item.is-active {
  background: rgb(3 94 207 / 7%);
  color: var(--brand);
}

.nav-item.is-active::before {
  background: var(--signal);
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  font-size: var(--text-base);
}

.nav-count,
.count-pill,
.soft-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.nav-count {
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  background: var(--signal-soft);
  color: var(--brand);
  font-size: var(--text-xs);
}

.sidebar-footer {
  display: grid;
  gap: 11px;
  margin-top: auto;
  padding-top: 18px;
}

.handoff-test-button {
  gap: 8px;
  border: 1px solid rgb(0 200 205 / 24%);
  background: var(--signal-soft);
  color: var(--brand);
}

.handoff-test-button:hover {
  border-color: rgb(0 200 205 / 42%);
  background: #ddf8fa;
}

.handoff-test-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgb(0 200 205 / 12%);
}

.sync-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
}

.sync-note strong,
.sync-note small {
  display: block;
}

.sync-note strong {
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.sync-note small {
  color: var(--muted);
  font-size: var(--text-sm);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 80px;
  align-items: center;
  gap: 16px;
  padding: 13px clamp(20px, 3vw, 42px);
  border-bottom: 1px solid rgb(3 94 207 / 8%);
  background: rgb(243 248 253 / 78%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.topbar-title {
  min-width: 0;
}

.topbar-description {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.topbar-title h1,
.topbar-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.connection-status,
.date-chip {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(255 255 255 / 60%);
  color: var(--muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.user-avatar {
  width: 38px;
  height: 38px;
  font-size: var(--text-sm);
}

.menu-button {
  display: none;
}

.workspace-content {
  width: min(100%, 1580px);
  margin: 0 auto;
  padding: 30px clamp(20px, 3vw, 42px) 54px;
}

.view {
  animation: view-in 260ms ease both;
}

.view-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-row,
.page-intro,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.welcome-row,
.page-intro {
  margin-bottom: 22px;
}

.welcome-row h2,
.page-intro h2 {
  margin-bottom: 5px;
  font-size: clamp(var(--text-2xl), 2.5vw, var(--text-3xl));
}

.welcome-row p:last-child,
.page-intro p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.count-pill,
.soft-badge {
  min-height: 30px;
  padding: 0 11px;
  background: var(--signal-soft);
  color: var(--brand);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.section-header {
  min-height: 72px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.section-header-compact {
  min-height: 66px;
}

.section-header h2,
.section-header p {
  margin-bottom: 0;
}

/* Overview */
.metric-icon,
.setting-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-blue);
  color: var(--brand);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.metric-card::after {
  position: absolute;
  right: -25px;
  bottom: -34px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgb(3 94 207 / 5%);
  content: "";
}

.metric-card.is-primary {
  background: linear-gradient(145deg, var(--brand) 0%, #087bd5 75%, var(--signal) 150%);
  color: white;
}

.metric-card.is-primary::after {
  background: rgb(255 255 255 / 10%);
}

.metric-card-label {
  display: flex;
  min-height: 34px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.3;
}

.metric-card.is-primary .metric-card-label,
.metric-card.is-primary small {
  color: rgb(255 255 255 / 72%);
}

.metric-card strong {
  display: block;
  margin: 9px 0 0;
  color: var(--ink);
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
  font-weight: 680;
  letter-spacing: -0.06em;
  line-height: 1;
}

.metric-card.is-primary strong {
  color: white;
}

.metric-card small {
  color: var(--muted-light);
  font-size: var(--text-sm);
}

.metric-icon {
  width: 28px;
  height: 28px;
  font-size: var(--text-sm);
}

.metric-card.is-primary .metric-icon {
  background: rgb(255 255 255 / 14%);
  color: white;
}

.live-calls-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.live-calls-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}

.live-calls-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-calls-title h2 {
  font-size: var(--text-lg);
}

.live-pulse {
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--positive);
  box-shadow: 0 0 0 4px var(--positive-soft);
}

.count-pill.is-live {
  background: var(--positive-soft);
  color: var(--positive);
}

.live-calls-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.live-calls-empty {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  color: var(--muted);
}

.live-empty-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--positive-soft);
  color: var(--positive);
  font-size: var(--text-sm);
  font-weight: 760;
}

.live-call-item {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
}

.live-call-item + .live-call-item {
  border-left: 1px solid var(--border);
}

.live-call-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.live-call-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--signal));
  color: white;
  font-size: var(--text-sm);
  font-weight: 760;
}

.live-call-identity div,
.live-call-context {
  min-width: 0;
}

.live-call-identity strong,
.live-call-identity span,
.live-call-context strong,
.live-call-context span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-call-identity span,
.live-call-context span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.live-call-context {
  text-align: right;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(310px, 0.72fr);
  gap: 16px;
  align-items: stretch;
}

.attention-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.attention-list,
.cases-list {
  display: grid;
}

.attention-item,
.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.attention-item:last-child,
.case-row:last-child {
  border-bottom: 0;
}

.attention-copy,
.case-copy {
  min-width: 0;
}

.attention-meta,
.case-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.priority-label,
.case-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  font-weight: 680;
}

.priority-label {
  gap: 6px;
  color: var(--muted);
}

.priority-label::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--signal);
  content: "";
}

.priority-label.is-urgent { color: var(--danger); }
.priority-label.is-urgent::before { background: var(--danger); }
.priority-label.is-high { color: #98601b; }
.priority-label.is-high::before { background: var(--warning); }

.case-status {
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-blue);
  color: var(--ink-soft);
}

.case-date {
  color: var(--muted-light);
}

.attention-copy strong,
.case-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-base);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-copy p,
.case-copy p {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: var(--text-sm);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.attention-actions,
.case-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.attention-actions .button,
.case-actions .button {
  min-height: 34px;
  padding: 0 10px;
  font-size: var(--text-sm);
}

.overview-aside {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
}

.chart-card {
  overflow: hidden;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.weekly-chart {
  display: grid;
  height: 195px;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  padding: 22px 18px 17px;
}

.week-column {
  display: grid;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.week-bars {
  display: flex;
  height: 100%;
  align-items: end;
  justify-content: center;
  gap: 3px;
}

.week-bar {
  width: min(11px, 45%);
  min-height: 5px;
  border-radius: 7px 7px 3px 3px;
  background: rgb(3 94 207 / 18%);
}

.week-bar.is-automated {
  background: linear-gradient(to top, var(--signal), #5ddfe1);
}

.week-column small {
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
}

.relief-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 21px;
  background:
    radial-gradient(circle at 85% 15%, rgb(0 200 205 / 13%), transparent 40%),
    linear-gradient(145deg, rgb(3 94 207 / 96%), #0b6ec3);
  color: white;
}

.relief-card .section-kicker {
  color: white;
}

.relief-copy {
  display: grid;
  gap: 5px;
}

.relief-method {
  margin: 0;
  color: rgb(255 255 255 / 68%);
  font-size: var(--text-sm);
}

.relief-orb {
  display: grid;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  place-content: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
  box-shadow: inset 0 0 0 7px rgb(255 255 255 / 5%);
  text-align: center;
}

.relief-orb span {
  font-size: var(--text-2xl);
  font-weight: 720;
  letter-spacing: -0.06em;
  line-height: 1;
}

.relief-orb small {
  color: rgb(255 255 255 / 68%);
  font-size: var(--text-sm);
}

.empty-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 25px;
  text-align: center;
}

/* Cases */
.cases-panel {
  overflow: hidden;
}

.cases-toolbar {
  justify-content: flex-start;
  overflow-x: auto;
}

.filter-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--page);
}

.filter-button {
  min-height: 34px;
  padding: 0 11px;
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.filter-button:hover,
.filter-button.is-active {
  background: var(--surface-solid);
  box-shadow: 0 2px 8px rgb(3 94 207 / 8%);
  color: var(--brand);
}

.case-row {
  min-height: 112px;
  grid-template-columns: minmax(320px, 1fr) 230px 430px;
  column-gap: 20px;
}

.case-person {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 2px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.case-person strong,
.case-person span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-person span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.case-row .case-actions {
  min-width: 0;
  align-self: center;
}

.case-status.status-in_progress { background: #eef1ff; color: #5864c6; }
.case-status.status-waiting_patient,
.case-status.status-waiting_practice { background: var(--warning-soft); color: #a66a1f; }
.case-status.status-done { background: var(--positive-soft); color: var(--positive); }

/* Calls */
.calls-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(520px, 1.28fr);
  gap: 16px;
  align-items: start;
}

.calls-list-panel,
.call-detail {
  min-height: 620px;
  overflow: hidden;
}

.calls-list-panel {
  position: sticky;
  top: 96px;
}

.calls-toolbar {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field span {
  position: absolute;
  left: 12px;
  z-index: 1;
  color: var(--muted);
}

.search-field input {
  min-height: 40px;
  padding-left: 34px;
  background: var(--surface-solid);
}

.calls-list {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.call-row {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  padding: 14px 17px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.call-row:last-child {
  border-bottom: 0;
}

.call-row:hover,
.call-row.is-selected {
  background: var(--surface-blue);
}

.call-row.is-selected {
  box-shadow: inset 3px 0 var(--signal);
}

.call-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #ddecfb, #eef8ff);
  color: var(--brand);
  font-size: var(--text-base);
  font-weight: 760;
}

.call-row-copy {
  min-width: 0;
}

.call-row-title,
.call-row-outcome,
.call-row-summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-row-title {
  font-size: var(--text-base);
  font-weight: 680;
}

.call-row-outcome {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.call-row-summary {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.call-row-time {
  color: var(--muted-light);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.call-detail {
  padding: 23px;
}

@media (min-width: 1041px) {
  body.is-calls-view {
    height: 100vh;
    overflow: hidden;
  }

  body.is-calls-view .app-shell {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  body.is-calls-view .workspace {
    display: grid;
    height: 100vh;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  body.is-calls-view .topbar {
    position: static;
  }

  body.is-calls-view .workspace-content,
  body.is-calls-view #callsView,
  body.is-calls-view .calls-layout {
    height: 100%;
    min-height: 0;
  }

  body.is-calls-view .workspace-content {
    overflow: hidden;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  body.is-calls-view .calls-layout {
    align-items: stretch;
  }

  body.is-calls-view .calls-list-panel {
    position: static;
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.is-calls-view .calls-list,
  body.is-calls-view .call-detail {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.is-calls-view .calls-list {
    max-height: none;
  }

  body.is-calls-view .call-detail {
    height: 100%;
  }
}

.detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.detail-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.detail-person .call-avatar {
  width: 48px;
  height: 48px;
}

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

.detail-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.status-label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--signal-soft);
  color: var(--brand);
  font-size: var(--text-sm);
  font-weight: 700;
}

.summary-card,
.handoff-card {
  margin-top: 19px;
  padding: 17px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-blue);
}

.summary-card p,
.handoff-card p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.handoff-card {
  border-color: rgb(225 149 50 / 22%);
  background: var(--warning-soft);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.fact {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgb(255 255 255 / 56%);
}

.fact dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.fact dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 650;
}

.detail-section {
  margin-top: 24px;
}

.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.detail-section-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.related-list,
.timeline-list,
.message-list {
  display: grid;
  gap: 9px;
}

.related-item,
.timeline-item {
  position: relative;
  padding: 11px 13px 11px 18px;
  border-left: 2px solid var(--signal);
}

.related-item strong,
.timeline-item strong {
  display: block;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.related-item p,
.timeline-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.timeline-time {
  color: var(--muted-light);
  font-size: var(--text-sm);
}

.message-list {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f6f9fd;
}

.message {
  max-width: 84%;
  justify-self: end;
}

.message.is-agent {
  justify-self: start;
}

.message-meta {
  margin: 0 4px 3px;
  color: var(--muted-light);
  font-size: var(--text-sm);
}

.message p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px 12px 4px 12px;
  background: var(--brand);
  color: white;
  font-size: var(--text-base);
  line-height: 1.55;
}

.message.is-agent p {
  border: 1px solid var(--border);
  border-radius: 12px 12px 12px 4px;
  background: var(--surface-solid);
  color: var(--ink-soft);
}

.transcript-empty {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #f6f9fd;
}

.phone-link {
  color: var(--brand);
  text-decoration: none;
}

.phone-link:hover {
  text-decoration: underline;
}

/* Analytics and settings */
.analytics-layout,
.settings-grid,
.integration-grid,
.admin-layout {
  display: grid;
  gap: 16px;
}

.analytics-layout {
  grid-template-columns: 1.4fr 0.8fr;
}

.analytics-card,
.usage-card,
.setting-card,
.admin-card {
  overflow: hidden;
}

.analytics-bars {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.analytics-bar-track,
.usage-track {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgb(3 94 207 / 8%);
}

.analytics-bar-track span,
.usage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(to right, var(--brand), var(--signal));
}

.intent-list {
  display: grid;
  padding: 10px 20px 20px;
}

.intent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.intent-row:last-child { border-bottom: 0; }
.intent-row strong { color: var(--brand); }

.taxonomy-note {
  margin: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
}

.usage-card {
  grid-column: 1 / -1;
  padding: 22px;
  background:
    radial-gradient(circle at 92% 10%, rgb(0 200 205 / 18%), transparent 38%),
    var(--surface);
}

.usage-card > div:first-of-type strong {
  color: var(--brand);
  font-size: var(--text-display);
  letter-spacing: -0.06em;
}

.usage-card > div:first-of-type span {
  color: var(--muted);
}

.usage-card p {
  margin: 4px 0 13px;
}

.usage-card small {
  display: block;
  margin-top: 9px;
  color: var(--muted-light);
  font-size: var(--text-sm);
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setting-card,
.admin-card {
  padding: 22px;
}

.setting-icon {
  width: 39px;
  height: 39px;
  margin-bottom: 20px;
}

.setting-card h3,
.admin-card h3 {
  margin-bottom: 8px;
  font-size: var(--text-xl);
}

.setting-card > p:not(.section-kicker),
.admin-card > p:not(.section-kicker) {
  color: var(--muted);
  font-size: var(--text-sm);
}

.settings-list {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
}

.settings-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.settings-list dt {
  color: var(--muted);
  font-size: var(--text-sm);
}

.settings-list dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 670;
  text-align: right;
}

.workflow-card {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 90% 20%, rgb(0 200 205 / 16%), transparent 36%),
    linear-gradient(145deg, rgb(3 94 207 / 96%), #0a6ec4);
}

.workflow-card h3,
.workflow-card p,
.workflow-card .section-kicker {
  color: white;
}

.workflow-card > p:last-child {
  color: rgb(255 255 255 / 67%);
}

.workflow-steps {
  display: flex;
  align-items: center;
  margin: 23px 0;
}

.workflow-steps > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 50%;
  color: rgb(255 255 255 / 70%);
  font-size: var(--text-sm);
}

.workflow-steps > span.is-current {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--brand-deep);
}

.workflow-steps > span span {
  position: absolute;
  margin-top: 62px;
  color: rgb(255 255 255 / 62%);
  font-size: var(--text-sm);
}

.workflow-steps i {
  height: 1px;
  flex: 1;
  background: rgb(255 255 255 / 20%);
}

.integration-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.integration-card {
  padding: 20px;
}

.integration-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.integration-logo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-blue);
  color: var(--brand);
  font-weight: 760;
}

.integration-card h3 {
  margin-bottom: 5px;
}

.integration-card p {
  min-height: 44px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.integration-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--positive);
  font-size: var(--text-base);
  font-weight: 680;
}

.integration-status.is-test { color: var(--warning); }
.integration-status.is-missing { color: var(--danger); }

.integration-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 16px;
  padding: 16px 18px;
}

.integration-note-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--signal-soft);
  color: var(--brand);
  font-weight: 760;
}

.integration-note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.admin-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.privacy-note {
  margin-top: 15px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-blue);
}

.role-list {
  display: grid;
  margin: 11px 0 14px;
}

.role-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
}

.role-list span,
.admin-card small {
  color: var(--muted);
}

.tariff-card {
  background:
    radial-gradient(circle at 88% 12%, rgb(0 200 205 / 18%), transparent 40%),
    linear-gradient(145deg, var(--brand), #0a6ec4);
}

.tariff-card h3,
.tariff-card p,
.tariff-card .section-kicker {
  color: white;
}

.tariff-number {
  margin: 22px 0 14px;
}

.tariff-number strong,
.tariff-number span {
  display: block;
}

.tariff-number strong {
  color: white;
  font-size: var(--text-display);
  letter-spacing: -0.07em;
  line-height: 1;
}

.tariff-number span,
.tariff-card p {
  color: rgb(255 255 255 / 68%);
  font-size: var(--text-sm);
}

.tariff-card .soft-badge {
  background: rgb(255 255 255 / 12%);
  color: white;
}

.coming-soon-card {
  display: grid;
  width: min(100%, 820px);
  justify-items: center;
  margin: 36px auto 0;
  padding: clamp(34px, 6vw, 72px);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgb(0 200 205 / 17%), transparent 42%),
    var(--surface);
}

.coming-soon-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgb(0 200 205 / 34%);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--signal-soft), white);
  box-shadow: 0 14px 32px rgb(0 200 205 / 13%);
  color: var(--brand);
  font-size: var(--text-2xl);
  font-weight: 760;
}

.coming-soon-card h2 {
  margin: 18px 0 8px;
  font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
}

.coming-soon-card > p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: var(--text-base);
}

.coming-soon-features {
  display: grid;
  width: min(100%, 620px);
  gap: 10px;
  margin: 28px 0;
  text-align: left;
}

.coming-soon-features span {
  position: relative;
  padding: 13px 16px 13px 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgb(255 255 255 / 62%);
  color: var(--ink-soft);
  font-weight: 620;
}

.coming-soon-features span::before {
  position: absolute;
  top: 50%;
  left: 16px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--signal-soft);
  color: var(--positive);
  content: "✓";
  font-size: var(--text-xs);
}

.coming-soon-card .coming-soon-note {
  color: var(--muted-light);
  font-size: var(--text-sm);
}

.notice {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100% - 48px));
  margin: 0;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

body.has-handoff-modal {
  overflow: hidden;
}

.handoff-overlay {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.handoff-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgb(11 38 73 / 36%);
  backdrop-filter: blur(5px);
}

.handoff-dialog {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: var(--radius-xl);
  background: var(--surface-solid);
  box-shadow: 0 30px 90px rgb(14 51 94 / 25%);
  animation: handoff-dialog-in 180ms ease-out;
}

@keyframes handoff-dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.handoff-dialog-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.handoff-dialog-header .section-kicker,
.handoff-dialog-header h2 {
  margin-bottom: 0;
}

.handoff-dialog-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand), #0b7ed5);
  box-shadow: 0 10px 25px rgb(3 94 207 / 20%);
  color: white;
  font-size: var(--text-xl);
}

.handoff-close {
  width: 36px;
  height: 36px;
  color: var(--muted);
  font-size: var(--text-xl);
}

.handoff-patient {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 18px 22px 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-blue);
}

.handoff-patient-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--signal));
  color: white;
  font-weight: 760;
}

.handoff-patient > div {
  min-width: 0;
}

.handoff-patient > div small,
.handoff-patient > div strong,
.handoff-patient > div span {
  display: block;
}

.handoff-patient > div small,
.handoff-patient > div span {
  color: var(--muted);
  font-size: var(--text-sm);
}

.handoff-patient > div strong {
  overflow: hidden;
  color: var(--ink);
  font-size: var(--text-lg);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handoff-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 22px 12px;
}

.handoff-facts div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.handoff-facts dt {
  color: var(--muted);
  font-size: var(--text-xs);
}

.handoff-facts dd {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handoff-concern-card {
  margin: 0 22px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--signal-soft);
}

.handoff-concern-card > span,
.handoff-concern-card small {
  color: var(--muted);
  font-size: var(--text-xs);
}

.handoff-concern-card p {
  margin: 3px 0 5px;
  color: var(--ink);
  font-weight: 650;
}

.handoff-concern-card small:empty {
  display: none;
}

.handoff-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 18px 22px 22px;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1260px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tariff-card { grid-column: 1 / -1; }
}

@media (max-width: 1450px) and (min-width: 1041px) {
  .case-row {
    grid-template-columns: minmax(300px, 1fr) 220px;
    row-gap: 12px;
  }

  .case-row .case-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1040px) {
  .app-shell { grid-template-columns: 218px minmax(0, 1fr); }
  .overview-layout { grid-template-columns: 1fr; }
  .overview-aside {
    grid-template-rows: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attention-panel { height: auto; }
  .calls-layout { grid-template-columns: 1fr; }
  .calls-list-panel { position: static; min-height: 0; }
  .calls-list { max-height: 430px; }
  .case-row { grid-template-columns: minmax(220px, 1fr) auto; }
  .case-person { display: none; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    width: min(288px, calc(100vw - 46px));
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    width: 100%;
    border: 0;
    background: rgb(12 39 74 / 34%);
    backdrop-filter: blur(3px);
  }
  .menu-button { display: inline-grid; place-items: center; }
  .connection-status { display: none; }
  .overview-aside,
  .analytics-layout,
  .settings-grid,
  .admin-layout { grid-template-columns: 1fr; }
  .workflow-card,
  .usage-card,
  .tariff-card { grid-column: auto; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .topbar { min-height: 70px; padding: 10px 14px; }
  .topbar-title .eyebrow,
  .date-chip { display: none; }
  .workspace-content { padding: 22px 13px 42px; }
  .welcome-row,
  .page-intro { align-items: flex-start; flex-direction: column; }
  .welcome-row .button { width: 100%; }
  .metric-grid,
  .overview-aside,
  .integration-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { padding: 14px; }
  .attention-item,
  .case-row { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .attention-actions,
  .case-actions { grid-column: 1; justify-content: flex-start; }
  .attention-actions .button,
  .case-actions .button { flex: 1; }
  .calls-list-panel,
  .call-detail { min-height: 0; }
  .call-detail { padding: 17px; }
  .detail-heading { align-items: flex-start; flex-direction: column; }
  .facts { grid-template-columns: 1fr; }
  .message { max-width: 94%; }
  .relief-card { align-items: flex-start; flex-direction: column; }
  .live-calls-list { grid-template-columns: 1fr; }
  .live-call-item { grid-template-columns: minmax(0, 1fr) auto; }
  .live-call-context { grid-column: 1; text-align: left; }
  .live-call-item .button { grid-column: 2; grid-row: 1 / span 2; }
  .handoff-overlay { padding: 10px; }
  .handoff-dialog { max-height: calc(100vh - 20px); border-radius: var(--radius-lg); }
  .handoff-dialog-header { grid-template-columns: 40px minmax(0, 1fr) 34px; padding: 17px; }
  .handoff-dialog-icon { width: 40px; height: 40px; }
  .handoff-patient { margin: 15px 17px 10px; }
  .handoff-facts { grid-template-columns: 1fr; margin: 0 17px 10px; }
  .handoff-concern-card { margin: 0 17px; }
  .handoff-dialog-actions { padding: 16px 17px 17px; }
  .handoff-dialog-actions .button { flex: 1; }
  .login-card { padding: 29px 23px; }
  .notice { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
