/* Swiftly SMS operations-console shell.
   Inspired by dense operational dashboards while preserving Swiftly's own branding,
   information architecture, labels, and interaction behavior. */

.app-shell:not(.admin-shell) {
  --ops-bg: #08152d;
  --ops-bg-2: #0b1934;
  --ops-surface: #102044;
  --ops-surface-2: #142958;
  --ops-surface-3: #193266;
  --ops-line: rgba(130, 157, 211, .18);
  --ops-line-strong: rgba(130, 157, 211, .32);
  --ops-text: #eef4ff;
  --ops-muted: #89a0ce;
  --ops-dim: #6278a4;
  --ops-blue: #2e5da8;
  --ops-blue-bright: #4d82da;
  --ops-orange: #ff9518;
  --ops-green: #31d07f;
  --ops-red: #ff6f7d;
  --ops-radius: 10px;
  --ops-sidebar: 232px;

  --sidebar-width: var(--ops-sidebar);
  min-height: 100vh;
  background: var(--ops-bg);
  color: var(--ops-text);
}

.app-shell:not(.admin-shell) .sidebar {
  padding: 14px 12px;
  border-right: 1px solid var(--ops-line);
  background: #091733;
  color: var(--ops-text);
}

.app-shell:not(.admin-shell) .sidebar-head {
  min-height: 54px;
  border-bottom: 1px solid var(--ops-line);
  margin: -14px -12px 12px;
  padding: 7px 12px;
}

.app-shell:not(.admin-shell) .brand {
  min-width: 0;
  padding: 0;
}

.app-shell:not(.admin-shell) .user-nav {
  padding: 4px 0 12px;
  scrollbar-color: rgba(137, 160, 206, .25) transparent;
}

.app-shell:not(.admin-shell) .nav-group {
  margin-top: 16px;
  gap: 3px;
}

.app-shell:not(.admin-shell) .nav-section-label {
  padding: 0 10px 6px;
  color: var(--ops-dim);
  font-size: 9px;
  letter-spacing: .15em;
}

.app-shell:not(.admin-shell) .nav-link,
.app-shell:not(.admin-shell) .nav-action {
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #a9b8d9;
  font-size: 13px;
  font-weight: 500;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}

.app-shell:not(.admin-shell) .nav-link:hover,
.app-shell:not(.admin-shell) .nav-link.active {
  transform: none;
  color: #fff;
  background: rgba(46, 93, 168, .28);
  border-color: rgba(77, 130, 218, .35);
}

.app-shell:not(.admin-shell) .nav-link.active {
  color: #fff;
  box-shadow: inset 2px 0 0 var(--ops-orange);
}

.app-shell:not(.admin-shell) .nav-link .icon,
.app-shell:not(.admin-shell) .nav-action .icon {
  width: 17px;
  height: 17px;
  color: #7995ca;
}

.app-shell:not(.admin-shell) .nav-link.active .icon {
  color: var(--ops-orange);
}

.app-shell:not(.admin-shell) .sidebar-foot {
  border-top: 1px solid var(--ops-line);
  padding-top: 12px;
}

.app-shell:not(.admin-shell) .sidebar-download {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  color: #9eb0d5;
  background: rgba(255,255,255,.02);
}

.app-shell:not(.admin-shell) .sidebar-download:hover {
  color: #fff;
  border-color: var(--ops-line-strong);
  background: rgba(46, 93, 168, .18);
}

.app-shell:not(.admin-shell) .sidebar-collapse-toggle {
  top: 24px;
  right: -12px;
  border-color: var(--ops-line-strong);
  color: #9eb0d5;
  background: #0d1d3d;
  box-shadow: 0 6px 16px rgba(0,0,0,.24);
}

.app-shell:not(.admin-shell) .sidebar-collapse-toggle:hover {
  color: var(--ops-orange);
  border-color: rgba(255,149,24,.4);
  background: #13274f;
}

.app-shell:not(.admin-shell) .main-content {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(19, 44, 88, .16), transparent 180px),
    var(--ops-bg);
}

.app-shell:not(.admin-shell) .topbar {
  height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--ops-line);
  background: rgba(8, 21, 45, .96);
  backdrop-filter: blur(12px);
}

.app-shell:not(.admin-shell) .topbar-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.app-shell:not(.admin-shell) .topbar-title strong {
  color: #fff;
  font-size: 13px;
  letter-spacing: .02em;
}

.app-shell:not(.admin-shell) .topbar-title .muted {
  color: var(--ops-dim);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-shell:not(.admin-shell) .user-chip {
  border: 1px solid var(--ops-line);
  color: #d9e4fb;
  background: rgba(255,255,255,.03);
}

.app-shell:not(.admin-shell) .user-chip:hover {
  border-color: var(--ops-line-strong);
  background: rgba(255,255,255,.06);
}

.app-shell:not(.admin-shell) .user-avatar {
  color: #0b1934;
  background: var(--ops-orange);
}

.app-shell:not(.admin-shell) .user-menu-popover {
  border-color: var(--ops-line-strong);
  color: var(--ops-text);
  background: #102044;
  box-shadow: 0 18px 44px rgba(0,0,0,.34);
}

.app-shell:not(.admin-shell) .user-menu-popover a,
.app-shell:not(.admin-shell) .user-menu-popover button {
  color: #d8e4ff;
}

.app-shell:not(.admin-shell) .user-menu-popover a:hover,
.app-shell:not(.admin-shell) .user-menu-popover button:hover {
  background: rgba(77,130,218,.14);
}

.app-shell:not(.admin-shell) .page {
  max-width: none;
  margin: 0;
  padding: 30px 34px 46px;
  color: var(--ops-text);
}

.app-shell:not(.admin-shell) .page-heading {
  margin-bottom: 24px;
}

.app-shell:not(.admin-shell) .page-heading h1 {
  color: #fff;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -.035em;
}

.app-shell:not(.admin-shell) .page-heading p,
.app-shell:not(.admin-shell) .card-head p,
.app-shell:not(.admin-shell) .helper-text,
.app-shell:not(.admin-shell) .muted,
.app-shell:not(.admin-shell) small {
  color: var(--ops-muted);
}

.app-shell:not(.admin-shell) .eyebrow {
  color: #6f8fc9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: .16em;
}

.app-shell:not(.admin-shell) .card {
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius);
  background: var(--ops-surface);
  box-shadow: 0 14px 34px rgba(0,0,0,.10);
}

.app-shell:not(.admin-shell) .card:not(.table-card):not(.inbox-shell) {
  padding: 22px;
}

.app-shell:not(.admin-shell) .card-head h2 {
  color: #fff;
}

.app-shell:not(.admin-shell) .decor-icon,
.app-shell:not(.admin-shell) .text-link {
  color: var(--ops-orange);
}

.app-shell:not(.admin-shell) .stat-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  background: #0e1e40;
  box-shadow: none;
}

.app-shell:not(.admin-shell) .stat-card:hover {
  transform: none;
  border-color: var(--ops-line-strong);
  box-shadow: none;
}

.app-shell:not(.admin-shell) .stat-card span:not(.stat-icon),
.app-shell:not(.admin-shell) .stat-card p {
  color: var(--ops-muted);
}

.app-shell:not(.admin-shell) .stat-card strong {
  color: #fff;
}

.app-shell:not(.admin-shell) .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(77,130,218,.12) !important;
}

.app-shell:not(.admin-shell) input,
.app-shell:not(.admin-shell) textarea,
.app-shell:not(.admin-shell) select {
  border-color: var(--ops-line-strong);
  border-radius: 8px;
  color: #f5f8ff;
  background: #091733;
}

.app-shell:not(.admin-shell) input::placeholder,
.app-shell:not(.admin-shell) textarea::placeholder {
  color: #61759e;
}

.app-shell:not(.admin-shell) input:focus,
.app-shell:not(.admin-shell) textarea:focus,
.app-shell:not(.admin-shell) select:focus {
  border-color: var(--ops-blue-bright);
  box-shadow: 0 0 0 3px rgba(77,130,218,.14);
}

.app-shell:not(.admin-shell) .field label,
.app-shell:not(.admin-shell) .field-label {
  color: #cbd8f1;
}

.app-shell:not(.admin-shell) .btn {
  min-height: 40px;
  border-radius: 8px;
}

.app-shell:not(.admin-shell) .btn-primary {
  color: #07142c;
  background: var(--ops-orange);
  box-shadow: none;
}

.app-shell:not(.admin-shell) .btn-primary:hover {
  background: #ffab3d;
  box-shadow: none;
}

.app-shell:not(.admin-shell) .btn-secondary {
  border-color: var(--ops-line-strong);
  color: #dce6fb;
  background: #102044;
}

.app-shell:not(.admin-shell) .btn-secondary:hover {
  background: #162b57;
}

