/* ============================================================
   Claimly v3.3 — Main CSS
   ============================================================ */

:root {
  --accent:  #00e5ff;
  --accent2: #7c3aed;
  --bg:      #060b14;
  --bg2:     #0d1520;
  --bg3:     #111c2a;
  --border:  rgba(255,255,255,.07);
  --text:    #e8eaf0;
  --muted:   #5a6a82;
  --success: #00e676;
  --warning: #ffd700;
  --danger:  #ff4757;
  --sidebar: 205px;
  --radius:  12px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .85; }

/* ── Layout ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar);
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform .25s ease;
}

.main-content {
  min-height: 100vh;
}
.main-content.with-sidebar { margin-left: var(--sidebar); }
.main-content.no-sidebar   { margin-left: 0; }

.page-wrap {
  padding: 28px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Sidebar Brand ──────────────────────────────────────── */
.sidebar-brand {
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 900;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: -.5px;
}
.brand-icon { font-size: 18px; }
.brand-name { color: var(--accent); }

/* ── Balance ────────────────────────────────────────────── */
.sidebar-balance {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0,229,255,.03);
}
.bal-label { font-size: 9px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 2px; }
.bal-amount {
  font-family: monospace;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.bal-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 10px; padding: 0; }
.link-btn:hover { opacity: .8; }

/* ── Nav ────────────────────────────────────────────────── */
.sidebar-nav  { padding: 8px 0; flex: 1; }
.sidebar-footer { padding: 8px 0 12px; border-top: 1px solid var(--border); }

.nav-section {
  padding: 8px 14px 2px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .6;
  display: block;
}
/* Inside accordion toggle — no extra padding */
.nav-acc-toggle .nav-section {
  padding: 0;
  opacity: .7;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  color: var(--muted);
  font-size: 12px;
  transition: all .15s;
  border-left: 2px solid transparent;
  cursor: pointer;
  line-height: 1.3;
}
.nav-item:hover  { color: var(--text); background: rgba(255,255,255,.03); }
.nav-item.active { color: var(--accent); background: rgba(0,229,255,.07); border-left-color: var(--accent); }
.nav-logout { color: var(--danger) !important; }
.nav-logout:hover { background: rgba(255,71,87,.07) !important; }

/* ── Nav Accordion ──────────────────────────────────────── */
.nav-accordion {}
.nav-acc-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 14px 2px;
  cursor: pointer;
  gap: 0;
  text-align: left;
}
.nav-acc-toggle:hover .nav-section { color: var(--text); opacity: 1; }
.nav-acc-arrow {
  font-size: 13px;
  color: var(--muted);
  transition: transform .2s ease;
  line-height: 1;
  flex-shrink: 0;
  margin-left: auto;
  opacity: .5;
}
.nav-acc-toggle[aria-expanded="true"] .nav-acc-arrow { opacity: .8; }
.nav-acc-body {
  overflow: hidden;
}
@keyframes accOpen {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-acc-body[style*="block"] { animation: accOpen .15s ease; }

/* ── Mobile header ──────────────────────────────────────── */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 99;
}
.burger {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
}
.mobile-brand { font-family: monospace; font-weight: 700; color: var(--accent); }
.mobile-bal   { font-family: monospace; font-size: 13px; color: var(--warning); }

/* ── Page header ────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-family: monospace; font-size: 22px; font-weight: 700; }
.page-header p  { color: var(--muted); font-size: 13px; margin-top: 4px; }
.muted { color: var(--muted); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card.active { border-color: var(--accent); }
.card-header {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.card-body { padding: 18px; }

/* ── Stats grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: border-color .2s;
}
.stat-card.active { border-color: var(--accent); background: rgba(0,229,255,.04); }
.stat-icon  { font-size: 24px; margin-bottom: 6px; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.stat-value { font-family: monospace; font-size: 20px; font-weight: 700; }
.stat-sub   { font-size: 11px; color: var(--muted); margin-top: 4px; }
.stat-value.accent { color: var(--accent); }
.stat-value.green  { color: var(--success); }
.stat-value.gold   { color: var(--warning); }

/* ── Faucet card ────────────────────────────────────────── */
.faucet-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.faucet-reward {
  font-family: monospace;
  font-size: 40px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 4px;
  line-height: 1.1;
}
.faucet-cur     { font-size: 28px; color: var(--muted); }
.faucet-interval { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.fp-address-hint { font-size: 11px; color: var(--muted); margin-top: 12px; }

/* Progress bar */
.faucet-progress { margin: 16px 0; }
.progress-bar {
  height: 6px;
  background: rgba(255,255,255,.07);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width .5s ease;
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-secondary { background: var(--bg3); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,.08); }
.btn-full  { width: 100%; }
.btn-claim {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  font-weight: 700;
  margin-top: 8px;
}
.btn-claim:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── Forms ──────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .7px;
}
.input {
  width: 100%;
  padding: 10px 14px;
  background: #060b14;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s;
}
.input:focus { outline: none; border-color: var(--accent); }
.input::placeholder { color: var(--muted); }
.input-sm { padding: 6px 10px; font-size: 13px; }
.input-readonly {
  padding: 10px 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  color: var(--muted);
  font-family: monospace;
}
.field-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-meta  { font-size: 12px; color: var(--muted); margin-bottom: 12px; }

