/* ───────────────────────────────────────────────────────────────
   PURPLE RAINDROPS — Shared shell tokens
   These --tx-* names are kept for backward compatibility with the
   sidebar/header/dashboard markup, but their VALUES now point at
   the canonical theme.css palette so the shell stops drifting away
   from the brand colors.
─────────────────────────────────────────────────────────────── */
/* Shell tokens migrated to css/0-tokens/legacy.css */

.dashboard-body {
  background:
    radial-gradient(ellipse 80% 60% at 12% 0%, rgba(61, 123, 255, 0.34) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 92% 18%, rgba(30, 64, 175, 0.36) 0%, transparent 62%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(37, 99, 235, 0.26) 0%, transparent 65%),
    radial-gradient(circle at 80% 92%, rgba(61, 123, 255, 0.12) 0%, transparent 38%),
    var(--tx-canvas);
}

.sidebar,
.dashboard-header,
.header-shell-panel,
.header-utility-panel,
.sidebar-footer-card,
.tx-live-status,
.tx-shell-secondary,
.tx-shell-cta {
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(11,14,20,0.78) 0%, rgba(11,14,20,0.88) 100%),
    radial-gradient(ellipse 60% 40% at 20% 0%, rgba(61, 123, 255,0.10) 0%, transparent 60%);
  border-right: 1px solid rgba(120, 170, 255,0.10);                /* Cloudy Sky tint */
  box-shadow: none;
}

.sidebar-logo-wrap .tx-logo,
.sidebar-footer-card {
  border-radius: 24px;
  border: 0.5px solid var(--tx-border);
  background: linear-gradient(180deg, var(--tx-surface) 0%, var(--tx-surface-bottom) 100%);
  box-shadow: none;
}

.sidebar-brand-kicker,
.sidebar-section-heading,
.sidebar-footer-label {
  color: var(--tx-text-muted);
}

.sidebar-brand-text,
.sidebar-footer-value,
.sidebar-label,
.header-page-title,
.tx-shell-title {
  color: var(--tx-text);
}

.sidebar-link {
  min-height: 56px;
  border-radius: 999px;
  border: 0.5px solid transparent;
}

.sidebar-link:hover {
  border-color: #a855f7;
  color: #c084fc;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.sidebar-link.active {
  border-color: #c084fc;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.5) 0%, rgba(124, 58, 237, 0.4) 100%);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.3);
  color: #ffffff;
}

.sidebar-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(88, 28, 135, 0.25) 100%);
  border: 0.5px solid rgba(168, 85, 247, 0.3);
}

.sidebar-link.active .sidebar-icon {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35) 0%, rgba(124, 58, 237, 0.4) 100%);
  border-color: #c084fc;
}

.sidebar-label,
.tx-shell-cta,
.tx-shell-secondary {
  font-size: 18px;
}

.dashboard-header {
  background:
    linear-gradient(180deg, rgba(11,14,20,0.78) 0%, rgba(11,14,20,0.88) 100%),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(61,123,255,0.10) 0%, transparent 60%);
  border-bottom: 1px solid rgba(120, 170, 255,0.10);              /* Cloudy Sky tint */
  box-shadow: none;
  height: var(--shell-header-height);                          /* strict 64px */
}

/* ──────────────────────────────────────────────────────────────
   Dashboard header — 3-zone flex layout (left / center / right)
   Strict 64px height, no wrap, ellipsis on overflowing text.
   ────────────────────────────────────────────────────────────── */
.dashboard-header-content {
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.header-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: nowrap;
}

.header-left { flex: 0 1 auto; }
.header-center {
  flex: 1 1 480px;
  justify-content: center;
  max-width: 560px;
}
.header-right { flex: 0 0 auto; justify-content: flex-end; }

/* Sidebar collapse toggle — square glass tile, 40px */
.dashboard-header .sidebar-collapse-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(56, 225, 255,0.05) 0%, rgba(61, 123, 255,0.04) 100%);
  border: 1px solid rgba(120, 170, 255,0.14);
  color: var(--tx-text-secondary);
  flex-shrink: 0;
}
.dashboard-header .sidebar-collapse-toggle:hover {
  border-color: rgba(56, 225, 255,0.34);
  color: var(--tx-text);
}
.dashboard-header .sidebar-collapse-toggle svg { width: 18px; height: 18px; }

/* Warehouse indicator — glass pill, icon + kicker/name, ellipsis-safe */
.header-warehouse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 255,0.14);
  background: linear-gradient(180deg, rgba(56, 225, 255,0.05) 0%, rgba(61, 123, 255,0.04) 100%);
  color: var(--tx-text);
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
  cursor: pointer;
  max-width: 280px;
  min-width: 0;
  transition: border-color var(--tr-fast), background var(--tr-fast), box-shadow var(--tr-fast);
}
.header-warehouse-indicator:hover {
  border-color: rgba(56, 225, 255,0.34);
  box-shadow: 0 0 0 1px rgba(56, 225, 255,0.10);
}
.warehouse-indicator-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(61, 123, 255,0.18) 0%, rgba(37, 99, 235,0.22) 100%);
  color: var(--color-sky-aqua, var(--tx-color-cyan-brand));
  flex-shrink: 0;
}
.warehouse-indicator-icon svg { width: 14px; height: 14px; }
.warehouse-indicator-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.1;
}
.warehouse-indicator-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-text-muted);
}
.warehouse-indicator-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-text);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-warehouse-indicator .header-chevron {
  width: 14px;
  height: 14px;
  color: var(--tx-text-muted);
  flex-shrink: 0;
}

/* Center search — compact, glassmorphism, 40px */
.header-center .header-search {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
}
.header-center .header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--tx-text-muted);
  pointer-events: none;
}
.header-center .header-search .search-input {
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 0 12px 0 36px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 255,0.14);
  background: linear-gradient(180deg, rgba(11,14,20,0.55) 0%, rgba(11,14,20,0.38) 100%);
  color: var(--tx-text);
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast), background var(--tr-fast);
}
.header-center .header-search .search-input::placeholder {
  color: var(--tx-text-muted);
  font-weight: 500;
}
.header-center .header-search .search-input:hover {
  border-color: rgba(56, 225, 255,0.30);
}
.header-center .header-search .search-input:focus,
.header-center .header-search .search-input:focus-visible {
  border-color: rgba(56, 225, 255,0.55);
  box-shadow: 0 0 0 3px rgba(61, 123, 255,0.18);
}