.app-shell:not(.admin-shell) .icon-button {
  border-color: var(--ops-line);
  color: #a7b8da;
  background: rgba(255,255,255,.025);
}

.app-shell:not(.admin-shell) .icon-button:hover {
  transform: none;
  border-color: var(--ops-line-strong);
  color: #fff;
  background: rgba(77,130,218,.14);
}

.app-shell:not(.admin-shell) .table-wrap,
.app-shell:not(.admin-shell) table {
  color: var(--ops-text);
  background: transparent;
}

.app-shell:not(.admin-shell) thead th {
  border-color: var(--ops-line);
  color: #728bb9;
  background: #0c1b3a;
}

.app-shell:not(.admin-shell) tbody td {
  border-color: var(--ops-line);
}

.app-shell:not(.admin-shell) tbody tr:hover {
  background: rgba(77,130,218,.06);
}

.app-shell:not(.admin-shell) .device-row {
  border-color: var(--ops-line);
}

.app-shell:not(.admin-shell) .device-row:hover {
  padding-left: 8px;
  padding-right: 8px;
  background: rgba(77,130,218,.08);
}

.app-shell:not(.admin-shell) .device-avatar {
  color: #9bb7eb;
  background: rgba(77,130,218,.12);
}

.app-shell:not(.admin-shell) .badge {
  border-color: var(--ops-line);
  background: rgba(255,255,255,.04);
}

.app-shell:not(.admin-shell) .secret-panel {
  border: 1px solid rgba(255,149,24,.25);
  border-radius: var(--ops-radius);
  background: #132449;
  box-shadow: none;
}

.app-shell:not(.admin-shell) .toast {
  border-color: var(--ops-line-strong);
  color: #fff;
  background: #13264d;
  box-shadow: 0 18px 40px rgba(0,0,0,.32);
}

.app-shell:not(.admin-shell) .announcement-banner {
  border-color: var(--ops-line);
  color: var(--ops-text);
  background: #12264e;
}

@media (min-width: 821px) {
  .app-shell:not(.admin-shell).sidebar-collapsed {
    --sidebar-width: 72px;
  }

  .app-shell:not(.admin-shell).sidebar-collapsed .brand-logo-image {
    width: 48px;
    height: 30px;
    object-fit: cover;
    object-position: right center;
  }

  .app-shell:not(.admin-shell).sidebar-collapsed .sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 1180px) {
  .app-shell:not(.admin-shell) .page {
    padding-left: 24px;
    padding-right: 24px;
  }

  .app-shell:not(.admin-shell) .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell:not(.admin-shell) {
    display: block;
  }

  .app-shell:not(.admin-shell) .sidebar {
    width: min(86vw, 300px);
    background: #091733;
  }

  .app-shell:not(.admin-shell) .topbar {
    height: 54px;
    padding: 0 14px;
  }

  .app-shell:not(.admin-shell) .topbar-title {
    display: grid;
    gap: 0;
  }

  .app-shell:not(.admin-shell) .page {
    padding: 20px 14px 38px;
  }

  .app-shell:not(.admin-shell) .page-heading {
    align-items: flex-start;
  }

  .app-shell:not(.admin-shell) .page-heading h1 {
    font-size: 30px;
  }

  .app-shell:not(.admin-shell) .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .app-shell:not(.admin-shell) .dashboard-grid,
  .app-shell:not(.admin-shell) .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app-shell:not(.admin-shell) .stat-grid {
    grid-template-columns: 1fr;
  }

  .app-shell:not(.admin-shell) .user-menu-name {
    display: none;
  }
}

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

/* Dashboard command workspace */
.dashboard-command-heading {
  align-items: flex-end;
}

.dashboard-command-heading p {
  max-width: 760px;
}

.dashboard-command-skeleton {
  height: 520px;
  margin-bottom: 18px;
}

.dashboard-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius);
  overflow: hidden;
  background: #0c1b39;
}

.dashboard-summary-item {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--ops-line);
}

.dashboard-summary-item:last-child {
  border-right: 0;
}

.dashboard-summary-item .summary-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ops-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.dashboard-summary-item strong {
  display: block;
  color: #fff;
  font-size: 23px;
  line-height: 1.05;
  font-weight: 650;
}

.dashboard-summary-item strong small {
  display: inline;
  margin: 0 0 0 2px;
  color: var(--ops-dim);
  font-size: 13px;
}

.dashboard-summary-item > span:last-child {
  display: block;
  margin-top: 4px;
  color: var(--ops-muted);
  font-size: 10px;
}

.dashboard-summary-item.has-alert strong {
  color: var(--ops-red);
}

.dashboard-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.app-shell:not(.admin-shell) .sms-command-card {
  padding: 0;
  overflow: hidden;
  background: #10234b;
}

.command-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ops-line);
  background: #0d1e40;
}

.command-card-header h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.command-card-header .eyebrow {
  margin-bottom: 3px;
}

.command-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ops-muted);
  font-size: 11px;
  white-space: nowrap;
}

.command-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ops-red);
  box-shadow: 0 0 0 4px rgba(255,111,125,.08);
}

.command-status-dot.is-live {
  background: var(--ops-green);
  box-shadow: 0 0 0 4px rgba(49,208,127,.08);
}

.sms-command-form {
  display: grid;
}

.command-step {
  padding: 18px 20px;
  border-bottom: 1px solid var(--ops-line);
}

.command-step-label {
  display: block;
  margin-bottom: 10px;
  color: #7190ca;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.command-gateway-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.command-message-step textarea {
  min-height: 210px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.65;
}

.command-message-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.command-message-meta .sms-counter {
  flex: 0 0 auto;
  color: #7890bd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.command-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 20px;
  background: #0c1c3b;
}

.command-submit-bar > div {
  min-width: 0;
}

.command-submit-bar strong {
  display: block;
  color: #eaf1ff;
  font-size: 12px;
}

.command-submit-bar span:not(.button-label):not(.button-loading):not(.spinner) {
  color: var(--ops-muted);
  font-size: 10px;
}

.app-shell:not(.admin-shell) .command-send-button {
  min-width: 176px;
}

.dashboard-gateways-card {
  position: sticky;
  top: 74px;
}

.dashboard-gateways-card .card-head {
  margin-bottom: 8px;
}

.dashboard-gateways-card .device-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 11px 0;
}

.dashboard-gateways-card .device-avatar {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.dashboard-gateways-card .badge {
  font-size: 9px;
}

.dashboard-activity-card {
  margin-top: 0;
}

.dashboard-activity-card .card-head {
  padding: 18px 20px 12px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--ops-line);
}

@media (max-width: 1180px) {
  .dashboard-command-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .dashboard-summary-strip {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 920px) {
  .dashboard-command-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-gateways-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .dashboard-summary-strip {
    grid-template-columns: repeat(5, minmax(132px, 1fr));
  }

  .command-card-header,
  .command-submit-bar {
    align-items: flex-start;
  }

  .command-submit-bar {
    display: grid;
  }

  .command-gateway-grid {
    grid-template-columns: 1fr;
  }

  .command-message-meta {
    display: grid;
    gap: 5px;
  }

  .app-shell:not(.admin-shell) .command-send-button {
    width: 100%;
    min-width: 0;
  }
}

/* Persistent operations rail */
.operations-rail {
  display: none;
}

@media (min-width: 1440px) {
  .app-shell:not(.admin-shell) .main-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 304px;
    align-items: start;
  }

  .app-shell:not(.admin-shell) .topbar,
  .app-shell:not(.admin-shell) .announcement-stack {
    grid-column: 1 / -1;
  }

  .app-shell:not(.admin-shell) .page {
    grid-column: 1;
    min-width: 0;
  }

  .operations-rail {
    grid-column: 2;
    display: block;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    border-left: 1px solid var(--ops-line);
    background: #091731;
    scrollbar-width: thin;
    scrollbar-color: rgba(137,160,206,.22) transparent;
  }
}

.operations-rail-section {
  padding: 16px 16px 18px;
  border-bottom: 1px solid var(--ops-line);
}

.operations-rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.operations-rail-heading > span {
  color: var(--ops-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.operations-rail-heading > a {
  color: #7898cf;
  font-size: 10px;
  font-weight: 600;
}

.operations-rail-heading > a:hover {
  color: var(--ops-orange);
}

.operations-rail-heading > strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ops-muted);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.operations-rail-heading > strong i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ops-red);
}

.operations-rail-heading > strong.is-live {
  color: var(--ops-green);
}

.operations-rail-heading > strong.is-live i {
  background: var(--ops-green);
}

.operations-system-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  overflow: hidden;
  background: #0c1d3c;
}

.operations-system-counts > div {
  padding: 12px;
  text-align: center;
}

.operations-system-counts > div + div {
  border-left: 1px solid var(--ops-line);
}

