:root {
  --shell-z-topbar: 70;
  --shell-z-backdrop: 55;
  --shell-z-sidebar: 60;
  --shell-z-sidebar-overlay: 45;
  --shell-sidebar-collapsed: 64px;
  --shell-sidebar-expanded: 248px;
}

.layout-shell {
  min-height: 100dvh;
  height: 100dvh;
}

.layout {
  grid-template-columns: var(--shell-sidebar-collapsed) minmax(0, 1fr);
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  transition: grid-template-columns 200ms ease;
}

.layout.sidebar-expanded:not(.sidebar-pinned) {
  grid-template-columns: var(--shell-sidebar-expanded) minmax(0, 1fr);
}

.sidebar {
  width: var(--shell-sidebar-collapsed);
  padding: 10px 8px;
  background: #f6f8fc;
  color: #1f2937;
  border-right: 1px solid #dbe3ee;
  overflow: hidden auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scroll-padding-block: 8px;
  scrollbar-gutter: stable;
  transition: padding 200ms ease, width 200ms ease, margin-right 200ms ease, box-shadow 200ms ease;
}

.layout > .sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  max-height: 100dvh;
}

.content {
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  padding: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.content .card {
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}

.content table th,
.content table td {
  padding: 8px 9px;
}

.content .ops-summary-strip {
  margin-bottom: 10px;
}

.content .ops-summary-pill {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.content .ops-summary-pill strong {
  font-size: 13px;
}

.content .admin-primary-card {
  position: relative;
}

@media (min-width: 961px) {
  .content .admin-page-title-source,
  .content .admin-page-head-compact .ops-page-copy,
  .content .admin-page-head-compact > h2,
  .content .admin-page-head-compact > h3,
  .content .admin-page-head-compact > h4 {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .content .admin-page-head-compact {
    min-height: 0;
    margin-bottom: 8px;
    align-items: center;
    justify-content: flex-end;
  }

  .content .admin-page-head-compact .ops-page-actions,
  .content .admin-page-head-compact > .inline-help-wrap {
    margin-left: auto;
  }

  .content .panel.has-topbar-page-help .admin-primary-card > .admin-page-head-compact .inline-help-wrap {
    display: none;
  }

  .content .admin-page-head-compact .ops-page-actions:empty {
    display: none;
  }
}

.layout:not(.sidebar-pinned) .sidebar {
  z-index: var(--shell-z-sidebar-overlay);
}

.layout.sidebar-expanded:not(.sidebar-pinned) .sidebar {
  width: var(--shell-sidebar-expanded);
  margin-right: 0;
  box-shadow: none;
}

.layout.sidebar-pinned {
  grid-template-columns: var(--shell-sidebar-expanded) minmax(0, 1fr);
}

.layout.sidebar-pinned .sidebar {
  width: var(--shell-sidebar-expanded);
  margin-right: 0;
  box-shadow: none;
  z-index: var(--shell-z-sidebar);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100%;
  padding-bottom: 8px;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2px 0 6px;
}

.sidebar-brand-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  gap: 0;
}

.sidebar-logo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  flex: 0 0 auto;
}

.sidebar-mobile-menu-btn {
  display: none;
  flex: 0 0 auto;
}

.sidebar-brand-text {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.sidebar-pin-btn {
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  color: #334155;
  min-width: 48px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.sidebar-pin-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.sidebar-pin-btn.is-active {
  border-color: #1d4ed8;
  color: #1d4ed8;
  background: #dbeafe;
}

.nav-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-block-bottom {
  margin-top: auto;
}

.sidebar .nav-label {
  margin: 8px 8px 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Collapsed desktop rail: group labels are hidden, keep only a small gap. */
@media (min-width: 961px) {
  .layout:not(.sidebar-expanded) .sidebar .nav-label {
    height: 0;
    margin: 6px 0 0;
    overflow: hidden;
  }
}

.sidebar .nav-link,
.sidebar .nav-section-head {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-section-head:hover {
  background: #e9eef8;
  color: #0f172a;
}

.sidebar .nav-link.module-disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.sidebar .nav-link.module-disabled:hover {
  background: transparent;
  color: #334155;
}

.sidebar .nav-link.active,
.layout.sidebar-expanded .sidebar .nav-link.active {
  background: #dbe7ff;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px #bfd3ff;
  font-weight: 700;
}

.sidebar .nav-section {
  margin: 0;
  border-radius: 10px;
}

.sidebar .nav-head-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.sidebar .nav-ico {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.sidebar .nav-ico svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar .nav-text {
  white-space: nowrap;
}

.sidebar .chev {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.sidebar .nav-section-body {
  display: none;
  padding: 1px 0 4px;
}

.sidebar .nav-section.open .nav-section-body {
  display: none;
}

.layout.sidebar-expanded .sidebar .nav-section.open .nav-section-body {
  display: block;
}

.sidebar .nav-link.child {
  font-size: 14px;
  min-height: 30px;
  color: #475569;
}

.layout.sidebar-expanded .sidebar .nav-link.child {
  padding-left: 30px;
}

.sidebar .nav-child-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #94a3b8;
  flex: 0 0 auto;
}

.sidebar .nav-label,
.sidebar .nav-text,
.sidebar .chev,
.sidebar .sidebar-brand-text {
  opacity: 0;
  visibility: hidden;
  width: 0;
  pointer-events: none;
  transition: opacity 150ms ease, visibility 150ms ease;
}

.sidebar .sidebar-pin-btn {
  opacity: 0;
  visibility: hidden;
  width: 0;
  min-width: 0;
  padding: 0;
  border-width: 0;
  pointer-events: none;
}

.sidebar .nav-link,
.sidebar .nav-section-head {
  justify-content: center;
  gap: 0;
  padding: 7px;
}

.sidebar .nav-head-main {
  justify-content: center;
  gap: 0;
}

.sidebar .nav-section.open .chev {
  transform: rotate(180deg);
}

.layout.sidebar-expanded .sidebar {
  padding: 10px 8px;
}

.layout.sidebar-expanded .sidebar .nav-label,
.layout.sidebar-expanded .sidebar .nav-text,
.layout.sidebar-expanded .sidebar .chev,
.layout.sidebar-expanded .sidebar .sidebar-brand-text {
  opacity: 1;
  visibility: visible;
  width: auto;
  pointer-events: auto;
}

.layout.sidebar-expanded .sidebar .nav-link,
.layout.sidebar-expanded .sidebar .nav-section-head {
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 9px;
}

.layout.sidebar-expanded .sidebar .nav-head-main {
  justify-content: flex-start;
  gap: 8px;
}

.layout.sidebar-expanded .sidebar .sidebar-brand-row {
  justify-content: space-between;
  padding: 2px 4px 6px;
}

.layout.sidebar-expanded .sidebar .sidebar-brand-main {
  justify-content: flex-start;
  width: auto;
  gap: 10px;
}

.layout.sidebar-expanded .sidebar .sidebar-pin-btn {
  opacity: 1;
  visibility: visible;
  width: auto;
  min-width: 48px;
  padding: 6px 8px;
  border-width: 1px;
  pointer-events: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--shell-z-topbar);
  background: linear-gradient(180deg, #f8fafd 0%, #f4f6fb 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 8px;
  margin-bottom: 10px;
}

.topbar-left {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

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

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.topbar-brand-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-title-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The title is the page h1; outrank `.content h1` sizing. */
.topbar .topbar-brand-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ui-text, #0f172a);
  line-height: 1.1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-crumb-section {
  color: var(--ui-muted, #64748b);
  font-weight: 600;
}

.topbar-crumb-separator {
  color: var(--ui-muted, #64748b);
  font-weight: 400;
}

.topbar-inline-help-slot {
  display: none;
  flex: 0 0 auto;
  align-items: center;
}

.topbar-inline-help-slot:not(:empty) {
  display: inline-flex;
}

.topbar-inline-help-slot:empty {
  display: none;
}

.topbar-inline-help-slot .inline-help-btn {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.topbar-inline-help-slot .inline-help-popover {
  left: 0;
  right: auto;
  width: min(340px, calc(100vw - 40px));
}

.topbar-panel-name {
  font-size: 12px;
  line-height: 1.1;
  max-width: min(52vw, 280px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search-slot {
  flex: 1 1 460px;
  min-width: 220px;
  max-width: 620px;
}

/* Narrow desktops: the page title keeps its natural width; search fills what is left. */
@media (960px < width < 1280px) {
  .topbar-search-slot {
    flex: 1 1 280px;
    min-width: 200px;
  }
}

.admin-global-search {
  position: relative;
  width: 100%;
  margin: 0;
}

.admin-global-search-input {
  width: 100%;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 0 12px;
  font: inherit;
  line-height: 34px;
}

.admin-global-search-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.admin-global-search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 95;
  max-height: min(68vh, 520px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  padding: 6px;
}

.admin-global-search-panel.hidden {
  display: none;
}

.admin-global-search-status {
  padding: 10px;
  color: #64748b;
  font-size: 12px;
}

.admin-global-search-summary {
  padding: 4px 9px 7px;
  color: #64748b;
  font-size: 11px;
}

.admin-global-search-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-global-search-result {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  text-align: left;
}

.admin-global-search-result:hover,
.admin-global-search-result:focus-visible {
  background: #eef2ff;
  outline: none;
}

.admin-global-search-kind {
  align-self: start;
  min-width: 0;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.admin-global-search-icon {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #eef2ff;
  color: #1d4ed8;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.admin-global-search-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-global-search-title {
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.2;
}

.admin-global-search-subtitle {
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-live-wrap,
.admin-message-wrap,
.avatar-wrap {
  position: relative;
}

.admin-live-dropdown {
  position: absolute;
  right: 0;
  top: 40px;
  width: min(480px, 92vw);
  max-width: calc(100vw - 16px);
  max-height: min(70vh, 560px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 26px rgba(2, 6, 23, 0.16);
  padding: 8px;
  z-index: 70;
  display: none;
}

.admin-live-dropdown.show {
  display: block;
}

.avatar-btn {
  width: 34px;
  height: 34px;
}

.avatar-menu {
  top: 40px;
}

.admin-live-dropdown-head {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-live-dropdown-head .title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 700;
}

.admin-live-dropdown-head .summary {
  font-size: 12px;
  color: #475569;
}

.admin-live-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-live-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.admin-live-item.is-clickable {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.admin-live-item.is-clickable:hover,
.admin-live-item.is-clickable:focus-visible {
  border-color: #93c5fd;
  background: #f8fafc;
  outline: none;
}

.admin-live-item .title {
  font-weight: 700;
  color: #0f172a;
}

.admin-live-online-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  vertical-align: middle;
}

.admin-message-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 8px;
}

.admin-message-item-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.admin-message-title {
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

button.admin-message-title:hover,
button.admin-message-title:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
  outline: none;
}

.admin-message-title-btn,
.admin-message-latest-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.admin-message-title-btn:hover,
.admin-message-title-btn:focus-visible,
.admin-message-latest-btn:hover,
.admin-message-latest-btn:focus-visible {
  color: #1d4ed8;
  outline: none;
  text-decoration: underline;
}

.admin-message-pill {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 1px 6px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.admin-message-pill--new {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.admin-message-pill--replied {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.admin-message-time {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.admin-message-source {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 150px;
  overflow: hidden;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-message-more {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.admin-live-item .meta {
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-live-item .sub {
  margin-top: 2px;
  color: #334155;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.admin-message-latest {
  appearance: none;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #f8fafc;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
}

button.admin-message-latest:hover,
button.admin-message-latest:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  outline: none;
}

.admin-message-quick-reply {
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
}

.admin-message-quick-reply summary {
  color: #1d4ed8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.admin-message-quick-reply input,
.admin-message-quick-reply textarea {
  box-sizing: border-box;
  width: 100%;
  margin-top: 6px;
  padding: 7px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font: inherit;
}

.admin-message-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
}

.admin-message-preview-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.admin-message-preview-line {
  display: grid;
  grid-template-columns: minmax(66px, auto) minmax(0, 1fr);
  gap: 6px;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.admin-message-preview-time {
  color: #64748b;
  white-space: nowrap;
}

.admin-message-preview-text {
  overflow-wrap: anywhere;
}

.admin-message-preview-more,
.admin-message-open-hint {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
}

.admin-message-preview-more {
  color: #64748b;
}

.admin-message-open-hint {
  color: #2563eb;
}

.admin-toast-root,
.admin-live-toast-root {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.admin-toast,
.admin-live-toast {
  pointer-events: auto;
  width: min(360px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 8px 18px rgba(30, 58, 138, 0.14);
  transition: transform 180ms ease, opacity 180ms ease;
}

.admin-toast.is-ok,
.admin-live-toast.is-ok {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: 0 8px 18px rgba(30, 58, 138, 0.14);
}

/* PD-647 AC-8.5: a ringing call toast is distinct from informational toasts and keeps the full caller label. */
.admin-toast.is-live,
.admin-live-toast.is-live {
  border-color: #dc2626;
  border-left-width: 4px;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 8px 18px rgba(153, 27, 27, 0.18);
}

.admin-toast.is-live .meta,
.admin-live-toast.is-live .meta {
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-toast.is-live .admin-toast-action {
  border-color: #166534;
  background: #15803d;
  color: #ffffff;
  min-height: 36px;
}

.admin-toast.is-warn,
.admin-live-toast.is-warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.14);
}

.admin-toast.is-bad,
.admin-live-toast.is-bad {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  box-shadow: 0 8px 18px rgba(153, 27, 27, 0.14);
}

.admin-toast.is-actionable {
  cursor: pointer;
}

.admin-toast.is-actionable:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.admin-toast.is-leaving,
.admin-live-toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.admin-toast .title,
.admin-live-toast .title {
  font-weight: 700;
}

.admin-toast .meta,
.admin-live-toast .meta {
  margin-top: 3px;
  color: #334155;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-toast .admin-toast-action {
  margin-top: 8px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 9px;
  cursor: pointer;
}

.admin-toast .admin-toast-action:hover,
.admin-toast .admin-toast-action:focus-visible {
  background: #dbeafe;
  outline: none;
}

.topbar-menu-btn {
  display: none;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.topbar-menu-btn:hover {
  background: #eef2ff;
  border-color: #94a3b8;
}

.topbar-menu-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.24);
}

.topbar-menu-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.topbar-menu-icon > span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
  transition: transform 180ms ease, opacity 160ms ease, top 180ms ease, background 180ms ease;
}

.topbar-menu-icon > span:nth-child(1) {
  top: 0;
}

.topbar-menu-icon > span:nth-child(2) {
  top: 6px;
}

.topbar-menu-icon > span:nth-child(3) {
  top: 12px;
}

.topbar-menu-btn[aria-expanded="true"] {
  background: #0f172a;
  border-color: #0f172a;
}

.topbar-menu-btn[aria-expanded="true"] .topbar-menu-icon > span {
  background: #ffffff;
}

.topbar-menu-btn[aria-expanded="true"] .topbar-menu-icon > span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.topbar-menu-btn[aria-expanded="true"] .topbar-menu-icon > span:nth-child(2) {
  opacity: 0;
}

.topbar-menu-btn[aria-expanded="true"] .topbar-menu-icon > span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.mobile-nav-backdrop {
  display: none;
}

/* PD-640 (ADR-4044): "Dispatch (new)" link to the parallel next UI. The server
   injects it only when ADMIN_PORTAL_NEXT_UI is on, right after Orders /
   Dispatch. It is deliberately not a .nav-link, so the legacy panel router
   never binds it; it mirrors a top-level nav link (icon-only rail when
   collapsed). It is hidden whenever the Order Labels link is hidden: by module
   entitlement (hidden attribute), by merchant access (aria-hidden), or through
   the quick-links .nav-link-row, which mirrors both as row.hidden. No :has(),
   so older browsers keep the rule. */
.sidebar .nav-next-link {
  width: 100%;
  min-height: 34px;
  border-radius: 12px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 7px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.layout.sidebar-expanded .sidebar .nav-next-link {
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 9px;
}

.sidebar .nav-next-link:hover,
.sidebar .nav-next-link:focus-visible {
  background: #e9eef8;
  color: #0f172a;
}

.sidebar .nav-link[hidden] + .nav-next-link,
.sidebar .nav-link[aria-hidden="true"] + .nav-next-link,
.sidebar .nav-link-row[hidden] + .nav-next-link {
  display: none;
}

@media (max-width: 960px) {
  .sidebar .nav-next-link {
    justify-content: flex-start;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
  }
}