/* Theme toggle — square glass tile, sun/moon swap via data-theme */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(56, 225, 255,0.05) 0%, rgba(61, 123, 255,0.04) 100%);
  border: 1px solid rgba(120, 170, 255,0.14);
  color: var(--tx-text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--tr-fast), background var(--tr-fast), color var(--tr-fast);
}
.theme-toggle-btn:hover {
  border-color: rgba(56, 225, 255,0.34);
  color: var(--tx-text);
}
.theme-toggle-btn .theme-icon { width: 18px; height: 18px; }
.theme-toggle-btn .theme-icon-sun { display: none; }
[data-theme="light"] .theme-toggle-btn .theme-icon-moon { display: none; }
[data-theme="light"] .theme-toggle-btn .theme-icon-sun  { display: block; }

/* Profile menu trigger — 40px pill, name/role with ellipsis */
.dashboard-header .profile-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  min-height: 40px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 255,0.14);
  background: linear-gradient(180deg, rgba(56, 225, 255,0.05) 0%, rgba(61, 123, 255,0.04) 100%);
  color: var(--tx-text);
  cursor: pointer;
  max-width: 220px;
  min-width: 0;
  transition: border-color var(--tr-fast), background var(--tr-fast), box-shadow var(--tr-fast);
}
.dashboard-header .profile-menu-trigger:hover {
  border-color: rgba(56, 225, 255,0.34);
  box-shadow: 0 0 0 1px rgba(56, 225, 255,0.10);
}
.dashboard-header .profile-menu-trigger .profile-avatar-initials {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
  flex-shrink: 0;
}
.dashboard-header .profile-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.1;
  gap: 1px;
}
.dashboard-header .profile-copy .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-text);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-header .profile-copy .profile-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tx-text-muted);
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-header .profile-menu-trigger .header-chevron {
  width: 14px;
  height: 14px;
  color: var(--tx-text-muted);
  flex-shrink: 0;
}

/* Simplified warehouse name — plain label, no switcher/dropdown */
.header-warehouse-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 255,0.14);
  background: linear-gradient(180deg, rgba(56, 225, 255,0.05) 0%, rgba(61, 123, 255,0.04) 100%);
  color: var(--tx-text);
  max-width: 320px;
  min-width: 0;
}
.header-warehouse-name .warehouse-indicator-name {
  font-size: 14px;
  font-weight: 700;
  max-width: 260px;
}

/* Profile link — pill that navigates straight to settings */
.dashboard-header .profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(120, 170, 255,0.14);
  background: linear-gradient(180deg, rgba(56, 225, 255,0.05) 0%, rgba(61, 123, 255,0.04) 100%);
  color: var(--tx-text);
  text-decoration: none;
  cursor: pointer;
  max-width: 240px;
  min-width: 0;
  transition: border-color var(--tr-fast), background var(--tr-fast), box-shadow var(--tr-fast);
}
.dashboard-header .profile-link:hover {
  border-color: rgba(56, 225, 255,0.34);
  box-shadow: 0 0 0 1px rgba(56, 225, 255,0.10);
}
.dashboard-header .profile-link .profile-avatar-initials {
  width: 32px;
  height: 32px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
  flex-shrink: 0;
}
.dashboard-header .profile-link .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-text);
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Logout — square glass tile */
.dashboard-header .header-logout-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(56, 225, 255,0.05) 0%, rgba(61, 123, 255,0.04) 100%);
  border: 1px solid rgba(120, 170, 255,0.14);
  color: var(--tx-text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--tr-fast), background var(--tr-fast), color var(--tr-fast);
}
.dashboard-header .header-logout-btn:hover {
  border-color: rgba(255, 99, 132,0.40);
  color: var(--tx-text);
}
.dashboard-header .header-logout-btn svg { width: 18px; height: 18px; }

/* Hide legacy header sub-panels in the non-public path */
.dashboard-header:not(.landing-public-header) .header-shell-panel,
.dashboard-header:not(.landing-public-header) .header-utility-panel,
.dashboard-header:not(.landing-public-header) .header-shell-divider,
.dashboard-header:not(.landing-public-header) .header-search-panel,
.dashboard-header:not(.landing-public-header) .header-page-meta {
  display: none;
}

/* Warehouse popover anchors to the left edge of its trigger */
.warehouse-menu-shell .header-popover {
  left: 0;
  right: auto;
}

/* Smaller desktop — keep header inside 64px, compact center, then drop it */
@media (max-width: 1100px) {
  .warehouse-indicator-name { max-width: 140px; }
  .header-warehouse-indicator { max-width: 220px; }
  .header-warehouse-name { max-width: 200px; }
  .header-warehouse-name .warehouse-indicator-name { max-width: 140px; }
  .dashboard-header .profile-copy .user-name,
  .dashboard-header .profile-copy .profile-role,
  .dashboard-header .profile-link .user-name { max-width: 110px; }
}
@media (max-width: 900px) {
  .dashboard-header .header-center { display: none; }
}
@media (max-width: 640px) {
  .dashboard-header .profile-copy { display: none; }
  .dashboard-header .profile-link { padding-right: 6px; }
  .dashboard-header .profile-menu-trigger { padding-right: 6px; }
  .dashboard-header .profile-menu-trigger .header-chevron { display: none; }
  .warehouse-indicator-copy .warehouse-indicator-kicker { display: none; }
}


.header-page-title,
.tx-shell-title {
  font-size: 20px;
  letter-spacing: -0.5px;
}

.header-page-summary,
.tx-shell-summary,
.welcome-message {
  color: var(--tx-text-secondary);
  font-size: 16px;
}

