/* Bundled shared RAN theme. */
:root {
  --ran-ink: #20242a;
  --ran-muted: #68717d;
  --ran-subtle: #8a94a3;
  --ran-page: #f4f8fc;
  --ran-surface: #ffffff;
  --ran-surface-2: #fbfcfd;
  --ran-line: #e3e7ec;
  --ran-line-strong: #cfd7df;
  --ran-sidebar-900: #061f2b;
  --ran-sidebar-800: #073044;
  --ran-sidebar-700: #07506d;
  --ran-blue: #0e8fd0;
  --ran-blue-soft: #e8f5fc;
  --ran-cyan: #20b8e8;
  --ran-green: #27b86f;
  --ran-green-soft: #eaf8f0;
  --ran-yellow: #f6b73c;
  --ran-yellow-soft: #fff8df;
  --ran-red: #f05252;
  --ran-red-soft: #fff0f0;
  --ran-purple: #8064d9;
  --ran-purple-soft: #f1edff;
  --ran-shadow: 0 10px 28px rgba(32, 36, 42, 0.08);
  --ran-radius: 8px;
  --ran-font: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ran-ink);
  background: var(--ran-page);
  font-family: var(--ran-font);
  font-size: 14px;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
  -webkit-font-smoothing: inherit;
  -moz-osx-font-smoothing: inherit;
}

