:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --navy: #0b1730;
  --apc-green: #008751;
  --apc-red: #ce1126;
}

html { scroll-behavior: smooth; }

.page-enter {
  animation: pageEnter 0.45s ease-out;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.breathe {
  animation: breathe 3.6s ease-in-out infinite;
}
.breathe-slow {
  animation: breatheSlow 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes breatheSlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

button, a, .sidebar-link, input, select, textarea {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

button:hover, a.bg-brand:hover, a.bg-indigo-600:hover {
  transform: translateY(-1px);
}

.sidebar-link {
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease, padding-left 0.22s ease;
}
.sidebar-link:hover {
  transform: translateX(2px);
}

.shell-header a:hover,
.avatar-circle {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.avatar-circle {
  animation: breathe 4.8s ease-in-out infinite;
}

table tbody tr {
  transition: background-color 0.2s ease;
}
table tbody tr:hover {
  background-color: #f8fafc;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
}

.stat-ico {
  animation: breathe 4.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-enter, .breathe, .breathe-slow, .stat-ico, .avatar-circle, .reveal,
  .card, .stat-card, .mini-stat, .kpi-card, .roster-panel {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  button:hover, a.bg-brand:hover, .hover-lift:hover, .sidebar-link:hover,
  .card:hover, .stat-card:hover, .mini-stat:hover, .kpi-card:hover, .roster-panel:hover {
    transform: none;
  }
}

.shell-body {
  font-family: Inter, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #1e293b;
}

.ui-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-dark {
  background: linear-gradient(180deg, #1e4fd7 0%, #1d47c4 48%, #1a3fb3 100%);
}

.sidebar-profile {
  padding: 28px 16px 18px;
  text-align: center;
}
.sidebar-photo {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  display: flex;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  background: #93c5fd;
  color: #fff;
  font-weight: 800;
  font-size: 28px;
  align-items: center;
  justify-content: center;
}
.sidebar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-profile-name {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}
.sidebar-profile-portal {
  margin-top: 4px;
  color: #fdba74;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sidebar-profile-role {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}
.nav-group-label {
  padding: 16px 12px 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.sidebar-candidate {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 16px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
}
.sidebar-candidate img {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
}

.sidebar-brand {
  width: 100%;
  box-sizing: border-box;
  padding: 22px 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.sidebar-brand-logo {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.sidebar-brand-name,
.sidebar-brand-tag {
  width: 100%;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.sidebar-brand-name {
  margin-top: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
}
.sidebar-brand-tag {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transform-origin: 50% 50%;
}
.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}
.sidebar-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.nav-dark .sidebar-link.active {
  background: rgba(11, 36, 99, 0.38);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #f97316;
}

.shell-header {
  background: #fff;
  border-bottom: 1px solid #e8eef5;
  min-height: 72px;
}
.header-title-block {
  min-width: 0;
}
.header-crumb {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f97316;
  line-height: 1;
  margin-bottom: 4px;
}
.header-title-block h1 {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.header-search {
  display: none;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 360px;
  margin-left: 12px;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  border-radius: 999px;
  padding: 8px 14px;
  color: #94a3b8;
}
.header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: #0f172a;
  box-shadow: none !important;
}
@media (min-width: 900px) {
  .header-search {
    display: flex;
  }
}
.header-pill {
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 12px;
}
.header-pill:hover {
  transform: none;
  color: #1e3a8a;
}
@media (min-width: 1100px) {
  .header-pill {
    display: inline-flex;
  }
}

.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.28);
}
.avatar-circle.lg {
  width: 44px;
  height: 44px;
  font-size: 14px;
}
.avatar-circle.xl {
  width: 72px;
  height: 72px;
  font-size: 20px;
  border-radius: 22px;
}
.avatar-circle.has-photo {
  padding: 0;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: none;
}
.avatar-circle.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}

.header-clock {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, #0f1c38 0%, #0b1730 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(11, 23, 48, 0.22);
  color: #fff;
  line-height: 1.1;
  min-width: 0;
}
.header-clock-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: #93c5fd;
}
.header-clock-icon .ui-icon {
  width: 16px;
  height: 16px;
}
.header-clock-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.header-clock-date {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(226, 232, 240, 0.68);
  white-space: nowrap;
}
.header-clock-time {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #fff;
}
.header-clock-ampm {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #93c5fd;
}
.header-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}
.header-icon-btn:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
  transform: none;
}

.user-menu {
  position: relative;
}
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.user-menu-btn:hover,
.user-menu.open .user-menu-btn {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.user-menu-copy {
  text-align: left;
  line-height: 1.15;
  min-width: 0;
  max-width: 188px;
}
.user-menu-name {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-role {
  display: block;
  font-size: 11px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-caret {
  display: flex;
  color: #94a3b8;
}
.user-menu-caret .ui-icon {
  width: 16px;
  height: 16px;
}
.user-menu.open .user-menu-caret {
  transform: rotate(180deg);
}
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 260px;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  z-index: 40;
  overflow: hidden;
}
.user-menu-panel[hidden] {
  display: none;
}
.user-menu-panel-head {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #eef2f7;
  align-items: flex-start;
}
.user-menu-email {
  font-size: 12px;
  color: #64748b;
  word-break: break-all;
  margin-top: 2px;
}
.user-menu-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 3px 8px;
}
.user-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  border-top: 1px solid #eef2f7;
}
.user-menu-link:hover {
  background: #f8fafc;
}
.user-menu-link .ui-icon {
  width: 16px;
  height: 16px;
  color: #64748b;
}
.user-menu-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.user-menu-logout:hover {
  background: #fef2f2;
}

.card,
.stat-card,
.mini-stat,
.kpi-card,
.roster-panel {
  background: #fff;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  position: relative;
  isolation: isolate;
  animation: cardBreathe 5.8s ease-in-out infinite;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.38s ease;
}
.grid > .kpi-card:nth-child(3n+2),
.grid > .card:nth-child(2),
.roster-grid > .roster-panel:nth-child(2) {
  animation-delay: -1.9s;
}
.grid > .kpi-card:nth-child(3n),
.grid > .card:nth-child(3) {
  animation-delay: -3.8s;
}
.card::after,
.stat-card::after,
.mini-stat::after,
.kpi-card::after,
.roster-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.42) 50%, transparent 62%);
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.75s ease, opacity 0.25s ease;
}
.card:not(.chart-card):hover::after,
.stat-card:hover::after,
.mini-stat:hover::after,
.kpi-card:hover::after,
.roster-panel:hover::after {
  opacity: 1;
  transform: translateX(130%);
  transition: transform 0.75s ease, opacity 0.25s ease;
}
.card:hover,
.stat-card:hover,
.mini-stat:hover,
.kpi-card:hover,
.roster-panel:hover {
  animation: none;
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(37, 99, 235, 0.1);
}
.kpi-card:hover .kpi-badge,
.stat-card:hover .kpi-badge {
  transform: scale(1.06);
}
@keyframes cardBreathe {
  0%, 100% { box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05); }
  50% { box-shadow: 0 18px 40px rgba(37, 99, 235, 0.12), 0 0 0 1px rgba(37, 99, 235, 0.06); }
}