.tx-shell-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tx-shell-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.tx-shell-kicker {
  color: var(--tx-text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tx-shell-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tx-live-status,
.tx-shell-secondary,
.tx-shell-cta {
  min-height: 44px;
  border-radius: 999px;
  border: 0.5px solid var(--tx-border);
  padding: 10px 18px;
  text-decoration: none;
}

.tx-live-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--tx-surface) 0%, var(--tx-surface-bottom) 100%);
  color: var(--tx-text);
  font-size: 13px;
  font-weight: 500;
}

.tx-live-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--tx-green);
  box-shadow: 0 0 10px var(--tx-green);
}

.tx-shell-cta {
  /* Ghost CTA — translucent interior, gradient purple border, purple neon glow */
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(11,14,20,0.55) 0%, rgba(11,14,20,0.38) 100%) padding-box,
    linear-gradient(135deg, var(--tx-color-blue-brand) 0%, var(--tx-color-blue-600) 100%) border-box;
  color: var(--tx-color-white);
  box-shadow:
    0 0 0 1px rgba(61, 123, 255,0.16),
    0 8px 24px rgba(61, 123, 255,0.28),
    0 2px 8px rgba(37, 99, 235,0.22);
}

.tx-shell-secondary {
  background: linear-gradient(180deg, var(--tx-surface) 0%, var(--tx-surface-bottom) 100%);
  color: var(--tx-text);
}

.dashboard-main,
.dashboard-container {
  color: var(--tx-text);
}

:focus-visible {
  outline: 2px solid var(--tx-sapphire);                 /* Electric Sapphire focus ring */
  outline-offset: 3px;
}

/* ================================================================
   PHASE 2 CANONICAL DESIGN-SYSTEM EXTENSION
   ================================================================ */

/* All tokens migrated to css/0-tokens/ */

html,
body,
.dashboard-body,
button,
input,
select,
textarea {
  font-family: var(--tx-font-sans);
}

code,
pre,
.tx-mono {
  font-family: var(--tx-font-mono);
}

.dashboard-body {
  background:
    radial-gradient(ellipse 80% 60% at 12% 0%, rgba(61, 123, 255, 0.34) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 92% 18%, rgba(30, 64, 175, 0.36) 0%, transparent 62%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(37, 99, 235, 0.26) 0%, transparent 65%),
    radial-gradient(circle at 80% 92%, rgba(61, 123, 255, 0.12) 0%, transparent 38%),
    var(--tx-canvas);
  color: var(--tx-text);
}

.sidebar,
.dashboard-header,
.header-shell-panel,
.header-utility-panel,
.sidebar-footer-card,
.tx-glass-card,
.tx-stat-card,
.tx-activity-row,
.tx-live-status,
.tx-shell-secondary,
.tx-shell-cta,
.tx-primary-button,
.tx-secondary-button {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.sidebar,
.dashboard-header,
.header-shell-panel,
.header-utility-panel,
.sidebar-logo-wrap .tx-logo,
.sidebar-footer-card,
.tx-glass-card,
.tx-stat-card,
.tx-activity-row {
  background: var(--tx-surface-elevated);
  border: 0.5px solid var(--tx-border);
  box-shadow: none;
}

.sidebar,
.dashboard-header {
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.09) 0, transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.94) 0%, rgba(6, 6, 8, 0.98) 100%);
}

.sidebar-link {
  min-height: 56px;
  border-radius: var(--tx-radius-card);                          /* 12px */
  border: 1px solid rgba(120, 170, 255,0.10);                       /* Cloudy Sky tint */
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.sidebar-link:hover {
  border-color: rgba(56, 225, 255,0.34);                           /* Sky Aqua — hover */
  box-shadow: none;
}

.sidebar-link.active {
  /* Ghost active state — purple gradient outline, glass interior, neon glow */
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(11,14,20,0.55) 0%, rgba(11,14,20,0.40) 100%) padding-box,
    linear-gradient(135deg, var(--tx-color-blue-brand) 0%, var(--tx-color-blue-600) 100%) border-box;
  color: var(--tx-color-white);
  box-shadow:
    0 0 0 1px rgba(61, 123, 255,0.16),
    0 6px 18px rgba(61, 123, 255,0.28);
}

