/* Dashboard-specific styles — uses tokens from theme.css */

/* ===== NAV ===== */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--fg); }
.nav-brand .accent { color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-link { text-decoration: none; color: var(--fg-muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--fg); }
.nav-link.active { color: var(--accent); }

/* ===== LAYOUT ===== */
.dash-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ===== CHAIN BAR ===== */
.chain-bar {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
}
.chain-bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.chain-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 18px;
}
.chain-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: blink 2s ease-in-out infinite;
}
.zcash-dot  { background: var(--zcash-color);  box-shadow: 0 0 8px var(--zcash-color); }
.solana-dot { background: var(--solana-color); box-shadow: 0 0 8px var(--solana-color); }
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.chain-chip-name {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
}
.chain-chip-block {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg);
}
.chain-chip-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bridge-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.arrow-line {
  width: 80px;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}
.arrow-pulse {
  position: absolute;
  top: -1px;
  left: -24px;
  width: 24px; height: 4px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent);
  animation: slide-pulse 2.4s ease-in-out infinite;
}
.arrow-pulse.delay1 { animation-delay: 0.8s; }
.arrow-pulse.delay2 { animation-delay: 1.6s; }
@keyframes slide-pulse {
  0%   { left: -24px; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
.arrow-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== STATS ===== */
.stats-row {}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: rgba(255,255,255,0.12); }
.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.accent-color  { color: var(--accent) !important; }
.orchid-color  { color: var(--orchid-color) !important; }
.zcash-color   { color: var(--zcash-color) !important; }
.solana-color  { color: var(--solana-color) !important; }

/* ===== ZK PROOF FLOW ===== */
.proof-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--orchid-color);
  background: rgba(95,69,186,0.12);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.08em;
}

.proof-flow {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 4px;
}
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  min-width: 120px;
  text-align: center;
  flex-shrink: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.flow-step:hover { border-color: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.flow-icon { font-size: 1.4rem; }
.flow-label { font-size: 0.85rem; font-weight: 600; }
.flow-sub { font-size: 0.7rem; color: var(--fg-muted); font-family: var(--font-mono); }

.flow-arrow {
  color: var(--fg-muted);
  font-size: 1.2rem;
  padding: 0 8px;
  flex-shrink: 0;
}

/* ===== BOTTOM GRID ===== */
.bottom-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

/* ===== BRIDGE FORM ===== */
.bridge-form-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.bridge-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label { font-size: 0.82rem; color: var(--fg-muted); font-weight: 500; }
.form-input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 14px;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--fg-muted); }
.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 0.82rem;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.form-feedback {
  font-size: 0.85rem;
  line-height: 1.5;
  border-radius: 6px;
  padding: 0;
}
.form-feedback:not(:empty) { padding: 10px 14px; }
.feedback-ok  { background: rgba(0,255,163,0.08); color: var(--accent); border: 1px solid rgba(0,255,163,0.2); }
.feedback-err { background: rgba(255,80,80,0.08); color: #ff6b6b; border: 1px solid rgba(255,80,80,0.2); }

/* ===== TX LIST ===== */
.tx-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.tx-list { display: flex; flex-direction: column; gap: 8px; }
.tx-loading, .tx-empty {
  font-size: 0.88rem;
  color: var(--fg-muted);
  padding: 24px 0;
  text-align: center;
}
.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
  transition: border-color 0.2s;
}
.tx-row:hover { border-color: rgba(255,255,255,0.1); }
.tx-meta { display: flex; flex-direction: column; gap: 2px; min-width: 48px; }
.tx-id { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }
.tx-age { font-size: 0.7rem; color: var(--fg-muted); }
.tx-addrs {
  display: flex; align-items: center; gap: 8px;
  flex: 1; overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.tx-sep { color: var(--fg-muted); }
.tx-right { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; min-width: 80px; }
.tx-amount { font-family: var(--font-mono); font-size: 0.82rem; color: var(--fg); }
.tx-status {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}
.status-pending   { background: rgba(0,255,163,0.1);   color: var(--accent); }
.status-proving   { background: rgba(95,69,186,0.15);  color: var(--orchid-color); }
.status-completed { background: rgba(20,241,149,0.12); color: var(--solana-color); }
.status-failed    { background: rgba(255,80,80,0.1);   color: #ff6b6b; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .bottom-grid { grid-template-columns: 1fr; }
  .topnav-inner { padding: 0 20px; }
  .dash-main { padding: 20px; }
}
@media (max-width: 600px) {
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .chain-bar-inner { gap: 12px; }
  .bridge-arrow { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