.operations-system-counts strong {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.operations-system-counts span {
  display: block;
  margin-top: 5px;
  color: var(--ops-dim);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.operations-delivery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  overflow: hidden;
}

.operations-delivery-grid > div {
  padding: 10px 8px;
  text-align: center;
  background: #0c1d3c;
}

.operations-delivery-grid > div + div {
  border-left: 1px solid var(--ops-line);
}

.operations-delivery-grid span {
  display: block;
  color: var(--ops-dim);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.operations-delivery-grid strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 17px;
}

.operations-delivery-grid .has-alert strong {
  color: var(--ops-red);
}

.operations-device-list,
.operations-activity-list {
  display: grid;
  gap: 6px;
}

.operations-device-row,
.operations-activity-row {
  display: grid;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #dce6fb;
  background: rgba(255,255,255,.02);
}

.operations-device-row {
  grid-template-columns: 7px minmax(0, 1fr) auto;
}

.operations-device-row:hover,
.operations-activity-row:hover {
  border-color: var(--ops-line);
  background: rgba(77,130,218,.08);
}

.operations-device-row > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52627e;
}

.operations-device-row > i.is-live {
  background: var(--ops-green);
  box-shadow: 0 0 0 3px rgba(49,208,127,.08);
}

.operations-device-row span,
.operations-activity-row span {
  min-width: 0;
}

