:root {
  --bg-base: #09090b;
  --bg-panel: #18181b;
  --bg-input: #0c0c0e;
  --border: #27272a;
  --text-main: #f8fafc;
  --text-muted: #a1a1aa;
  --primary: #fbbf24; /* Gold refined */
  --success: #10b981;
  --danger: #ef4444;
  --radius: 16px;
  --font: 'Inter', sans-serif;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

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

html {
  min-height: 100%;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.05), transparent 30%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05), transparent 30%);
  background-attachment: fixed;
}

button, input, select, textarea {
  font: inherit;
  border: none;
  outline: none;
}

a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

.dashboard-page {
  padding: 32px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header & Topbar */
.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 12px 24px;
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 99px;
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.dashboard-ball {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.dashboard-nav { display: flex; gap: 8px; }
.dashboard-nav a {
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.dashboard-nav a.is-active {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border);
}

/* Layout Grid */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-bottom: 24px;
}

.welcome-card, .profile-card, .stat-card, .history-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.welcome-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.welcome-card::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.08), transparent 70%);
  z-index: 0;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.welcome-card h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.welcome-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 24px;
}

.quick-actions { display: flex; gap: 12px; position: relative; z-index: 1; }

.action-button {
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}
.action-button:active { transform: scale(0.98); }

.action-button--deposit {
  background: var(--primary);
  color: #000;
}
.action-button--withdraw {
  background: var(--bg-base);
  color: var(--text-main);
  border: 1px solid var(--border);
}

/* Profile Card */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), #d97706);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #000;
  margin-bottom: 16px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.profile-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.profile-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

.profile-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.profile-list div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.profile-list span { color: var(--text-muted); }
.profile-list strong { color: var(--text-main); font-weight: 600; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.stat-card strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  margin: 4px 0;
}

.stat-card small {
  font-size: 11px;
  color: var(--text-muted);
}

/* History Card */
.history-card {
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-head a {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.history-item strong { font-size: 14px; font-weight: 600; }
.history-item span { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.status-pill {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.status-pill--success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-pill--pending { background: rgba(251, 191, 36, 0.1); color: var(--primary); }

/* Account Operations Grid */
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.account-form { display: grid; gap: 16px; }
.account-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.account-form input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 12px;
  transition: border-color 0.2s;
}
.account-form input:focus { border-color: var(--primary); }

.account-feedback { font-size: 12px; color: var(--text-muted); }

/* PIX Result */
.pix-result {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
}

.pix-result img {
  width: 100px; height: 100px;
  background: #fff;
  border-radius: 8px;
}

.pix-result__content { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pix-result__content textarea {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  color: var(--text-muted);
  font-size: 11px;
  resize: none;
  height: 60px;
}

/* Modal */
.dashboard-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  z-index: 1000;
  padding: 20px;
}

.dashboard-modal-backdrop[hidden] {
  display: none !important;
}
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
}

.dashboard-modal__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}

.dashboard-modal__head h2 { font-size: 20px; font-weight: 800; }
.dashboard-modal__close {
  font-size: 24px;
  color: var(--text-muted);
  background: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-hero { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dashboard-topbar { flex-direction: column; border-radius: 24px; gap: 16px; padding: 20px; }
  .dashboard-nav { width: 100%; justify-content: center; }
  .stats-grid { grid-template-columns: 1fr; }
  .welcome-card h1 { font-size: 32px; }
}
