/* ==============================================================================
   YOUNITY SOVEREIGN CONSOLE · KEYNOTE GRADE ADMIN DESIGN SYSTEM
   Brand Tokens: Ghana Gold (#F59E0B), Emerald Forest (#10B981), AfriOne Cyan (#00F2FE),
   Deep Space Canvas (#050811), Glass Surfaces & Kinetic Badges
   ============================================================================== */

:root {
  --bg-space: #050811;
  --bg-surface: #0a0f1d;
  --bg-card: rgba(14, 21, 38, 0.7);
  --bg-card-hover: rgba(19, 29, 53, 0.85);
  --bg-glass-elevated: rgba(20, 31, 56, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.16);
  --border-gold: rgba(245, 158, 11, 0.35);
  --border-emerald: rgba(16, 185, 129, 0.35);
  --border-cyan: rgba(0, 242, 254, 0.35);

  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --cyan: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.25);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.25);
  --purple: #8b5cf6;

  --text-white: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', ui-monospace, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow-gold: 0 0 25px rgba(245, 158, 11, 0.2);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.2);
  --shadow-glow-cyan: 0 0 25px rgba(0, 242, 254, 0.2);

  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-space);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Ambient Visual Canvas Background */
#adminCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Application Layout Structure */
.admin-app {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   TOP COMMAND BAR
   -------------------------------------------------------------------------- */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 8, 17, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-white);
}

.brand-icon-wrapper {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.2));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow-gold);
}

.brand-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #f59e0b 80%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #34d399;
}

.radar-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  position: relative;
}

.radar-pulse::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 1px solid #10b981;
  animation: radarRipple 2s infinite ease-out;
}

@keyframes radarRipple {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.corridor-select-wrap {
  position: relative;
}

.select-custom {
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1.8rem 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: var(--transition-fast);
}

.select-custom:hover, .select-custom:focus {
  border-color: var(--border-gold);
  background: rgba(19, 29, 53, 0.9);
}

.corridor-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-pill-btn:hover {
  color: var(--text-white);
  border-color: var(--border-bright);
  background: rgba(255, 255, 255, 0.09);
}

.btn-refresh {
  color: var(--gold);
  border-color: var(--border-gold);
  background: rgba(245, 158, 11, 0.08);
}

.btn-refresh:hover {
  background: rgba(245, 158, 11, 0.18);
}

.btn-refresh.spinning svg {
  animation: spin 0.8s linear infinite;
}

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

/* --------------------------------------------------------------------------
   WORKSPACE SHELL (SIDEBAR + MAIN CONTENT)
   -------------------------------------------------------------------------- */
.workspace-shell {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 65px);
}

/* Sidebar */
.admin-sidebar {
  width: 275px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(10, 15, 29, 0.94) 0%, rgba(6, 9, 18, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.15rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1), padding 0.28s ease;
  position: relative;
  z-index: 10;
  overflow-x: hidden;
}

.sidebar-scrollable-area {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
}

.sidebar-scrollable-area::-webkit-scrollbar {
  width: 3px;
}
.sidebar-scrollable-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* 1. Corridor Sovereign Quick Status Widget */
.sidebar-corridor-widget {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(16, 185, 129, 0.04) 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sidebar-corridor-widget:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.18);
  transform: translateY(-1px);
}

.corridor-widget-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.corridor-flag {
  font-size: 1.35rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.corridor-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.corridor-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.corridor-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #34d399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.corridor-switch-hint {
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-fast);
}

.sidebar-corridor-widget:hover .corridor-switch-hint {
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.35);
}

/* 2. Navigation Groups & Titles */
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem 0.35rem;
}

.nav-group-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 700;
}

.nav-group-badge {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  list-style: none;
}

/* 3. Navigation Links */
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
}

.link-content {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.link-icon {
  font-size: 1.12rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.link-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.link-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.sidebar-kbd {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  padding: 0.05rem 0.35rem;
  transition: var(--transition-fast);
}

.sidebar-link:hover .sidebar-kbd {
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.25);
}

.link-counter {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.42rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.revenue-counter {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.invariant-counter {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.kyc-counter {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.neutral-counter {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.12);
}

.telemetry-counter {
  background: rgba(0, 242, 254, 0.1);
  color: var(--cyan);
  border-color: rgba(0, 242, 254, 0.25);
}

.sidebar-link:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.sidebar-link:hover .link-icon {
  transform: scale(1.15);
}

.sidebar-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(16, 185, 129, 0.06) 100%);
  border-color: rgba(245, 158, 11, 0.4);
  border-left: 3px solid var(--gold);
  font-weight: 600;
  box-shadow: inset 4px 0 14px -2px rgba(245, 158, 11, 0.25);
}

/* 4. Node Telemetry Strip */
.sidebar-node-strip {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.node-strip-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.node-pulse-ring {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.node-name {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-white);
}

.node-stats {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* 5. Sidebar Footer & Operator Card */
.sidebar-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sidebar-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ecosystem-backlink {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.7rem;
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  font-size: 0.78rem;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
}

.ecosystem-backlink:hover {
  background: rgba(0, 242, 254, 0.14);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

.sidebar-collapse-toggle {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sidebar-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.2);
}

.operator-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.operator-avatar-box {
  position: relative;
  flex-shrink: 0;
}

.operator-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--emerald));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0b1120;
}

.operator-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #0b1120;
}