.kpi-card,
.stat-card,
.mini-stat {
  position: relative;
  overflow: hidden;
  padding: 22px 22px 20px;
  min-height: 132px;
  display: block;
}
.kpi-card::before,
.stat-card::before,
.mini-stat::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  top: -58px;
  left: -48px;
  background: radial-gradient(circle, var(--kpi-tint, #dbe7ff) 0%, rgba(255,255,255,0) 72%);
  pointer-events: none;
}
.kpi-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  line-height: 1.35;
}
.kpi-hint {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #94a3b8;
}
.kpi-badge {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--kpi-badge, #e8eeff);
  color: var(--kpi-ink, #4f7df3);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.kpi-badge .ui-icon {
  width: 16px;
  height: 16px;
}
.kpi-value,
.stat-value {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #123056;
}
.kpi-value.is-zero {
  color: #f97316;
}
.kpi-card.tone-blue,
.stat-card.tone-blue,
.mini-stat.tone-blue { --kpi-tint: #c9d8ff; --kpi-badge: #e7eeff; --kpi-ink: #4f7df3; }
.kpi-card.tone-orange,
.stat-card.tone-orange,
.mini-stat.tone-orange { --kpi-tint: #ffe1c4; --kpi-badge: #ffece0; --kpi-ink: #f59a5a; }
.kpi-card.tone-purple,
.stat-card.tone-purple,
.mini-stat.tone-purple { --kpi-tint: #e4d7ff; --kpi-badge: #efe8ff; --kpi-ink: #8b7cf6; }
.kpi-card.tone-green,
.stat-card.tone-green,
.mini-stat.tone-green { --kpi-tint: #ccefe0; --kpi-badge: #e3f7ed; --kpi-ink: #34c38f; }

.stat-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-ico.sm {
  width: 36px;
  height: 36px;
}

.stat-delta {
  font-size: 12px;
  margin-top: 4px;
}
.stat-delta.up { color: #16a34a; }
.stat-delta.down { color: #dc2626; }

.qa-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 12px;
}
.qa-row:hover { background: #f8fafc; }
.qa-row strong { display: block; font-size: 14px; color: #0f172a; }
.qa-row small { display: block; font-size: 12px; color: #64748b; }
.qa-ico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qa-chevron { color: #94a3b8; font-size: 22px; line-height: 1; }

.dash-table {
  width: 100%;
  font-size: 13px;
}
.dash-table th {
  text-align: left;
  color: #94a3b8;
  font-weight: 500;
  padding: 8px 20px;
  background: #fafcff;
}
.dash-table td {
  padding: 12px 20px;
  border-top: 1px solid #f1f5f9;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}
.pill-green { background: #ecfdf3; color: #16a34a; }
.pill-blue { background: #eff6ff; color: #2563eb; }
.pill-red { background: #fef2f2; color: #dc2626; }
.pill-orange { background: #fff7ed; color: #ea580c; }
.pill-purple { background: #f5f3ff; color: #7c3aed; }
.pill-slate { background: #f1f5f9; color: #64748b; }

.progress-track {
  width: 72px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
}

.activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px #dcfce7;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.chart-card {
  overflow: hidden;
}
.chart-card:hover {
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.09);
}

.script-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.script-tab {
  border: 0;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.script-tab.is-active {
  background: #2563eb;
  color: #fff;
}
.script-panel[hidden] {
  display: none;
}
.voice-panel[hidden] {
  display: none;
}
.voice-line {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}
.voice-badge {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f5f9;
  color: #64748b;
}
.voice-badge-ready { background: #ecfdf5; color: #047857; }
.voice-badge-preview { background: #eff6ff; color: #1d4ed8; }
.voice-badge-stale { background: #fff7ed; color: #c2410c; }
.voice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.voice-actions form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.voice-actions button,
.voice-file {
  font-size: 13px;
}
.voice-actions button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
}
.voice-record.is-live,
.voice-stop.is-live {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}
.voice-status {
  flex: 1 1 100%;
  min-height: 1em;
  font-size: 12px;
  color: #64748b;
}
.voice-file {
  max-width: 220px;
}
.chart-stage {
  position: relative;
  min-height: 180px;
}
.chart-stage.pie {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-stage.pie-compact {
  max-width: 248px;
  margin: 0 auto;
}
.consent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.consent-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.consent-meta strong {
  font-variant-numeric: tabular-nums;
  color: #0b1730;
  font-weight: 700;
}
.consent-meta em {
  margin-left: 6px;
  font-style: normal;
  font-weight: 600;
  color: #94a3b8;
}
.consent-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}
.consent-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.chart-glow {
  position: absolute;
  width: 58%;
  height: 58%;
  left: 21%;
  top: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, rgba(37, 99, 235, 0) 70%);
  pointer-events: none;
  z-index: 0;
}
.chart-stage canvas {
  position: relative;
  z-index: 1;
}
.qa-row {
  transition: transform 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}
.qa-row:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}
.qa-ico {
  transition: transform 0.25s ease;
}
.qa-row:hover .qa-ico {
  transform: scale(1.08);
}

.toast { animation: slideIn 0.25s ease-out; }
@keyframes slideIn {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.demo-banner {
  background: #ce1126;
}

.text-apc-red { color: var(--apc-red); }
.border-apc-red { border-color: var(--apc-red); }
.bg-brand { background-color: var(--brand); }
.hover\:bg-brand-dark:hover { background-color: var(--brand-dark); }
.text-brand { color: var(--brand); }
.text-brand-dark { color: var(--brand-dark); }

.bg-indigo-600 { background-color: #2563eb !important; }
.hover\:bg-indigo-700:hover { background-color: #1d4ed8 !important; }
.text-indigo-700, .text-indigo-600 { color: #1d4ed8 !important; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}
.pager-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pager-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  color: #334155;
}
.pager-nav a.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.call-ring {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #0b1730;
  color: #fff;
}
.call-ring img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  background: #fff;
}
.call-ring p {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fdba74;
}
.call-ring h2 {
  margin: 4px 0 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
}
.call-ring span,
.call-ring small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.portal-ringer {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(520px, calc(100% - 24px));
  padding: 14px 16px;
  border-radius: 16px;
  background: #0b1730;
  color: #fff;
  box-shadow: 0 16px 40px rgba(11, 23, 48, 0.28);
}
.portal-ringer[hidden] { display: none; }
.portal-ringer strong { display: block; font-size: 14px; }
.portal-ringer p { margin: 2px 0 0; color: rgba(255,255,255,0.72); font-size: 13px; }
.portal-ringer button {
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0b1730;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
}
.portal-ringer-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fb923c;
  box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.7);
  animation: portal-ring-pulse 1.4s ease-out infinite;
}
@keyframes portal-ring-pulse {
  70% { box-shadow: 0 0 0 10px rgba(251, 146, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0); }
}
.dial-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.dial-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.dial-row:last-child { border-bottom: 0; }
.dial-row.is-disabled { color: #94a3b8; }
.dial-phone { color: #64748b; font-size: 13px; }
.dial-row em { margin-left: auto; font-style: normal; font-size: 12px; color: #b45309; }
@media (max-width: 640px) {
  .call-ring { padding: 14px; }
  .call-ring h2 { font-size: 20px; }
}
@media (min-width: 1024px) {
  #sidebar-toggle { display: none; }
}
@media (max-width: 1023px) {
  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(11, 23, 48, 0.48);
    z-index: 30;
  }
  #app-sidebar.sidebar-open {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: min(280px, 86vw);
    height: 100%;
    overflow-y: auto;
  }
}

.login-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: Inter, "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
  background: #0b1730;
}
.login-backdrop {
  position: fixed;
  inset: -8%;
  will-change: transform;
}
.login-backdrop-img {
  position: absolute;
  inset: 0;
  background-image: var(--login-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  animation: loginKenBurns 28s ease-in-out infinite alternate;
}
.login-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 23, 48, 0.38) 0%, rgba(11, 23, 48, 0.74) 100%);
}
.login-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
}
.login-orb-a {
  width: 280px;
  height: 280px;
  left: 8%;
  top: 12%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45), transparent 68%);
  animation: loginOrbFloat 9s ease-in-out infinite;
}
.login-orb-b {
  width: 220px;
  height: 220px;
  right: 10%;
  bottom: 14%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.32), transparent 68%);
  animation: loginOrbFloat 11s ease-in-out infinite reverse;
}
.login-orb-c {
  width: 160px;
  height: 160px;
  right: 28%;
  top: 18%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.22), transparent 70%);
  animation: loginOrbFloat 7.5s ease-in-out infinite;
}
.login-card-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  will-change: transform;
}
.login-card-aura {
  position: absolute;
  inset: -22px;
  border-radius: 40px;
  pointer-events: none;
  z-index: 0;
}
.login-card-aura-a {
  background: radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.42), rgba(37, 99, 235, 0.08) 48%, transparent 72%);
  filter: blur(16px);
  animation: loginAura 5.4s ease-in-out infinite;
}
.login-card-aura-b {
  inset: -10px;
  background: radial-gradient(circle at 50% 80%, rgba(249, 115, 22, 0.22), transparent 62%);
  filter: blur(18px);
  animation: loginAura 7.2s ease-in-out infinite reverse;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  padding: 36px 32px 32px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
  animation: loginCardIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) both, loginCardBreathe 5.6s ease-in-out 0.85s infinite;
  transition: box-shadow 0.35s ease, transform 0.35s ease, background-color 0.35s ease;
}
.login-card:hover,
.login-card:focus-within {
  animation-play-state: paused;
  box-shadow: 0 36px 80px rgba(15, 23, 42, 0.46);
}
.login-card-wrap:hover .login-card-aura,
.login-card-wrap:focus-within .login-card-aura {
  animation-play-state: paused;
}
.login-card-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.login-intro {
  text-align: center;
  margin: 0 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}
.login-intro h1 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #0f172a;
}
.login-intro p {
  margin: 8px auto 0;
  max-width: 26ch;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}
.login-logo {
  height: 72px;
  width: 72px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
  animation: loginLogoBreathe 3.8s ease-in-out infinite;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.login-logo:hover {
  transform: scale(1.08);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
  animation-play-state: paused;
}
.login-card input {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.login-card input:hover {
  border-color: #93c5fd;
}
.login-card input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}
.login-card button[type="submit"] {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  animation: loginBtnBreathe 3.4s ease-in-out infinite;
}
.login-card button[type="submit"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: loginShine 3.8s ease-in-out infinite;
}
.login-card button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}
@keyframes loginKenBurns {
  from { transform: scale(1.08) translate(0, 0); }
  to { transform: scale(1.18) translate(-1.4%, -1%); }
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes loginCardBreathe {
  0%, 100% {
    transform: scale(1) translateY(0);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.24);
    border-color: rgba(255, 255, 255, 0.38);
  }
  50% {
    transform: scale(1.02) translateY(-5px);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 38px 86px rgba(37, 99, 235, 0.22);
    border-color: rgba(147, 197, 253, 0.7);
  }
}
@keyframes loginAura {
  0%, 100% { opacity: 0.32; transform: scale(0.94); }
  50% { opacity: 0.85; transform: scale(1.08); }
}
@keyframes loginLogoBreathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.14);
  }
  40% {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.32);
  }
  70% {
    transform: scale(1.03) rotate(1.4deg);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
  }
}
@keyframes loginBtnBreathe {
  0%, 100% { box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18); }
  50% { box-shadow: 0 14px 28px rgba(37, 99, 235, 0.4); }
}
@keyframes loginOrbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.42; }
  50% { transform: translate3d(18px, -22px, 0) scale(1.14); opacity: 0.8; }
}
@keyframes loginShine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}
@media (prefers-reduced-motion: reduce) {
  .login-backdrop,
  .login-backdrop-img,
  .login-orb,
  .login-card,
  .login-card-aura,
  .login-logo,
  .login-card button[type="submit"],
  .login-card button[type="submit"]::after {
    animation: none !important;
  }
  .login-logo:hover,
  .login-card:hover,
  .login-card button[type="submit"]:hover,
  .login-card input:focus {
    transform: none !important;
  }
}

