/* ==========================================================================
   GOX — Global Ownership Exchange Institutional Design System
   ========================================================================== */

:root {
  --bg-primary: #070a12;
  --bg-secondary: #0c1220;
  --bg-surface: rgba(16, 24, 40, 0.75);
  --bg-card: rgba(19, 29, 49, 0.65);
  --bg-card-hover: rgba(26, 40, 68, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(59, 130, 246, 0.5);

  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --danger: #f43f5e;
  --danger-glow: rgba(244, 63, 94, 0.25);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.25);
  --info: #0ea5e9;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Ambient Ambient Glow Backgrounds */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #2563eb, #3b82f6);
  top: -150px;
  left: 10%;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #059669, #10b981);
  top: 40%;
  right: -100px;
}

.glow-3 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #7c3aed, #6366f1);
  bottom: -200px;
  left: 30%;
}

/* Top Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

.logo-icon {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border: 1px solid rgba(59, 130, 246, 0.5);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.4);
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-institutional {
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.logo-subtitle {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}

.consensus-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  letter-spacing: 0.05em;
}

.pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Market Ticker Strip */
.market-ticker-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticker-sym {
  color: var(--text-dim);
  font-weight: 600;
}

.ticker-val {
  color: var(--text-main);
  font-weight: 700;
}

.ticker-up {
  color: var(--success);
  font-size: 0.75rem;
}

.ticker-down {
  color: var(--danger);
  font-size: 0.75rem;
}

.ticker-divider {
  color: rgba(255, 255, 255, 0.15);
}

.ticker-reg {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Header Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff;
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #fff;
  border-color: rgba(251, 113, 133, 0.4);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-blue);
  color: var(--accent-cyan);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
}

.btn-block {
  width: 100%;
}

/* Metrics Banner */
.metrics-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.25rem 2rem;
  position: relative;
  z-index: 10;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0.3rem 0;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 2rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.tab-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 0.1rem 0.3rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.tab-btn.active .tab-num {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.15);
}

/* Main Container & Tab Panes */
.main-container {
  padding: 2rem;
  position: relative;
  z-index: 10;
  max-width: 1600px;
  margin: 0 auto;
}

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

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

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

/* Cards & Layouts */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card-hero {
  background: linear-gradient(145deg, rgba(20, 32, 58, 0.8), rgba(12, 18, 32, 0.8));
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: var(--shadow-lg);
}

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

.card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

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

.pill-active {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.overview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.overview-grid > .card-hero {
  grid-column: 1 / -1;
}

.panel-layout {
  display: flex;
  gap: 1.5rem;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

/* 8 Components Matrix */
.components-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.matrix-node {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.matrix-node:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.node-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}

.node-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.node-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.node-status {
  font-size: 0.72rem;
  font-weight: 600;
}

/* Spotlight Assets Cards */
.spotlight-assets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spotlight-asset-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.spotlight-asset-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.asset-info-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.asset-info-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

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

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

.table-compact {
  font-size: 0.78rem;
}

.table th {
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

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

.badge-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.badge-info {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  background: rgba(12, 18, 32, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-wrap label {
  margin-bottom: 0;
  cursor: pointer;
}

/* Pricing Top Strip */
.pricing-top-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.security-selector-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.security-selector-box label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.pricing-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.stat-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.stat-num {
  font-weight: 700;
}

/* Order Book Depth Ladder */
.depth-ladder-container {
  display: flex;
  gap: 1rem;
  min-height: 280px;
}

.depth-col {
  flex: 1;
}

.depth-header {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.5rem;
}

.depth-table-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding: 0.2rem 0.5rem;
}

.depth-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.depth-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  overflow: hidden;
}

.depth-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

.depth-row.bid .depth-bar-fill {
  right: 0;
  background-color: var(--success);
}

.depth-row.ask .depth-bar-fill {
  left: 0;
  background-color: var(--danger);
}

.depth-row span {
  position: relative;
  z-index: 2;
}

/* Side Selector Buttons */
.side-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-side {
  flex: 1;
  padding: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-side.btn-buy.active {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  box-shadow: 0 0 14px var(--success-glow);
}

.btn-side.btn-sell.active {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 0 14px var(--danger-glow);
}

.order-summary-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.8rem;
}

/* DvP Stepper Explainer */
.dvp-stepper-explainer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.dvp-step {
  flex: 1;
  text-align: center;
}

.dvp-step-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 0.5rem;
  font-size: 0.85rem;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.dvp-step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.dvp-step-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.dvp-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
}

/* Cap Table Distribution Bar */
.captable-viz-container {
  margin-top: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.captable-viz-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.captable-bar {
  display: flex;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border-subtle);
}

.captable-slice {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}

.captable-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.75rem;
}

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

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* Rules Bench & Cards */
.rule-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.rule-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.rule-tag {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

.tag-strict {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
}

.tag-custom {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.rule-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.rule-body {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.result-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  animation: fadeIn 0.2s ease-out;
}

.result-box.allowed {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.result-box.blocked {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

/* Info Callout */
.info-callout {
  display: flex;
  gap: 0.75rem;
  background: rgba(30, 41, 59, 0.4);
  border-left: 3px solid var(--accent-blue);
  padding: 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.stats-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 280px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.activity-action {
  color: var(--accent-cyan);
  font-weight: 600;
}

.activity-actor {
  color: var(--text-dim);
}

/* Modal Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
}

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

.modal-close:hover {
  color: #fff;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.receipt-body {
  background: rgba(7, 10, 18, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.75rem;
  line-height: 1.6;
  max-height: 350px;
  overflow-y: auto;
}

/* Alert Banner */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 300;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-danger { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Customer Experience & Portal Styles */
.customer-hero-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 50%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.customer-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-violet));
}

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

.customer-hero-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.customer-hero-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.35rem;
  max-width: 680px;
  line-height: 1.5;
}

.persona-selector {
  display: flex;
  background: rgba(10, 15, 29, 0.8);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 0.25rem;
}

.persona-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.persona-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.persona-pill.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.persona-body-content {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  animation: fadeIn 0.3s ease;
}

.persona-guide-text h4 {
  font-size: 1.05rem;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.persona-guide-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 620px;
}

.persona-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Customer Trust & Workflow Bar */
.trust-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 0.25rem;
}

.trust-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  transition: all 0.25s ease;
  position: relative;
}

.trust-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(20, 30, 55, 0.7);
  transform: translateY(-2px);
}

