:root {
  --bg-primary: #050811;
  --bg-secondary: #0a0f1d;
  --bg-card: rgba(26, 34, 52, 0.65);
  --bg-card-hover: rgba(31, 42, 64, 0.75);
  --cyan: #00d4ff;
  --cyan-dim: #00bcf2;
  --blue: #2563eb;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --purple: #8b5cf6;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: rgba(0, 212, 255, 0.16);
  --glow: 0 8px 32px 0 rgba(0, 212, 255, 0.12), 0 0 20px rgba(0, 212, 255, 0.18);
  --radius: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Glassmorphism Global Enhancements */
.card, .panel, .modal, .chart-panel, .agent-layout-page aside .panel, .portal-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

html { 
  scroll-behavior: smooth; 
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-primary); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}



/* Subtle Admin Header Sub-Menu */
.admin-nav {
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  z-index: 900;
  backdrop-filter: blur(8px);
}
.admin-nav .container {
  display: flex;
  gap: 24px;
  align-items: center;
}
body.has-admin-nav main,
body.has-admin-nav .hero,
body.has-admin-nav .page-main {
  padding-top: 140px !important;
}
.admin-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.admin-nav a:hover, .admin-nav a.active {
  color: var(--cyan);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  /* Grayscale overrides for header */
  --cyan: #e2e8f0;
  --blue: #64748b;
  --border: rgba(255, 255, 255, 0.15);
  --glow: 0 8px 32px 0 rgba(255, 255, 255, 0.05), 0 0 20px rgba(255, 255, 255, 0.1);
}

.grayscale-theme {
  --cyan: #e2e8f0;
  --blue: #64748b;
  --border: rgba(255, 255, 255, 0.15);
  --glow: 0 8px 32px 0 rgba(255, 255, 255, 0.05), 0 0 20px rgba(255, 255, 255, 0.1);
}

.navbar .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: var(--glow);
}

.logo span { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.08);
}

.nav-cta {
  background: linear-gradient(135deg, var(--cyan), var(--blue)) !important;
  color: var(--bg-primary) !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
}

.nav-cta:hover { opacity: 0.9; color: var(--bg-primary) !important; }

/* Dropdown menu */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
  background: none;
  border: none;
  width: auto;
  text-align: left;
}

.nav-dropdown-btn:hover, .nav-dropdown.open .nav-dropdown-btn {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.08);
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  padding: 8px 0;
  margin-top: 4px;
  backdrop-filter: blur(10px);
}

.nav-dropdown-content a {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  border-radius: 0 !important;
  background: transparent !important;
}

.nav-dropdown-content a:hover {
  background: rgba(0, 212, 255, 0.08) !important;
  color: var(--cyan) !important;
}

.nav-dropdown.open .nav-dropdown-content {
  display: block;
}

@media (max-width: 968px) {
  .nav-dropdown-content {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 20px;
  }
  .nav-dropdown.open .nav-dropdown-content {
    display: block;
  }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
}
.mobile-toggle:hover,
.mobile-toggle:focus-visible {
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyan);
  outline: none;
}
.mobile-toggle[aria-expanded="true"] {
  color: var(--cyan);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero-container-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-canvas-container {
  position: relative;
  width: 100%;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#hero-globe-canvas {
  width: 100%;
  height: 100%;
  max-width: 450px;
  max-height: 450px;
  cursor: grab;
}

#hero-globe-canvas:active {
  cursor: grabbing;
}

