/* ============================================================
   CRIPTOBR - CSS Global v4.0 | Mobile-First | Full Responsive
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Palette */
  --dark-bg:      #050b18;
  --dark-surface: #0a1628;
  --dark-card:    #0f1f3d;
  --dark-border:  #1a3060;
  --dark-hover:   #162545;

  /* Gold */
  --gold:         #f5c842;
  --gold-dark:    #d4a017;
  --gold-light:   #fde68a;
  --gold-glow:    rgba(245,200,66,.25);

  /* Accent */
  --blue:         #3b82f6;
  --blue-dark:    #1d4ed8;
  --green:        #22c55e;
  --green-dark:   #15803d;
  --red:          #ef4444;
  --red-dark:     #b91c1c;
  --purple:       #a855f7;
  --orange:       #f97316;

  /* Text */
  --text-primary:   #f0f4ff;
  --text-secondary: #8fa3c8;
  --text-muted:     #4a6490;

  /* Spacing */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.6);
  --shadow-gold:0 4px 24px rgba(245,200,66,.2);

  /* Transitions */
  --transition: all .25s ease;
  --transition-fast: all .15s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Typography --- */
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 600; }
p  { font-size: clamp(.875rem, 2vw, 1rem); }
small { font-size: .8rem; }

a { color: var(--gold); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; display: block; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark-bg); }
::-webkit-scrollbar-thumb { background: var(--dark-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem;   } }

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: rgba(10, 22, 40, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dark-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: .75rem 0;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}
.navbar-brand .brand-text {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.navbar-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.navbar-menu a {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  white-space: nowrap;
}
.navbar-menu a:hover,
.navbar-menu a.active {
  background: var(--dark-hover);
  color: var(--gold);
}
.navbar-menu a i { font-size: .9rem; }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--dark-border);
  color: var(--text-primary);
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}
.navbar-mobile-menu {
  display: none;
  background: var(--dark-surface);
  border-bottom: 1px solid var(--dark-border);
  padding: .75rem 0;
}
.navbar-mobile-menu.open { display: block; }
.navbar-mobile-menu a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.5rem;
  color: var(--text-secondary);
  font-size: .9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition-fast);
}
.navbar-mobile-menu a:hover,
.navbar-mobile-menu a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: var(--dark-hover);
}

@media (max-width: 768px) {
  .navbar-menu { display: none; }
  .navbar-toggle { display: flex; align-items: center; justify-content: center; }
}

/* ============================================================
   AUTH PAGES (login / register)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-bg);
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1rem;
}

/* Animated background */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(245,200,66,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 70%, rgba(59,130,246,.05) 0%, transparent 60%);
  pointer-events: none;
}

.auth-card {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
}
.auth-logo img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}
.auth-logo .logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-title h2 { color: var(--text-primary); margin-bottom: .35rem; }
.auth-title p  { color: var(--text-secondary); font-size: .9rem; }

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.75rem;
}
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  background: var(--dark-card);
  border: 2px solid var(--dark-border);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}
.step-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--dark-bg);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.step-dot.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--dark-border);
  max-width: 60px;
  transition: var(--transition);
}
.step-line.done { background: var(--green); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .4rem;
}
.form-control {
  width: 100%;
  background: var(--dark-card);
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: .95rem;
  padding: .7rem 1rem;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.is-invalid { border-color: var(--red); }
.form-control.is-valid   { border-color: var(--green); }

.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
}
.input-group .form-control { flex: 1; }
.input-group .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .9rem;
  pointer-events: none;
}
.input-group.has-icon .form-control { padding-left: 2.75rem; }
.input-group .input-action {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: .2rem;
  font-size: .9rem;
  transition: var(--transition-fast);
}
.input-group .input-action:hover { color: var(--gold); }