.sms-page {
  max-width: 1280px;
}
.sms-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.sms-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 6px;
}
.sms-kicker .ui-icon {
  width: 16px;
  height: 16px;
}
.sms-title {
  font-size: 22px;
  font-weight: 750;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.sms-lead {
  margin-top: 6px;
  max-width: 560px;
  font-size: 14px;
  color: #64748b;
}
.sms-script-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  padding: 8px 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.sms-script-link:hover {
  background: #dbeafe;
  transform: translateY(-1px);
}
.sms-compose,
.sms-history {
  padding: 0;
  overflow: hidden;
}
.sms-compose-head,
.sms-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.sms-compose-head h2,
.sms-history-head h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.sms-compose-head p {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
  max-width: 420px;
}
.sms-selected,
.sms-history-head span {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.sms-compose .sms-field {
  padding: 18px 24px 0;
}
.sms-field > label,
.sms-label-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}
.sms-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sms-count {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.sms-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sms-search {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.sms-search:focus {
  outline: none;
  background: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.sms-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.sms-people {
  max-height: 280px;
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #fbfcfe;
}
.sms-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}
.sms-person:last-child {
  border-bottom: 0;
}
.sms-person:hover {
  background: #fff;
}
.sms-person:has(input:checked) {
  background: #eff6ff;
}
.sms-person input {
  accent-color: #2563eb;
}
.sms-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sms-person-copy {
  min-width: 0;
  flex: 1;
}
.sms-person-name {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
}
.sms-person-meta {
  display: block;
  font-size: 12px;
  color: #64748b;
}
.sms-lang {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 3px 8px;
}
.sms-body {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  min-height: 128px;
  resize: vertical;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.sms-body:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.sms-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.sms-preview {
  margin: 16px 24px 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fafc, #eef4ff);
  padding: 14px 16px;
}
.sms-preview-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}
.sms-preview-body {
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
}
.sms-actions {
  padding: 18px 24px 24px;
}
.sms-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 650;
  font-size: 14px;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.sms-send:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.28);
}
.sms-send .ui-icon {
  width: 16px;
  height: 16px;
}
.sms-feed {
  list-style: none;
  margin: 0;
  padding: 8px 0 12px;
  max-height: 720px;
  overflow: auto;
}
.sms-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 24px;
  transition: background 0.15s ease;
}
.sms-item input[type="checkbox"] { margin-top: 10px; }
.sms-item:hover {
  background: #f8fafc;
}
.sms-item-body {
  min-width: 0;
  flex: 1;
}
.sms-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sms-item-top strong {
  font-size: 13px;
  color: #0f172a;
}
.sms-item-phone {
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
}
.sms-item-text {
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
}
.sms-empty,
.sms-empty-state {
  color: #64748b;
  font-size: 13px;
  padding: 28px 16px;
  text-align: center;
}
.sms-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 64px 24px;
}
.sms-empty-state .ui-icon {
  width: 28px;
  height: 28px;
  color: #93c5fd;
}

