/* =============================================================================
   QUANTUM — A NEW WAY TO ACCESS DIGITAL ASSETS (QuantumDigital.in)
   Design System & Premium Dark Fintech Styles
   Palette: Deep Navy/Black (#060913), Electric Blue (#2563eb), Cyan (#06b6d4), Violet (#8b5cf6)
   ============================================================================= */

:root {
  --bg-dark: #060913;
  --bg-card: #0c1222;
  --bg-card-hover: #131c35;
  --bg-surface: #17223c;
  --border: #1e2c4f;
  --border-focus: #06b6d4;
  --border-light: rgba(255, 255, 255, 0.08);

  /* Primary Accent: Electric Blue */
  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.4);
  --primary-hover: #1d4ed8;

  /* Secondary Accent: Electric Cyan */
  --accent: #06b6d4;
  --accent-cyan: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.35);

  /* Subtle Violet Accent */
  --violet: #8b5cf6;
  --violet-glow: rgba(139, 92, 246, 0.3);

  /* Functional Status Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* UI Geometry & Animation */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 35px rgba(6, 182, 212, 0.15);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --touch-target: 44px;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 88% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 60%);
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
h1 { font-size: clamp(1.65rem, 4.5vw, 2.5rem); line-height: 1.22; }
h2 { font-size: clamp(1.25rem, 3.2vw, 1.85rem); margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.05rem, 2.2vw, 1.35rem); margin-bottom: 0.5rem; }
p { color: var(--text-muted); font-size: 0.95rem; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #38bdf8; }

/* Layout & Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }
}
.main-content {
  flex: 1;
  padding: 20px 0 48px 0;
}
@media (min-width: 768px) {
  .main-content {
    padding: 32px 0 64px 0;
  }
}

/* Demo Simulation Banner */
.demo-banner {
  display: none !important;
  background: linear-gradient(90deg, #0f172a, #0c1c38, #1e1b4b);
  border-bottom: 1px solid var(--border);
  padding: 8px 24px;
  font-size: 13px;
  position: relative;
  z-index: 101;
}
.demo-badge {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid var(--accent);
  color: #cffafe;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}
.demo-controls {
  display: none;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.demo-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.demo-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Important Notification Banner (Yellow / Amber High-Visibility Notice Above Header) */
.important-notification-banner {
  background: linear-gradient(90deg, #78350f 0%, #b45309 35%, #d97706 70%, #b45309 100%);
  color: #fffbeb;
  border-bottom: 2px solid #fde68a;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.35);
  font-size: 13.5px;
  position: relative;
  z-index: 99;
  transition: all 0.25s ease;
}

.important-banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.important-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.important-banner-tag {
  background: #fef3c7;
  color: #78350f;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.important-banner-title {
  color: #ffffff;
  font-weight: 700;
}

.important-banner-sep {
  color: #fde68a;
  opacity: 0.8;
}

.important-banner-text {
  color: #fef3c7;
  line-height: 1.4;
}

.important-banner-timestamp {
  font-size: 11px;
  color: #fde68a;
  opacity: 0.85;
  white-space: nowrap;
}

.important-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.important-banner-btn {
  background: #ffffff;
  color: #92400e;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.important-banner-btn:hover {
  background: #fef3c7;
  color: #78350f;
}

.important-banner-close-btn {
  background: transparent;
  border: none;
  color: #fef3c7;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.15s ease;
  position: relative;
  z-index: 3;
}

.important-banner-close-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

@media (max-width: 640px) {
  .important-banner-inner {
    padding: 8px 0;
    gap: 8px;
  }
  .important-banner-left {
    gap: 6px;
    font-size: 12.5px;
  }
  .important-banner-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* Important Notification Popup Modal */
.important-popup-modal {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  background: #0d1322;
  padding: 28px;
  max-width: 580px;
  width: 100%;
}

.important-popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.important-popup-title {
  color: #f9fafb;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.important-popup-time {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.important-popup-body {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 16px 18px;
  color: #e5e7eb;
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 24px;
  white-space: pre-wrap;
}

.important-popup-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Header & Navigation */
header.app-header {
  background: rgba(6, 9, 19, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-icon-svg {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}
.brand-text-wrap {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-domain {
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-link {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-link.active {
  color: #fff;
  background: rgba(6, 182, 212, 0.15);
  border-bottom: 2px solid var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
}

/* Buttons (Touch Targets >= 44px) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-target);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  transform: translateY(-1px);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: #38bdf8;
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}
.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #059669;
  color: #fff;
}
.btn-sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 13px;
}
.btn-lg {
  min-height: 48px;
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius);
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Cards & Containers */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
}
@media (min-width: 640px) {
  .card {
    padding: 24px;
  }
}
.card:hover {
  border-color: rgba(6, 182, 212, 0.3);
}
.card-glass {
  background: rgba(12, 18, 34, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.card-highlight {
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-glow);
}
.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

/* Mobile-First Fluid Grid Layouts */
.grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 768px) {
  .grid {
    gap: 24px;
  }
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.badge-primary { background: rgba(37, 99, 235, 0.18); color: #93c5fd; border: 1px solid rgba(37, 99, 235, 0.4); }
.badge-info { background: rgba(6, 182, 212, 0.18); color: #a5f3fc; border: 1px solid rgba(6, 182, 212, 0.4); }
.badge-success { background: var(--success-bg); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-warning { background: var(--warning-bg); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-danger { background: var(--danger-bg); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-violet { background: rgba(139, 92, 246, 0.18); color: #ddd6fe; border: 1px solid rgba(139, 92, 246, 0.4); }

/* Form Controls (Touch Targets >= 44px & iOS Zoom Prevention) */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  min-height: var(--touch-target);
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 16px; /* 16px minimum prevents iOS automatic page zoom */
  font-family: inherit;
  transition: var(--transition);
  touch-action: manipulation;
}
@media (min-width: 768px) {
  .form-input {
    font-size: 14px;
    padding: 11px 16px;
  }
}
.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}
.form-input::placeholder {
  color: var(--text-dim);
}
.input-with-prefix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 15px;
}
.form-input.has-prefix {
  padding-left: 32px;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
}

/* Tables (Mobile Horizontal Scrollable & Alignment Hardening) */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  background: var(--bg-card);
  display: block;
}
.data-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-weight: 700;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-main);
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.data-table th.th-right,
.data-table td.td-right {
  text-align: right;
}
.data-table th.th-center,
.data-table td.td-center {
  text-align: center;
}

/* Cell Truncation, Monospace & Action Utilities */
.cell-truncate {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.cell-truncate-sm {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.cell-truncate-md {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.cell-truncate-lg {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.cell-mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: -0.01em;
}
.cell-wrap {
  min-width: 150px;
  max-width: 280px;
  word-break: break-word;
  line-height: 1.45;
  font-size: 12.5px;
}
.cell-actions {
  text-align: right;
  white-space: nowrap;
}
.cell-actions .btn {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
}
.cell-nowrap {
  white-space: nowrap;
}

/* Admin Governance Tab Navigation */
.admin-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  position: relative;
  z-index: 10;
}

.admin-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  min-height: 40px;
}

.admin-tab-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: var(--primary);
}

.admin-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 16px var(--primary-glow);
}

/* Semantic Admin Registry Table Layout */
.admin-registry-table {
  width: 100%;
  min-width: 1180px;
  table-layout: auto;
  border-collapse: collapse;
}
.admin-registry-table th,
.admin-registry-table td {
  display: table-cell !important;
  vertical-align: middle;
  padding: 12px 14px;
}
.admin-registry-table th {
  white-space: nowrap;
}
.admin-registry-table td.cell-address {
  white-space: normal;
  max-width: 220px;
  min-width: 160px;
  word-break: break-word;
  line-height: 1.4;
}
.admin-registry-table td.cell-email {
  white-space: normal;
  max-width: 180px;
  word-break: break-all;
  line-height: 1.4;
}

/* Protocol Audit Stream */
.audit-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}
.audit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: var(--radius-sm);
  word-break: break-word;
}
@media (max-width: 640px) {
  .audit-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* Modals (Mobile-Contained & Touch-Friendly) */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.active {
  display: flex;
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
  width: min(94vw, 520px);
  padding: 22px 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-box.modal-box-lg,
.modal-box-lg {
  max-width: 860px;
  width: min(95vw, 860px);
}
@media (min-width: 640px) {
  .modal-box {
    padding: 32px;
    border-radius: var(--radius-lg);
  }
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  min-width: 300px;
  animation: slideIn 0.3s ease;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-danger { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--accent); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Stats Components */
.stat-card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
}
@media (min-width: 640px) {
  .stat-card {
    padding: 20px;
  }
}
.stat-label {
  font-size: 11.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.stat-value {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  margin: 4px 0;
  word-break: break-word;
}

/* Price History Graph Widget */
.chart-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.chart-svg {
  width: 100%;
  height: 200px;
  overflow: visible;
}
.chart-line {
  fill: none;
  stroke: url(#chartGradient);
  stroke-width: 3;
  stroke-linecap: round;
}
.chart-area {
  fill: url(#areaGradient);
}
.chart-dot {
  fill: #06b6d4;
  stroke: #060913;
  stroke-width: 2;
  transition: r 0.2s ease;
  cursor: pointer;
}
.chart-dot:hover {
  r: 7;
}

/* Live pulsing indicator for Market Price Chart */
.pulse-live-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
}

.pulse-live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseLive 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulseLive {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-live-dot {
    animation: none !important;
  }
  .chart-dot {
    transition: none !important;
  }
}

/* Zero-State Portfolio */
.empty-portfolio-box {
  text-align: center;
  padding: 56px 24px;
  background: rgba(12, 18, 34, 0.6);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 28px;
}

/* Countdown Clock */
.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Legal & Compliance Typography */
.legal-layout {
  max-width: 900px;
  margin: 0 auto;
}
.legal-header {
  margin-bottom: 36px;
  text-align: center;
}
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  line-height: 1.7;
}
.legal-card h2 {
  font-size: 1.4rem;
  color: #fff;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}
.legal-card h3 {
  font-size: 1.15rem;
  color: var(--accent);
  margin-top: 20px;
  margin-bottom: 8px;
}
.legal-card p, .legal-card ul {
  margin-bottom: 16px;
  color: var(--text-muted);
}
.legal-card ul {
  padding-left: 24px;
}
.legal-card li {
  margin-bottom: 8px;
}
.risk-callout {
  background: rgba(239, 68, 68, 0.08);
  border-left: 4px solid var(--danger);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
}
.security-callout {
  background: rgba(6, 182, 212, 0.08);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
}

/* Admin Audit Activity Stream */
.audit-stream {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.audit-time {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
}

/* Footer */
footer.app-footer {
  background: #04060c;
  border-top: 1px solid var(--border);
  padding: 56px 0 32px 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-column h4 {
  font-size: 14px;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* Mobile Drawer Backdrop & Panel */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 199;
}
.mobile-drawer-backdrop.active {
  display: block;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 86vw);
  height: 100vh;
  background: rgba(10, 15, 29, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--border);
  z-index: 200;
  padding: 20px 16px 36px 16px;
  display: none;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer.open {
  display: flex;
  animation: drawerSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes drawerSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.drawer-close-btn {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}
.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
}
.drawer-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
  padding: 10px 10px 4px 10px;
  margin-top: 6px;
}
.mobile-drawer .nav-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  touch-action: manipulation;
}
.mobile-drawer .nav-link:hover,
.mobile-drawer .nav-link.active {
  background: rgba(6, 182, 212, 0.12);
  color: #fff;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .header-actions { display: none; }
  .mobile-toggle { display: flex; }
  .header-inner { height: 64px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .chart-svg { height: 160px; }
  .toast-container { right: 16px; left: 16px; bottom: 16px; }
  .toast { min-width: auto; width: 100%; }
}
@media (max-width: 480px) {
  .btn-block { width: 100%; }
  .demo-banner { padding: 8px 14px; }
  .demo-controls { gap: 8px; }
  .demo-controls .demo-btn { padding: 4px 8px; font-size: 11px; }
}
@media (max-width: 360px) {
  .brand-name { font-size: 16px; }
  .logo-icon-svg { width: 34px; height: 34px; }
  .container { padding: 0 12px; }
}

/* Selected Price Callout Box */
.price-selected-callout {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.price-selected-callout strong {
  color: var(--accent-cyan);
}

/* User Inspector Detail Modal */
.user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
  font-size: 13px;
}
.user-detail-row {
  background: var(--bg-surface);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.user-detail-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.user-detail-val {
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

/* =============================================================================
   PRINT STYLES FOR TERMS & CONDITIONS AND RISK DISCLOSURE
   ============================================================================= */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.5;
  }
  header, footer, .mobile-toggle, .mobile-drawer, .mobile-drawer-backdrop,
  .btn, .btn-print, .lang-toggle-bar, #header-actions, .simulation-banner,
  .tab-nav, .header-container, #mobile-drawer, #mobile-backdrop {
    display: none !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .legal-layout, .legal-card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: #000000 !important;
  }
  h1, h2, h3, h4 {
    color: #000000 !important;
    page-break-after: avoid;
  }
  p, li, span, td, th {
    color: #111111 !important;
  }
  .legal-section {
    page-break-inside: avoid;
    margin-bottom: 20pt;
  }
  .alert, .risk-callout {
    border: 1px solid #999 !important;
    background: #f8f8f8 !important;
    color: #000000 !important;
  }
}

/* Print Action Button & Language Switcher Bar */
.legal-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.lang-toggle-bar {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}
.lang-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.lang-btn:hover {
  color: #fff;
}
.lang-btn.active {
  background: var(--primary);
  color: #fff;
}
.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-print:hover {
  background: #334155;
  border-color: var(--accent);
}

/* Handwritten-Inspired Reward Table Styles */
.reward-tier-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  margin: 0;
  font-size: 13.5px;
}
.reward-tier-table th {
  background: rgba(12, 18, 34, 0.95);
  padding: 16px 18px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  vertical-align: top;
}
.reward-tier-table th .th-title {
  font-weight: 800;
  font-size: 12.5px;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.reward-tier-table th .th-subtitle {
  font-size: 11.5px;
  color: #38bdf8;
  font-weight: 400;
  margin-top: 4px;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.35;
}
.reward-tier-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}
.reward-tier-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}
.reward-icon-pill {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.reward-icon-cyan {
  background: rgba(8, 51, 68, 0.7);
  border: 1.5px solid rgba(6, 182, 212, 0.5);
  color: #00e5ff;
}
.reward-icon-green {
  background: rgba(6, 78, 59, 0.6);
  border: 1.5px solid #10b981;
  color: #10b981;
}
.reward-icon-amber {
  background: rgba(120, 53, 15, 0.4);
  border: 1.5px solid #f59e0b;
  color: #f59e0b;
}
.reward-icon-orange {
  background: rgba(124, 45, 18, 0.4);
  border: 1.5px solid #f97316;
  color: #f97316;
}
.reward-icon-purple {
  background: rgba(76, 29, 149, 0.4);
  border: 1.5px solid #a855f7;
  color: #a855f7;
}

/* Admin Tabs & Inspector Layout */
.admin-tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.admin-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.admin-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.admin-tab-btn.active {
  background: var(--bg-surface);
  color: var(--accent-cyan);
  border-color: var(--border);
}
.readonly-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(100, 116, 139, 0.15);
  border: 1px solid #475569;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

/* =============================================================================
   REWARDS SECTION: OPERATIONAL PARAMETERS EVALUATION CARDS
   ============================================================================= */
.reward-eval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}
@media (min-width: 1024px) {
  .reward-eval-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.reward-eval-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  position: relative;
  transition: var(--transition);
}
.reward-eval-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.reward-eval-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.reward-eval-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.reward-eval-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 12px;
  min-height: 42px;
}
.reward-eval-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
}
.reward-eval-metric {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.reward-eval-metric-label {
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.reward-eval-metric-val {
  font-weight: 700;
  font-family: var(--font-mono);
}
.reward-eval-footer {
  margin-top: auto;
}

/* Footer Social Channels */
.footer-social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}
.footer-social-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.footer-social-btn.disabled,
.footer-social-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.footer-social-btn .social-icon-svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.footer-social-btn:hover .social-icon-svg {
  transform: scale(1.1);
}

/* Interactive Bézier Chart Floating Tooltip & Crosshair */
.chart-wrapper-interactive {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.chart-crosshair-line {
  stroke: rgba(6, 182, 212, 0.6);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.chart-tooltip-floating {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 16, 32, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(6, 182, 212, 0.25);
  pointer-events: none;
  z-index: 10;
  text-align: center;
  white-space: nowrap;
  transition: all 0.1s ease-out;
}
.chart-tooltip-title {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  margin-bottom: 2px;
}
.chart-tooltip-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Referral Claim Component Styles */
.claim-card-highlight {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.claim-window-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.claim-window-status-pill.open {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.claim-window-status-pill.closed {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.claim-state-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.claim-state-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.claim-state-matured {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.claim-state-claimable {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.claim-state-claimed {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}
.claim-state-expired {
  background: rgba(107, 114, 128, 0.2);
  color: #9ca3af;
}
.claim-state-rejected {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Dual Stream Architecture & Responsive Legal Actions */
.dual-stream-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  border-radius: 12px;
  padding: 24px;
  position: relative;
  box-sizing: border-box;
}

.dual-stream-card .dual-stream-details {
  margin-top: auto;
}

.legal-actions-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

@media (max-width: 640px) {
  .dual-stream-card {
    padding: 20px 16px;
  }
  .legal-actions-group {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  .legal-actions-group .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