button {
  cursor: pointer;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(32, 184, 232, 0.35);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.ran-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  color: #e7f6fb;
  background:
    radial-gradient(circle at 70% 25%, rgba(20, 151, 196, 0.34), transparent 34%),
    linear-gradient(180deg, var(--ran-sidebar-900), var(--ran-sidebar-800) 48%, #0877a7);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ran-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 24px 22px 18px;
}

.ran-brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ran-logo-mark {
  width: 21px;
  height: 28px;
  border: 3px solid #d8f5ff;
  border-radius: 4px;
  transform: rotate(18deg);
  box-shadow: inset 6px 0 0 rgba(216, 245, 255, 0.3);
}

.ran-brand strong {
  display: block;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
}

.ran-sidebar-menu {
  width: 28px;
  height: 28px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 0;
  background: transparent;
  border: 0;
}

.ran-sidebar-menu span {
  display: block;
  height: 2px;
  background: #d8f5ff;
  border-radius: 99px;
}

.ran-product {
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 0 46px;
  color: #7ad4f1;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.ran-profile {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 84px;
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.ran-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: #0fa4dc;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

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

.ran-profile strong {
  color: #ffffff;
}

.ran-profile span {
  margin-top: 3px;
  color: #97dff4;
  font-size: 12px;
}

.ran-legal {
  display: grid;
  gap: 8px;
  padding: 0 22px 20px;
  color: #97dff4;
  font-size: 11px;
  line-height: 1.35;
}

.ran-legal img {
  display: block;
  width: 92px;
  height: auto;
  background: transparent;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f5;
  color: var(--ran-muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.tag.blue {
  color: var(--ran-blue);
  background: var(--ran-blue-soft);
}

.tag.green {
  color: var(--ran-green);
  background: var(--ran-green-soft);
}

.tag.yellow {
  color: #b67810;
  background: var(--ran-yellow-soft);
}

.tag.red {
  color: var(--ran-red);
  background: var(--ran-red-soft);
}

.tag.purple {
  color: var(--ran-purple);
  background: var(--ran-purple-soft);
}

.trend-up {
  color: var(--ran-green);
}

.trend-down {
  color: var(--ran-red);
}

.trend-flat {
  color: var(--ran-subtle);
}

@media (max-width: 980px) {
  .ran-app-shell {
    grid-template-columns: 1fr;
  }

  .ran-sidebar {
    position: static;
    height: auto;
    min-height: 0;
  }

  .ran-product {
    min-height: 46px;
    padding: 0 22px;
  }

  .ran-profile {
    display: none;
  }
}

/* App-specific styles. */
.ab-app {
  grid-template-columns: 240px minmax(0, 1fr);
  transition: grid-template-columns 240ms cubic-bezier(0.2, 0, 0, 1);
}

html,
body {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

html {
  scroll-behavior: smooth;
}

.ab-app .ran-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  align-self: start;
  grid-template-rows: auto auto auto 1fr auto auto;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ab-main {
  min-width: 0;
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 24px 32px 32px;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(230, 241, 248, 0.22), transparent 20rem),
    linear-gradient(135deg, rgba(0, 57, 94, 0.98), rgba(0, 113, 188, 0.95) 58%, rgba(18, 137, 14, 0.88));
}

.auth-unlocked .auth-screen {
  display: none;
}

.auth-locked {
  overflow: hidden;
  height: 100vh;
}

.auth-locked .ab-app {
  display: none;
}

.auth-card {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  padding: 28px;
  background: #ffffff;
  border: 1px solid rgba(230, 241, 248, 0.86);
  border-radius: 8px;
  box-shadow: 0 32px 90px rgba(0, 35, 56, 0.34);
  animation: auth-in 320ms cubic-bezier(0.2, 0, 0, 1) both;
}

.auth-card p,
.auth-card h1 {
  margin: 0;
}

.auth-card p {
  color: #4f5f6f;
  font-size: 13px;
  font-weight: 700;
}

.auth-card h1 {
  margin-top: 4px;
  color: #1b1b1b;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.auth-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  background: linear-gradient(135deg, #00395e, #0071bc);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 79, 132, 0.2);
}

.auth-logo svg {
  width: 36px;
  height: 36px;
}

.auth-logo rect {
  fill: rgba(255, 255, 255, 0.12);
  stroke: rgba(255, 255, 255, 0.46);
  stroke-width: 1.5;
}

.auth-logo path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-logo .logo-shell {
  fill: transparent;
  stroke: none;
}

.cms-auth-logo {
  background: linear-gradient(135deg, #075b7a, #0071bc);
}

.cms-auth-logo .logo-orbit {
  fill: #27b86f;
}

.cms-auth-logo .logo-bar {
  fill: #ffffff;
  stroke: none;
}

.ab-auth-logo {
  background: linear-gradient(135deg, #061f2b, #075b7a);
}

.ab-auth-logo .logo-device {
  fill: none;
  stroke: #d8f5ff;
  stroke-width: 5;
  stroke-linejoin: round;
}

.auth-card label {
  display: grid;
  gap: 6px;
  color: #4f5f6f;
  font-size: 13px;
  font-weight: 700;
}

.auth-card input {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  color: #1b1b1b;
  background: #ffffff;
  border: 1px solid #b8cadc;
  border-radius: 8px;
  font: inherit;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.auth-card input:focus {
  outline: 0;
  border-color: #0071bc;
  box-shadow: 0 0 0 3px rgba(0, 113, 188, 0.18);
}

.auth-card input[aria-invalid="true"] {
  border-color: #d54309;
  background: #fcebe6;
  box-shadow: 0 0 0 3px rgba(213, 67, 9, 0.12);
}

.field-error,
.auth-error {
  min-height: 16px;
  color: #d54309;
  font-size: 12px;
  font-weight: 700;
}

.auth-card .primary-action {
  min-height: 42px;
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(180deg, #0071bc, #0066a9);
  border: 1px solid #0066a9;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 102, 169, 0.2);
  font-weight: 900;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.auth-card .primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 102, 169, 0.26);
}

.ab-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.ab-header p,
.ab-header h1,
.ab-header span {
  margin: 0;
}

#view-kicker {
  color: var(--ran-subtle);
  font-size: 13px;
  font-weight: 800;
}

#view-title {
  margin-top: 5px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

#view-subtitle {
  display: block;
  margin-top: 8px;
  color: var(--ran-muted);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.status-pill,
.date-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--ran-line-strong);
  border-radius: var(--ran-radius);
  color: var(--ran-muted);
  background: var(--ran-surface);
  box-shadow: var(--ran-shadow);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.good {
  color: #087842;
  border-color: #cceedd;
  background: #f7fffa;
}

.status-pill.paused {
  color: #9a5b00;
  border-color: #ffd9a8;
  background: #fffaf0;
}

.dnd-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--ran-line-strong);
  border-radius: var(--ran-radius);
  box-shadow: var(--ran-shadow);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.dnd-toggle:hover,
.dnd-toggle:focus {
  border-color: #9fc6ff;
  box-shadow: 0 10px 26px rgba(21, 105, 232, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.dnd-toggle.is-on {
  color: #9a5b00;
  border-color: #ffd9a8;
  background: #fff8ea;
}

.dnd-toggle .switch {
  display: inline-block;
  flex: 0 0 auto;
}

.dnd-toggle.is-on .switch {
  background: #f59e0b;
}

.dnd-toggle.is-on .switch::after {
  transform: translateX(18px);
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.table-action,
.icon-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: var(--ran-radius);
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: #ffffff;
  background: #067a3d;
  border: 1px solid #067a3d;
}

.secondary-button {
  color: #1569e8;
  background: #ffffff;
  border: 1px solid #bfd7ff;
}

.danger-button {
  color: var(--ran-red);
  background: #ffffff;
  border: 1px solid #ffb8b8;
}

.ghost-button {
  color: #415069;
  background: #f8fbff;
  border: 1px solid var(--ran-line-strong);
}

.table-action {
  min-height: 32px;
  padding: 6px 10px;
  color: #1569e8;
  background: #ffffff;
  border: 1px solid #bfd7ff;
  font-size: 12px;
}

.icon-button {
  width: 38px;
  padding: 0;
  color: #1569e8;
  background: #ffffff;
  border: 1px solid #d2e0f0;
  border-radius: 50%;
  position: relative;
}

.notification-button span {
  width: 15px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 5px 5px;
  border-bottom-width: 3px;
}

.notification-button strong {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--ran-red);
  border-radius: 50%;
  font-size: 10px;
}

.notification-menu {
  position: relative;
}

.notification-menu.is-open .notification-button {
  border-color: #9ec3ff;
  box-shadow: 0 10px 20px rgba(21, 105, 232, 0.14);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(360px, calc(100vw - 34px));
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d2e0f0;
  border-radius: var(--ran-radius);
  box-shadow: 0 20px 50px rgba(3, 38, 62, 0.18);
  transform-origin: top right;
  animation: dropdown-in 180ms cubic-bezier(0.2, 0, 0, 1) both;
}

.notification-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 4px 4px 10px;
  border-bottom: 1px solid #edf1f6;
}

.notification-panel-header strong {
  color: #1f2733;
}

.notification-panel-header span {
  color: var(--ran-muted);
  font-size: 12px;
  font-weight: 800;
}

.notification-list {
  display: grid;
  gap: 8px;
  padding: 10px 0;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 5px 9px;
  width: 100%;
  padding: 11px;
  color: #24385f;
  background: #fbfdff;
  border: 1px solid #dde7f2;
  border-radius: var(--ran-radius);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.notification-item:hover {
  border-color: #9ec3ff;
  background: #f5f9ff;
  box-shadow: 0 8px 18px rgba(21, 105, 232, 0.1);
  transform: translateY(-1px);
}

.notification-item strong {
  min-width: 0;
  color: #1f2733;
}

.notification-item > span:not(.notification-priority) {
  grid-column: 2 / -1;
  color: var(--ran-muted);
  font-size: 12px;
  line-height: 1.35;
}

.notification-item small {
  color: var(--ran-muted);
  font-size: 11px;
  font-weight: 800;
}

.notification-priority {
  grid-row: 1 / span 2;
  align-self: start;
  padding: 5px 8px;
  color: #1569e8;
  background: #e9f3ff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.notification-item.red .notification-priority {
  color: var(--ran-red);
  background: #fff1f1;
}

.notification-item.yellow .notification-priority {
  color: #b97800;
  background: #fff8e6;
}

.notification-footer {
  width: 100%;
  min-height: 36px;
  color: #1569e8;
  background: #f8fbff;
  border: 1px solid #bfd7ff;
  border-radius: var(--ran-radius);
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.notification-footer:hover {
  border-color: #9ec3ff;
  box-shadow: 0 8px 18px rgba(21, 105, 232, 0.1);
  transform: translateY(-1px);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-button:hover,
.table-action:hover,
.icon-button:hover,
.cms-nav-item:hover,
.mode-switch:hover {
  transform: translateY(-1px);
}

.cms-nav {
  display: grid;
  gap: 8px;
  padding: 18px 12px;
}

.cms-nav-item,
.mode-switch {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 13px;
  color: #d8f5ff;
  background: transparent;
  border: 0;
  border-radius: var(--ran-radius);
  text-align: left;
  font-weight: 800;
}

.cms-nav-item[hidden],
.cms-nav-item.nav-item-hidden {
  display: none !important;
}

.cms-nav-item.is-active {
  color: #ffffff;
  background: linear-gradient(90deg, #0d73c7, #07598a);
  box-shadow: inset 3px 0 0 #28c5ff;
}

.mode-switch {
  width: calc(100% - 24px);
  margin: 12px;
  color: #ffffff;
  border: 1px solid rgba(216, 245, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.mode-icon,
.nav-icon {
  width: 22px;
  height: 22px;
  position: relative;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.mode-icon::before,
.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.mode-icon::before {
  width: 16px;
  height: 10px;
  border-radius: 8px 8px 4px 4px;
}

.mode-icon::after {
  content: "";
  width: 22px;
  height: 6px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  transform: translateY(7px);
}

.nav-icon.dashboard::before {
  width: 16px;
  height: 16px;
  box-shadow: -7px -7px 0 -5px currentColor, 7px -7px 0 -5px currentColor, -7px 7px 0 -5px currentColor, 7px 7px 0 -5px currentColor;
}

.nav-icon.referrals::before,
.nav-icon.availability::before {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.nav-icon.referrals::after {
  width: 9px;
  height: 9px;
  border-left: 0;
  border-bottom: 0;
  transform: translate(7px, 7px) rotate(45deg);
}

.nav-icon.team::before {
  width: 18px;
  height: 10px;
  border-radius: 10px 10px 5px 5px;
}

.nav-icon.team::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-8px);
}

.nav-icon.mail::before,
.nav-icon.messages::before {
  width: 18px;
  height: 13px;
}

.nav-icon.mail::after,
.nav-icon.messages::after {
  width: 13px;
  height: 13px;
  border-left: 0;
  border-bottom: 0;
  transform: rotate(135deg) translate(-1px, 1px);
}

.nav-icon.actions::before {
  width: 14px;
  height: 18px;
}

.nav-icon.actions::after {
  width: 8px;
  height: 4px;
  border-left: 0;
  border-top: 0;
  transform: rotate(-45deg);
}

.nav-icon.settings::before {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.nav-icon.settings::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.nav-badge {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  color: #ffffff;
  background: #1266ff;
  border-radius: 999px;
  font-size: 12px;
}

.sidebar-collapsed .ab-app {
  grid-template-columns: 84px minmax(0, 1fr);
}

.sidebar-collapsed .ran-brand {
  justify-content: flex-end;
  padding-inline: 18px;
}

.sidebar-collapsed .ran-brand-lockup,
.sidebar-collapsed .ran-product,
.sidebar-collapsed .ran-profile div,
.sidebar-collapsed .ran-legal,
.sidebar-collapsed .cms-nav-item span:nth-child(2),
.sidebar-collapsed .mode-switch span:nth-child(2),
.sidebar-collapsed .nav-badge {
  display: none;
}

.sidebar-collapsed .cms-nav-item,
.sidebar-collapsed .mode-switch {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

.sidebar-collapsed .mode-switch {
  width: auto;
}

.sidebar-collapsed .ran-profile {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 18px;
}

.live-referral {
  margin-bottom: 20px;
}

.referral-banner {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(420px, 1fr) minmax(380px, 0.9fr);
  gap: 24px;
  align-items: center;
  min-height: 116px;
  padding: 18px 20px;
  border: 2px solid #ff3f3f;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--ran-shadow);
  animation: surface-in 220ms cubic-bezier(0.2, 0, 0, 1) both;
}

.referral-loading {
  min-height: 74px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 18px 20px;
  color: #24385f;
  background: #ffffff;
  border: 1px dashed #b8cce2;
  border-radius: 12px;
  box-shadow: var(--ran-shadow);
  animation: surface-in 220ms cubic-bezier(0.2, 0, 0, 1) both;
}

.referral-paused {
  min-height: 84px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  color: #4a2f06;
  background: linear-gradient(180deg, #fffaf0 0%, #fff6df 100%);
  border: 1px solid #ffd9a8;
  border-radius: 12px;
  box-shadow: var(--ran-shadow);
  animation: surface-in 220ms cubic-bezier(0.2, 0, 0, 1) both;
}

.referral-paused div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.referral-paused strong {
  color: #7a4200;
  font-size: 16px;
}

.referral-paused span {
  color: #775a2a;
  font-size: 13px;
}

.referral-banner.compact {
  grid-template-columns: minmax(210px, 0.65fr) minmax(360px, 1fr) minmax(340px, 0.9fr);
  min-height: 78px;
}

.referral-timer {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
}

.live-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff1717;
  box-shadow: 0 0 0 5px rgba(255, 23, 23, 0.08);
  animation: live-pulse 1200ms ease-in-out infinite;
}

.timer {
  display: block;
  margin-top: 16px;
  color: #ff1717;
  font-size: 32px;
  line-height: 1;
  font-weight: 900;
}

.timer-label {
  display: block;
  margin-top: 5px;
  color: #28395d;
  font-weight: 800;
}

.referral-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, max-content));
  gap: 14px 56px;
  align-items: center;
  align-content: center;
  justify-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 82px;
  padding-inline: 24px;
  border-left: 1px solid var(--ran-line);
}

.detail-chip {
  display: grid;
  gap: 4px;
  justify-items: center;
  width: min(190px, 100%);
  min-width: 0;
  color: #24385f;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.detail-chip span {
  color: var(--ran-muted);
  font-size: 11px;
}

.masked-note {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 620px;
  margin: 0;
  color: var(--ran-muted);
  font-size: 12px;
  text-align: center;
}

.acs-status {
  grid-column: 1 / -1;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-self: center;
  max-width: 100%;
  padding: 10px 12px;
  color: #224060;
  background: #f3f9ff;
  border: 1px solid #cbe2fb;
  border-radius: var(--ran-radius);
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  animation: status-change 240ms ease both;
}

.acs-status.call-status-large {
  width: 100%;
  gap: 14px;
  justify-self: stretch;
  margin: 14px 0;
  padding: 16px 18px;
  border-width: 2px;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(31, 55, 91, 0.08);
}

.acs-status.call-status-large strong {
  font-size: 16px;
}

.acs-status.call-status-large small {
  font-size: 12px;
}

.acs-status strong,
.acs-status small {
  display: block;
}

.acs-status small {
  margin-top: 2px;
  color: var(--ran-muted);
  font-size: 11px;
}

.acs-status.agent-connected,
.acs-status.in-progress,
.acs-status.disconnected,
.acs-status.connected {
  color: #076b3a;
  background: #edfff5;
  border-color: #bceccf;
}

.acs-status.dialing,
.acs-status.dialing-agent {
  color: #075d8b;
  background: #eef9ff;
  border-color: #b8e4fb;
}

.acs-status.no-answer,
.acs-status.sms-sent {
  color: #946100;
  background: #fff8df;
  border-color: #f6d889;
}

.acs-status.failed {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.call-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9aa8b8;
}

.call-status-large .call-dot {
  width: 18px;
  height: 18px;
}

.call-dot.queued,
.call-dot.dialing,
.call-dot.agent-connected {
  background: var(--ran-blue);
  animation: pulse 1s ease-in-out infinite;
}

.call-dot.no-answer,
.call-dot.sms-sent {
  background: var(--ran-yellow);
  animation: pulse 1s ease-in-out infinite;
}

.call-dot.connected,
.call-dot.in-progress,
.call-dot.disconnected {
  background: var(--ran-green);
}

.call-dot.in-progress {
  animation: call-active 1.15s ease-in-out infinite;
}

.call-dot.failed {
  background: var(--ran-red);
}

.attempt-cell small,
.call-state-inline {
  display: block;
}

.call-state-inline {
  color: #24385f;
  font-size: 12px;
  font-weight: 900;
}

.call-state-inline.dialing,
.call-state-inline.agent-connected {
  color: var(--ran-blue);
}

.call-state-inline.in-progress,
.call-state-inline.disconnected {
  color: var(--ran-green);
}

.call-state-inline.no-answer,
.call-state-inline.sms-sent {
  color: #946100;
}

.call-state-inline.shared {
  color: #057481;
}

.call-state-inline.failed {
  color: var(--ran-red);
}

.attempt-cell small {
  max-width: 230px;
  margin-top: 3px;
  color: var(--ran-muted);
  font-size: 11px;
  line-height: 1.35;
}

.inline-spinner {
  width: 16px;
  height: 16px;
  display: inline-block;
  border: 2px solid rgba(14, 143, 208, 0.18);
  border-top-color: var(--ran-blue);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.live-actions {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-self: stretch;
  min-width: 0;
}

.live-actions-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 10px;
}

.live-actions .primary-button {
  width: 100%;
}

.live-actions button {
  min-width: 0;
  min-height: 50px;
  padding-inline: 10px;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
}

.view-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.view-content > * {
  animation: surface-in 260ms cubic-bezier(0.2, 0, 0, 1) both;
}

.dashboard-greeting {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 18px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #04394f, #0a83bd);
  border: 1px solid rgba(8, 122, 179, 0.34);
  border-radius: var(--ran-radius);
  box-shadow: 0 16px 38px rgba(3, 43, 67, 0.16);
}

.dashboard-greeting span,
.dashboard-greeting p {
  color: rgba(255, 255, 255, 0.78);
}

.dashboard-greeting span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-greeting h2,
.dashboard-greeting p {
  margin: 0;
}

.dashboard-greeting h2 {
  color: #ffffff;
  font-size: 25px;
  line-height: 1.12;
}

.dashboard-greeting p {
  margin-top: 6px;
  line-height: 1.45;
}

.dashboard-greeting strong {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: #d9fbff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 12px;
}

.metric-strip,
.wide-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

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

.metric-card,
.panel {
  min-width: 0;
  background: var(--ran-surface);
  border: 1px solid #d6e0ec;
  border-radius: var(--ran-radius);
  box-shadow: var(--ran-shadow);
  transition: transform 220ms cubic-bezier(0.2, 0, 0, 1), border-color 220ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 220ms cubic-bezier(0.2, 0, 0, 1), background-color 220ms cubic-bezier(0.2, 0, 0, 1);
}

.metric-card:hover,
.panel:hover {
  border-color: #c8d6e6;
  box-shadow: 0 14px 34px rgba(3, 38, 62, 0.1);
  transform: translateY(-1px);
}

.metric-card {
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: transparent;
}

.metric-card.trend-up {
  border-color: rgba(7, 143, 74, 0.34);
}

.metric-card.trend-down {
  border-color: rgba(229, 45, 66, 0.36);
}

.metric-card.trend-up::before {
  background: #078f4a;
}

.metric-card.trend-down::before {
  background: #e52d42;
}

.metric-card > div {
  min-width: 0;
  text-align: center;
}

.metric-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
  margin: 0;
  text-align: center;
}

.metric-card.blue .metric-icon,
.metric-icon.blue {
  background: #1569e8;
}

.metric-card.purple .metric-icon,
.metric-icon.purple {
  background: #8064d9;
}

.metric-card.red .metric-icon,
.metric-icon.red {
  background: #e52d42;
}

.metric-card.yellow .metric-icon,
.metric-icon.yellow {
  background: #ff7300;
}

.metric-card.green .metric-icon,
.metric-icon.green {
  background: #078f4a;
}

.metric-card.teal .metric-icon,
.metric-icon.teal {
  background: #079aa6;
}

.metric-card h3 {
  margin: 0;
  color: #27395f;
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1;
}

.metric-card .metric-actual {
  display: inline-flex;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
  color: #27395f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.metric-card > div > span {
  display: block;
  margin-top: 5px;
  color: #067a3d;
  font-size: 12px;
  font-weight: 800;
}

.metric-card.trend-up .metric-trend {
  color: #067a3d;
}

.metric-card.trend-down .metric-trend {
  color: #d83c2f;
}

.metric-card.red > div > span,
.metric-card.yellow > div > span {
  color: #d83c2f;
}

.metric-card.trend-up > div > .metric-trend {
  color: #067a3d;
}

.metric-card.trend-down > div > .metric-trend {
  color: #d83c2f;
}

.panel {
  padding: 18px;
}

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

.panel-heading h2,
.panel-heading h3,
.panel-heading p {
  margin: 0;
}

.panel-heading h2,
.panel-heading h3 {
  color: #1f2733;
}

.panel-heading p {
  margin-top: 6px;
  color: var(--ran-muted);
  font-size: 13px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.dashboard-stack,
.side-stack {
  display: grid;
  gap: 14px;
}

.two-column-grid,
.settings-grid,
.availability-grid,
.correspondence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
  gap: 18px;
  align-items: start;
}

.team-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.team-insight-panel {
  min-height: 210px;
}

.team-workbench-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.44fr);
}

.agent-summary-panel {
  position: sticky;
  top: 18px;
}

.agent-summary-highlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.agent-summary-highlight > div,
.agent-focus-block {
  padding: 12px;
  border: 1px solid #dce6f1;
  border-radius: var(--ran-radius);
  background: #f8fbff;
}

.agent-summary-highlight span,
.agent-focus-block h4 {
  margin: 0;
  color: var(--ran-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-summary-highlight strong {
  display: block;
  margin-top: 6px;
  color: #13203a;
  font-size: 20px;
}

.agent-focus-block {
  margin-top: 12px;
}

.agent-focus-block ul {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--ran-muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-grid {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

.data-table tbody tr[data-select-agent-row] {
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.data-table tbody tr[data-select-agent-row]:hover,
.data-table tbody tr.is-selected-row {
  background: #f1f8ff;
  box-shadow: inset 4px 0 0 var(--ran-blue);
}

.data-table th {
  color: #41516f;
  background: #f8fbff;
  font-size: 11px;
  font-weight: 900;
}

.sort-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.sort-button:hover,
.sort-button:focus-visible,
.sort-button.is-active {
  color: #0455e7;
}

.sort-button:focus-visible {
  outline: 2px solid rgba(0, 82, 204, 0.35);
  outline-offset: 3px;
  border-radius: 5px;
}

.sort-glyph {
  min-width: 10px;
  color: #6d7c95;
  font-size: 10px;
  line-height: 1;
  text-align: right;
}

.call-duration {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f6fb;
  color: #28364c;
  font-weight: 900;
}

.call-duration.is-active {
  color: #006b37;
  background: #e8f9ef;
  box-shadow: 0 0 0 0 rgba(0, 196, 118, 0.38);
  animation: callDurationPulse 1.6s ease-in-out infinite;
}

@keyframes callDurationPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 196, 118, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 196, 118, 0);
  }
}

.data-table tr:hover td {
  background: #fbfdff;
}

.data-table tr.requires-status-update td {
  background: #fffdf2;
}

.data-table tr.requires-status-update:hover td {
  background: #fff8dd;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.call-action {
  color: #067a3d;
  border-color: #bceccf;
}

.call-action:hover {
  border-color: #62d191;
  box-shadow: 0 8px 18px rgba(6, 122, 61, 0.1);
}

.call-back-action {
  color: #075d8b;
  background: #eef9ff;
  border-color: #9fd7f3;
}

.call-back-action:hover {
  border-color: #0e8fd0;
  box-shadow: 0 8px 18px rgba(14, 143, 208, 0.12);
}

.status-select-label {
  display: inline-block;
  min-width: 138px;
}

.status-select {
  min-height: 30px;
  padding: 0 28px 0 11px;
  color: #105d8b;
  background: #e8f6ff;
  border: 1px solid #c9e7f8;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.status-select:hover,
.status-select:focus-visible {
  border-color: #7ccced;
  box-shadow: 0 0 0 4px rgba(14, 143, 208, 0.12);
}

.status-select.green {
  color: #067a3d;
  background: #e9fff3;
  border-color: #bceccf;
}

.status-select.yellow {
  color: #946100;
  background: #fff8df;
  border-color: #f6d889;
}

.status-select.requires-update {
  color: #875000;
  background: linear-gradient(180deg, #fff8d7, #ffefae);
  border-color: #e9b949;
  box-shadow: inset 0 0 0 1px rgba(233, 185, 73, 0.12);
}

.status-select.red {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.status-select.teal {
  color: #075d66;
  background: #ecfeff;
  border-color: #99f6e4;
}

.status-select.gray {
  color: #546173;
  background: #eef2f6;
  border-color: #d8e1eb;
}

.status-select:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.table-action[disabled] {
  cursor: not-allowed;
  color: #8a98aa;
  background: #f4f7fa;
  border-color: #d8e1eb;
}

.tag.gray {
  color: #546173;
  background: #eef2f6;
}

.table-footer,
.panel-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  color: var(--ran-muted);
  font-size: 12px;
}

.mini-list {
  display: grid;
  gap: 9px;
}

.mini-list-item,
.action-card,
.message-row,
.todo-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dde7f2;
  border-radius: var(--ran-radius);
  background: #fbfdff;
}

.todo-item.is-complete {
  border-color: #bcebd1;
  background: #f0fff6;
}

.mini-list-item strong,
.action-card strong,
.message-row strong,
.todo-item strong {
  color: #1f2b42;
}

.mini-list-item span,
.action-card span,
.message-row span,
.todo-item span {
  color: var(--ran-muted);
  font-size: 12px;
}

.referral-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--ran-line);
}

.tab-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  color: #29385c;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--ran-radius);
  font-weight: 900;
  white-space: nowrap;
}

.tab-button.is-active {
  color: #1569e8;
  border-color: #9ec3ff;
  box-shadow: inset 0 -3px 0 #1569e8;
}

.tab-button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  color: #42536f;
  background: #eef2f7;
  border-radius: 999px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.toolbar input,
.toolbar select,
.settings-card select,
.settings-card input {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #cdd8e5;
  border-radius: var(--ran-radius);
  background: #ffffff;
}

.toolbar input {
  min-width: 280px;
  flex: 1;
}

.date-range-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px;
  border: 1px solid #cdd8e5;
  border-radius: var(--ran-radius);
  background: #ffffff;
}

.date-range-controls > span {
  color: #42536f;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.date-range-controls input {
  min-width: 132px;
  min-height: 32px;
  flex: 0 0 auto;
  padding: 5px 8px;
  border-color: transparent;
  background: #f8fbff;
}

.date-range-controls .compact-button {
  min-height: 32px;
  padding: 6px 10px;
}

.charts-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.chart-box {
  border: 1px solid #dce6f1;
  border-radius: var(--ran-radius);
  padding: 14px;
  background: #ffffff;
}

.chart-box h4 {
  margin: 0 0 10px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.donut {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(#0e8fd0 0 58%, #8064d9 58% 85%, #f05252 85% 91%, #f6b73c 91% 96%, #27b86f 96% 100%);
}

.donut::after {
  content: attr(data-label);
  position: absolute;
  inset: 25px;
  display: grid;
  place-items: center;
  color: #1f2733;
  background: #ffffff;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}

.legend-list {
  display: grid;
  gap: 7px;
}

.legend-button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ran-muted);
  text-align: left;
}

.legend-button i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-button strong {
  color: #1f2733;
}

.bar-chart {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(11, minmax(20px, 1fr));
  gap: 8px;
  align-items: end;
  padding-top: 10px;
}

.bar-button {
  min-width: 0;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ran-muted);
  font-size: 10px;
}

.bar-button i {
  display: block;
  min-height: 8px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #089bdb, #8de1ff);
  transition: height 240ms cubic-bezier(0.2, 0, 0, 1), transform 180ms ease, box-shadow 180ms ease;
}

.bar-button.is-active i {
  background: linear-gradient(180deg, #067a3d, #7be0ac);
  box-shadow: 0 0 0 3px rgba(39, 184, 111, 0.15);
}

.heat-grid {
  display: grid;
  grid-template-columns: 62px repeat(7, minmax(50px, 1fr));
  gap: 6px;
  align-items: center;
  font-size: 11px;
}

.heat-grid button,
.coverage-matrix button {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.heat-grid button:hover,
.coverage-matrix button:hover {
  filter: saturate(1.08);
  transform: translateY(-1px);
}

.heat-grid .label,
.coverage-matrix .label {
  color: #41516f;
  font-weight: 900;
}

.heat-low {
  color: #ad6c08;
  background: #fff3bf;
}

.heat-mid {
  color: #087842;
  background: #dff8eb;
}

.heat-high {
  color: #07572f;
  background: #bdf2d5;
}

.heat-gap {
  color: #a51f2a;
  background: #ffe3e3;
}

.is-selected-cell {
  border-color: #1569e8 !important;
  box-shadow: 0 0 0 3px rgba(21, 105, 232, 0.13);
}

.coverage-matrix {
  display: grid;
  grid-template-columns: 100px repeat(7, minmax(70px, 1fr));
  gap: 7px;
  align-items: center;
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dde7f2;
  border-radius: var(--ran-radius);
  background: #fbfdff;
  margin-bottom: 12px;
}

.status-dot-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot-cell::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ran-green);
}

.status-dot-cell.offline::before {
  background: var(--ran-subtle);
}

.status-dot-cell.warning::before {
  background: var(--ran-yellow);
}

.correspondence-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1fr) minmax(260px, 0.55fr);
}

.message-row {
  width: 100%;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  border-color: #dde7f2;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.message-row:hover,
.action-card:hover,
.todo-item:hover,
.mini-list-item:hover {
  border-color: #c7d8ea;
  box-shadow: 0 8px 18px rgba(3, 38, 62, 0.08);
  transform: translateY(-1px);
}

.message-row.is-active {
  border-color: #9ec3ff;
  background: #f3f8ff;
  box-shadow: inset 4px 0 0 #1569e8;
}

.correspondence-comment-box {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cfe0f2;
  border-radius: var(--ran-radius);
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9fd 100%);
}

.correspondence-comment-box label {
  color: #1f2b42;
  font-size: 13px;
  font-weight: 900;
}

.correspondence-comment-box textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 12px 13px;
  color: var(--ran-ink);
  border: 1px solid #bad1e8;
  border-radius: var(--ran-radius);
  background: #ffffff;
  line-height: 1.45;
  box-shadow: inset 0 1px 2px rgba(3, 38, 62, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.correspondence-comment-box textarea:focus {
  border-color: var(--ran-blue);
  box-shadow: 0 0 0 4px rgba(14, 143, 208, 0.13), inset 0 1px 2px rgba(3, 38, 62, 0.04);
}

.correspondence-comment-box small {
  color: var(--ran-muted);
  font-size: 12px;
}

.correspondence-response-note {
  margin-top: 14px;
}

.correspondence-response-lock {
  min-height: 42px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid #bcebd1;
  border-radius: var(--ran-radius);
  background: var(--ran-green-soft);
  color: #086a3b;
}

.correspondence-response-lock.is-editing {
  border-color: #b9d9f3;
  background: #eef8ff;
  color: #0b5b89;
}

.correspondence-response-lock span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.correspondence-response-lock strong {
  color: inherit;
  font-size: 13px;
}

.message-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1569e8;
  background: #e9f3ff;
  font-weight: 900;
}

.settings-card {
  display: grid;
  gap: 14px;
}

.settings-card h3 {
  margin: 0;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
}

.switch {
  width: 40px;
  height: 22px;
  position: relative;
  border: 0;
  border-radius: 999px;
  background: #b9c4d1;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 160ms ease;
}

.switch.is-on {
  background: #1569e8;
}

.switch.is-on::after {
  transform: translateX(18px);
}

.primary-button.is-complete,
.secondary-button.is-complete,
.ghost-button.is-complete,
.table-action.is-complete {
  color: var(--ran-green);
  background: var(--ran-green-soft);
  border-color: #bcebd1;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.primary-button.is-loading,
.secondary-button.is-loading,
.danger-button.is-loading,
.ghost-button.is-loading,
.table-action.is-loading {
  cursor: progress;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  justify-items: end;
  padding: 22px;
  background: transparent;
  pointer-events: none;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(620px, 100%);
  max-height: min(720px, 76vh);
  overflow: auto;
  position: relative;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #d7e5f3;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
  pointer-events: auto;
  animation: modal-in 220ms cubic-bezier(0.2, 0, 0, 1) both;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--ran-muted);
  background: #eef3f7;
  font-size: 22px;
  line-height: 1;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.referral-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.referral-detail-hero > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid #d7e5f3;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(22, 46, 77, 0.06);
}

.referral-detail-hero span {
  color: var(--ran-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.referral-detail-hero strong {
  min-width: 0;
  color: #13203a;
  font-size: 17px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.referral-detail-hero small {
  color: var(--ran-muted);
  font-size: 12px;
  font-weight: 800;
}

.referral-name-card strong {
  font-size: 22px;
}

.referral-location-card {
  border-left: 4px solid var(--ran-blue) !important;
  background: linear-gradient(180deg, #eef8ff 0%, #ffffff 100%) !important;
}

.referral-location-card strong {
  color: #075d8b;
  font-size: 21px;
}

.agent-detail-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.agent-detail-hero > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid #d7e5f3;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(22, 46, 77, 0.06);
}

.agent-detail-hero span:first-child {
  color: var(--ran-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-detail-hero strong {
  color: #13203a;
  font-size: 20px;
}

.agent-detail-hero.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.agent-chat-modal,
.coaching-wizard {
  display: grid;
  gap: 14px;
}

.chat-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.chat-heading h2,
.chat-heading p {
  margin: 0;
}

.chat-heading p {
  margin-top: 6px;
  color: var(--ran-muted);
}

.chat-thread {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid #dce6f1;
  border-radius: var(--ran-radius);
  background: #f6faff;
}

.chat-message {
  display: grid;
  gap: 5px;
  max-width: 78%;
  padding: 10px 12px;
  border: 1px solid #dce6f1;
  border-radius: 12px;
  background: #ffffff;
  animation: message-in 180ms ease-out;
}

.chat-message.outbound {
  justify-self: end;
  color: #ffffff;
  background: var(--ran-blue);
  border-color: var(--ran-blue);
}

.chat-message span {
  color: inherit;
  opacity: 0.72;
  font-size: 11px;
  font-weight: 800;
}

.chat-message p {
  margin: 0;
  line-height: 1.4;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-compose input,
.wizard-field input,
.wizard-field select,
.wizard-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid #cbd9e8;
  border-radius: var(--ran-radius);
  font: inherit;
}

.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wizard-stepper span {
  display: grid;
  place-items: center;
  min-height: 34px;
  color: var(--ran-muted);
  background: #f2f6fa;
  border: 1px solid #dce6f1;
  border-radius: 999px;
  font-weight: 900;
}

.wizard-stepper span.is-active {
  color: #ffffff;
  background: var(--ran-blue);
  border-color: var(--ran-blue);
}

.wizard-stepper span.is-complete {
  color: var(--ran-green);
  background: #e9fbf2;
  border-color: #bcebd1;
}

.wizard-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dce6f1;
  border-radius: var(--ran-radius);
  background: #fbfdff;
}

.wizard-card h3 {
  margin: 0;
}

.wizard-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wizard-field {
  display: grid;
  gap: 6px;
  color: var(--ran-muted);
  font-size: 12px;
  font-weight: 900;
}

.wizard-field.wide {
  grid-column: 1 / -1;
}

.button-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-field {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dce6f1;
  border-radius: var(--ran-radius);
  background: #ffffff;
  transition: border-color 160ms ease, background 160ms ease;
}

.modal-field span {
  color: var(--ran-muted);
  font-size: 12px;
}

.call-sms-preview {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  color: #24385f;
  background: #f6fbff;
  border: 1px solid #d6e7f6;
  border-radius: var(--ran-radius);
}

.call-sms-preview span {
  color: var(--ran-muted);
  font-size: 12px;
  font-weight: 800;
}

.call-sms-preview p {
  margin: 0;
  line-height: 1.45;
}

.post-call-status-workflow {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  background: #fff9e8;
  border: 1px solid #f1d083;
  border-left: 5px solid #f0a400;
  border-radius: 14px;
}

.post-call-status-workflow.resolved {
  background: #effcf4;
  border-color: #bceccf;
  border-left-color: #0d9f5c;
}

.post-call-status-workflow span {
  color: #875000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.post-call-status-workflow.resolved span {
  color: #067a3d;
}

.post-call-status-workflow strong {
  color: #263649;
  font-size: 16px;
}

.post-call-status-workflow p {
  margin: 0;
  color: var(--ran-muted);
  font-size: 13px;
  line-height: 1.45;
}

.post-call-status-workflow .status-select-label {
  min-width: min(100%, 240px);
}

.shared-referral-status {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 16px;
  color: #075d66;
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 100%);
  border: 2px solid #99f6e4;
  border-left-width: 5px;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.09);
  animation: status-change 240ms ease both;
}

.shared-referral-status span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.shared-referral-status strong {
  color: #134e4a;
  font-size: 18px;
}

.shared-referral-status small {
  color: var(--ran-muted);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  max-width: 360px;
  padding: 14px 16px;
  color: #ffffff;
  background: #102f44;
  border-radius: var(--ran-radius);
  box-shadow: var(--ran-shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.workflow-points {
  display: grid;
  gap: 12px;
}

.workflow-points li {
  margin-bottom: 6px;
}

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

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

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(246, 183, 60, 0.35);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(246, 183, 60, 0);
  }
}

@keyframes call-active {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 184, 102, 0.28);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(0, 184, 102, 0);
    transform: scale(1.1);
  }
}

@keyframes status-change {
  from {
    opacity: 0.82;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes live-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(255, 23, 23, 0.1);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(255, 23, 23, 0);
    transform: scale(1.12);
  }
}

@media (max-width: 1280px) {
  .referral-banner {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .live-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .live-actions-row {
    justify-content: flex-end;
  }

  .dashboard-grid,
  .two-column-grid,
  .team-workbench-grid,
  .team-insight-grid,
  .availability-grid,
  .correspondence-layout {
    grid-template-columns: 1fr;
  }

  .agent-summary-panel {
    position: static;
  }
}

@media (max-width: 1180px) {
  .metric-strip {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 980px) {
  .ab-app,
  .sidebar-collapsed .ab-app {
    grid-template-columns: 1fr;
  }

  .ab-app .ran-sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .ab-main {
    padding: 18px;
  }

  .ab-header {
    display: grid;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .referral-banner,
  .referral-banner.compact {
    grid-template-columns: 1fr;
  }

  .referral-details {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    padding-inline: 0;
    border-left: 0;
  }

  .referral-detail-hero {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .wide-metric-strip,
  .charts-row,
  .team-insight-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-collapsed .ran-brand-lockup,
  .sidebar-collapsed .ran-product,
  .sidebar-collapsed .ran-profile div,
  .sidebar-collapsed .ran-legal,
  .sidebar-collapsed .cms-nav-item span:nth-child(2),
  .sidebar-collapsed .mode-switch span:nth-child(2),
  .sidebar-collapsed .nav-badge {
    display: initial;
  }

  .sidebar-collapsed .cms-nav-item,
  .sidebar-collapsed .mode-switch {
    grid-template-columns: 25px minmax(0, 1fr) auto;
    justify-items: stretch;
    padding: 0 13px;
  }
}

@media (max-width: 720px) {
  #view-title {
    font-size: 24px;
  }

  .live-actions,
  .live-actions-row,
  .dashboard-greeting,
  .panel-heading,
  .table-footer,
  .panel-footer {
    display: grid;
    justify-content: stretch;
  }

  .dashboard-greeting strong {
    justify-self: start;
  }

  .referral-details,
  .referral-detail-hero,
  .agent-detail-hero,
  .modal-grid,
  .wizard-field-grid,
  .agent-summary-highlight,
  .chat-compose {
    grid-template-columns: 1fr;
  }

  .acs-status.call-status-large {
    padding: 14px;
  }

  .heat-grid,
  .coverage-matrix {
    overflow-x: auto;
  }
}

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