/* ═══════════════════════════════════════════════
   app.incomesolana.com - SPA Styles
   Theme: Beige / Black - Luxury Editorial Brutalism
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,600;1,400&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

:root {
  --beige:       #e8e0d0;
  --beige-light: #f2ece0;
  --beige-dark:  #c8bfad;
  --cream:       #faf6ef;
  --black:       #0c0b09;
  --ink:         #1a1814;
  --charcoal:    #2e2b26;
  --mid:         #3d3a33;
  --muted:       #7a7468;
  --gold:        #c4a862;
  --gold-dim:    #8a7240;

  --font-display: 'Rajdhani', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;
  --font-body:    'DM Sans', sans-serif;

  --transition: 0.25s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--beige);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: default;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.6;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }

.app-gold { color: var(--gold) !important; }
.app-green { color: #4ade80 !important; }
.app-red { color: #ef4444 !important; }

/* ── Scanlines ── */
.app-scanlines {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
}

/* ══════════════════════════════════════
   TOP BAR
══════════════════════════════════════ */
.app-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: 32px;
  background: #060604; border-bottom: 1px solid rgba(196,168,98,0.08);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 0 20px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
}
.app-top b { color: var(--beige); font-weight: 600; }
.app-dot-live {
  width: 5px; height: 5px; border-radius: 50%;
  background: #27c93f; box-shadow: 0 0 6px #27c93f;
  animation: appPulse 2s infinite;
}
.app-sep { width: 1px; height: 10px; background: rgba(196,168,98,0.12); }
@keyframes appPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.app-wallet-btn {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px;
  text-transform: uppercase; background: var(--gold); color: var(--black);
  border: none; padding: 5px 16px; cursor: pointer; font-weight: 700;
  transition: all var(--transition);
}
.app-wallet-btn:hover { background: var(--beige); }
.app-wallet-btn.connected {
  background: rgba(196,168,98,0.15); color: var(--gold); border: 1px solid rgba(196,168,98,0.2);
}

/* ══════════════════════════════════════
   LAYOUT
══════════════════════════════════════ */
.app-layout {
  display: grid; grid-template-columns: 200px 1fr;
  min-height: 100vh; padding-top: 32px;
}

/* ── SIDEBAR ── */
.app-sidebar {
  background: #060604; border-right: 1px solid rgba(196,168,98,0.06);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 32px; height: calc(100vh - 32px); overflow-y: auto;
}
.app-sidebar::-webkit-scrollbar { width: 0; }

.app-logo {
  font-family: var(--font-display); font-size: 22px; font-weight: 900;
  color: var(--beige); text-decoration: none; margin-bottom: 12px; letter-spacing: 1px;
}
.app-logo-t { color: var(--gold); }

/* Wallet card */
.app-wallet-card {
  background: rgba(196,168,98,0.04); border: 1px solid rgba(196,168,98,0.1);
  padding: 12px; margin-bottom: 16px;
}
.app-wc-addr {
  font-family: var(--font-mono); font-size: 10px; color: var(--gold);
  letter-spacing: 1px; margin-bottom: 8px; text-align: center;
}
.app-wc-row {
  display: flex; justify-content: space-between; padding: 3px 0;
  font-family: var(--font-mono); font-size: 9px;
  border-bottom: 1px solid rgba(196,168,98,0.04);
}
.app-wc-row span { color: var(--muted); }
.app-wc-row b { color: var(--beige); font-weight: 600; }

/* Nav */
.app-nav-label {
  font-family: var(--font-mono); font-size: 7px; letter-spacing: 2px;
  color: var(--gold); text-transform: uppercase; margin: 14px 0 6px; opacity: 0.6;
}

.app-nav-link {
  display: block; padding: 8px 12px; text-decoration: none;
  font-family: var(--font-mono); font-size: 11px; color: var(--beige-dark);
  border-left: 2px solid transparent; transition: all 0.12s;
}
.app-nav-link:hover { color: var(--gold); border-left-color: var(--gold); background: rgba(196,168,98,0.03); }
.app-nav-link.active { color: var(--gold); border-left-color: var(--gold); background: rgba(196,168,98,0.04); }
.app-nav-ext { color: var(--muted); font-size: 9px; }