/* ── Tables ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.03); }
.data-table tr.highlight td { background: rgba(0,229,255,.05); }
.data-table tr:last-child td { border-bottom: none; }

/* Colors in tables */
.accent { color: var(--accent); }
.green  { color: var(--success); }
.red    { color: var(--danger); }
.gold   { color: var(--warning); }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green  { background: rgba(0,230,118,.12); color: var(--success); border: 1px solid rgba(0,230,118,.25); }
.badge-yellow { background: rgba(255,215,0,.1);  color: var(--warning); border: 1px solid rgba(255,215,0,.2); }
.badge-red    { background: rgba(255,71,87,.1);  color: var(--danger);  border: 1px solid rgba(255,71,87,.2); }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(255,71,87,.1);  border: 1px solid rgba(255,71,87,.25);  color: var(--danger);  }
.alert-success { background: rgba(0,230,118,.1);  border: 1px solid rgba(0,230,118,.25);  color: var(--success); }
.alert-warning { background: rgba(255,215,0,.08); border: 1px solid rgba(255,215,0,.2);   color: var(--warning); }
.alert-warning a { color: var(--warning); text-decoration: underline; }

/* ── Auth ───────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, rgba(0,229,255,.04) 0%, transparent 60%);
}
.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
}
.auth-logo  { font-size: 42px; text-align: center; margin-bottom: 8px; }
.auth-title {
  font-family: monospace;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
  margin-bottom: 24px;
}
.auth-tabs  { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-form.hidden { display: none; }
.link-sm { font-size: 13px; color: var(--muted); }
.link-sm:hover { color: var(--accent); }

/* ── Currency picker ────────────────────────────────────── */
.currency-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.cur-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.cur-btn.selected {
  border-color: var(--cur-color, var(--accent));
  color: var(--cur-color, var(--accent));
  background: rgba(0,229,255,.07);
}
.cur-btn:hover { border-color: var(--cur-color, var(--accent)); color: var(--cur-color, var(--accent)); }

/* ── Currency icon badge (for custom coins without emoji) ── */
.cur-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  line-height: 1;
}
/* Image-based icon (when admin sets a URL) */
.cur-icon-img {
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 50%;
}
/* Letter badge fallback for custom coins */
.cur-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  font-size: .65em;
  font-weight: 900;
  font-family: monospace;
  background: currentColor;
  color: #000 !important;
  vertical-align: middle;
  line-height: 1;
}


.cur-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cur-picker-overlay.hidden { display: none; }
.cur-picker-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  min-width: 280px;
}
.cur-picker-title { font-weight: 700; margin-bottom: 16px; color: var(--accent); font-family: monospace; }

/* ── Info rows ──────────────────────────────────────────── */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--muted); }

.ref-link-wrap { display: flex; gap: 8px; }
.ref-link-wrap .input { flex: 1; font-family: monospace; font-size: 12px; }

/* ── Notifications ──────────────────────────────────────── */
#notifWrap {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.notif {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  max-width: 320px;
  pointer-events: all;
  animation: notifIn .2s ease;
  cursor: pointer;
}
.notif-success { background: var(--success); color: #000; }
.notif-error   { background: var(--danger);  color: #fff; }
.notif-warning { background: var(--warning); color: #000; }
.notif-info    { background: var(--accent);  color: #000; }
@keyframes notifIn {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .main-content.with-sidebar { margin-left: 0; }
  .mobile-header { display: flex; }
  .page-wrap { padding: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .faucet-card { padding: 24px 16px; }
  .faucet-reward { font-size: 32px; }
  .auth-card { padding: 24px 16px; }
}