.operations-device-row strong,
.operations-activity-row strong {
  display: block;
  overflow: hidden;
  color: #dfe9ff;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-device-row small,
.operations-activity-row small {
  display: block;
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--ops-dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-device-row em {
  color: var(--ops-dim);
  font-size: 8px;
  font-style: normal;
  text-transform: uppercase;
}

.operations-activity-row {
  grid-template-columns: 5px minmax(0, 1fr) auto;
}

.operations-activity-row > i {
  width: 3px;
  height: 28px;
  border-radius: 999px;
  background: #55709e;
}

.operations-activity-row > i.direction-inbound {
  background: var(--ops-green);
}

.operations-activity-row > i.direction-outbound {
  background: var(--ops-blue-bright);
}

.operations-activity-row time {
  color: var(--ops-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8px;
}

.operations-rail-empty {
  margin: 0;
  padding: 10px;
  border: 1px dashed var(--ops-line);
  border-radius: 7px;
  color: var(--ops-dim);
  font-size: 10px;
  text-align: center;
}

@media (min-width: 1440px) and (max-width: 1580px) {
  .dashboard-command-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-gateways-card {
    position: static;
  }
}

/* Secondary user-page normalization */
.app-shell:not(.admin-shell) .limit-card,
.app-shell:not(.admin-shell) .sim-card,
.app-shell:not(.admin-shell) .toggle-card,
.app-shell:not(.admin-shell) .subaccount-row,
.app-shell:not(.admin-shell) .credit-plan-card {
  border-color: var(--ops-line);
  background: #0d1e40;
  box-shadow: none;
}

.app-shell:not(.admin-shell) .limit-card {
  border-radius: 9px;
}

.app-shell:not(.admin-shell) .limit-icon,
.app-shell:not(.admin-shell) .sim-icon,
.app-shell:not(.admin-shell) .subaccount-icon,
.app-shell:not(.admin-shell) .session-device-icon,
.app-shell:not(.admin-shell) .plan-icon,
.app-shell:not(.admin-shell) .empty-icon {
  color: #9ab7ed;
  background: rgba(77,130,218,.12);
}

.app-shell:not(.admin-shell) .progress {
  background: rgba(255,255,255,.07);
}

.app-shell:not(.admin-shell) .progress > span {
  background: var(--ops-orange);
}

.app-shell:not(.admin-shell) .sim-card:hover,
.app-shell:not(.admin-shell) .subaccount-row:hover {
  transform: none;
  border-color: var(--ops-line-strong);
  box-shadow: none;
}

.app-shell:not(.admin-shell) .sim-card > span,
.app-shell:not(.admin-shell) .settings-section-heading,
.app-shell:not(.admin-shell) .device-name-link {
  color: #dce7ff;
}

.app-shell:not(.admin-shell) .toggle-card p,
.app-shell:not(.admin-shell) .credit-plan-copy p {
  color: var(--ops-muted);
}

.app-shell:not(.admin-shell) .status-badge {
  border: 1px solid var(--ops-line);
  color: #b8c8e9;
  background: rgba(255,255,255,.04);
}

.app-shell:not(.admin-shell) .compact-metric-card strong,
.app-shell:not(.admin-shell) .billing-metric strong {
  color: #fff;
}

.app-shell:not(.admin-shell) .billing-metric > div > span,
.app-shell:not(.admin-shell) .compact-metric-card .field-label {
  color: var(--ops-muted);
}

.app-shell:not(.admin-shell) .data-table tbody tr,
.app-shell:not(.admin-shell) .assignment-table tbody tr,
.app-shell:not(.admin-shell) .invoice-table tbody tr {
  background: transparent;
}

.app-shell:not(.admin-shell) .data-table tbody tr:hover,
.app-shell:not(.admin-shell) .assignment-table tbody tr:hover,
.app-shell:not(.admin-shell) .invoice-table tbody tr:hover {
  background: rgba(77,130,218,.06);
}

.app-shell:not(.admin-shell) .table-identity code,
.app-shell:not(.admin-shell) .subaccount-identity code,
.app-shell:not(.admin-shell) .assignment-disabled {
  color: var(--ops-muted);
}

.app-shell:not(.admin-shell) .compact-row,
.app-shell:not(.admin-shell) .assigned-device {
  border-color: var(--ops-line);
}

/* Inbox */
.app-shell:not(.admin-shell) .inbox-shell {
  border-color: var(--ops-line);
  background: #0c1c3b;
}

.app-shell:not(.admin-shell) .conversation-list {
  border-color: var(--ops-line);
  background: #0b1a37;
}

.app-shell:not(.admin-shell) .conversation-head,
.app-shell:not(.admin-shell) .thread-head,
.app-shell:not(.admin-shell) .composer {
  border-color: var(--ops-line);
  background: #0d1e40;
}

.app-shell:not(.admin-shell) .conversation-title h2,
.app-shell:not(.admin-shell) .thread-contact h2 {
  color: #fff;
}

.app-shell:not(.admin-shell) .conversation-title p,
.app-shell:not(.admin-shell) .thread-contact p,
.app-shell:not(.admin-shell) .conversation-device,
.app-shell:not(.admin-shell) .conversation-line time {
  color: var(--ops-muted);
}

.app-shell:not(.admin-shell) .conversation-item {
  border-color: var(--ops-line);
}

.app-shell:not(.admin-shell) .conversation-item:hover,
.app-shell:not(.admin-shell) .conversation-item.active,
.app-shell:not(.admin-shell) .conversation-select-row.is-selected .conversation-item {
  background: rgba(77,130,218,.10);
}

.app-shell:not(.admin-shell) .conversation-item.active {
  box-shadow: inset 3px 0 0 var(--ops-orange);
}

.app-shell:not(.admin-shell) .avatar {
  color: #c9d9f7;
  background: #1a3569;
}

.app-shell:not(.admin-shell) .thread-panel {
  background: #081731;
}

.app-shell:not(.admin-shell) .thread-messages {
  background:
    linear-gradient(180deg, rgba(77,130,218,.04), transparent 180px),
    #081731;
}

.app-shell:not(.admin-shell) .date-divider span {
  color: var(--ops-dim);
  background: #081731;
}

.app-shell:not(.admin-shell) .date-divider::before {
  background: var(--ops-line);
}

.app-shell:not(.admin-shell) .bubble {
  border-color: var(--ops-line);
  color: #e5eeff;
  background: #12264e;
  box-shadow: none;
}

.app-shell:not(.admin-shell) .outbound .bubble {
  border-color: rgba(255,149,24,.35);
  color: #fff;
  background: #294d8b;
}

.app-shell:not(.admin-shell) .bubble-meta,
.app-shell:not(.admin-shell) .outbound .bubble-meta {
  color: #90a7d2;
}

.app-shell:not(.admin-shell) .composer-routing,
.app-shell:not(.admin-shell) .routing-field {
  border-color: var(--ops-line);
}

.app-shell:not(.admin-shell) .send-button {
  background: var(--ops-orange);
  color: #07142c;
}

.app-shell:not(.admin-shell) .conversation-bulk-bar {
  border-color: var(--ops-line);
  background: #10234a;
}

/* Sessions and account settings */
.app-shell:not(.admin-shell) .session-row,
.app-shell:not(.admin-shell) .session-footer {
  border-color: var(--ops-line);
}

.app-shell:not(.admin-shell) .session-copy strong,
.app-shell:not(.admin-shell) .details-list strong {
  color: #e7efff;
}

/* Support, API access, billing */
.app-shell:not(.admin-shell) .support-tips,
.app-shell:not(.admin-shell) .api-guide-card,
.app-shell:not(.admin-shell) .invoice-summary {
  border-color: var(--ops-line);
}

.app-shell:not(.admin-shell) .api-step {
  border-color: var(--ops-line);
  background: rgba(255,255,255,.025);
}

.app-shell:not(.admin-shell) .credit-plan-card {
  background: linear-gradient(135deg, #10234a, #0d1e40);
}

.app-shell:not(.admin-shell) .credit-plan-copy h2,
.app-shell:not(.admin-shell) .invoice-status-line strong {
  color: #fff;
}

.app-shell:not(.admin-shell) .invoice-status-line {
  border-color: var(--ops-line);
}

/* Notices */
.app-shell:not(.admin-shell) .notice,
.swiftly-ops-body .notice {
  border: 1px solid var(--ops-line, rgba(130,157,211,.18));
}

.app-shell:not(.admin-shell) .notice-info,
.swiftly-ops-body .notice-info {
  color: #b8dfff;
  border-color: rgba(85,191,234,.28);
  background: rgba(85,191,234,.09);
}

.app-shell:not(.admin-shell) .notice-warning,
.swiftly-ops-body .notice-warning {
  color: #ffd88f;
  border-color: rgba(255,149,24,.30);
  background: rgba(255,149,24,.09);
}

.app-shell:not(.admin-shell) .notice-danger,
.swiftly-ops-body .notice-danger {
  color: #ffb8c0;
  border-color: rgba(255,111,125,.30);
  background: rgba(255,111,125,.09);
}

.app-shell:not(.admin-shell) .notice-success,
.swiftly-ops-body .notice-success {
  color: #a7f3cf;
  border-color: rgba(49,208,127,.28);
  background: rgba(49,208,127,.09);
}

/* Authenticated page modals sit outside .app-shell in the base template. */
.swiftly-ops-body .modal-backdrop {
  background: rgba(3,10,24,.76);
}

.swiftly-ops-body .modal-dialog {
  border: 1px solid rgba(130,157,211,.28);
  border-radius: 10px;
  color: #eef4ff;
  background: #0d1e40;
  box-shadow: 0 30px 80px rgba(0,0,0,.46);
}

.swiftly-ops-body .modal-header,
.swiftly-ops-body .modal-footer {
  border-color: rgba(130,157,211,.18);
  background: #0c1b39;
}

.swiftly-ops-body .modal-dialog h2,
.swiftly-ops-body .modal-dialog h3,
.swiftly-ops-body .modal-dialog strong {
  color: #fff;
}

.swiftly-ops-body .modal-dialog p,
.swiftly-ops-body .modal-dialog small,
.swiftly-ops-body .modal-dialog .helper-text {
  color: #89a0ce;
}

.swiftly-ops-body .modal-dialog input,
.swiftly-ops-body .modal-dialog textarea,
.swiftly-ops-body .modal-dialog select {
  border-color: rgba(130,157,211,.32);
  color: #f5f8ff;
  background: #091733;
}

.swiftly-ops-body .modal-dialog input:focus,
.swiftly-ops-body .modal-dialog textarea:focus,
.swiftly-ops-body .modal-dialog select:focus {
  border-color: #4d82da;
  box-shadow: 0 0 0 3px rgba(77,130,218,.14);
}

.swiftly-ops-body .modal-dialog .btn-secondary {
  border-color: rgba(130,157,211,.32);
  color: #dce6fb;
  background: #102044;
}

.swiftly-ops-body .modal-dialog .btn-primary {
  color: #07142c;
  background: #ff9518;
  box-shadow: none;
}

.swiftly-ops-body .modal-dialog .icon-button {
  border-color: rgba(130,157,211,.20);
  color: #a7b8da;
  background: rgba(255,255,255,.025);
}

@media (max-width: 820px) {
  .app-shell:not(.admin-shell) .inbox-shell {
    border-radius: 8px;
  }

  .app-shell:not(.admin-shell) .thread-panel {
    border-color: var(--ops-line);
  }
}

/* Responsive operations rail drawer */
.ops-rail-trigger {
  position: relative;
  display: inline-grid;
}

.ops-rail-trigger-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border: 1px solid #0d1e40;
  border-radius: 50%;
  background: var(--ops-red);
}

.ops-rail-trigger-dot.is-live {
  background: var(--ops-green);
}

.operations-rail-mobile-head,
.operations-rail-backdrop {
  display: none;
}

@media (min-width: 1440px) {
  .ops-rail-trigger {
    display: none !important;
  }

  .operations-rail-mobile-head,
  .operations-rail-backdrop {
    display: none !important;
  }
}

@media (max-width: 1439px) {
  body.ops-rail-open {
    overflow: hidden;
  }

  .operations-rail {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    width: min(360px, 92vw);
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid var(--ops-line);
    background: #091731;
    box-shadow: -22px 0 55px rgba(0,0,0,.38);
    transform: translateX(104%);
    transition: transform .2s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(137,160,206,.22) transparent;
  }

  body.ops-rail-open .operations-rail {
    transform: translateX(0);
  }

  .operations-rail-mobile-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ops-line);
    background: rgba(9,23,49,.98);
    backdrop-filter: blur(12px);
  }

  .operations-rail-mobile-head > div {
    display: grid;
    gap: 1px;
  }

  .operations-rail-mobile-head span {
    color: var(--ops-dim);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  .operations-rail-mobile-head strong {
    color: #fff;
    font-size: 13px;
  }

  .operations-rail-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: block;
    border: 0;
    padding: 0;
    background: rgba(2,8,20,.66);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.ops-rail-open .operations-rail-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 820px) {
  .app-shell:not(.admin-shell) .topbar-actions {
    gap: 6px;
  }

  .app-shell:not(.admin-shell) .ops-rail-trigger {
    width: 36px;
    height: 36px;
  }

  .dashboard-command-heading {
    display: grid;
    gap: 14px;
  }

  .dashboard-command-heading > form,
  .dashboard-command-heading > form .btn {
    width: 100%;
  }

  .dashboard-summary-strip {
    margin-left: -14px;
    margin-right: -14px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    scrollbar-width: thin;
  }

  .command-card-header,
  .command-step,
  .command-submit-bar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .command-card-header {
    min-height: 64px;
  }

  .command-card-header h2 {
    font-size: 20px;
  }

  .command-status {
    font-size: 9px;
  }

  .command-message-step textarea {
    min-height: 180px;
  }

  .dashboard-activity-card .card-head,
  .inbox-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-activity-card .text-link {
    padding-top: 4px;
  }

  .operations-rail-section {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 520px) {
  .operations-rail {
    width: 94vw;
  }

  .topbar-title .muted {
    display: none;
  }

  .command-card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .dashboard-summary-item {
    padding: 12px 14px;
  }

  .dashboard-summary-item strong {
    font-size: 20px;
  }
}


/* Focused partylist shell */
.product-wordmark,
.app-shell:not(.admin-shell) .product-wordmark {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #fff;
}

.app-shell:not(.admin-shell) .product-wordmark {
  font-size: 21px;
}

.auth-brand.product-wordmark {
  justify-content: center;
  font-size: 30px;
}

.app-shell:not(.admin-shell) .nav-group-primary {
  margin-top: 4px;
}

.app-shell:not(.admin-shell) .nav-group-system {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--ops-line);
}

.app-shell:not(.admin-shell) .nav-group-system .nav-link {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
  color: #8296bb;
  font-size: 12px;
}

.app-shell:not(.admin-shell) .nav-group-system .nav-section-label {
  color: #53698f;
}

@media (min-width: 821px) {
  .app-shell:not(.admin-shell).sidebar-collapsed .product-wordmark span {
    font-size: 0;
  }

  .app-shell:not(.admin-shell).sidebar-collapsed .product-wordmark span::before {
    content: "S";
    font-size: 22px;
  }
}


/* Mobile-native navigation */
.mobile-bottom-nav,
.mobile-more-sheet {
  display: none;
}

@media (max-width: 820px) {
  .swiftly-ops-body {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }

  .app-shell:not(.admin-shell) .mobile-menu {
    display: none !important;
  }

  .app-shell:not(.admin-shell) .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    min-height: calc(62px + env(safe-area-inset-bottom));
    padding: 6px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--ops-line, rgba(130,157,211,.18));
    background: rgba(7,18,39,.97);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    position: relative;
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #7188b3;
    background: transparent;
    font: inherit;
    cursor: pointer;
  }

  .mobile-bottom-nav a.active,
  .mobile-bottom-nav a:focus-visible,
  .mobile-bottom-nav button:focus-visible {
    color: #fff;
    background: rgba(77,130,218,.12);
  }

  .mobile-bottom-nav a.active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: var(--ops-orange, #ff9518);
  }

  .mobile-bottom-nav .icon {
    width: 20px;
    height: 20px;
  }

  .mobile-bottom-nav span {
    font-size: 9px;
    font-weight: 600;
  }

  .mobile-nav-status-dot {
    position: absolute;
    top: 8px;
    left: calc(50% + 8px);
    width: 6px;
    height: 6px;
    border: 1px solid #071227;
    border-radius: 50%;
    background: var(--ops-red, #ff6f7d);
  }

  .mobile-nav-status-dot.is-live {
    background: var(--ops-green, #31d07f);
  }

  .mobile-more-sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: block;
    pointer-events: none;
  }

  .mobile-more-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    opacity: 0;
    background: rgba(2,8,20,.70);
    transition: opacity .18s ease;
  }

  .mobile-more-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(78vh, 680px);
    overflow-y: auto;
    padding: 0 14px calc(18px + env(safe-area-inset-bottom));
    border: 1px solid var(--ops-line, rgba(130,157,211,.18));
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    color: #eef4ff;
    background: #0a1935;
    box-shadow: 0 -24px 60px rgba(0,0,0,.45);
    transform: translateY(105%);
    transition: transform .2s ease;
  }

  .mobile-more-panel > header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--ops-line, rgba(130,157,211,.18));
    background: rgba(10,25,53,.98);
  }

  .mobile-more-panel > header > div {
    display: grid;
  }

  .mobile-more-panel > header span,
  .mobile-more-group > span {
    color: #6078a5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .mobile-more-panel > header strong {
    color: #fff;
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 18px;
  }

  .mobile-more-group {
    display: grid;
    gap: 6px;
    padding-top: 16px;
  }

  .mobile-more-group > a,
  .mobile-more-group > button {
    width: 100%;
    min-height: 60px;
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #dce7ff;
    text-align: left;
    background: rgba(255,255,255,.025);
  }

  .mobile-more-group > a:active,
  .mobile-more-group > button:active {
    border-color: var(--ops-line, rgba(130,157,211,.18));
    background: rgba(77,130,218,.12);
  }

  .mobile-more-group > a > .icon:first-child,
  .mobile-more-group > button > .icon:first-child {
    color: #7696cd;
  }

  .mobile-more-group > a > .icon:last-child,
  .mobile-more-group > button > .icon:last-child {
    width: 15px;
    color: #53698f;
  }

  .mobile-more-group div {
    min-width: 0;
  }

  .mobile-more-group strong,
  .mobile-more-group small {
    display: block;
  }

  .mobile-more-group strong {
    color: #fff;
    font-size: 12px;
  }

  .mobile-more-group small {
    margin-top: 1px;
    color: #7288af;
    font-size: 9px;
  }

  body.mobile-more-open {
    overflow: hidden;
  }

  body.mobile-more-open .mobile-more-sheet {
    pointer-events: auto;
  }

  body.mobile-more-open .mobile-more-backdrop {
    opacity: 1;
  }

  body.mobile-more-open .mobile-more-panel {
    transform: translateY(0);
  }

  body.mobile-more-open .mobile-bottom-nav {
    visibility: hidden;
  }
}