.trust-step-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.trust-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Customer Portfolio Spotlight Card */
.customer-portfolio-box {
  background: linear-gradient(135deg, rgba(16, 24, 40, 0.8) 0%, rgba(26, 38, 64, 0.8) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.portfolio-metric-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.portfolio-metric-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.portfolio-holdings-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.holding-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.holding-chip strong {
  color: var(--accent-cyan);
}

/* FAQ Modal Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
}

.faq-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.faq-q {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.faq-a {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Utilities */
.text-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--accent-cyan); }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-center { text-align: center; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.25rem; }
.hidden { display: none !important; }

/* Responsive */
@media (max-width: 1024px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  .overview-grid,
  .panel-layout {
    flex-direction: column;
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Layer 1 & Layer 2 Gateways: Auth & Institutional Pricing System
   ========================================================================== */

.gateway-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at 50% 20%, rgba(15, 23, 42, 0.96), rgba(7, 10, 18, 0.99));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.gateway-layer.hidden {
  display: none !important;
}

.gateway-container {
  width: 100%;
  max-width: 960px;
  background: rgba(16, 24, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.1);
  overflow: hidden;
  position: relative;
}

.gateway-header {
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.gateway-title-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.gateway-body {
  padding: 2rem;
}

/* Layer 1: Auth Layout */
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
  align-items: stretch;
}

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

.auth-hero-pane {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.8));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-features-list {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-feature-icon {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 1rem;
}

.auth-support-pill {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-support-pill a {
  color: var(--accent-cyan);
  font-weight: 600;
  text-decoration: none;
}

.auth-tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* Layer 2: Pricing Layout (3 Tiers: $299 / $999 / $9,000) */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

.pricing-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.1);
}

.pricing-card.featured {
  background: linear-gradient(160deg, rgba(30, 27, 75, 0.8), rgba(15, 23, 42, 0.9));
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 16px 40px -8px rgba(79, 70, 229, 0.3), 0 0 25px rgba(99, 102, 241, 0.15);
}

.pricing-card.enterprise {
  background: linear-gradient(160deg, rgba(15, 32, 67, 0.85), rgba(10, 15, 30, 0.95));
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 16px 40px -8px rgba(14, 165, 233, 0.35), 0 0 25px rgba(56, 189, 248, 0.15);
}

.pricing-badge-popular {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.pricing-badge-enterprise {
  position: absolute;
  top: -12px;
  right: 24px;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: #fff;
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.pricing-tier-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.pricing-tier-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 40px;
}

.pricing-cost {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-currency {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.pricing-amount {
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: #fff;
  line-height: 1;
}

.pricing-cycle {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}

.pricing-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex: 1;
}

.pricing-perk-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pricing-perk-check {
  color: var(--success);
  font-weight: 700;
  font-size: 0.95rem;
}

/* Header User Profile Badge */
.header-user-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
}

.user-avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.72rem;
}

.user-tier-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-tier-pill.owner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
}

.user-tier-pill.firm {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
}

.user-tier-pill.pro {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