.form-select {
  width: 100%;
  background: var(--dark-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fa3c8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 1rem center;
  border: 1.5px solid var(--dark-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: .95rem;
  padding: .7rem 2.5rem .7rem 1rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: var(--transition);
}
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-select option { background: var(--dark-card); }

.form-text {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .3rem;
}
.form-error {
  font-size: .8rem;
  color: var(--red);
  margin-top: .3rem;
  display: none;
}
.form-error.show { display: block; }

/* OTP / Code Input */
.otp-group {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin: 1rem 0;
}
.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--dark-card);
  border: 2px solid var(--dark-border);
  border-radius: var(--radius-md);
  color: var(--gold);
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
}
.otp-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
@media (max-width: 360px) {
  .otp-input { width: 38px; height: 46px; font-size: 1.1rem; }
  .otp-group { gap: .3rem; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-sm  { padding: .45rem .9rem; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-lg  { padding: .9rem 1.8rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl  { padding: 1rem 2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--dark-bg);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 28px rgba(245,200,66,.35); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--dark-border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--dark-hover); color: var(--text-primary); }

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: var(--red-dark); }

.btn-success {
  background: var(--green);
  color: #fff;
}
.btn-success:hover { background: var(--green-dark); }

.btn-blue {
  background: var(--blue);
  color: #fff;
}
.btn-blue:hover { background: var(--blue-dark); }

/* Loading spinner inside button */
.btn .spinner { display: none; }
.btn.loading .btn-text { display: none; }
.btn.loading .spinner { display: inline-block; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: var(--transition);
}
.card:hover { border-color: rgba(245,200,66,.3); }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--dark-border);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-title i { color: var(--gold); }

/* Stat Cards */
.stat-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
  cursor: default;
}
.stat-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-icon.gold   { background: rgba(245,200,66,.15); color: var(--gold); }
.stat-icon.blue   { background: rgba(59,130,246,.15);  color: var(--blue); }
.stat-icon.green  { background: rgba(34,197,94,.15);   color: var(--green); }
.stat-icon.red    { background: rgba(239,68,68,.15);   color: var(--red); }
.stat-icon.purple { background: rgba(168,85,247,.15);  color: var(--purple); }
.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-change { font-size: .75rem; margin-top: .15rem; }
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red);   }

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.grid {
  display: grid;
  gap: 1rem;
}
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Auto-fit grids */
.grid-auto-fill-200 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-auto-fill-280 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-fill-300 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.main-content {
  flex: 1;
  padding: 1.25rem 0 2rem;
}

.page-header {
  margin-bottom: 1.5rem;
}
.page-header h1 { color: var(--text-primary); margin-bottom: .25rem; }
.page-header p  { color: var(--text-secondary); font-size: .9rem; }