@media (max-width: 520px) {
  .app-shell:not(.admin-shell) .topbar-title strong {
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* Audience workspace */
.audience-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 1px;
  margin-bottom: 16px;
  width: fit-content;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--ops-line);
}

.audience-summary-strip > div {
  min-width: 132px;
  padding: 11px 14px;
  background: #0c1d3c;
}

.audience-summary-strip span {
  display: block;
  color: var(--ops-dim);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audience-summary-strip strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: 20px;
}

.app-shell:not(.admin-shell) .audience-workspace {
  padding: 0;
  overflow: hidden;
}

.audience-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(120px, .55fr)) auto;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--ops-line);
  background: #0d1e40;
}

.audience-search {
  position: relative;
}

.audience-search .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 16px;
  color: var(--ops-dim);
  transform: translateY(-50%);
  pointer-events: none;
}

.audience-search input {
  padding-left: 34px !important;
}

.audience-table {
  min-width: 980px;
}

.audience-table td > strong {
  color: #eef4ff;
}

.audience-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.audience-chip-row span {
  padding: 3px 6px;
  border: 1px solid var(--ops-line);
  border-radius: 999px;
  color: #a9bfeb;
  background: rgba(77,130,218,.08);
  font-size: 9px;
}

.audience-chip-row em {
  color: var(--ops-dim);
  font-style: normal;
}

.audience-mobile-list {
  display: none;
}

.audience-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--ops-line);
  color: var(--ops-muted);
  font-size: 11px;
}

@media (max-width: 1100px) {
  .audience-filter-bar {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .audience-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .audience-page .page-heading {
    display: grid;
    gap: 12px;
  }

  .audience-page .page-heading .btn {
    width: 100%;
  }

  .audience-summary-strip {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .audience-summary-strip > div {
    min-width: 0;
    padding: 10px;
  }

  .audience-summary-strip strong {
    font-size: 18px;
  }

  .audience-filter-bar {
    grid-template-columns: 1fr 1fr;
    padding: 10px;
  }

  .audience-filter-bar .btn {
    width: 100%;
  }

  .audience-table-wrap {
    display: none;
  }

  .audience-mobile-list {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  .audience-contact-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--ops-line);
    border-radius: 9px;
    background: #0d1e40;
  }

  .audience-contact-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .audience-contact-card-head > div {
    min-width: 0;
  }

  .audience-contact-card-head strong,
  .audience-contact-card-head span {
    display: block;
  }

  .audience-contact-card-head strong {
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .audience-contact-card-head > div > span {
    margin-top: 2px;
    color: var(--ops-muted);
    font-size: 10px;
  }

  .audience-contact-card dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0;
  }

  .audience-contact-card dl div {
    min-width: 0;
  }

  .audience-contact-card dt {
    color: var(--ops-dim);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .audience-contact-card dd {
    overflow: hidden;
    margin: 2px 0 0;
    color: #dbe6fb;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .audience-filter-bar {
    grid-template-columns: 1fr;
  }

  .audience-search {
    grid-column: auto;
  }

  .audience-contact-card dl {
    grid-template-columns: 1fr 1fr;
  }
}


/* Audience import mapper */
.import-page {
  padding-bottom: 96px;
}

.import-upload-card,
.import-mapping-card,
.import-options-card,
.import-preview-card,
.import-review-card,
.import-result-card {
  margin-bottom: 16px;
}

.import-upload-card {
  max-width: 720px;
}

.import-step-marker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.import-step-marker strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #07142c;
  background: var(--ops-orange);
  font-size: 12px;
}

.import-step-marker span {
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.import-recent-card {
  max-width: 920px;
  margin-top: 18px;
}

.import-recent-card .compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--ops-line);
}

.import-recent-card .compact-row:first-child {
  border-top: 0;
}

.import-recent-card .compact-row strong,
.import-recent-card .compact-row small {
  display: block;
}

.import-recent-card .compact-row strong {
  color: #eaf1ff;
  font-size: 12px;
}

.import-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.import-presets > span {
  margin-right: 4px;
  color: var(--ops-dim);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.import-presets a {
  padding: 5px 8px;
  border: 1px solid var(--ops-line);
  border-radius: 999px;
  color: #9eb4de;
  background: rgba(255,255,255,.02);
  font-size: 10px;
}

.import-presets a.active,
.import-presets a:hover {
  color: #fff;
  border-color: rgba(255,149,24,.35);
  background: rgba(255,149,24,.08);
}

.app-shell:not(.admin-shell) .import-mapping-card {
  padding: 0;
}

.import-mapping-card .card-head {
  padding: 18px 20px 12px;
  margin: 0;
  border-bottom: 1px solid var(--ops-line);
}

.import-mapping-list {
  display: grid;
}

.import-mapping-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 24px minmax(180px, .8fr);
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--ops-line);
}

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

.import-mapping-row > div {
  min-width: 0;
}

.import-mapping-row strong,
.import-mapping-row small {
  display: block;
}

.import-mapping-row strong {
  overflow: hidden;
  color: #edf4ff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-mapping-row small {
  color: var(--ops-dim);
  font-size: 9px;
}

.import-mapping-row > span {
  color: #566f9d;
}

.import-mapping-row > span .icon {
  width: 16px;
}

.import-preview-card .table-wrap {
  max-height: 310px;
}

.import-preview-card table {
  min-width: max-content;
}

.import-preview-note {
  padding: 10px 20px 14px;
}

.import-sticky-action {
  position: sticky;
  bottom: 12px;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(760px, calc(100% - 20px));
  margin: 18px auto 0;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--ops-line-strong);
  border-radius: 10px;
  background: rgba(9,23,49,.96);
  box-shadow: 0 18px 45px rgba(0,0,0,.32);
  backdrop-filter: blur(14px);
}

.import-sticky-action > span {
  min-width: 0;
}

.import-sticky-action strong,
.import-sticky-action small {
  display: block;
}

.import-sticky-action strong {
  color: #fff;
  font-size: 11px;
}

.import-sticky-action small {
  color: var(--ops-muted);
  font-size: 9px;
}