/* Streams */
.app-stream {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px;
  font-family: var(--font-mono); font-size: 9px; color: var(--beige-dark);
}
.app-sd { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.app-sd-on { background: #27c93f; box-shadow: 0 0 4px #27c93f; }
.app-sd-test { background: var(--gold); box-shadow: 0 0 4px var(--gold); }
.app-sd-soon { background: #3a3830; }

/* ── MAIN CONTENT ── */
.app-main {
  padding: 24px 32px; overflow-y: auto; height: calc(100vh - 32px);
}

/* ── MOBILE NAV ── */
.app-mob-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #060604; border-top: 1px solid rgba(196,168,98,0.1);
}
.app-mob-nav a {
  display: inline-block; width: 25%; padding: 12px; text-align: center; text-decoration: none;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted); transition: color 0.12s;
}
.app-mob-nav a:hover, .app-mob-nav a.active { color: var(--gold); }

/* ══════════════════════════════════════
   SHARED VIEW COMPONENTS
══════════════════════════════════════ */

/* Section label / title */
.v-label {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 5px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px;
}
.v-label::after {
  content: ''; flex: 1; max-width: 56px; height: 1px;
  background: var(--gold); opacity: 0.35;
}

.v-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(36px, 5vw, 56px); line-height: 0.95;
  color: var(--beige-light); margin-bottom: 32px;
}
.v-title .gold { color: var(--gold); font-style: italic; }

/* Block / Card */
.v-block {
  background: #0b0b09; border: 1px solid rgba(196,168,98,0.08); margin-bottom: 20px;
}
.v-block-head {
  padding: 12px 16px; border-bottom: 1px solid rgba(196,168,98,0.06);
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 3px;
  color: var(--gold); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}

/* Grid of stat boxes */
.v-stat-grid {
  display: grid; gap: 1px; background: rgba(196,168,98,0.04);
}
.v-stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.v-stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.v-stat-grid-2 { grid-template-columns: repeat(2, 1fr); }

.v-stat {
  background: #0b0b09; padding: 14px 16px;
}
.v-stat span {
  display: block; font-family: var(--font-mono); font-size: 7px;
  letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin-bottom: 4px;
}
.v-stat b {
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--beige);
}
.v-stat b.gold { color: var(--gold); }

/* Key-Value rows */
.v-kv {
  display: flex; justify-content: space-between; padding: 8px 16px;
  border-bottom: 1px solid rgba(196,168,98,0.03);
  font-family: var(--font-mono); font-size: 11px;
}
.v-kv span { color: var(--muted); }
.v-kv b { color: var(--beige); font-weight: 600; }