.operator-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.operator-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.operator-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.operator-badge {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  padding: 0.05rem 0.25rem;
  border-radius: 2px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-weight: 700;
}

.operator-role {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 6. COLLAPSED SIDEBAR STATE */
.admin-sidebar.collapsed {
  width: 72px;
  padding: 1.15rem 0.5rem;
}

.admin-sidebar.collapsed .sidebar-corridor-widget .corridor-details,
.admin-sidebar.collapsed .sidebar-corridor-widget .corridor-switch-hint,
.admin-sidebar.collapsed .nav-group-header,
.admin-sidebar.collapsed .link-label,
.admin-sidebar.collapsed .link-right,
.admin-sidebar.collapsed .sidebar-node-strip,
.admin-sidebar.collapsed .operator-info,
.admin-sidebar.collapsed .ecosystem-backlink span:last-child {
  display: none !important;
}

.admin-sidebar.collapsed .sidebar-corridor-widget {
  padding: 0.5rem;
  align-items: center;
  justify-content: center;
}

.admin-sidebar.collapsed .corridor-flag {
  font-size: 1.6rem;
}

.admin-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0.65rem;
}

.admin-sidebar.collapsed .link-content {
  gap: 0;
  justify-content: center;
}

.admin-sidebar.collapsed .link-icon {
  font-size: 1.25rem;
}

.admin-sidebar.collapsed .operator-card {
  justify-content: center;
  padding: 0.35rem;
}

.admin-sidebar.collapsed .ecosystem-backlink {
  padding: 0.5rem;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   MAIN VIEWPORT & TABS
   -------------------------------------------------------------------------- */
.main-viewport {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  max-height: calc(100vh - 65px);
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-pane.active {
  display: block;
}

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

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

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.35rem;
  max-width: 650px;
}

.section-actions {
  display: flex;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   METRIC STATS GRID
   -------------------------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.stat-card.highlight-gold {
  border-color: rgba(245, 158, 11, 0.3);
}
.stat-card.highlight-gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.stat-card.highlight-emerald {
  border-color: rgba(16, 185, 129, 0.3);
}
.stat-card.highlight-emerald::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--emerald), transparent);
}

.stat-card.highlight-cyan {
  border-color: rgba(0, 242, 254, 0.3);
}
.stat-card.highlight-cyan::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.stat-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.stat-badge.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-badge.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-subtext {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --------------------------------------------------------------------------
   PANELS & CARDS
   -------------------------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }

.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   INVARIANT BANNER (DOUBLE-ENTRY GUARANTEE)
   -------------------------------------------------------------------------- */
.invariant-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 8, 17, 0.8) 100%);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.75rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.invariant-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.invariant-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #34d399;
}

.invariant-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-white);
}

.invariant-formula {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #6ee7b7;
  margin-top: 0.2rem;
}