.import-validation-grid,
.import-result-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--ops-line);
  gap: 1px;
}

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

.import-validation-grid > div,
.import-result-grid > div {
  padding: 14px;
  background: #0c1d3c;
}

.import-validation-grid span,
.import-result-grid span {
  display: block;
  color: var(--ops-dim);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.import-validation-grid strong,
.import-result-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 22px;
}

.import-validation-grid .has-alert strong,
.import-result-grid .has-alert strong {
  color: var(--ops-red);
}

@media (max-width: 820px) {
  .import-page {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .import-mapping-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 14px;
  }

  .import-mapping-row > span {
    display: none;
  }

  .import-options-card .two-col {
    grid-template-columns: 1fr;
  }

  .import-sticky-action {
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    margin-top: 14px;
  }

  .import-sticky-action .btn {
    width: 100%;
  }

  .import-validation-grid,
  .import-result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Campaign operations */
.campaign-status-strip,
.campaign-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--ops-line);
  gap: 1px;
}

.campaign-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.campaign-status-strip > div,
.campaign-summary-grid > div {
  padding: 13px 15px;
  background: #0c1d3c;
}

.campaign-status-strip span,
.campaign-summary-grid span {
  display: block;
  color: var(--ops-dim);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.campaign-status-strip strong,
.campaign-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 22px;
}

.campaign-summary-grid .has-alert strong {
  color: var(--ops-red);
}

.app-shell:not(.admin-shell) .campaign-list-card {
  padding: 0;
}

.campaign-list-head,
.campaign-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(110px, .55fr) minmax(150px, .8fr) 120px;
  gap: 14px;
  align-items: center;
}

.campaign-list-head {
  padding: 10px 16px;
  border-bottom: 1px solid var(--ops-line);
  color: var(--ops-dim);
  background: #0c1b39;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.campaign-row {
  min-height: 70px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--ops-line);
  color: #dce7fb;
}

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

.campaign-row:hover {
  background: rgba(77,130,218,.07);
}

.campaign-row > span {
  min-width: 0;
}

.campaign-row strong,
.campaign-row small {
  display: block;
}

.campaign-row strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-row small {
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: 9px;
}

.campaign-form-card {
  max-width: 760px;
}

.campaign-config-summary {
  margin-bottom: 16px;
}

@media (max-width: 820px) {
  .campaigns-page .page-heading,
  .campaign-create-page .page-heading,
  .campaign-detail-page .page-heading {
    display: grid;
    gap: 12px;
  }

  .campaigns-page .page-heading .btn,
  .campaign-create-page .page-heading .btn {
    width: 100%;
  }

  .campaign-status-strip,
  .campaign-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .campaign-list-head {
    display: none;
  }

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

  .campaign-row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    min-height: 0;
    padding: 12px;
    border: 1px solid var(--ops-line);
    border-radius: 9px;
    background: #0d1e40;
  }

  .campaign-row > span:nth-child(2),
  .campaign-row > span:nth-child(3) {
    grid-column: 1;
  }

  .campaign-row > span:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
  }
}


/* Campaign setup wizard */
.campaign-wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 16px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  overflow: hidden;
  background: #0b1935;
}

.campaign-wizard-steps span {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-right: 1px solid var(--ops-line);
  color: #5f759e;
  font-size: 9px;
}

.campaign-wizard-steps span:last-child {
  border-right: 0;
}

.campaign-wizard-steps span.active {
  color: #dce7fb;
  background: rgba(77,130,218,.07);
}

.campaign-wizard-steps i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--ops-line);
  border-radius: 50%;
  color: #7189b4;
  font-style: normal;
  font-size: 8px;
}

.campaign-wizard-steps span.active i {
  border-color: rgba(255,149,24,.38);
  color: #07142c;
  background: var(--ops-orange);
}

.campaign-wizard-steps b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-wizard-form {
  padding-bottom: 82px;
}

.campaign-wizard-card {
  margin-bottom: 16px;
}

.campaign-current-count {
  color: var(--ops-orange);
  font-size: 10px;
  font-weight: 700;
}

.campaign-target-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.campaign-target-grid select[multiple] {
  min-height: 150px;
  padding: 6px;
}

.campaign-target-grid select[multiple] option {
  padding: 7px 8px;
  border-radius: 5px;
}

.campaign-message-card textarea {
  min-height: 220px;
  font-size: 15px;
  line-height: 1.6;
}

.campaign-delivery-grid {
  display: grid;
  grid-template-columns: 1.2fr .7fr .7fr;
  gap: 12px;
  margin-top: 14px;
}

.campaign-wizard-action {
  position: sticky;
  bottom: 12px;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(780px, calc(100% - 20px));
  margin: 18px auto 0;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--ops-line-strong);
  border-radius: 10px;
  background: rgba(9,23,49,.97);
  box-shadow: 0 18px 45px rgba(0,0,0,.32);
  backdrop-filter: blur(14px);
}

.campaign-wizard-action > span:first-child {
  min-width: 0;
}

.campaign-wizard-action strong,
.campaign-wizard-action small {
  display: block;
}

.campaign-wizard-action strong {
  color: #fff;
  font-size: 11px;
}

.campaign-wizard-action small {
  color: var(--ops-muted);
  font-size: 9px;
}

.campaign-review-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 16px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--ops-line);
}

.campaign-review-grid > div {
  padding: 13px 14px;
  background: #0c1d3c;
}

.campaign-review-grid span {
  display: block;
  color: var(--ops-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.campaign-review-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

.campaign-review-message,
.campaign-review-delivery {
  margin-bottom: 16px;
}

.campaign-review-message blockquote {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  color: #edf4ff;
  background: #091733;
  white-space: pre-wrap;
}

@media (max-width: 820px) {
  .campaign-wizard-page .page-heading {
    display: grid;
    gap: 10px;
  }

  .campaign-wizard-page .page-heading .btn {
    width: 100%;
  }

  .campaign-wizard-steps {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    scrollbar-width: thin;
  }

  .campaign-target-grid,
  .campaign-delivery-grid {
    grid-template-columns: 1fr;
  }

  .campaign-wizard-form {
    padding-bottom: calc(102px + env(safe-area-inset-bottom));
  }

  .campaign-wizard-action {
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-wizard-action .btn,
  .campaign-wizard-action .btn-disabled {
    width: 100%;
  }

  .campaign-review-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* Campaign execution controls */
.campaign-live-actions {
  flex-wrap: wrap;
}

.campaign-live-actions form {
  margin: 0;
}

.campaign-runtime-alert {
  margin-bottom: 16px;
}

.campaign-progress-panel {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--ops-line);
  border-radius: var(--ops-radius);
  background: #0c1d3c;
}

.campaign-progress-panel > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.campaign-progress-panel span,
.campaign-progress-panel small {
  color: var(--ops-muted);
  font-size: 10px;
}

.campaign-progress-panel strong {
  color: #fff;
  font-size: 21px;
}

.campaign-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}

.campaign-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ops-orange);
  transition: width .25s ease;
}