.sidebar-icon,
.tx-icon-tile {
  width: 56px;
  height: 56px;
  border-radius: var(--tx-radius-tile);
  background: linear-gradient(135deg, var(--tx-sky) 0%, var(--tx-purple) 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-icon svg,
.tx-icon-tile svg {
  width: 30px;
  height: 30px;
}

.tx-hero-icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--tx-sky) 0%, var(--tx-purple) 100%);
  border: 0.5px solid rgba(255,255,255,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tx-hero-icon-tile svg {
  width: 26px;
  height: 26px;
}

.sidebar-label,
.header-page-title,
.tx-shell-title,
.tx-section-heading,
.tx-card-label {
  color: var(--tx-text);
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
}

.header-page-kicker,
.sidebar-brand-kicker,
.sidebar-section-heading,
.sidebar-footer-label,
.tx-shell-kicker,
.tx-label {
  color: var(--tx-text-muted);
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.header-page-title,
.tx-shell-title,
.tx-section-heading {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.header-page-summary,
.tx-shell-summary,
.welcome-message,
.sidebar-brand-text,
.sidebar-footer-value {
  color: var(--tx-text-secondary);
  font-size: 16px;
  font-weight: 500;
}

.tx-primary-button,
.tx-shell-cta {
  /* Ghost CTA — translucent glass interior + purple-gradient border + neon glow */
  min-height: 44px;
  border-radius: var(--tx-radius-pill);
  padding: 10px 20px;
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, rgba(11,14,20,0.55) 0%, rgba(11,14,20,0.38) 100%) padding-box,
    linear-gradient(135deg, var(--tx-color-blue-brand) 0%, var(--tx-color-blue-600) 100%) border-box;
  color: var(--tx-color-white);
  box-shadow:
    0 0 0 1px rgba(61, 123, 255,0.16),
    0 8px 24px rgba(61, 123, 255,0.28),
    0 2px 8px rgba(37, 99, 235,0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: box-shadow 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.tx-secondary-button,
.tx-shell-secondary {
  min-height: 44px;
  border-radius: var(--tx-radius-pill);
  padding: 10px 20px;
  background: var(--tx-surface-elevated);
  color: var(--tx-text);
  border: 0.5px solid var(--tx-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  transition: border-color 0.18s ease, filter 0.18s ease;
}

.tx-primary-button:hover,
.tx-shell-cta:hover {
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(61, 123, 255,0.22) 0%, rgba(37, 99, 235,0.18) 100%) padding-box,
    linear-gradient(135deg, var(--tx-color-cyan-brand) 0%, var(--tx-color-blue-brand) 50%, var(--tx-color-blue-600) 100%) border-box;
  box-shadow:
    0 0 0 1px rgba(61, 123, 255,0.28),
    0 12px 32px rgba(61, 123, 255,0.42),
    0 4px 12px rgba(37, 99, 235,0.32);
  transform: translateY(-1px);
}

.tx-secondary-button:hover,
.tx-shell-secondary:hover {
  cursor: pointer;
  border-color: rgba(56, 225, 255, 0.45);                /* Sky Aqua hover accent */
  filter: brightness(1.04);
}

.tx-live-status {
  min-height: 44px;
  border-radius: var(--tx-radius-pill);
  padding: 10px 18px;
  background: var(--tx-surface-elevated);
  border: 0.5px solid var(--tx-border);
  color: var(--tx-text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}

.tx-live-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--tx-green);
  box-shadow: 0 0 8px var(--tx-green);
}

.tx-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--tx-radius-pill);
  border: 0.5px solid rgba(255,255,255,0.1);
  font-size: 18px;
  font-weight: 600;
}

.tx-status-pill::before {
  content: '●';
  font-size: 12px;
}

.tx-status-pill.is-success { background: rgba(48, 209, 88, 0.12);  border-color: rgba(48, 209, 88, 0.28);  color: var(--tx-color-emerald-deep); }
.tx-status-pill.is-warning { background: rgba(245, 166, 35, 0.12); border-color: rgba(245, 166, 35, 0.28); color: var(--tx-color-amber-550); }
.tx-status-pill.is-receiving { background: rgba(61, 123, 255, 0.14); border-color: rgba(61, 123, 255, 0.32); color: var(--tx-color-cyan-brand); }
.tx-status-pill.is-urgent { background: rgba(61, 123, 255, 0.14);  border-color: rgba(61, 123, 255, 0.34); color: var(--tx-color-blue-brand); }

.tx-hero-stat {
  font-size: clamp(72px, 12vw, 96px);
  font-weight: 700;
  letter-spacing: -5px;
  line-height: 0.92;
  background: linear-gradient(180deg, var(--tx-color-white) 0%, var(--tx-color-slate-250) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tx-glass-card,
.tx-stat-card {
  border-radius: var(--tx-radius-card);
  padding: 28px;
}

.tx-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--tx-card-gap);
}

.tx-card-value {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
}

.tx-activity-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--tx-radius-card);
}

.tx-activity-row .tx-mono,
.tx-card-meta,
.tx-card-subtle {
  color: var(--tx-text-secondary);
  font-size: 16px;
  font-weight: 500;
}

@media (max-width: 768px) {
  .tx-stat-grid {
    grid-template-columns: 1fr;
  }

  .tx-activity-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .tx-status-pill,
  .tx-primary-button,
  .tx-secondary-button,
  .tx-shell-cta,
  .tx-shell-secondary,
  .sidebar-link {
    font-size: 18px;
  }
}

/* ================================================================
   PREP-TRAX GLOBAL SHELL AUTHORITY
   Shared shell, layout containers, and billing-shell adoption.
   ================================================================ */

.dashboard-body {
  min-height: 100vh;
  margin-left: var(--shell-sidebar-width);
  padding-top: calc(var(--shell-header-height) + 10px);
  transition: margin-left var(--tr-smooth), padding-top var(--tr-smooth);
}

.dashboard-body.sidebar-collapsed {
  margin-left: var(--shell-sidebar-collapsed-width);
}

.dashboard-body.sidebar-collapsed .dashboard-header {
  left: var(--shell-sidebar-collapsed-width);
}

.dashboard-body.sidebar-collapsed .sidebar {
  width: var(--shell-sidebar-collapsed-width);
}

.dashboard-body.sidebar-collapsed .sidebar-brand-copy,
.dashboard-body.sidebar-collapsed .sidebar-section-heading,
.dashboard-body.sidebar-collapsed .sidebar-label,
.dashboard-body.sidebar-collapsed .sidebar-footer-card,
.dashboard-body.sidebar-collapsed .profile-copy {
  display: none;
}

.dashboard-body.sidebar-collapsed .sidebar-brand-shell,
.dashboard-body.sidebar-collapsed .sidebar-link,
.dashboard-body.sidebar-collapsed .header-actions {
  justify-content: center;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--shell-sidebar-width);
  height: 100vh;
  padding: 1.1rem 0.9rem 1rem;
  overflow: hidden;
  border-right-color: rgba(125, 211, 252, 0.14);
  box-shadow: 24px 0 48px rgba(1, 6, 20, 0.34);
  transition: width var(--tr-smooth), transform var(--tr-smooth), opacity var(--tr-fast), box-shadow var(--tr-smooth);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(125, 211, 252, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 22%);
  pointer-events: none;
}

.sidebar-logo-wrap,
.sidebar-nav,
.sidebar-footer-card {
  position: relative;
  z-index: 1;
}