.invariant-metrics {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.inv-metric-box {
  display: flex;
  flex-direction: column;
}

.inv-metric-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.inv-metric-val {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

/* --------------------------------------------------------------------------
   DATA TABLES
   -------------------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.admin-table th {
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: rgba(0, 242, 254, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.action-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.action-btn.btn-approve {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.action-btn.btn-approve:hover {
  background: rgba(16, 185, 129, 0.3);
}

.action-btn.btn-reject {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.action-btn.btn-reject:hover {
  background: rgba(239, 68, 68, 0.3);
}

.action-btn.btn-freeze {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.action-btn.btn-freeze:hover {
  background: rgba(239, 68, 68, 0.25);
}

.action-btn.btn-unfreeze {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.action-btn.btn-inspect {
  background: rgba(0, 242, 254, 0.12);
  color: var(--cyan);
  border-color: rgba(0, 242, 254, 0.3);
}

.action-btn.btn-inspect:hover {
  background: rgba(0, 242, 254, 0.22);
}

/* --------------------------------------------------------------------------
   MODALS
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 5, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  max-width: 650px;
  width: 100%;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s var(--transition-bounce);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-white);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------------------------------
   SEARCH & FILTERS BAR
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.search-input-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 0.55rem 1rem 0.55rem 2.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-gold);
  background: rgba(19, 29, 53, 0.95);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.filter-controls-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.filter-select {
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  outline: none;
  font-family: inherit;
  transition: var(--transition-fast);
  cursor: pointer;
}

.filter-select:focus,
.filter-select:hover {
  border-color: var(--border-gold);
  background: rgba(19, 29, 53, 0.95);
}

.filter-select option {
  background: #0b1120;
  color: #fff;
}

.filter-badge-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold);
  border: 1px solid var(--border-gold);
  white-space: nowrap;
}

.filter-reset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.filter-reset-btn:hover {
  border-color: #ef4444;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 200px;
  }
  .col-8, .col-7, .col-6, .col-5, .col-4 {
    grid-column: span 12;
  }
  .invariant-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .workspace-shell {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .main-viewport {
    padding: 1rem;
  }
}

/* ==============================================================================
   SOVEREIGN REVENUE & MONETIZATION ENGINE STYLES
   ============================================================================== */
.revenue-deck-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(16, 185, 129, 0.08) 50%, rgba(5, 8, 17, 0.8) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  box-sizing: border-box;
  grid-column: 1 / -1;
}

.revenue-deck-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  min-width: 0;
}

.revenue-deck-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fbbf24;
}

.controls-deck {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: rgba(14, 21, 38, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  backdrop-filter: blur(16px);
  margin-bottom: 2rem;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.currency-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem;
}

.curr-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-mono);
}

.curr-btn.active {
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.scale-slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scale-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.scale-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 10px #10b981;
}

.scale-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

/* Big KPIs Cards Grid */
.big-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.4rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.kpi-box:hover {
  transform: translateY(-3px);
  border-color: var(--border-bright);
}

.kpi-box.hero-kpi {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(14, 21, 38, 0.8) 100%);
}

.kpi-box.hero-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #f59e0b, #10b981);
}

.kpi-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.kpi-amount {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-white);
  line-height: 1.1;
}

.kpi-secondary {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #34d399;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pillar-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
}

.pillar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pillar-badge-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.pillar-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.pillar-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
}

.pillar-category {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.pillar-share {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.pillar-amount {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-white);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.pillar-local-amount {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #34d399;
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.pillar-formula-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.85rem;
}

.formula-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.25rem;
}

.formula-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.pillar-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.pillar-ledger-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ledger-tag {
  color: var(--cyan);
  font-weight: 600;
}

.national-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.national-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.national-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.national-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.national-table tr.total-row td {
  border-top: 2px solid var(--border-gold);
  background: rgba(245, 158, 11, 0.05);
  font-weight: 800;
}



/* ==============================================================================
   KEYNOTE ENHANCEMENTS: VISUAL ANALYTICS, LIVE STREAM & COMMAND PALETTE
   ============================================================================== */

/* 1. Analytics & Velocity Deck */
.analytics-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.chart-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--emerald), var(--cyan));
  opacity: 0.6;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chart-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

.chart-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.chart-svg-wrap {
  width: 100%;
  height: 210px;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
}

/* Donut Chart Visuals */
.donut-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 210px;
  gap: 1rem;
}

.donut-legend-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.76rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

.donut-legend-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* 2. Live Transaction Stream Ticker */
.stream-panel {
  background: rgba(8, 14, 28, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stream-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.live-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseBeacon 1.8s infinite;
}

.stream-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #34d399;
  text-transform: uppercase;
}

.stream-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.stream-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.stream-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-white);
  border-color: var(--border-bright);
}

.stream-btn.active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.stream-feed {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 160px;
  overflow-y: hidden;
  position: relative;
}

.stream-feed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35px;
  background: linear-gradient(to bottom, transparent, rgba(8, 14, 28, 0.95));
  pointer-events: none;
}

.stream-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  animation: streamItemSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition-fast);
}

