:root {
  --bg-dark: #07080b;
  --bg-card: rgba(14, 16, 24, 0.88);
  --border: rgba(255, 255, 255, 0.08);
  --gold-primary: #d4af37;
  --gold-light: #f5d77f;
  --cyan-primary: #38bdf8;
  --emerald-primary: #10b981;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --font-cinzel: 'Cinzel', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}

.aura-bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 11, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-crest {
  font-size: 1.6rem;
  color: var(--gold-primary);
  text-shadow: 0 0 16px rgba(212, 175, 55, 0.6);
}

.brand-title {
  font-family: var(--font-cinzel);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  display: block;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold-light);
  letter-spacing: 0.06em;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--emerald-primary);
}

.pulse-dot.green {
  width: 8px;
  height: 8px;
  background: var(--emerald-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-primary);
  animation: pulse 2s infinite;
}

.badge-god {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 1rem;
}

.badge-god strong {
  color: var(--gold-light);
}

.main-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.terminal-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.badge-vault {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.hero-heading {
  font-family: var(--font-cinzel);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 40%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.75rem;
}

.hero-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto;
}

.terminal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.head-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.head-title h2 {
  font-family: var(--font-cinzel);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}

.tag-latency {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan-primary);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.tag-ri {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.input-currency-group {
  display: flex;
  gap: 0.75rem;
}

.form-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.form-input.readonly {
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-light);
}

.form-select {
  background: rgba(18, 20, 30, 0.9);
  border: 1px solid var(--border);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
}

.exchange-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0 1.25rem 0;
}

.rate-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan-primary);
}

.icon-swap {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.escrow-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.escrow-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.escrow-status {
  font-family: var(--font-mono);
  color: var(--emerald-primary);
}

.signers-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.signer.active {
  color: var(--emerald-primary);
}

.signer.pending {
  color: var(--text-muted);
}

.btn-execute {
  width: 100%;
  background: linear-gradient(135deg, var(--gold-primary), #b38f24);
  border: none;
  color: #000;
  font-family: var(--font-cinzel);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

.btn-execute:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.45);
}

/* Concierge Chat */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 380px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.5rem;
  margin-bottom: 1rem;
}

.msg {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.msg.bot {
  border-left: 3px solid var(--gold-primary);
}

.msg.user {
  border-right: 3px solid var(--cyan-primary);
  background: rgba(56, 189, 248, 0.05);
}

.msg-author {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
}

.msg.user .msg-author {
  color: var(--cyan-primary);
}

.msg-content {
  font-size: 0.88rem;
  color: #e5e7eb;
  line-height: 1.6;
}

.chat-input-row {
  display: flex;
  gap: 0.75rem;
}

.chat-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  outline: none;
  font-size: 0.9rem;
}

.chat-input:focus {
  border-color: var(--gold-primary);
}

.btn-send {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-send:hover {
  background: var(--gold-primary);
  color: #000;
}

.quick-prompts {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prompt-chip:hover {
  border-color: var(--gold-primary);
  color: #fff;
}

/* Telemetry Table */
.telemetry-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.section-title-sm {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold-primary);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

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

.telemetry-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.telemetry-table td {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.telemetry-table code {
  font-family: var(--font-mono);
  color: var(--cyan-primary);
}

.badge-status.cleared {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.footer {
  text-align: center;
  padding: 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-sub {
  color: var(--gold-primary);
  margin-top: 0.5rem;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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