/* Balance Hero */
.balance-hero {
  background: linear-gradient(135deg, var(--dark-card) 0%, #0d1e3f 100%);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 4vw, 2rem);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.balance-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,200,66,.08) 0%, transparent 70%);
  pointer-events: none;
}
.balance-hero-content { position: relative; z-index: 1; }
.balance-label { font-size: .85rem; color: var(--text-muted); margin-bottom: .4rem; display: flex; align-items: center; gap: .4rem; }
.balance-amount {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: .5rem;
}
.balance-btc { font-size: .9rem; color: var(--text-secondary); margin-bottom: 1rem; }
.balance-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Crypto Price Ticker */
.price-ticker {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.price-ticker::-webkit-scrollbar { display: none; }
.ticker-item {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  min-width: 160px;
  transition: var(--transition-fast);
}
.ticker-item:hover { border-color: var(--gold); }
.ticker-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
}
.ticker-icon.btc  { background: rgba(247,147,26,.15); color: #f7931a; }
.ticker-icon.eth  { background: rgba(98,126,234,.15);  color: #627eea; }
.ticker-icon.ltc  { background: rgba(191,191,191,.15); color: #bfbfbf; }
.ticker-symbol { font-size: .75rem; color: var(--text-muted); }
.ticker-price  { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.ticker-change { font-size: .75rem; }
.ticker-change.up   { color: var(--green); }
.ticker-change.down { color: var(--red);   }

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.action-btn {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1rem .75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
}
.action-btn:hover {
  border-color: var(--gold);
  background: var(--dark-hover);
  color: var(--gold);
  transform: translateY(-2px);
}
.action-btn i { font-size: 1.4rem; }
.action-btn span { font-size: .8rem; font-weight: 600; text-align: center; }

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th {
  background: var(--dark-surface);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--dark-border);
  white-space: nowrap;
}
.table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(26,48,96,.5);
  color: var(--text-primary);
  vertical-align: middle;
}
.table tr:hover td { background: var(--dark-hover); }
.table tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES & STATUS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-gold    { background: rgba(245,200,66,.15); color: var(--gold); border: 1px solid rgba(245,200,66,.3); }
.badge-green   { background: rgba(34,197,94,.15);  color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.badge-red     { background: rgba(239,68,68,.15);  color: var(--red);  border: 1px solid rgba(239,68,68,.3); }
.badge-blue    { background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid rgba(59,130,246,.3); }
.badge-purple  { background: rgba(168,85,247,.15); color: var(--purple); border: 1px solid rgba(168,85,247,.3); }
.badge-muted   { background: rgba(74,100,144,.15); color: var(--text-muted); border: 1px solid rgba(74,100,144,.3); }

/* ============================================================
   ALERTS & TOASTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: .875rem;
  margin-bottom: 1rem;
}
.alert i { font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }
.alert-warning { background: rgba(245,200,66,.1);  border: 1px solid rgba(245,200,66,.3); color: var(--gold-light); }
.alert-danger  { background: rgba(239,68,68,.1);   border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.1);   border: 1px solid rgba(34,197,94,.3);  color: #86efac; }
.alert-info    { background: rgba(59,130,246,.1);  border: 1px solid rgba(59,130,246,.3); color: #93c5fd; }

/* Toast notification */
#toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: calc(100vw - 2.5rem);
}
.toast {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: .85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: var(--shadow-lg);
  animation: slideInRight .3s ease;
  min-width: 280px;
  max-width: 380px;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red);   }
.toast.warning { border-left: 4px solid var(--gold);  }
.toast.info    { border-left: 4px solid var(--blue);  }
.toast i { font-size: 1.1rem; flex-shrink: 0; }
.toast.success i { color: var(--green); }
.toast.error   i { color: var(--red);   }
.toast.warning i { color: var(--gold);  }
.toast.info    i { color: var(--blue);  }
.toast-text { flex: 1; font-size: .875rem; color: var(--text-primary); }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0; font-size: .85rem; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(.95);
  transition: transform .25s ease;
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: .5rem; }
.modal-title i { color: var(--gold); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; padding: .25rem; transition: var(--transition-fast); }
.modal-close:hover { color: var(--text-primary); }
.modal-footer { margin-top: 1.25rem; display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }

/* ============================================================
   PROGRESS / VIP
   ============================================================ */
.progress-bar {
  background: var(--dark-border);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width .6s ease;
}

.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border-radius: var(--radius-full);
  font-size: .8rem;
  font-weight: 700;
}
.vip-0 { background: rgba(74,100,144,.2);  color: var(--text-muted); border: 1px solid var(--dark-border); }
.vip-1 { background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid rgba(59,130,246,.3); }
.vip-2 { background: rgba(168,85,247,.15); color: var(--purple); border: 1px solid rgba(168,85,247,.3); }
.vip-3 { background: rgba(245,200,66,.15); color: var(--gold); border: 1px solid rgba(245,200,66,.3); }

/* ============================================================
   STEPS / WIZARD
   ============================================================ */