@keyframes streamItemSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stream-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.stream-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stream-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.stream-tag-gh { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.stream-tag-ng { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stream-tag-ke { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.stream-tag-xof { background: rgba(0, 242, 254, 0.15); color: #38bdf8; }
.stream-tag-global { background: rgba(139, 92, 246, 0.15); color: #c084fc; }

.stream-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stream-narration {
  color: var(--text-white);
  font-weight: 500;
}

.stream-amount {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #34d399;
}

/* 3. Universal Sovereign Command Palette (⌘K) */
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(14px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: fadeIn 0.2s ease-out;
}

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

.palette-box {
  width: 100%;
  max-width: 620px;
  background: #0d1527;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 30px rgba(245, 158, 11, 0.2);
  overflow: hidden;
  animation: paletteScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes paletteScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.palette-search-box {
  display: flex;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.palette-icon {
  font-size: 1.25rem;
  margin-right: 0.85rem;
  color: var(--gold);
}

.palette-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-white);
}

.palette-input::placeholder {
  color: var(--text-muted);
}

.palette-kbd-shortcut {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.75rem;
}

.palette-category-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.25rem;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.palette-item:hover, .palette-item.active {
  background: rgba(245, 158, 11, 0.12);
  color: var(--text-white);
}

.palette-item.active {
  border-left: 3px solid var(--gold);
}

.palette-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.palette-item-icon {
  font-size: 1.15rem;
}

.palette-item-title {
  font-weight: 600;
}

.palette-item-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* 4. Merchant Ghana QR Stand Terminal Modal */
.stand-modal-box {
  width: 100%;
  max-width: 580px;
  background: #0b1120;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 40px rgba(245, 158, 11, 0.25);
  animation: paletteScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stand-banner {
  background: linear-gradient(135deg, #78350f 0%, #1e1b4b 100%);
  padding: 1.5rem;
  position: relative;
  text-align: center;
}

.stand-banner-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.01em;
}

.stand-banner-sub {
  font-size: 0.82rem;
  color: #fde68a;
  margin-top: 0.2rem;
}

.stand-body {
  padding: 1.75rem;
}

.stand-qr-wrapper {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  width: 220px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.stand-qr-svg {
  width: 170px;
  height: 170px;
}

.stand-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.stand-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stand-meta-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stand-meta-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
}

/* 5. Quick Export & Print Actions */
.btn-export {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-gold);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-export:hover {
  background: rgba(245, 158, 11, 0.25);
  color: var(--text-white);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Print Optimization */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .admin-sidebar, .admin-header, .filter-bar, .controls-deck, #adminCanvas, .noise-overlay, .palette-overlay, .modal-backdrop {
    display: none !important;
  }
  .main-viewport {
    padding: 0 !important;
  }
  .panel-card, .stat-card, .kpi-box {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #000000 !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .national-table th, .national-table td, .admin-table th, .admin-table td {
    color: #000000 !important;
    border-color: #dddddd !important;
  }
}

/* ==============================================================================
   7. HIGH-SECURITY SOVEREIGN AUTHENTICATION GATE & SESSION LOCK
   ============================================================================== */
.auth-gate-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(15, 23, 42, 0.96) 0%, rgba(3, 7, 18, 0.99) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: authGateFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-gate-overlay.open {
  display: flex;
}

@keyframes authGateFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-gate-card {
  width: 100%;
  max-width: 490px;
  background: rgba(11, 17, 32, 0.92);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.95), 0 0 50px rgba(245, 158, 11, 0.15);
  overflow: hidden;
  position: relative;
  animation: authScaleIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authScaleIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.auth-gate-card.shake {
  animation: hapticShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes hapticShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.auth-gate-header {
  padding: 2.25rem 2rem 1.25rem;
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-shield-crest {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.auth-shield-icon {
  font-size: 1.85rem;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.6));
}

.auth-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  animation: authPulse 2.5s infinite;
}

@keyframes authPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.auth-badge-fips {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.25);
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
  letter-spacing: 0.06em;
}

.auth-gate-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.auth-gate-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.auth-security-notice {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  display: inline-block;
}

.auth-gate-body {
  padding: 1.75rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-alert-box {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: authScaleIn 0.2s ease;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-field-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.07em;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.auth-input-wrapper:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
  background: rgba(0, 0, 0, 0.6);
}

.auth-input-icon {
  padding-left: 0.85rem;
  font-size: 1rem;
}

.auth-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.75rem 0.85rem;
  color: var(--text-white);
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
}

.auth-input::placeholder {
  color: var(--text-muted);
}

.auth-eye-btn {
  background: none;
  border: none;
  padding: 0 0.85rem;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.65;
  transition: var(--transition-fast);
}

.auth-eye-btn:hover {
  opacity: 1;
}

.auth-otp-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #34d399;
}

.auth-hint-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.auth-hint-text code {
  color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
}

.auth-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.auth-submit-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #000000;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.auth-demo-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.auth-demo-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--gold);
}

.auth-gate-footer {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.auth-telemetry-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Operator Lock Button */
.operator-lock-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.8rem;
  margin-left: auto;
  flex-shrink: 0;
}

.operator-lock-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}