.btn-primary,
.btn-ghost,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover {
  background: #1d4ed8;
  color: #fff;
}
.btn-ghost {
  background: #fff;
  color: #0f172a;
  border-color: #e2e8f0;
}
.btn-ghost:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
  transform: none;
}
.btn-danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn-danger:hover {
  background: #fee2e2;
  transform: none;
}

.roster-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) {
  .roster-grid {
    grid-template-columns: 1fr 1.15fr;
    align-items: start;
  }
}
.roster-panel {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.roster-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}
.roster-head h2 {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}
.roster-count {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}
.roster-list {
  display: flex;
  flex-direction: column;
}
.roster-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #f1f5f9;
}
.roster-row:first-child {
  border-top: 0;
}
.roster-copy {
  min-width: 0;
}
.roster-copy h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
  color: #0f172a;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.roster-copy p {
  margin: 3px 0 0;
  font-size: 13px;
  color: #64748b;
}
.party-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eff6ff, #dbeafe);
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.candidate-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.roster-row-candidate.is-current {
  background: linear-gradient(90deg, #f8fbff, #fff 42%);
}
.current-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
}
.roster-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.roster-actions form {
  margin: 0;
}
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
.btn-mini:hover {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #f8fbff;
}
.btn-mini-primary {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.btn-mini-primary:hover {
  background: #dbeafe;
  color: #1e3a8a;
}
.btn-mini-danger {
  background: #fff;
  border-color: #fecaca;
  color: #b91c1c;
}
.btn-mini-danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.roster-empty {
  margin: 0;
  padding: 28px 20px 32px;
  color: #64748b;
  font-size: 14px;
}
@media (min-width: 720px) {
  .roster-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .roster-actions {
    grid-column: auto;
    justify-content: flex-end;
  }
}

.history-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.history-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 4px 4px;
}
.history-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 8px;
}
.history-kicker .ui-icon {
  width: 14px;
  height: 14px;
}
.history-title {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.history-lead {
  margin-top: 8px;
  max-width: 520px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}
.history-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.history-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.history-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.history-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e8eef5;
}
.history-chip:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
  transform: none;
}
.history-chip.is-active {
  background: #0b1730;
  border-color: #0b1730;
  color: #fff;
}
.history-toolbar-side {
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #475569;
  font-weight: 650;
  background: #f8fafc;
  border: 1px solid #e8eef5;
  border-radius: 999px;
  padding: 8px 12px;
}
.history-bulk {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.history-bulk span {
  font-size: 12px;
  color: #94a3b8;
}
.history-board {
  padding: 8px 0 12px;
  overflow: hidden;
}
.history-select-all {
  padding: 10px 22px 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.history-day {
  padding: 16px 22px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
}
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history-row {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, 1fr) 72px 108px;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid #f1f5f9;
}
.history-list.has-check .history-row {
  grid-template-columns: 28px 40px minmax(0, 1.4fr) minmax(0, 1fr) 72px 108px;
}
.history-row .pill {
  justify-self: end;
  white-space: nowrap;
}
.history-row-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.history-check {
  position: relative;
  z-index: 2;
}
.history-row:hover {
  background: #f8fbff;
}
.history-who,
.history-meta,
.history-time {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.history-who strong,
.history-time strong {
  font-size: 13px;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.history-who span,
.history-meta span,
.history-time span {
  font-size: 12px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-dir {
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2563eb !important;
}
.history-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: #1d4ed8;
  white-space: nowrap;
}
.history-open:hover {
  transform: none;
}
.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 64px 24px;
  color: #64748b;
  text-align: center;
}
.history-empty .ui-icon {
  width: 28px;
  height: 28px;
  color: #93c5fd;
}

.app-modal[hidden] {
  display: none !important;
}
.app-modal.is-open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 80;
}
.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 48, 0.48);
}
.app-modal-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 32px));
  margin: 8vh auto 0;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}