/* Badges */
.v-badge {
  font-family: var(--font-mono); font-size: 7px; letter-spacing: 1.5px;
  padding: 2px 8px; font-weight: 700; display: inline-block;
}
.v-badge-active { background: rgba(39,201,63,0.15); color: #27c93f; }
.v-badge-test { background: rgba(196,168,98,0.1); color: var(--gold); }
.v-badge-soon { background: rgba(129,140,248,0.08); color: #818cf8; }
.v-badge-off { background: rgba(122,116,104,0.1); color: var(--muted); }

/* Buttons */
.v-btn {
  display: inline-block; padding: 14px 32px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px;
  text-transform: uppercase; font-weight: 600; cursor: pointer;
  transition: all var(--transition); border: none; text-decoration: none;
  text-align: center;
}
.v-btn-primary {
  background: var(--beige); color: var(--black); border: 1px solid var(--beige);
}
.v-btn-primary:hover { background: var(--gold); border-color: var(--gold); }
.v-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.v-btn-secondary {
  background: transparent; color: var(--gold);
  border: 1px solid rgba(196,168,98,0.3);
}
.v-btn-secondary:hover { border-color: var(--gold); background: rgba(196,168,98,0.06); }

.v-btn-full { width: 100%; display: block; }

/* Inputs */
.v-input-wrap {
  border: 1px solid rgba(196,168,98,0.2); background: rgba(196,168,98,0.03);
  transition: all 0.15s;
}
.v-input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 16px rgba(196,168,98,0.06); }
.v-input-wrap input {
  width: 100%; background: transparent; border: none; color: var(--gold);
  font-family: var(--font-mono); font-size: 18px; font-weight: 700;
  padding: 14px 16px; outline: none; letter-spacing: 1px;
}
.v-input-wrap input::placeholder { color: rgba(196,168,98,0.2); font-weight: 400; font-size: 12px; }

.v-input-row {
  display: flex; gap: 8px; align-items: stretch;
}
.v-input-row .v-input-wrap { flex: 1; }
.v-input-max {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px;
  padding: 0 14px; background: rgba(196,168,98,0.06);
  border: 1px solid rgba(196,168,98,0.1); color: var(--gold); cursor: pointer;
  transition: all 0.12s; display: flex; align-items: center;
}
.v-input-max:hover { background: rgba(196,168,98,0.12); border-color: var(--gold); }

/* Status line */
.v-status {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px;
  color: var(--gold); padding: 8px 0; min-height: 28px;
}
.v-status.error { color: #ef4444; }

.v-tx-link a {
  color: #22c55e; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 1px; text-decoration: none;
}
.v-tx-link a:hover { text-decoration: underline; }

/* Two-column layout within a view */
.v-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Card grid */
.v-card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px; background: rgba(196,168,98,0.04); border: 1px solid rgba(196,168,98,0.04);
}
.v-card {
  background: #0b0b09; padding: 28px 24px; transition: background var(--transition);
}
.v-card:hover { background: var(--charcoal); }
.v-card-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--beige-light); margin-bottom: 12px;
}
.v-card-desc {
  font-family: var(--font-body); font-size: 14px; color: var(--muted);
  line-height: 1.8; font-weight: 300;
}

/* Earn card variant */
.v-earn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(196,168,98,0.04); }
.v-earn-card { background: #0b0b09; padding: 20px; display: flex; flex-direction: column; }
.v-earn-card-glow { border-left: 3px solid var(--gold); background: linear-gradient(135deg, rgba(196,168,98,0.04), #0b0b09); }
.v-earn-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.v-earn-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--beige); }
.v-earn-reward {
  margin-top: auto; padding: 8px 12px; text-align: center;
  background: rgba(196,168,98,0.06); border: 1px solid rgba(196,168,98,0.12);
  font-family: var(--font-mono); font-size: 10px; color: var(--gold);
}

/* Connect overlay */
.v-connect-overlay {
  position: absolute; inset: 0; background: rgba(12,11,9,0.85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); z-index: 10;
}
.v-connect-prompt {
  text-align: center; padding: 40px;
}
.v-connect-prompt p {
  font-family: var(--font-body); font-size: 16px; color: var(--muted);
  margin-bottom: 24px; line-height: 1.7;
}

/* Toast */
.app-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9000;
  background: var(--ink); border: 1px solid rgba(196,168,98,0.2);
  border-left: 3px solid var(--gold); padding: 14px 40px 14px 16px;
  min-width: 240px; max-width: 400px;
  opacity: 0; transform: translateX(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.app-toast.visible { opacity: 1; transform: translateX(0); pointer-events: auto; }
.app-toast-msg {
  font-family: var(--font-mono); font-size: 11px; color: var(--beige); letter-spacing: 0.5px;
}
.app-toast-close {
  position: absolute; top: 8px; right: 10px; background: none; border: none;
  color: var(--muted); font-size: 16px; cursor: pointer; padding: 2px;
}

/* Burn popup / modal */
.v-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9500;
  background: rgba(12,11,9,0.8); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.v-modal-overlay.active { display: flex; }
.v-modal {
  background: var(--ink); border: 1px solid rgba(196,168,98,0.2);
  padding: 40px; max-width: 480px; width: 90%; text-align: center; position: relative;
}
.v-modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  color: var(--muted); font-size: 20px; cursor: pointer;
}
.v-modal-title {
  font-family: var(--font-display); font-weight: 700; font-size: 28px;
  color: var(--gold); margin-bottom: 16px;
}
.v-modal-amount {
  font-family: var(--font-display); font-weight: 700; font-size: 42px;
  color: var(--beige-light); margin-bottom: 8px;
}
.v-modal-burn {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
  color: #ef4444; margin-bottom: 6px;
}
.v-modal-irl {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
  color: #818cf8; margin-bottom: 16px;
}
.v-modal-links a {
  color: #22c55e; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 1px; text-decoration: none; margin: 0 8px;
}

/* TX Table */
.v-tx-filters { display: flex; gap: 1px; }
.v-txf {
  flex: 1; padding: 8px; text-align: center;
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--muted); background: rgba(196,168,98,0.02);
  border: none; cursor: pointer; transition: all 0.12s;
}
.v-txf:hover { color: var(--beige); }
.v-txf.active { color: var(--gold); background: rgba(196,168,98,0.06); }