.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: none;
}
.wizard-steps::-webkit-scrollbar { display: none; }
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  flex: 1;
  min-width: 80px;
  position: relative;
}
.wizard-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--dark-border);
}
.wizard-step.done:not(:last-child)::after { background: var(--green); }
.wizard-step.active:not(:last-child)::after { background: var(--gold); }
.ws-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  background: var(--dark-card);
  border: 2px solid var(--dark-border);
  color: var(--text-muted);
  z-index: 1;
}
.wizard-step.active .ws-num { background: var(--gold); border-color: var(--gold); color: var(--dark-bg); }
.wizard-step.done   .ws-num { background: var(--green); border-color: var(--green); color: #fff; }
.ws-label { font-size: .72rem; color: var(--text-muted); text-align: center; font-weight: 500; }
.wizard-step.active .ws-label { color: var(--gold); }
.wizard-step.done   .ws-label { color: var(--green); }

/* ============================================================
   CRYPTO ASSETS LIST
   ============================================================ */
.asset-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(26,48,96,.5);
}
.asset-item:last-child { border-bottom: none; }
.asset-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.asset-icon.btc { background: rgba(247,147,26,.15); color: #f7931a; }
.asset-icon.eth { background: rgba(98,126,234,.15);  color: #627eea; }
.asset-icon.ltc { background: rgba(191,191,191,.15); color: #bfbfbf; }
.asset-info { flex: 1; min-width: 0; }
.asset-name   { font-weight: 600; font-size: .9rem; }
.asset-symbol { font-size: .75rem; color: var(--text-muted); }
.asset-values { text-align: right; }
.asset-brl  { font-weight: 700; font-size: .95rem; }
.asset-qty  { font-size: .75rem; color: var(--text-muted); }

/* ============================================================
   ADMIN SIDEBAR + LAYOUT
   ============================================================ */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 1024px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.admin-sidebar {
  background: var(--dark-surface);
  border-right: 1px solid var(--dark-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
@media (max-width: 1024px) {
  .admin-sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1500;
    width: 260px;
  }
  .admin-sidebar.open { display: block; }
}

.admin-sidebar-header {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--dark-border);
  margin-bottom: .75rem;
}
.admin-sidebar-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 600; margin-bottom: .75rem; padding: 0 1.25rem; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem 1.25rem;
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.admin-nav-item:hover { color: var(--text-primary); background: var(--dark-hover); }
.admin-nav-item.active { color: var(--gold); border-left-color: var(--gold); background: rgba(245,200,66,.05); }
.admin-nav-item i { width: 18px; text-align: center; font-size: .9rem; }

.admin-main { padding: 1.5rem; overflow-x: hidden; }
.admin-section { display: none; }
.admin-section.active { display: block; }

/* ============================================================
   PIX FLOW
   ============================================================ */
.pix-amount-display {
  background: var(--dark-card);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 1rem 0;
}
.pix-amount-display .amount-brl {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}
.pix-amount-display .amount-label { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }

.qr-placeholder {
  width: 200px;
  height: 200px;
  margin: 1rem auto;
  background: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-bg);
  font-size: .8rem;
  text-align: center;
  padding: 1rem;
}

.pix-key-box {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .75rem 0;
}
.pix-key-box .key-value {
  flex: 1;
  font-family: monospace;
  font-size: .875rem;
  word-break: break-all;
  color: var(--text-primary);
}

/* Timer */
.timer-display {
  text-align: center;
  padding: 1rem;
}
.timer-clock {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: .05em;
}
.timer-label { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

/* ============================================================
   CHART WRAPPER
   ============================================================ */
.chart-wrapper {
  position: relative;
  height: 220px;
  width: 100%;
}
@media (min-width: 768px) { .chart-wrapper { height: 260px; } }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: .5rem; }

/* ============================================================
   LOADING
   ============================================================ */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(245,200,66,.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,11,24,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  z-index: 9998;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--dark-card) 25%, var(--dark-hover) 50%, var(--dark-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--dark-border);
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 1.25rem;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: .7rem 1.1rem;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-fast);
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--dark-border);
  margin: 1.25rem 0;
}
.divider-text {
  text-align: center;
  position: relative;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: .8rem;
}
.divider-text::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border-top: 1px solid var(--dark-border);
}
.divider-text span {
  background: var(--dark-surface);
  padding: 0 .75rem;
  position: relative;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-gold    { color: var(--gold) !important; }
.text-green   { color: var(--green) !important; }
.text-red     { color: var(--red) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-primary { color: var(--text-primary) !important; }
.text-center  { text-align: center !important; }
.text-right   { text-align: right !important; }
.text-small   { font-size: .8rem !important; }
.text-bold    { font-weight: 700 !important; }

.d-flex       { display: flex !important; }
.d-none       { display: none !important; }
.d-block      { display: block !important; }
.align-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-center  { justify-content: center !important; }
.gap-1  { gap: .25rem !important; }
.gap-2  { gap: .5rem !important; }
.gap-3  { gap: .75rem !important; }
.gap-4  { gap: 1rem !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1  { flex: 1 !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: .75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-5 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: .75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.5rem !important; }
.p-0  { padding: 0 !important; }
.p-2  { padding: .5rem !important; }
.p-3  { padding: .75rem !important; }
.p-4  { padding: 1rem !important; }

.w-100 { width: 100% !important; }
.rounded { border-radius: var(--radius-md) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes shimmer     { to { background-position: -200% 0; } }
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInUp   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse-gold  { 0%,100% { box-shadow: 0 0 0 0 var(--gold-glow); } 50% { box-shadow: 0 0 0 8px transparent; } }

.fade-in     { animation: fadeIn .4s ease both; }
.slide-in-up { animation: slideInUp .4s ease both; }

/* Stagger delays */
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark-surface);
  border-top: 1px solid var(--dark-border);
  padding: 1.25rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-text { font-size: .8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { font-size: .8rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--gold); }

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .balance-actions { gap: .5rem; }
  .balance-actions .btn { flex: 1; font-size: .8rem; padding: .6rem .8rem; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .stat-value { font-size: 1rem; }
}
@media (min-width: 641px) {
  .hide-desktop { display: none !important; }
}

/* Touch targets */
@media (hover: none) and (pointer: coarse) {
  .btn     { min-height: 44px; }
  .tab-btn { min-height: 44px; }
  .admin-nav-item { min-height: 44px; }
  .form-control, .form-select { font-size: 16px; /* prevent iOS zoom */ }
}

/* Safe area (iPhone notch) */
@supports (padding: env(safe-area-inset-bottom)) {
  .navbar { padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); }
  #toast-container { bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); right: calc(1.25rem + env(safe-area-inset-right, 0px)); }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .navbar, .footer, .btn, #toast-container { display: none !important; }
  body { background: #fff; color: #000; }
}


/* ============================================================
   MARKET STRIP / TICKER
   ============================================================ */
.market-strip {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(26,48,96,.65);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(10,22,40,.95), rgba(15,31,61,.92));
  box-shadow: var(--shadow-sm);
}
.market-strip.compact { border-radius: var(--radius-md); }
.market-strip-inner {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.market-track {
  display: flex;
  gap: .85rem;
  min-width: max-content;
  padding: .85rem;
}
.market-card {
  min-width: 190px;
  padding: .85rem .95rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(5, 11, 24, .72);
  backdrop-filter: blur(10px);
}
.market-card.is-up { box-shadow: inset 0 0 0 1px rgba(34,197,94,.12); }
.market-card.is-down { box-shadow: inset 0 0 0 1px rgba(239,68,68,.12); }
.market-card-top,
.market-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.market-symbol {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--text-primary);
}
.market-name {
  font-size: .72rem;
  color: var(--text-secondary);
}
.market-price {
  margin: .4rem 0 .25rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.market-direction,
.market-change {
  font-size: .78rem;
  font-weight: 700;
}
.market-direction.up,
.market-change.up { color: var(--green); }
.market-direction.down,
.market-change.down { color: var(--red); }
.market-sparkline {
  width: 92px;
  height: 26px;
  opacity: .9;
}
@media (max-width: 768px) {
  .market-card { min-width: 170px; }
  .market-track { padding: .7rem; gap: .7rem; }
}