.app-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 0;
}
.app-modal-close {
  border: 0;
  background: #f8fafc;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.app-modal-body {
  padding: 18px 22px 22px;
}
.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
body.modal-open {
  overflow: hidden;
}

.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 28px 32px;
  border-radius: 24px;
  background: linear-gradient(105deg, #1e3a8a 0%, #1d4ed8 52%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(29, 78, 216, 0.22);
}
.dash-hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.dash-hero-title {
  margin-top: 12px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.dash-balance {
  margin-top: 14px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}
.dash-balance strong {
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.02em;
}
.dash-hero-lead {
  margin-top: 8px;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.dash-hero-clock {
  background: #0b1730 !important;
  box-shadow: none;
  flex-shrink: 0;
  padding: 12px 18px;
  border-radius: 16px;
}
.dash-hero-clock .header-clock-time {
  font-size: 16px;
}
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 760px) {
  .dash-metrics {
    grid-template-columns: 1fr;
  }
}
.dash-snapshot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-snapshot-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f97316;
  margin-bottom: 6px;
}
.dash-snapshot-kicker .dash-live {
  letter-spacing: 0;
  text-transform: none;
}
.dash-snapshot-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.dash-snapshot-lead {
  margin-top: 4px;
  font-size: 14px;
  color: #64748b;
}
.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf3;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}
@media (max-width: 720px) {
  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }
  .dash-hero-title {
    font-size: 24px;
  }
  .dash-snapshot {
    flex-direction: column;
    align-items: flex-start;
  }
}