.v-tx-head {
  display: grid; grid-template-columns: 60px 1fr 80px 60px 50px;
  gap: 6px; padding: 8px 12px;
  font-family: var(--font-mono); font-size: 7px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid rgba(196,168,98,0.06);
}
.v-tx-list { max-height: 400px; overflow-y: auto; }
.v-tx-row {
  display: grid; grid-template-columns: 60px 1fr 80px 60px 50px;
  gap: 6px; padding: 8px 12px; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  border-bottom: 1px solid rgba(196,168,98,0.02);
  transition: background 0.1s;
}
.v-tx-row:hover { background: rgba(196,168,98,0.02); }
.v-tx-type { font-size: 7px; letter-spacing: 1px; font-weight: 700; text-transform: uppercase; }
.v-tx-type-burn { color: #ef4444; }
.v-tx-type-stake { color: var(--gold); }
.v-tx-type-revenue { color: #4ade80; }
.v-tx-type-reward { color: #818cf8; }
.v-tx-event { color: var(--beige-dark); }
.v-tx-event small { display: block; font-size: 8px; color: var(--muted); }
.v-tx-amt { color: var(--beige); font-weight: 500; }
.v-tx-link a { color: var(--muted); text-decoration: none; font-size: 8px; }
.v-tx-link a:hover { color: var(--gold); }
.v-tx-time { color: var(--muted); font-size: 9px; }
.v-tx-empty { padding: 24px; text-align: center; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

/* Node-specific */
.v-node-status {
  display: flex; align-items: center; gap: 10px; padding: 16px;
  background: rgba(196,168,98,0.04); border: 1px solid rgba(196,168,98,0.1);
  margin-bottom: 20px;
}
.v-node-dot { width: 10px; height: 10px; border-radius: 50%; }
.v-node-dot-active { background: #27c93f; box-shadow: 0 0 8px #27c93f; }
.v-node-dot-inactive { background: #ef4444; }
.v-node-dot-none { background: var(--muted); }
.v-node-status-text {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--beige);
}

/* Pre-flight check list */
.v-check-list { padding: 16px; }
.v-check-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid rgba(196,168,98,0.04);
  font-family: var(--font-mono); font-size: 12px; color: var(--beige-dark);
}
.v-check-icon { font-size: 16px; width: 24px; text-align: center; }
.v-check-pass { color: #27c93f; }
.v-check-fail { color: #ef4444; }
.v-check-wait { color: var(--muted); }

/* Animations */
@keyframes valFlash { 0% { color: #22c55e; text-shadow: 0 0 8px rgba(34,197,94,0.5); } 100% { text-shadow: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.v-fade-in { animation: fadeIn 0.4s ease both; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 960px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .app-mob-nav { display: flex; }
  body { padding-bottom: 46px; }
  .app-main { height: auto; min-height: calc(100vh - 32px - 46px); }
  .v-cols { grid-template-columns: 1fr; }
  .v-stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .v-earn-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app-top { font-size: 7px; gap: 8px; padding: 0 10px; }
  .app-main { padding: 16px; }
  .v-stat-grid-3 { grid-template-columns: 1fr 1fr; }
  .v-input-row { flex-direction: column; }
  .app-toast { left: 12px; right: 12px; max-width: none; min-width: 0; bottom: 56px; }
}