.campaign-summary-grid-live {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.status-badge.status-running {
  color: #a7f3cf;
  background: rgba(49,208,127,.12);
}

.status-badge.status-scheduled {
  color: #bfdbfe;
  background: rgba(77,130,218,.14);
}

.status-badge.status-paused {
  color: #ffd88f;
  background: rgba(255,149,24,.12);
}

.status-badge.status-cancelled {
  color: #cbd5e1;
  background: rgba(148,163,184,.12);
}

.status-badge.status-completed {
  color: #a7f3cf;
  background: rgba(49,208,127,.12);
}

.campaign-wizard-action form {
  margin: 0;
}

@media (max-width: 1180px) {
  .campaign-summary-grid-live {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .campaign-live-actions,
  .campaign-live-actions form,
  .campaign-live-actions .btn {
    width: 100%;
  }

  .campaign-progress-panel {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .campaign-summary-grid-live {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .campaign-summary-grid-live {
    grid-template-columns: repeat(6, minmax(116px, 1fr));
  }
}


/* Audience bulk operations */
.audience-check-col {
  width: 38px;
  text-align: center;
}

.audience-check-col input,
.audience-mobile-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--ops-orange);
}

.audience-bulk-toolbar {
  position: sticky;
  bottom: 12px;
  z-index: 22;
  display: grid;
  grid-template-columns: auto auto minmax(320px, 1fr);
  align-items: center;
  gap: 12px;
  width: calc(100% - 20px);
  margin: 14px auto 0;
  padding: 10px 12px;
  border: 1px solid var(--ops-line-strong);
  border-radius: 10px;
  background: rgba(9,23,49,.97);
  box-shadow: 0 18px 44px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
}

.audience-bulk-toolbar[hidden] {
  display: none !important;
}

.audience-bulk-selection {
  min-width: 130px;
}

.audience-bulk-selection strong,
.audience-bulk-selection button {
  display: block;
}

.audience-bulk-selection strong {
  color: #fff;
  font-size: 11px;
}

.audience-bulk-selection .text-link {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.audience-bulk-primary,
.audience-bulk-organize {
  display: flex;
  align-items: center;
  gap: 7px;
}

.audience-bulk-organize {
  justify-content: flex-end;
}

.audience-bulk-organize select {
  min-width: 130px;
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.audience-mobile-select {
  display: none;
}

@media (max-width: 1050px) {
  .audience-bulk-toolbar {
    grid-template-columns: 1fr auto;
  }

  .audience-bulk-organize {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .audience-page {
    padding-bottom: calc(126px + env(safe-area-inset-bottom));
  }

  .audience-mobile-select {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    color: var(--ops-muted);
    font-size: 9px;
  }

  .audience-bulk-toolbar {
    bottom: calc(72px + env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    width: 100%;
    gap: 9px;
  }

  .audience-bulk-selection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .audience-bulk-primary,
  .audience-bulk-organize {
    width: 100%;
  }

  .audience-bulk-primary .btn {
    flex: 1;
  }

  .audience-bulk-organize {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .audience-bulk-organize select {
    min-width: 0;
    width: 100%;
  }
}


/* Active campaign in operations rail */
.operations-campaign-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  color: #dce7fb;
  background: #0c1d3c;
}

.operations-campaign-card:hover {
  border-color: var(--ops-line-strong);
  background: rgba(77,130,218,.08);
}

.operations-campaign-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.operations-campaign-title strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-campaign-title .status-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  font-size: 7px;
}

.operations-campaign-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}

.operations-campaign-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ops-orange);
}

.operations-campaign-card > small {
  color: var(--ops-muted);
  font-size: 8px;
}


/* Operations-first navigation */
.sidebar-more-trigger {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  color: #9eb0d5;
  background: rgba(255,255,255,.02);
  font: inherit;
  cursor: pointer;
}

.sidebar-more-trigger:hover {
  color: #fff;
  border-color: var(--ops-line-strong);
  background: rgba(77,130,218,.10);
}

.sidebar-more-trigger .icon {
  width: 17px;
  height: 17px;
}

@media (min-width: 821px) {
  .mobile-more-sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: block;
    pointer-events: none;
  }

  .mobile-more-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    opacity: 0;
    background: rgba(2,8,20,.58);
    transition: opacity .18s ease;
  }

  .mobile-more-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(390px, 92vw);
    overflow-y: auto;
    padding: 0 18px 24px;
    border-left: 1px solid var(--ops-line);
    color: #eef4ff;
    background: #0a1935;
    box-shadow: -24px 0 60px rgba(0,0,0,.38);
    transform: translateX(104%);
    transition: transform .2s ease;
  }

  .mobile-more-panel > header {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--ops-line);
    background: rgba(10,25,53,.98);
  }

  .mobile-more-panel > header > div {
    display: grid;
  }

  .mobile-more-panel > header span,
  .mobile-more-group > span {
    color: #6078a5;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .mobile-more-panel > header strong {
    color: #fff;
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 18px;
  }

  .mobile-more-group {
    display: grid;
    gap: 6px;
    padding-top: 18px;
  }

  .mobile-more-group > a,
  .mobile-more-group > button {
    width: 100%;
    min-height: 60px;
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #dce7ff;
    text-align: left;
    background: rgba(255,255,255,.025);
    font: inherit;
  }

  .mobile-more-group > a:hover,
  .mobile-more-group > button:hover {
    border-color: var(--ops-line);
    background: rgba(77,130,218,.10);
  }

  .mobile-more-group div {
    min-width: 0;
  }

  .mobile-more-group strong,
  .mobile-more-group small {
    display: block;
  }

  .mobile-more-group strong {
    color: #fff;
    font-size: 12px;
  }

  .mobile-more-group small {
    margin-top: 1px;
    color: #7288af;
    font-size: 9px;
  }

  body.mobile-more-open {
    overflow: hidden;
  }

  body.mobile-more-open .mobile-more-sheet {
    pointer-events: auto;
  }

  body.mobile-more-open .mobile-more-backdrop {
    opacity: 1;
  }

  body.mobile-more-open .mobile-more-panel {
    transform: translateX(0);
  }

  .app-shell:not(.admin-shell).sidebar-collapsed .sidebar-more-trigger {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .app-shell:not(.admin-shell).sidebar-collapsed .sidebar-more-trigger span {
    display: none;
  }
}


/* Operations command center */
.operations-hero-skeleton {
  height: 250px;
  margin-bottom: 16px;
}

.operations-heading {
  align-items: flex-end;
}

.operations-active-card,
.operations-empty-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid rgba(49,208,127,.22);
  border-radius: var(--ops-radius);
  background:
    linear-gradient(135deg, rgba(49,208,127,.06), transparent 45%),
    #0c1d3c;
}

.operations-empty-active {
  border-color: var(--ops-line);
  background: #0c1d3c;
}

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

.operations-active-heading h2,
.operations-empty-active h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: 24px;
  letter-spacing: -.025em;
}

.operations-active-progress {
  display: grid;
  grid-template-columns: 150px minmax(160px, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.operations-active-progress > div:first-child {
  display: grid;
}

.operations-active-progress strong {
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.operations-active-progress span {
  margin-top: 4px;
  color: var(--ops-muted);
  font-size: 10px;
}

.operations-active-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 16px;
}

.operations-active-metrics > div {
  min-width: 100px;
}

.operations-active-metrics span,
.operations-campaign-row em {
  display: block;
  color: var(--ops-dim);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.operations-active-metrics strong {
  display: block;
  margin-top: 3px;
  color: #eaf1ff;
  font-size: 13px;
}

.operations-active-metrics strong.has-alert {
  color: var(--ops-red);
}

.operations-active-actions {
  min-width: 180px;
  display: grid;
  gap: 8px;
}

.operations-active-actions form,
.operations-active-actions .btn {
  width: 100%;
}

.operations-empty-active > div p {
  margin-bottom: 0;
  color: var(--ops-muted);
}

.operations-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.operations-attention-list,
.operations-quick-grid {
  display: grid;
  gap: 7px;
}

.operations-attention-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  color: #dce7fb;
  background: rgba(255,255,255,.018);
}

.operations-attention-row:hover {
  border-color: var(--ops-line-strong);
  background: rgba(77,130,218,.07);
}

.operations-attention-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #9bb7eb;
  background: rgba(77,130,218,.11);
}

.operations-attention-row.is-danger .operations-attention-icon {
  color: #ffc1c8;
  background: rgba(255,111,125,.10);
}

.operations-attention-row.is-warning .operations-attention-icon {
  color: #ffd28b;
  background: rgba(255,149,24,.10);
}

.operations-attention-row span:nth-child(2) {
  min-width: 0;
}

.operations-attention-row strong,
.operations-attention-row small {
  display: block;
}

.operations-attention-row strong {
  color: #fff;
  font-size: 11px;
}

.operations-attention-row small {
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: 9px;
}

.operations-attention-row em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7898cf;
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.operations-attention-row em .icon {
  width: 13px;
}

.operations-clear-state {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px dashed var(--ops-line);
  border-radius: 8px;
  color: var(--ops-green);
}

.operations-clear-state > span strong,
.operations-clear-state > span small {
  display: block;
}

.operations-clear-state strong {
  color: #dff9ed;
  font-size: 11px;
}

.operations-clear-state small {
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: 9px;
}

.operations-quick-grid {
  grid-template-columns: 1fr 1fr;
}

.operations-quick-grid a {
  min-height: 88px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  color: #dce7fb;
  background: #0c1d3c;
}

.operations-quick-grid a:hover {
  border-color: rgba(255,149,24,.28);
  background: rgba(255,149,24,.045);
}

.operations-quick-grid a > .icon {
  width: 20px;
  color: var(--ops-orange);
}

.operations-quick-grid strong,
.operations-quick-grid small {
  display: block;
}

.operations-quick-grid strong {
  color: #fff;
  font-size: 11px;
}

.operations-quick-grid small {
  margin-top: 3px;
  color: var(--ops-muted);
  font-size: 9px;
  line-height: 1.35;
}

.app-shell:not(.admin-shell) .operations-recent-campaigns {
  padding: 0;
}

.operations-recent-campaigns .card-head {
  margin: 0;
  padding: 17px 18px 12px;
  border-bottom: 1px solid var(--ops-line);
}

.operations-campaign-table {
  display: grid;
}

.operations-campaign-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) .55fr .65fr .5fr 18px;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--ops-line);
  color: #dce7fb;
}

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

.operations-campaign-row:hover {
  background: rgba(77,130,218,.06);
}

.operations-campaign-row > span {
  min-width: 0;
}

.operations-campaign-row > span:first-child strong,
.operations-campaign-row > span:first-child small {
  display: block;
}