.page-chart {
  padding: 20px 22px 12px;
  margin-bottom: 22px;
}
.page-chart-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0b1730;
  letter-spacing: -0.02em;
}
.page-chart-head p:last-child {
  margin-top: 4px;
  font-size: 13px;
  color: #64748b;
}
.page-chart-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 6px;
}
.page-chart-kicker .ui-icon {
  width: 14px;
  height: 14px;
}
.page-chart-stage {
  min-height: 220px;
}

.welcome-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-panel {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100% - 32px));
  background: #fff;
  border-radius: 28px;
  padding: 44px 36px 32px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.welcome-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: linear-gradient(90deg, #f59e0b, #fb923c, #f97316);
}
.welcome-close {
  position: absolute;
  top: 16px;
  right: 16px;
}
.welcome-photo {
  width: 118px;
  height: 118px;
  margin: 8px auto 18px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(145deg, #e8c872 0%, #c9a227 55%, #a57c12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(201, 162, 39, 0.28);
}
.welcome-photo img,
.welcome-photo span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
}
.welcome-photo span {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
}
.welcome-org {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0b1730;
  margin-bottom: 10px;
}
.welcome-panel h2 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.welcome-copy {
  margin: 12px auto 24px;
  max-width: 340px;
  font-size: 15px;
  line-height: 1.55;
  color: #64748b;
}
.welcome-cta {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #fb923c, #f97316);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.32);
}
.welcome-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #f97316, #ea580c);
}

@media (max-width: 900px) {
  .history-row,
  .history-list.has-check .history-row {
    grid-template-columns: 24px 36px minmax(0, 1fr) auto;
    grid-template-areas:
      "check av who pill"
      "check av meta pill"
      "check av time pill";
  }
  .history-check { grid-area: check; }
  .history-row .sms-avatar { grid-area: av; }
  .history-who { grid-area: who; }
  .history-meta { grid-area: meta; }
  .history-time { grid-area: time; }
  .history-row .pill { grid-area: pill; }
}
@media (max-width: 640px) {
  .shell-header {
    gap: 8px;
    min-height: 64px;
  }
  .header-title-block {
    flex: 1;
  }
  .header-title-block h1 {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
  }
  .header-clock {
    display: none;
  }
  .shell-header .ml-auto {
    gap: 6px;
  }
  .login-page {
    padding: 16px;
  }
  .login-card {
    padding: 28px 18px 22px;
  }
  .welcome-panel {
    padding: 36px 18px 22px;
  }
  .welcome-panel h2 {
    font-size: 22px;
  }
  .desk-compose {
    flex-direction: column;
  }
  .desk-compose button {
    min-height: 44px;
  }
  main form.flex input,
  main form.flex select,
  main form.flex button,
  main form.flex a {
    width: 100%;
  }
  .header-clock-date {
    display: none;
  }
  .header-clock {
    padding: 7px 12px 7px 8px;
  }
  .history-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .history-title {
    font-size: 26px;
  }
}