@media (max-width: 968px) {
  .hero-container-grid {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 40px;
  }
  .hero-canvas-container {
    height: 300px;
    margin-top: 20px;
  }
  #hero-globe-canvas {
    max-width: 300px;
    max-height: 300px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/assets/1_1.jpg') center/cover no-repeat;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 14, 23, 0.92) 0%, rgba(10, 14, 23, 0.6) 50%, rgba(0, 212, 255, 0.08) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--cyan);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 600px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: var(--bg-primary);
  box-shadow: var(--glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(0, 212, 255, 0.5); color: var(--bg-primary); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-nexus {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
}

.trust-signals {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.trust-signals span::before { content: '✓ '; color: var(--green); }

/* Sections */
section { padding: 100px 0; position: relative; z-index: 1; }

.section-header { text-align: center; margin-bottom: 60px; }

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-header p { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.section-label {
  display: inline-block;
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--text-secondary); font-size: 0.95rem; }

/* Hardware cards */
.hw-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}

.hw-card:hover { border-color: var(--cyan); box-shadow: var(--glow); }

.hw-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hw-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--cyan);
}

.hw-status { font-size: 0.8rem; font-weight: 600; }
.hw-status.available { color: var(--green); }
.hw-status.rented { color: var(--orange); }

.hw-card-body { padding: 24px; }
.hw-card-body h3 { font-size: 1.15rem; margin-bottom: 16px; }

.hw-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.hw-spec { font-size: 0.85rem; }
.hw-spec label { color: var(--text-muted); display: block; font-size: 0.75rem; }
.hw-spec value, .hw-spec span { font-weight: 600; color: var(--text-primary); }

.hw-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.hw-price .amount { font-size: 1.5rem; font-weight: 800; color: var(--cyan); }
.hw-price .nexus { font-size: 0.85rem; color: var(--orange); }

/* Stats dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-value.price {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.stat-value.green { color: var(--green); }
.stat-value.orange { color: var(--orange); }
.stat-value.purple { color: var(--purple); }

.stat-label { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

/* Charts */
.chart-container,
.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.chart-panel-lg {
  margin-top: 40px;
  background: linear-gradient(180deg, rgba(26, 34, 52, 0.95), rgba(17, 24, 39, 0.98));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.chart-container h3,
.chart-panel h3 {
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

.chart-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.chart-panel-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.chart-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 6px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.chart-live-badge.subtle {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.15);
}

.chart-live-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: chart-pulse 2s infinite;
}

@keyframes chart-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chart-canvas {
  width: 100%;
  height: 200px;
  display: block;
}

.chart-canvas-md { height: 240px; }
.chart-canvas-lg { height: 300px; }

.chart-gauge {
  width: 100%;
  height: 120px;
  display: block;
}

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.gauge-grid-wide {
  grid-template-columns: repeat(4, 1fr);
}

.chart-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.chart-kpi {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
}

.chart-kpi-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.chart-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.chart-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .gauge-grid-wide,
  .chart-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .gauge-grid,
  .gauge-grid-wide,
  .chart-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* Portal split — renter vs provider */
.portal-split-section {
  padding: 60px 0;
  background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.04));
}

.portal-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.portal-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: var(--glow);
}

.portal-card.portal-provider {
  border-color: rgba(139, 92, 246, 0.35);
}

.portal-card.portal-provider:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
}

.portal-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--cyan);
  margin-bottom: 16px;
}

.portal-badge.provider {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple, #8b5cf6);
}

.portal-card h2 { margin-bottom: 12px; font-size: 1.6rem; }
.portal-card p { color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }

.portal-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.portal-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.portal-features li::before {
  content: '✓ ';
  color: var(--green);
  font-weight: 700;
}

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

.portal-label.renter { color: var(--cyan); }
.portal-label.provider { color: #8b5cf6; }

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px;
  align-self: center;
  list-style: none;
}