.sidebar-logo-wrap {
  padding: 0 0.2rem 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-brand-shell,
.sidebar-brand-copy,
.sidebar-nav,
.sidebar-section,
.sidebar-section-links,
.header-page-meta,
.header-context-copy,
.profile-copy,
.header-cta-copy,
.client-billing-header-copy,
.client-billing-meta,
.notification-summary-list {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-shell,
.sidebar-section,
.notification-summary-list,
.client-billing-header-copy,
.client-billing-meta {
  gap: 0.7rem;
}

/* Sidebar spacing — standardized scale (Ghost shell) */
.sidebar-section { gap: 8px; }              /* heading → links cluster */
.sidebar-section-links { gap: 6px; }        /* between links */

.sidebar-brand-copy {
  gap: 0.2rem;
  padding-inline: 0.2rem;
}

.sidebar-nav {
  gap: 16px;                                /* between sections */
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  padding-right: 4px;
}

/* ──────────────────────────────────────────────────────────────
   Sidebar links — Premium Glass Shell (Purple Raindrops)
   Inactive: glass tile, cloudy-sky border, Inter typography.
   Hover:    sky-aqua border lift, no color shift on label.
   Active:   Neon-Pink CTA gradient, soft pink glow.
   ────────────────────────────────────────────────────────────── */
.sidebar .sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;                                       /* icon → label */
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--tx-radius-card);            /* 12px */
  background: linear-gradient(180deg, rgba(56, 225, 255,0.04) 0%, rgba(61, 123, 255,0.03) 100%);
  border: 1px solid rgba(120, 170, 255,0.10);          /* Cloudy Sky — subtle */
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  color: var(--tx-text-secondary);
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform var(--tr-fast),
    background var(--tr-fast),
    border-color var(--tr-fast),
    box-shadow var(--tr-fast),
    color var(--tr-fast);
}

.sidebar .sidebar-link::before,
.sidebar .sidebar-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity var(--tr-fast), transform var(--tr-fast), box-shadow var(--tr-fast), border-color var(--tr-fast);
}

.sidebar .sidebar-link::before {
  background: linear-gradient(90deg, rgba(56, 225, 255,0.10) 0%, rgba(61, 123, 255,0.08) 100%);
  opacity: 0;
}

.sidebar .sidebar-link::after {
  inset: 1px;
  border: 1px solid transparent;
  opacity: 0;
}

/* Animated gradient glow pulse on hover */
@keyframes nav-border-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(168,85,247,0.22), 0 8px 20px rgba(4,12,28,0.4); }
  50%       { box-shadow: 0 0 22px rgba(168,85,247,0.48), 0 8px 20px rgba(4,12,28,0.4); }
}

.sidebar .sidebar-link:hover {
  transform: translateX(2px);
  color: #c084fc;
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, rgba(10,4,28,0.65) 0%, rgba(8,3,22,0.55) 100%) padding-box,
    linear-gradient(135deg, #7c3aed, #a855f7, #c084fc, #ec4899) border-box;
  animation: nav-border-glow 2s ease-in-out infinite;
}

.sidebar .sidebar-link:hover::before {
  background: linear-gradient(90deg, rgba(168,85,247,0.09) 0%, rgba(192,132,252,0.05) 100%);
  opacity: 1;
}

.sidebar .sidebar-link.active {
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, rgba(88,28,135,0.42) 0%, rgba(76,29,149,0.32) 100%) padding-box,
    linear-gradient(135deg, #7c3aed, #a855f7, #c084fc) border-box;
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.22),
    0 0 26px rgba(168,85,247,0.38),
    0 10px 26px rgba(88,28,135,0.28),
    inset 0 0 18px rgba(168,85,247,0.10);
  animation: none;
}

.sidebar .sidebar-link.active::before {
  background: linear-gradient(90deg, rgba(168,85,247,0.14) 0%, rgba(192,132,252,0.08) 100%);
  opacity: 1;
}

.sidebar .sidebar-link.active::after {
  opacity: 1;
  border-color: rgba(255,255,255,0.07);
  box-shadow: inset 0 0 0 1px rgba(168,85,247,0.14);
}

.sidebar .sidebar-link .sidebar-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;                               /* tile radius — tighter to match 32px tile */
  background: linear-gradient(145deg, rgba(56, 225, 255,0.10) 0%, rgba(61, 123, 255,0.12) 100%);
  border: 1px solid rgba(120, 170, 255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  color: var(--color-cloudy-sky, var(--tx-color-cyan-brand));          /* inactive icon — cloudy sky */
  transition: background var(--tr-fast), border-color var(--tr-fast), box-shadow var(--tr-fast), color var(--tr-fast), transform var(--tr-fast);
}

.sidebar .sidebar-link:hover .sidebar-icon {
  transform: translateY(-1px);
  border-color: rgba(168,85,247,0.50);
  color: #c084fc;
}

.sidebar .sidebar-link.active .sidebar-icon {
  background: linear-gradient(145deg, rgba(168,85,247,0.28) 0%, rgba(124,58,237,0.38) 100%);
  border-color: rgba(168,85,247,0.55);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 14px rgba(168,85,247,0.30);
  color: #ffffff;
}

.sidebar .sidebar-link .sidebar-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar .sidebar-link .sidebar-label {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  font-family: var(--font-ui, 'Inter', 'Segoe UI', system-ui, sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: inherit;
}

.sidebar .sidebar-link.active .sidebar-label {
  color: #ffffff;
  font-weight: 700;
}

.sidebar-label,
.header-context-name,
.user-name,
.dropdown-user-name,
.menu-entry-title,
.header-cta-label {
  letter-spacing: -0.02em;
  font-weight: 700;
}

.dashboard-header {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--shell-sidebar-width);
  z-index: 220;
  height: var(--shell-header-height);
  border-bottom-color: rgba(125, 211, 252, 0.14);
  box-shadow: 0 20px 40px rgba(1, 6, 20, 0.26);
  transition: left var(--tr-smooth), background var(--tr-smooth), box-shadow var(--tr-smooth);
}

.dashboard-header-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.dashboard-header-shell {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: center;
}

.header-shell-panel,
.header-utility-panel {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border-radius: 24px;
}

.header-shell-panel {
  padding: 0.8rem 1rem;
}

.header-utility-panel {
  justify-content: space-between;
  padding: 0.4rem 0.5rem 0.4rem 1rem;
}

.header-shell-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(125,211,252,0.26), rgba(255,255,255,0.02));
}

.sidebar-collapse-toggle,
.header-action-button,
.profile-menu-trigger,
.hero-action-btn,
.activity-panel-link,
.header-cta-trigger,
.menu-entry,
.client-billing-back-btn {
  transition: transform var(--tr-fast), border-color var(--tr-fast), background var(--tr-fast), box-shadow var(--tr-fast), color var(--tr-fast);
}