.operations-campaign-row > span:first-child strong {
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-campaign-row > span:first-child small {
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: 9px;
}

.operations-campaign-row > span:not(:first-child) strong {
  display: block;
  margin-top: 3px;
  color: #eaf1ff;
  font-size: 11px;
}

@media (max-width: 1080px) {
  .operations-work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .operations-heading {
    display: grid;
    gap: 12px;
  }

  .operations-heading .btn {
    width: 100%;
  }

  .operations-active-card,
  .operations-empty-active {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 15px;
  }

  .operations-active-progress {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .operations-active-actions {
    min-width: 0;
    grid-template-columns: 1fr 1fr;
  }

  .operations-quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .operations-campaign-row {
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
    padding: 12px 14px;
  }

  .operations-campaign-row > span:nth-child(2),
  .operations-campaign-row > span:nth-child(3),
  .operations-campaign-row > span:nth-child(4) {
    grid-column: 1;
  }

  .operations-campaign-row > span:last-child {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .operations-quick-grid {
    grid-template-columns: 1fr;
  }

  .operations-attention-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .operations-attention-row em {
    grid-column: 2;
  }

  .operations-active-actions {
    grid-template-columns: 1fr;
  }
}


/* Campaign operator workspace */
.campaign-operator-alert,
.campaign-draft-next {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  background: #0c1d3c;
}

.campaign-operator-alert.is-danger {
  border-color: rgba(255,111,125,.28);
  background: rgba(255,111,125,.07);
}

.campaign-operator-alert.is-warning {
  border-color: rgba(255,149,24,.28);
  background: rgba(255,149,24,.07);
}

.campaign-operator-alert > span,
.campaign-draft-next > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #9bb7eb;
  background: rgba(77,130,218,.12);
}

.campaign-operator-alert strong,
.campaign-operator-alert p,
.campaign-draft-next strong,
.campaign-draft-next p {
  display: block;
  margin: 0;
}

.campaign-operator-alert strong,
.campaign-draft-next strong {
  color: #fff;
  font-size: 11px;
}

.campaign-operator-alert p,
.campaign-draft-next p {
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: 9px;
}

.campaign-runtime-hero {
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(340px,.7fr);
  gap: 1px;
  margin-bottom: 14px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--ops-line);
}

.campaign-runtime-progress,
.campaign-runtime-now {
  background: #0c1d3c;
}

.campaign-runtime-progress {
  padding: 18px;
}

.campaign-runtime-progress > strong {
  display: block;
  margin: 5px 0 10px;
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.campaign-runtime-progress > small {
  display: block;
  margin-top: 8px;
  color: var(--ops-muted);
  font-size: 9px;
}

.campaign-runtime-now {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.campaign-runtime-now > div {
  padding: 13px 14px;
  border-right: 1px solid var(--ops-line);
  border-bottom: 1px solid var(--ops-line);
}

.campaign-runtime-now > div:nth-child(2n) {
  border-right: 0;
}

.campaign-runtime-now span {
  display: block;
  color: var(--ops-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.campaign-runtime-now strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 12px;
}

.campaign-delivery-records {
  margin-bottom: 14px;
}

.campaign-details-disclosure {
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  background: rgba(255,255,255,.018);
}

.campaign-details-disclosure > summary {
  min-height: 56px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 18px;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  color: #dce7fb;
  cursor: pointer;
  list-style: none;
}

.campaign-details-disclosure > summary::-webkit-details-marker {
  display: none;
}

.campaign-details-disclosure > summary strong,
.campaign-details-disclosure > summary small {
  display: block;
}

.campaign-details-disclosure > summary strong {
  color: #dce7fb;
  font-size: 11px;
}

.campaign-details-disclosure > summary small {
  margin-top: 2px;
  color: var(--ops-dim);
  font-size: 9px;
}

.campaign-details-disclosure > summary > .icon:last-child {
  color: #6078a5;
  transition: transform .15s ease;
}

.campaign-details-disclosure[open] > summary > .icon:last-child {
  transform: rotate(90deg);
}

.campaign-details-body {
  padding: 0 13px 13px;
  border-top: 1px solid var(--ops-line);
}

.campaign-details-body .details-list {
  margin-top: 12px;
}

@media (max-width: 920px) {
  .campaign-runtime-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .campaign-operator-alert,
  .campaign-draft-next {
    grid-template-columns: 32px minmax(0,1fr);
  }

  .campaign-operator-alert form,
  .campaign-draft-next .btn {
    grid-column: 2;
    width: 100%;
  }

  .campaign-runtime-now {
    grid-template-columns: 1fr 1fr;
  }
}


/* Audience operational handoff */
.import-next-operation {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(255,149,24,.26);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255,149,24,.06), transparent 48%),
    #0c1d3c;
}

.import-next-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--ops-orange);
  background: rgba(255,149,24,.10);
}

.import-next-operation h2,
.import-next-operation p {
  margin: 0;
}

.import-next-operation h2 {
  margin-top: 3px;
  color: #fff;
  font-size: 18px;
}

.import-next-operation p {
  margin-top: 4px;
  color: var(--ops-muted);
  font-size: 10px;
  line-height: 1.5;
}

.import-next-operation p strong {
  color: #dce7fb;
}

@media (max-width: 820px) {
  .audience-page .page-heading .heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .audience-page .page-heading .heading-actions .btn-primary {
    grid-column: 1 / -1;
  }

  .import-next-operation {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .import-next-icon {
    width: 36px;
    height: 36px;
  }

  .import-next-operation form,
  .import-next-operation form .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .import-page .page-heading .heading-actions {
    width: 100%;
  }
}


/* Operator Activity timeline */
.activity-attention-strip {
  display: flex;
  align-items: stretch;
  gap: 1px;
  margin-bottom: 14px;
  border: 1px solid var(--ops-line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--ops-line);
}

.activity-attention-label,
.activity-attention-strip > a {
  min-height: 58px;
  display: flex;
  align-items: center;
  background: #0c1d3c;
}

.activity-attention-label {
  padding: 0 15px;
  color: var(--ops-dim);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.activity-attention-strip > a {
  gap: 7px;
  padding: 0 14px;
  color: #dce7fb;
}

.activity-attention-strip > a:hover {
  background: rgba(77,130,218,.08);
}

.activity-attention-strip > a strong {
  color: var(--ops-red);
  font-size: 18px;
}

.activity-attention-strip > a span {
  color: var(--ops-muted);
  font-size: 9px;
}

.activity-filters {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.activity-filters a {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--ops-line);
  border-radius: 7px;
  color: #8fa5cf;
  background: rgba(255,255,255,.018);
  font-size: 10px;
  font-weight: 600;
}

.activity-filters a.active,
.activity-filters a:hover {
  color: #fff;
  border-color: rgba(255,149,24,.28);
  background: rgba(255,149,24,.07);
}

.app-shell:not(.admin-shell) .activity-feed-card {
  padding: 0;
}

.activity-feed {
  display: grid;
}

.activity-event {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) 68px 16px;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ops-line);
  color: #dce7fb;
}

.activity-event:last-child {
  border-bottom: 0;
}

.activity-event:hover {
  background: rgba(77,130,218,.055);
}

.activity-event-marker {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #8fb0e8;
  background: rgba(77,130,218,.10);
}

.activity-event-marker.type-campaigns {
  color: var(--ops-orange);
  background: rgba(255,149,24,.09);
}

.activity-event-marker.type-imports {
  color: #c4b5fd;
  background: rgba(139,92,246,.10);
}

.activity-event-marker.type-devices {
  color: #a7f3cf;
  background: rgba(49,208,127,.09);
}

.activity-event-marker.status-failed,
.activity-event-marker.status-offline {
  color: #ffc1c8;
  background: rgba(255,111,125,.10);
}

.activity-event-copy {
  min-width: 0;
}

.activity-event-copy strong,
.activity-event-copy small,
.activity-event-copy em {
  display: block;
}

.activity-event-copy strong {
  color: #fff;
  font-size: 11px;
}

.activity-event-copy small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--ops-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-event-copy em {
  margin-top: 2px;
  color: #6078a5;
  font-size: 8px;
  font-style: normal;
}

.activity-event time {
  text-align: right;
}

.activity-event time strong,
.activity-event time small {
  display: block;
}

.activity-event time strong {
  color: #dce7fb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.activity-event time small {
  margin-top: 2px;
  color: var(--ops-dim);
  font-size: 8px;
}

.activity-event > .icon:last-child {
  width: 14px;
  color: #52698f;
}

@media (max-width: 820px) {
  .activity-attention-strip {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .activity-attention-label,
  .activity-attention-strip > a {
    flex: 0 0 auto;
  }

  .activity-event {
    grid-template-columns: 32px minmax(0,1fr) 52px;
  }

  .activity-event > .icon:last-child {
    display: none;
  }
}