.btn-nav-signin {
  padding: 8px 14px !important;
  border-radius: 8px;
  font-size: 0.85rem !important;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

.btn-nav-signin.provider {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
}

.modal-role-badge {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.modal-role-badge.provider { color: #8b5cf6; }
.modal-subtitle { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin: -12px 0 24px; }
.modal-switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-muted); }
.modal-switch a { color: var(--cyan); }

.sidebar-role {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 12px 16px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-role.provider { color: #8b5cf6; }

.sidebar-renter { border-right: 2px solid rgba(0, 212, 255, 0.2); }
.sidebar-provider { border-right: 2px solid rgba(139, 92, 246, 0.25); }

.wallet-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.wallet-summary .stat-card { padding: 16px; }

.nexus-wallet-card .wallet-summary .stat-value {
  font-size: 1.35rem;
  font-weight: 700;
}

.wallet-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wallet-activity-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.wallet-activity-item:last-child { border-bottom: none; }

.wallet-activity-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.wallet-activity-settlement .wallet-activity-label { color: var(--orange, #f59e0b); }
.wallet-activity-exchange .wallet-activity-label { color: var(--green); }

.provide-step {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.agent-command {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--green);
}

.detection-preview {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.detection-preview .spec-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.detection-preview .spec-row:last-child { border-bottom: none; }
.detection-preview .spec-label { color: var(--text-muted); }
.detection-preview .spec-value { font-weight: 600; }
.detection-preview .status-ready { color: var(--green); font-weight: 600; }
.detection-preview .status-wait { color: var(--orange, #f59e0b); }

/* Provider section */
.provider-section {
  background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.03));
}

.earnings-calc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 500px;
}

.earnings-calc label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem; }

.earnings-calc input[type="range"] {
  width: 100%;
  margin-bottom: 20px;
  accent-color: var(--cyan);
}

.earnings-result {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  text-align: center;
  padding: 20px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--cyan);
  box-shadow: var(--glow);
}

.pricing-card.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cyan);
  color: var(--bg-primary);
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pricing-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.pricing-card .price { font-size: 3rem; font-weight: 900; color: var(--cyan); margin: 20px 0; }
.pricing-card .price span { font-size: 1rem; color: var(--text-muted); }
.pricing-card ul { list-style: none; text-align: left; margin: 24px 0; }
.pricing-card li { padding: 8px 0; color: var(--text-secondary); font-size: 0.9rem; }
.pricing-card li::before { content: '✓ '; color: var(--green); }

/* API Docs section */
#page-docs h3 {
  color: var(--text-primary);
  font-weight: 700;
}

#page-docs .endpoint-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-block {
  background: #111827;
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: var(--radius);
  padding: 24px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.75;
  margin: 20px 0;
  color: #e2e8f0;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 6px;
  color: var(--cyan);
  padding: 4px 8px;
  font-size: 0.75rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.copy-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--cyan);
}

.copy-btn.copied {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--green);
  color: var(--green);
}

.code-block code {
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: inherit;
}