.sidebar-collapse-toggle,
.header-action-button {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 16px;
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.header-search-panel {
  flex: 1;
  min-width: 0;
}

.header-search {
  width: 100%;
  max-width: 100%;
}

.search-input {
  min-height: 52px;
  border-radius: 18px;
  padding: 0.95rem 1rem 0.95rem 3rem;
}

.header-context-trigger,
.header-cta-trigger {
  width: auto;
  min-width: 230px;
  height: 52px;
  padding: 0.72rem 0.95rem;
  justify-content: space-between;
  gap: 0.8rem;
  border-radius: 18px;
  text-decoration: none;
}

.header-context-copy,
.profile-copy,
.header-cta-copy {
  gap: 0.08rem;
  align-items: flex-start;
  min-width: 0;
}

.notification-button {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding-inline: 0.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 61, 165, 0.96), rgba(245, 158, 11, 0.96));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-menu-trigger {
  min-height: 52px;
  gap: 0.72rem;
  padding: 0.45rem 0.85rem 0.45rem 0.45rem;
  border-radius: 999px;
}

.profile-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--tx-color-slate-180);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(56, 189, 248, 0.94));
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.2);
}

.profile-avatar-large {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}

.header-menu-shell {
  position: relative;
}

.header-popover {
  position: absolute;
  top: calc(100% + 0.8rem);
  right: 0;
  min-width: 300px;
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0.98), rgba(5, 11, 22, 0.98));
  border: 1px solid rgba(125, 211, 252, 0.14);
  box-shadow: 0 28px 58px rgba(1, 6, 20, 0.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--tr-fast), transform var(--tr-fast), visibility var(--tr-fast);
  z-index: 260;
}

.header-menu-shell.is-open .header-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-entry {
  width: 100%;
  min-height: 52px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.35rem;
  border-radius: 16px;
  text-decoration: none;
}

.dashboard-main {
  padding: 0 0 2.5rem;
}

.dashboard-container {
  width: min(100%, var(--shell-content-width));
  margin: 0 auto;
  padding: 0 1.4rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 0 1.1rem;
  color: rgba(191, 219, 254, 0.72);
}

.breadcrumb a {
  color: rgba(191, 219, 254, 0.84);
  text-decoration: none;
}

.breadcrumb-current {
  color: var(--tx-color-slate-180);
  font-weight: 600;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--tx-color-slate-180);
}

.page-subtitle {
  margin: 0.45rem 0 0;
  max-width: 64ch;
  color: rgba(226, 232, 240, 0.72);
  line-height: 1.65;
}

.dashboard-body.shell-mobile-nav-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .dashboard-body {
    margin-left: 96px;
  }

  .dashboard-header {
    left: 96px;
  }

  .sidebar {
    width: 96px;
    padding-inline: 0.7rem;
  }

  .header-shell-divider,
  .header-page-summary,
  .header-context-copy {
    display: none;
  }

  .dashboard-header-shell {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-body {
    margin-left: 0;
  }

  .dashboard-header {
    left: 0;
  }

  .sidebar {
    display: flex;
    width: min(88vw, 360px);
    max-width: 360px;
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
    z-index: 260;
    overflow-y: auto;
  }

  .dashboard-body.shell-mobile-nav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(4, 10, 20, 0.6);
    backdrop-filter: blur(4px);
    z-index: 250;
  }

  .dashboard-body.shell-mobile-nav-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .dashboard-header-content,
  .dashboard-container {
    padding-inline: 0.95rem;
  }

  .dashboard-header-shell {
    grid-template-columns: 1fr;
  }

  .header-shell-panel,
  .header-utility-panel {
    width: 100%;
  }

  .header-utility-panel,
  .header-actions,
  .page-header {
    flex-wrap: wrap;
  }

  .profile-copy,
  .header-context-label,
  .header-page-summary,
  .sidebar-section-heading,
  .sidebar-footer-card {
    display: none;
  }

  .sidebar-brand-copy {
    display: flex;
  }

  .sidebar-link {
    justify-content: flex-start;
  }

  .header-context-trigger,
  .header-cta-trigger {
    min-width: min(100%, 220px);
  }

  .header-popover {
    left: 0;
    right: auto;
    min-width: min(320px, calc(100vw - 2rem));
  }
}

.client-billing-shell {
  padding-top: 0.45rem;
}

.client-billing-header {
  position: relative;
  overflow: hidden;
  padding: 1.55rem;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(14, 24, 43, 0.72), rgba(7, 13, 27, 0.58));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 28px 72px rgba(2, 6, 23, 0.26), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.client-billing-header::before {
  content: '';
  position: absolute;
  inset: auto -4rem -5rem auto;
  width: 14rem;
  height: 14rem;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.14);
  filter: blur(60px);
  pointer-events: none;
}

.client-billing-kicker,
.client-billing-shell .kpi .label,
.client-billing-shell th,
.client-billing-shell .badge {
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.client-billing-kicker {
  color: rgba(191, 219, 254, 0.8);
  font-size: 0.72rem;
  font-weight: 700;
}

.client-billing-meta,
.client-billing-actions,
.client-billing-shell .section-tabs,
.client-billing-shell .filters,
.modal-overlay .btn,
.client-billing-shell #invModalActions,
.client-billing-shell .meta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.client-billing-meta-pill,
.client-billing-back-btn,
.client-billing-shell .tab-btn,
.client-billing-shell .btn,
.client-billing-shell .badge {
  border-radius: 999px;
}

.client-billing-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  color: rgba(226, 232, 240, 0.86);
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.client-billing-shell .kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.client-billing-shell .kpi,
.client-billing-shell .card,
.client-billing-shell .modal,
.modal-overlay .modal {
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.7), rgba(8, 15, 29, 0.56));
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.client-billing-shell .kpi,
.client-billing-shell .card {
  border-radius: 22px;
  padding: 1.25rem;
}

.client-billing-shell .kpi .label,
.client-billing-shell th {
  font-size: 0.72rem;
  color: rgba(191, 219, 254, 0.64);
}