.desk {
  display: grid;
  gap: 18px;
}
.desk-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.desk-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a6a32;
}
.desk-lead {
  margin: 6px 0 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.6;
  color: #526277;
}
.desk-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #d7efe0;
  border-radius: 999px;
  background: #f3fbf6;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.desk-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
  animation: deskPulse 2.4s ease-in-out infinite;
}
@keyframes deskPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0.05); }
}
.desk-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.desk-panel {
  background: #fff;
  border: 1px solid #e5ebf2;
  border-radius: 18px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03), 0 16px 40px rgba(15, 23, 42, 0.04);
}
.desk-setup {
  padding: 22px;
}
.desk-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #eef2f6;
}
.desk-portrait {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 16px;
  object-fit: cover;
  object-position: center 18%;
  background: #f4f7fb;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.desk-agent {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 680;
  letter-spacing: -0.02em;
  color: #0b1730;
}
.desk-party {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}
.desk-form {
  display: grid;
  gap: 14px;
}
.desk-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #334155;
}
.desk-field select,
.desk-compose input {
  width: 100%;
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #0b1730;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.4;
}
.desk-field select:focus,
.desk-compose input:focus {
  outline: none;
  border-color: #0b1730;
  box-shadow: 0 0 0 3px rgba(11, 23, 48, 0.08);
}
.desk-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 2px;
  border: 0;
  border-radius: 10px;
  background: #0b1730;
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}
.desk-submit:hover {
  background: #162544;
  color: #fff;
  transform: none;
}
.desk-note {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: #526277;
}
.desk-stage {
  display: flex;
  flex-direction: column;
  min-height: 640px;
  padding: 22px 22px 16px;
}
.desk-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eef2f6;
}
.desk-caller {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.desk-phone {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.desk-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.desk-chips li {
  border: 1px solid #e6edf5;
  background: #f8fafc;
  color: #475569;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.desk-transcript {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  margin-top: 8px;
  overflow: auto;
}
.desk-line {
  padding: 16px 4px 16px 14px;
  border-bottom: 1px solid #f1f5f9;
  border-left: 2px solid transparent;
}
.desk-line.is-agent { border-left-color: #0b1730; }
.desk-line.is-caller { border-left-color: #b8c3d1; }
.desk-line.is-system { border-left-color: #c4a574; }
.desk-line-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.desk-who {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}
.desk-state {
  font-size: 11px;
  color: #94a3b8;
}
.desk-line p {
  margin: 6px 0 0;
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.65;
  color: #142033;
  white-space: pre-wrap;
}
.desk-empty {
  margin: auto;
  max-width: 38ch;
  padding: 48px 12px;
  text-align: center;
  font-size: 14px;
  line-height: 1.65;
  color: #64748b;
}
.desk-compose {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
}
.desk-compose input { flex: 1; }
.desk-compose button {
  border: 0;
  border-radius: 10px;
  background: #0b1730;
  color: #fff;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.desk-compose button:hover {
  background: #162544;
  transform: none;
}
@media (max-width: 980px) {
  .desk-layout { grid-template-columns: 1fr; }
  .desk-stage { min-height: 520px; }
  .desk-stage-head,
  .desk-intro { flex-direction: column; align-items: flex-start; }
  .desk-chips { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .desk-live i { animation: none; }
}

.campaign-page {
  display: grid;
  gap: 20px;
  max-width: 1180px;
}
.campaign-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.campaign-lead {
  margin: 6px 0 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.65;
  color: #526277;
}
.campaign-state {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e6edf5;
  background: #f8fafc;
  color: #0b1730;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.campaign-state.is-active { background: #f3fbf6; border-color: #d7efe0; color: #166534; }
.campaign-state.is-paused { background: #fff8ee; border-color: #f3e2c2; color: #8a6a32; }
.campaign-state.is-disabled,
.campaign-state.is-completed { background: #f8fafc; color: #64748b; }
.campaign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.campaign-form,
.campaign-side,
.campaign-roster {
  padding: 26px;
}
.campaign-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.campaign-block + .campaign-block {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid #eef2f6;
}
.campaign-block h2,
.campaign-side h2,
.campaign-roster h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.campaign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.campaign-span { grid-column: 1 / -1; }
.campaign-field span,
.campaign-days legend {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #334155;
}
.campaign-field input,
.campaign-field select,
.campaign-field textarea,
.campaign-add select {
  width: 100%;
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #0b1730;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.45;
}
.campaign-field textarea { resize: vertical; min-height: 88px; }
.campaign-field input:focus,
.campaign-field select:focus,
.campaign-field textarea:focus,
.campaign-add select:focus {
  outline: none;
  border-color: #0b1730;
  box-shadow: 0 0 0 3px rgba(11, 23, 48, 0.08);
}
.campaign-days {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}
.campaign-days > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.campaign-day { position: relative; margin: 0; }
.campaign-day input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.campaign-day span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 8px 10px;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.campaign-day input:checked + span {
  background: #0b1730;
  border-color: #0b1730;
  color: #fff;
}
.campaign-day input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(11, 23, 48, 0.12);
}
.campaign-check,
.campaign-caution label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 14px;
  color: #142033;
}
.campaign-check input,
.campaign-caution input { margin-top: 3px; }
.campaign-caution {
  margin-top: 16px;
  padding: 16px 16px 14px;
  border: 1px solid #eadcc4;
  border-radius: 14px;
  background: #fbf8f2;
}
.campaign-caution label { margin-top: 0; color: #0b1730; font-weight: 650; }
.campaign-caution p {
  margin: 8px 0 0 24px;
  font-size: 13px;
  line-height: 1.6;
  color: #6b5a3e;
}
.campaign-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #eef2f6;
}
.campaign-actions .desk-submit { width: auto; min-width: 180px; margin: 0; }
.campaign-actions a {
  font-size: 13px;
  font-weight: 650;
  color: #526277;
  text-decoration: none;
}
.campaign-actions a:hover { color: #0b1730; }
.campaign-side h2 {
  margin: 8px 0 18px;
  font-size: 22px;
  line-height: 1.25;
}
.campaign-side dl { margin: 0; }
.campaign-side dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #eef2f6;
}
.campaign-side dt {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a6a32;
}
.campaign-side dd {
  margin: 0;
  text-align: right;
  font-size: 14px;
  color: #0b1730;
}
.campaign-roster-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eef2f6;
}
.campaign-roster-head h2 { margin: 4px 0 6px; }
.campaign-roster-head p:last-child {
  margin: 0;
  max-width: 58ch;
  font-size: 14px;
  line-height: 1.6;
  color: #526277;
}
.campaign-count {
  margin: 0;
  min-width: 56px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #0b1730;
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.03em;
}
.campaign-add {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.campaign-add label { flex: 1; min-width: 0; }
.campaign-add button,
.campaign-people button {
  border: 0;
  border-radius: 10px;
  background: #0b1730;
  color: #fff;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.campaign-add button:hover,
.campaign-people button:hover { background: #162544; color: #fff; transform: none; }
.campaign-people button {
  background: transparent;
  color: #8a3a3a;
  border: 1px solid #eadbdb;
  padding: 8px 12px;
}
.campaign-people button:hover { background: #fbf6f6; color: #8a3a3a; }
.campaign-eligible { margin: 10px 0 0; }
.campaign-eligible button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #8a6a32;
  font-size: 13px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.campaign-eligible button:hover { color: #0b1730; transform: none; }
.campaign-empty {
  margin: 22px 0 0;
  padding: 28px 12px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}
.campaign-people {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.campaign-people li {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #eef2f6;
}
.campaign-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.campaign-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #f4f1ea;
  color: #0b1730;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.campaign-person strong,
.campaign-person span {
  display: block;
}
.campaign-person strong {
  font-size: 14px;
  font-weight: 650;
  color: #0b1730;
}
.campaign-person span,
.campaign-meta span {
  font-size: 13px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.campaign-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.user-directory {
  max-width: 1180px;
}
.user-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e6edf5;
}
.user-bar h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.user-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-tool {
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #0b1730;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.user-tool:hover,
.user-tool[aria-expanded="true"] {
  background: #0b1730;
  border-color: #0b1730;
  color: #fff;
  transform: none;
}
.user-total {
  display: grid;
  justify-items: end;
  margin: 0 0 0 8px;
  min-width: 64px;
}
.user-total span {
  font-size: 22px;
  line-height: 1;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.user-total small {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a6a32;
}
.user-panel {
  margin-top: 18px;
  padding: 22px 24px 8px;
}
.user-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.user-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.03em;
  color: #0b1730;
}
.user-panel-close {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.user-panel-close:hover { color: #0b1730; transform: none; }
.user-role-grid {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.user-role-grid li {
  padding: 14px 16px;
  border: 1px solid #eef2f6;
  border-radius: 14px;
  background: #fbfaf7;
}
.user-role-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: #0b1730;
}
.user-role-grid span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: #526277;
}
.user-register {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(120px, 0.7fr) 120px minmax(140px, 0.8fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid #eef2f6;
}
.user-row.is-self { background: linear-gradient(90deg, rgba(138, 106, 50, 0.06), transparent 42%); }
.user-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.user-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #0b1730;
  color: #f4efe4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.user-identity strong,
.user-identity span {
  display: block;
  min-width: 0;
}
.user-identity strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0b1730;
}
.user-identity strong em {
  margin-left: 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a6a32;
}
.user-identity span,
.user-seen {
  font-size: 13px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.user-role {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6a32;
}
.user-empty {
  margin: 28px 0 0;
  padding: 36px 12px;
  text-align: center;
  color: #64748b;
}
@media (max-width: 980px) {
  .user-bar,
  .user-bar-actions { flex-direction: column; align-items: flex-start; }
  .user-role-grid,
  .user-row { grid-template-columns: 1fr; }
  .user-total { justify-items: start; }
}
.user-roles { margin-top: 4px; }
.campaign-side dl.user-roles > div { display: block; }
.user-roles dt { text-align: left; }
.user-roles dd {
  margin: 4px 0 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: #526277;
}
.user-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.user-state.is-on { background: #f3fbf6; color: #166534; }
.user-state.is-off { background: #f8fafc; color: #64748b; }
.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.user-actions a,
.user-actions button {
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #0b1730;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.user-actions a:hover,
.user-actions button:hover { background: #f8fafc; color: #0b1730; transform: none; }
.user-actions .is-remove { color: #8a3a3a; border-color: #eadbdb; }
.user-actions .is-remove:hover { background: #fbf6f6; color: #8a3a3a; }
.user-edit { max-width: 860px; }
.user-role-notes {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.user-role-notes li {
  font-size: 13px;
  line-height: 1.5;
  color: #526277;
}
.user-role-notes strong { color: #0b1730; font-weight: 650; }
.campaign-people li { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; }
@media (max-width: 980px) {
  .campaign-layout,
  .campaign-grid,
  .campaign-people li { grid-template-columns: 1fr; }
  .user-actions { justify-content: flex-start; }
  .campaign-intro,
  .campaign-roster-head,
  .campaign-add { flex-direction: column; align-items: stretch; }
  .campaign-side dd { text-align: left; }
}
.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 760px) {
  .report-metrics { grid-template-columns: 1fr; }
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.person-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(11, 23, 48, 0.04);
}
.person-card.is-self { border-color: #d7e4f7; }
.person-top { display: flex; align-items: center; gap: 12px; }
.person-top h3 { margin: 0; font-size: 16px; color: #0b1730; }
.person-top h3 em { font-style: normal; font-size: 11px; color: #1d4ed8; margin-left: 4px; }
.person-top p { margin: 2px 0 0; color: #64748b; font-size: 13px; word-break: break-all; }
.person-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.person-role, .person-status {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}
.person-role { background: #eff6ff; color: #1d4ed8; }
.person-status.is-on { background: #ecfdf3; color: #166534; }
.person-status.is-off { background: #f8fafc; color: #64748b; }
.person-seen { margin: 12px 0 0; color: #64748b; font-size: 12px; }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.person-actions a, .person-actions button {
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #0b1730;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}
.person-actions .is-remove { color: #9f1239; border-color: #fecdd3; }
@media (max-width: 1024px) {
  .people-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .people-grid { grid-template-columns: 1fr; }
}