.code-block .comment { color: #94a3b8; }
.code-block .keyword { color: #c4b5fd; font-weight: 600; }
.code-block .string { color: #6ee7b7; }
.code-block .function { color: #7dd3fc; font-weight: 600; }

.endpoint-list { list-style: none; margin: 0; }
.endpoint-list li {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.92rem;
  color: #f1f5f9;
  background: #111827;
}

.endpoint-list li:last-child { border-bottom: none; }
.endpoint-list li:hover { background: #1a2234; }

.method {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 52px;
  text-align: center;
  letter-spacing: 0.03em;
}

.method.get { background: #059669; color: #fff; }
.method.post { background: #2563eb; color: #fff; }
.method.delete { background: #dc2626; color: #fff; }

/* Dashboard page */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 72px);
  margin-top: 72px;
}

.sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 24px 0;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sidebar a:hover, .sidebar a.active {
  color: var(--cyan);
  background: rgba(0, 212, 255, 0.08);
  border-right: 2px solid var(--cyan);
}

.dashboard-main { padding: 32px; }

.gauge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.gauge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.gauge-ring {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 4px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  position: relative;
}

.gauge-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--green);
  transform: rotate(var(--rotation, 0deg));
}

.gauge label { font-size: 0.8rem; color: var(--text-muted); }

/* Login modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

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

.modal {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--glow);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-close:hover {
  color: var(--text-primary);
}

.modal h2 { margin-bottom: 24px; text-align: center; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 0.9rem; }
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
}

.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filters select, .filters input {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 { margin-bottom: 16px; color: var(--text-primary); }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-muted); font-size: 0.9rem; }
.footer a:hover { color: var(--cyan); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.two-col img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Token section */
.token-price {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--cyan);
}

.token-change { color: var(--green); font-weight: 600; }
.token-change.negative { color: var(--red); }

/* Page sections hidden by default for SPA */
.page-main {
  display: block;
  padding-top: 120px;
}

.docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Responsive */
@media (max-width: 968px) {
  .docs-grid { grid-template-columns: 1fr; }

  .navbar {
    padding: 0 12px;
  }

  .navbar .container {
    overflow: visible;
  }

  .nav-links {
    display: none;
    list-style: none;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(16px);
    padding: 12px 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 1001;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > li {
    width: 100%;
  }

  .nav-links a,
  .nav-dropdown-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
  }

  .nav-dropdown {
    display: block;
    width: 100%;
  }

  .nav-dropdown-content {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 0;
    padding: 0 0 0 12px;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .nav-dropdown-content a {
    padding: 12px 16px;
  }

  .mobile-toggle {
    display: block;
  }

  body.nav-open {
    overflow: hidden;
  }

  .two-col { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .portal-split { grid-template-columns: 1fr; }
  .nav-divider { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .hero-buttons { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  
  /* Portrait mobile padding and grid stacking */
  .container {
    padding: 0 16px;
  }
  .hero h1 {
    font-size: 2rem;
    line-height: 1.25;
  }
  .hero p {
    font-size: 1rem;
  }
  .portal-split {
    gap: 20px;
  }
  .portal-card {
    padding: 24px;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filters select, .filters input {
    width: 100%;
  }
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .hero-canvas-container {
    height: 250px;
  }
  #hero-globe-canvas {
    max-width: 250px;
    max-height: 250px;
  }
  .agent-layout {
    grid-template-columns: 1fr !important;
  }
  .agent-sidebar {
    display: none;
  }
  .modal-overlay.active {
    align-items: stretch;
  }
  .modal {
    max-width: none;
    border-radius: 0;
    border: none;
    padding: 32px 24px;
    height: 100vh;
    overflow-y: auto;
  }
}
 / *   C h a t   M a r k d o w n   S t y l e s   * / 
 . c h a t - m a r k d o w n   { 
     f o n t - f a m i l y :   i n h e r i t ; 
     l i n e - h e i g h t :   1 . 6 ; 
 } 
 
 . c h a t - m a r k d o w n   p   { 
     m a r g i n :   0   0   1 2 p x   0 ; 
 } 
 
 . c h a t - m a r k d o w n   p : l a s t - c h i l d   { 
     m a r g i n - b o t t o m :   0 ; 
 } 
 
 . c h a t - m a r k d o w n   h 1 , 
 . c h a t - m a r k d o w n   h 2 , 
 . c h a t - m a r k d o w n   h 3 , 
 . c h a t - m a r k d o w n   h 4 , 
 . c h a t - m a r k d o w n   h 5 , 
 . c h a t - m a r k d o w n   h 6   { 
     m a r g i n :   2 0 p x   0   1 2 p x   0 ; 
     f o n t - w e i g h t :   6 0 0 ; 
     l i n e - h e i g h t :   1 . 2 5 ; 
 } 
 
 . c h a t - m a r k d o w n   h 1   {   f o n t - s i z e :   1 . 5 e m ;   } 
 . c h a t - m a r k d o w n   h 2   {   f o n t - s i z e :   1 . 3 e m ;   } 
 . c h a t - m a r k d o w n   h 3   {   f o n t - s i z e :   1 . 1 e m ;   } 
 
 . c h a t - m a r k d o w n   u l , 
 . c h a t - m a r k d o w n   o l   { 
     m a r g i n :   0   0   1 2 p x   0 ; 
     p a d d i n g - l e f t :   2 4 p x ; 
 } 
 
 . c h a t - m a r k d o w n   l i   { 
     m a r g i n - b o t t o m :   4 p x ; 
 } 
 
 . c h a t - m a r k d o w n   c o d e   { 
     b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 1 ) ; 
     p a d d i n g :   2 p x   6 p x ; 
     b o r d e r - r a d i u s :   4 p x ; 
     f o n t - f a m i l y :   ' F i r a   C o d e ' ,   ' C o n s o l a s ' ,   m o n o s p a c e ; 
     f o n t - s i z e :   0 . 9 e m ; 
 } 
 
 . c h a t - m a r k d o w n   p r e   { 
     b a c k g r o u n d :   # 1 1 1 8 2 7 ; 
     b o r d e r :   1 p x   s o l i d   r g b a ( 0 ,   2 1 2 ,   2 5 5 ,   0 . 3 5 ) ; 
     b o r d e r - r a d i u s :   v a r ( - - r a d i u s ) ; 
     p a d d i n g :   1 6 p x ; 
     m a r g i n :   1 2 p x   0 ; 
     o v e r f l o w - x :   a u t o ; 
     c o l o r :   # e 2 e 8 f 0 ; 
 } 
 
 . c h a t - m a r k d o w n   p r e   c o d e   { 
     b a c k g r o u n d :   t r a n s p a r e n t ; 
     p a d d i n g :   0 ; 
     b o r d e r - r a d i u s :   0 ; 
     f o n t - s i z e :   0 . 9 e m ; 
     c o l o r :   i n h e r i t ; 
 } 
 
 . c h a t - m a r k d o w n   b l o c k q u o t e   { 
     m a r g i n :   1 2 p x   0 ; 
     p a d d i n g :   8 p x   1 6 p x ; 
     b o r d e r - l e f t :   4 p x   s o l i d   v a r ( - - c y a n ) ; 
     b a c k g r o u n d :   r g b a ( 0 ,   2 1 2 ,   2 5 5 ,   0 . 0 5 ) ; 
     c o l o r :   v a r ( - - t e x t - m u t e d ) ; 
 } 
 
 . c h a t - m a r k d o w n   h r   { 
     b o r d e r :   0 ; 
     b o r d e r - t o p :   1 p x   s o l i d   v a r ( - - b o r d e r ) ; 
     m a r g i n :   2 0 p x   0 ; 
 } 
 
 . c h a t - m a r k d o w n   a   { 
     c o l o r :   v a r ( - - c y a n ) ; 
     t e x t - d e c o r a t i o n :   n o n e ; 
 } 
 
 . c h a t - m a r k d o w n   a : h o v e r   { 
     t e x t - d e c o r a t i o n :   u n d e r l i n e ; 
 } 
 
 . c h a t - b u b b l e . u s e r   . c h a t - m a r k d o w n   c o d e   { 
     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 2 ) ; 
 } 
 
 . c h a t - b u b b l e . u s e r   . c h a t - m a r k d o w n   p r e   { 
     b a c k g r o u n d :   r g b a ( 0 ,   0 ,   0 ,   0 . 3 ) ; 
     b o r d e r - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 2 ) ; 
     c o l o r :   # f f f ; 
 } 
 
 . c h a t - b u b b l e . u s e r   . c h a t - m a r k d o w n   b l o c k q u o t e   { 
     b o r d e r - l e f t - c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 5 ) ; 
     b a c k g r o u n d :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 1 ) ; 
     c o l o r :   r g b a ( 2 5 5 ,   2 5 5 ,   2 5 5 ,   0 . 9 ) ; 
 } 
 
 . c h a t - b u b b l e . u s e r   . c h a t - m a r k d o w n   a   { 
     c o l o r :   # f f f ; 
     t e x t - d e c o r a t i o n :   u n d e r l i n e ; 
 } 
  
 