.client-billing-shell .kpi .val {
  margin-top: 0.35rem;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums lining-nums;
}

.client-billing-shell .card h2 {
  margin: 0 0 1rem;
  color: var(--tx-color-slate-200);
  font-size: 1rem;
}

.client-billing-shell .filters select,
.client-billing-shell .dispute-form textarea {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  color: var(--tx-color-slate-180);
}

.client-billing-shell table {
  width: 100%;
  border-collapse: collapse;
}

.client-billing-shell th,
.client-billing-shell td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
}

.client-billing-shell tr:hover td {
  background: rgba(56, 225, 255, 0.05);
}

.client-billing-shell .badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.2rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
}

.client-billing-shell .btn {
  min-height: 40px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255,255,255,0.045);
  color: var(--tx-color-slate-180);
  cursor: pointer;
}

.client-billing-shell .tab-btn,
.modal-overlay .btn {
  min-height: 40px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255,255,255,0.045);
  color: var(--tx-color-slate-180);
  cursor: pointer;
}

.client-billing-shell .btn-pay,
.client-billing-back-btn {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(56, 189, 248, 0.82));
  border-color: rgba(125, 211, 252, 0.28);
}

.client-billing-shell .btn-pdf {
  color: #c9f2ff;
}

.client-billing-shell .btn-disp {
  color: var(--tx-color-amber-400);
}

.client-billing-shell .section-tabs {
  margin-bottom: 1rem;
}

.client-billing-shell .tab-btn.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(125, 211, 252, 0.28);
  color: var(--tx-color-cyan-100alt);
}

.client-billing-shell .section {
  display: none;
}

.client-billing-shell .section.active {
  display: block;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(4, 10, 20, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-overlay.open {
  display: flex;
}

.client-billing-shell .modal,
.modal-overlay .modal {
  width: min(520px, calc(100vw - 2rem));
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay .modal-close {
  float: right;
  cursor: pointer;
  color: rgba(226, 232, 240, 0.68);
  font-size: 1.2rem;
}

.dispute-list-item {
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.6rem;
}

#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: none;
  z-index: 9999;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  color: var(--tx-color-slate-180);
}

@media (max-width: 768px) {
  .client-billing-meta,
  .client-billing-actions,
  .client-billing-shell .meta-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ================================================================
   PREP-TRAX LANDING / ACCESS PORTAL
   Shared-shell public entry point styling consolidated into the
   master design system.
   ================================================================ */

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 999;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(7, 13, 27, 0.94);
  color: var(--tx-color-slate-180);
  text-decoration: none;
  transition: top var(--tr-fast);
}

.skip-link:focus {
  top: 12px;
}

.landing-shell-body {
  color: var(--tx-text);
}

.landing-shell-body .dashboard-main {
  padding-bottom: 1.25rem;
}

.landing-dashboard-container,
.landing-hero-copy,
.landing-hero-aside,
.landing-section,
.landing-section-header,
.landing-shell-body .login-form,
.landing-shell-body .demo-login-section,
.landing-feature-card,
.landing-trust-item,
.landing-footer-brand,
.landing-footer-column {
  display: flex;
  flex-direction: column;
}

.landing-dashboard-container {
  gap: 1.5rem;
}

.landing-shell-body .section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: var(--tx-color-slate-180);
}

.landing-shell-body .section-subtitle {
  margin: 0;
  max-width: 70ch;
  color: rgba(226, 232, 240, 0.76);
  font-size: 1.05rem;
  line-height: 1.75;
}

.landing-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.landing-section-header {
  gap: 0.55rem;
  align-items: center;
  text-align: center;
}

.landing-section-header-left {
  align-items: flex-start;
  text-align: left;
}

.landing-eyebrow,
.landing-stat-label,
.landing-footer-heading,
.landing-shell-body .login-divider span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(191, 219, 254, 0.74);
}

.landing-hero-shell,
.landing-trust-panel,
.landing-cta-panel,
.login-card,
.landing-feature-card,
.landing-stat-chip,
.landing-suite-footer {
  position: relative;
  overflow: hidden;
}

.landing-hero-shell {
  padding: clamp(1.5rem, 3vw, 2.2rem);
}

.landing-hero-shell::before,
.landing-trust-panel::before,
.landing-cta-panel::before {
  content: '';
  position: absolute;
  inset: auto -10% -30% auto;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.16);
  filter: blur(70px);
  pointer-events: none;
}

.landing-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1.35rem;
  align-items: stretch;
}

.landing-hero-copy,
.landing-hero-aside {
  gap: 1rem;
}

.landing-hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.landing-brand-mark,
.landing-feature-icon,
.landing-shell-body .login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(96, 165, 250, 0.18));
  border: 1px solid rgba(125, 211, 252, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.landing-brand-mark {
  width: 56px;
  height: 56px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--tx-color-slate-180);
}

.landing-wordmark {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--tx-color-slate-180);
}

.landing-hero-title {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.2rem, 5vw, 4.35rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  color: var(--tx-color-slate-180);
}

.landing-hero-subtitle,
.landing-header-summary,
.landing-footer-copy,
.landing-feature-description,
.landing-trust-item p,
.landing-stat-chip p,
.landing-shell-body .login-card-description,
.landing-shell-body .demo-login-text,
.landing-shell-body .register-cta,
.landing-shell-body .contact-info {
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.75;
}

.landing-hero-actions,
.landing-cta-actions,
.landing-shell-body .form-options,
.landing-footer-bottom,
.landing-footer-legal,
.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.landing-inline-link,
.landing-footer-link,
.landing-shell-body .forgot-link,
.landing-shell-body .contact-link {
  color: rgba(191, 219, 254, 0.88);
  text-decoration: none;
}

.landing-inline-link:hover,
.landing-footer-link:hover,
.landing-shell-body .forgot-link:hover,
.landing-shell-body .contact-link:hover {
  color: var(--tx-color-slate-180);
}

.landing-stat-chip {
  padding: 1rem 1.1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 24, 43, 0.74), rgba(8, 15, 29, 0.58));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.24);
  gap: 0.4rem;
}

.landing-stat-chip strong,
.landing-trust-item strong {
  color: var(--tx-color-slate-180);
  font-size: 1rem;
}

.landing-login-grid,
.landing-features-grid,
.landing-trust-grid,
.landing-footer-grid {
  display: grid;
  gap: 1rem;
}

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

.landing-shell-body .login-card {
  gap: 1rem;
  padding: 1.4rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 24, 43, 0.8), rgba(7, 13, 27, 0.64));
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 28px 62px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.landing-shell-body .warehouse-portal::before,
.landing-shell-body .client-portal::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(99, 102, 241, 0.8), transparent);
}

.landing-shell-body .login-card-header,
.landing-feature-card {
  gap: 0.8rem;
}

.landing-shell-body .login-icon {
  width: 54px;
  height: 54px;
  color: var(--tx-color-cyan-100alt);
}

.landing-shell-body .login-icon svg {
  width: 26px;
  height: 26px;
}

.landing-shell-body .login-card-title,
.landing-feature-title {
  margin: 0;
  color: var(--tx-color-slate-180);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.landing-shell-body .login-form {
  gap: 1rem;
}

.landing-shell-body .demo-login-section,
.landing-shell-body .form-group {
  gap: 0.5rem;
}

.landing-shell-body .btn,
.landing-shell-body .btn-demo-login {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.landing-shell-body .btn-demo-login,
.landing-shell-body .btn-login {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: transform var(--tr-fast), filter var(--tr-fast), box-shadow var(--tr-fast);
}

.landing-shell-body .btn-demo-login {
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--tx-color-slate-180);
}

.landing-shell-body .btn-demo-login svg {
  width: 18px;
  height: 18px;
}

.landing-shell-body .btn-login {
  padding: 0.95rem 1.1rem;
  color: #03111f;
  font-weight: 700;
}

.landing-shell-body .btn-warehouse,
.landing-shell-body .btn-client {
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(191, 219, 254, 0.92));
  box-shadow: 0 18px 34px rgba(125, 211, 252, 0.16);
}

.landing-shell-body .btn-demo-login:hover,
.landing-shell-body .btn-login:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.landing-shell-body .form-label {
  color: rgba(226, 232, 240, 0.84);
  font-weight: 600;
  font-size: 0.95rem;
}

.landing-shell-body .form-input {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255,255,255,0.045);
  color: var(--tx-color-slate-180);
  padding: 0.9rem 1rem;
  transition: border-color var(--tr-fast), box-shadow var(--tr-fast), background var(--tr-fast);
}

.landing-shell-body .form-input::placeholder {
  color: rgba(191, 219, 254, 0.5);
}

.landing-shell-body .form-group.focused .form-input,
.landing-shell-body .form-input:focus {
  outline: none;
  border-color: rgba(125, 211, 252, 0.34);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  background: rgba(255,255,255,0.06);
}

.landing-shell-body .form-input.has-invalid-email {
  border-color: rgba(244, 63, 94, 0.88);
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.landing-shell-body .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(226, 232, 240, 0.78);
}

.landing-shell-body .checkbox-input {
  accent-color: var(--tx-color-cyan-brand);
}

.landing-shell-body .login-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.landing-shell-body .login-divider::before,
.landing-shell-body .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.14);
}

.landing-shell-body .login-divider span {
  padding: 0 0.85rem;
}

.landing-shell-body .login-status-msg {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
}

.landing-shell-body .login-status-msg.error {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fecdd3;
}

.landing-shell-body .login-status-msg.pending {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--tx-color-amber-200);
}

.landing-shell-body .login-status-msg.rejected {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.32);
  color: var(--tx-color-red-200);
}

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

.landing-feature-link {
  text-decoration: none;
}

.landing-feature-card {
  height: 100%;
  gap: 0.85rem;
  padding: 1.2rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(14, 24, 43, 0.7), rgba(8, 15, 29, 0.58));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 54px rgba(2, 6, 23, 0.24);
  transition: transform var(--tr-fast), border-color var(--tr-fast), box-shadow var(--tr-fast);
}

.landing-feature-link:hover .landing-feature-card {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.24);
  box-shadow: 0 30px 64px rgba(2, 6, 23, 0.3);
}

.landing-feature-icon {
  width: 48px;
  height: 48px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--tx-color-slate-180);
}

.landing-feature-capabilities {
  margin: 0;
  padding-left: 1rem;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.8;
}

.landing-trust-panel,
.landing-cta-panel {
  padding: 1.5rem;
  border-radius: 30px;
}

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

.landing-trust-item {
  gap: 0.45rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.landing-suite-footer {
  margin: 0 1.4rem 1.4rem;
  padding: 1.4rem 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.landing-footer-grid {
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.8fr));
  align-items: start;
}

.landing-footer-brand,
.landing-footer-column,
.landing-footer-list {
  gap: 0.7rem;
}

.landing-footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-footer-bottom {
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  color: rgba(226, 232, 240, 0.62);
}

.landing-header-summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 0.35rem;
  font-size: 0.96rem;
}

.landing-header-link {
  text-decoration: none;
  white-space: nowrap;
}

.landing-reveal-target {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.landing-reveal-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .landing-features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .landing-hero-grid,
  .landing-login-grid,
  .landing-trust-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero-title,
  .landing-section-header,
  .landing-section-header-left {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .landing-dashboard-container,
  .landing-section,
  .landing-hero-copy,
  .landing-hero-aside,
  .landing-footer-brand,
  .landing-footer-column {
    gap: 1rem;
  }

  .landing-hero-shell,
  .landing-trust-panel,
  .landing-cta-panel,
  .login-card,
  .landing-feature-card {
    padding: 1.1rem;
  }

  .landing-features-grid,
  .landing-footer-grid {
    grid-template-columns: 1fr;
  }

  .landing-footer-bottom,
  .landing-footer-legal,
  .landing-hero-actions,
  .landing-header-actions,
  .landing-shell-body .form-options {
    align-items: flex-start;
  }

  .landing-suite-footer {
    margin-inline: 0.95rem;
  }
}