/* ========================
   BITWALLET — style.css
   Theme: Dark Luxury Minimal
======================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-card2: #16161f;
  --accent: #f5c842;
  --accent-dim: rgba(245, 200, 66, 0.12);
  --green: #3de89e;
  --green-dim: rgba(61, 232, 158, 0.12);
  --red: #ff5f6d;
  --red-dim: rgba(255, 95, 109, 0.12);
  --wait: #a78bfa;
  --wait-dim: rgba(167, 139, 250, 0.12);
  --text: #f0f0f5;
  --text-muted: rgba(240, 240, 245, 0.45);
  --text-faint: rgba(240, 240, 245, 0.18);
  --border: rgba(255,255,255,0.07);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font: 'Cabinet Grotesk', sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* SHELL */
.shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* HEADER */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'Syncopate', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.logo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.header-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.notif-btn { position: relative; }
.notif-badge {
  position: absolute;
  top: 3px; right: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

/* MAIN */
.main {
  flex: 1;
  padding: 20px 16px 100px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* BALANCE CARD */
.balance-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(245, 200, 66, 0.2);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  overflow: hidden;
  animation: fadeUp 0.5s ease both;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,200,66,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.card-glow {
  position: absolute;
  bottom: -40px; left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 80px;
  background: radial-gradient(ellipse, rgba(245,200,66,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.balance-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.balance-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.badge-up {
  display: flex; align-items: center; gap: 3px;
  background: var(--green-dim);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(61,232,158,0.2);
}

.balance-amount {
  font-size: 42px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 8px;
  animation: balancePulse 2.8s ease-in-out infinite;
}
.balance-currency {
  font-size: 24px;
  font-weight: 600;
  opacity: 0.8;
}
.balance-conversion {
  font-size: 14px;
  color: rgba(245, 200, 66, 0.88);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.balance-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.balance-meta-item {
  display: flex; flex-direction: column; gap: 2px;
}
.balance-meta-sep {
  width: 1px; height: 32px;
  background: var(--border);
}
.meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.meta-value {
  font-size: 15px;
  font-weight: 700;
}

/* COLORS */
.accent { color: var(--accent); }
.green { color: var(--green); }

@keyframes balancePulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(245,200,66,0);
  }
  50% {
    transform: scale(1.02);
    text-shadow: 0 0 22px rgba(245,200,66,0.22);
  }
}
.red { color: var(--red); }
.wait { color: var(--wait); }

/* ACTIONS */
.actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  animation: fadeUp 0.5s 0.1s ease both;
}
.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color .2s, color .2s, background .2s;
}
.action-btn:hover { border-color: var(--accent-dim); color: var(--accent); background: var(--bg-card2); }
.action-btn--primary {
  background: var(--accent-dim);
  border-color: rgba(245,200,66,0.3);
  color: var(--accent);
}
.action-btn--primary:hover { background: rgba(245,200,66,0.2); }
.action-icon { display: flex; }
.action-label { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; }

/* SECTION CARD */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  animation: fadeUp 0.5s 0.15s ease both;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.see-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity .2s;
}
.see-all:hover { opacity: 1; }

/* CHART */
.chart-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.chart-current-price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.chart-change {
  font-size: 13px;
  font-weight: 600;
}
.chart-wrap {
  position: relative;
  height: 100px;
  margin-bottom: 16px;
}
.chart-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.chart-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.chart-stat:first-child { align-items: flex-start; }
.chart-stat:last-child { align-items: flex-end; }
.cs-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.cs-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* PERIOD TABS */
.period-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-card2);
  padding: 3px;
  border-radius: var(--radius-sm);
}
.period-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: var(--font);
}
.period-tab.active {
  background: var(--accent);
  color: var(--bg);
}

/* TRANSACTIONS */
.tx-list { display: flex; flex-direction: column; gap: 0; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .2s;
}

/* SEND FORM */
.send-section {
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(15, 16, 26, 0.96), rgba(17, 18, 29, 0.99));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.18);
  border-radius: 28px;
  padding: 28px 24px;
}

.send-section .section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.send-section .section-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f7f7fa;
}

.send-section .section-note {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

.send-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.send-form label,
.send-form select,
.send-form input,
.send-form textarea {
  font-family: var(--font);
}

.send-form label {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.send-form input,
.send-form select,
.send-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  color: #f5f7ff;
  padding: 16px 18px;
  outline: none;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, transform .25s ease;
}

.send-form input::placeholder,
.send-form textarea::placeholder {
  color: rgba(255,255,255,0.45);
}

.send-form input:hover,
.send-form select:hover,
.send-form textarea:hover {
  transform: translateY(-1px);
}

.send-form input:focus,
.send-form select:focus,
.send-form textarea:focus {
  border-color: rgba(245,200,66,0.95);
  background: rgba(245,200,66,0.12);
  box-shadow: 0 0 0 6px rgba(245,200,66,0.08);
}

.send-form textarea {
  resize: vertical;
  min-height: 120px;
}

.send-submit {
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 16px 0;
  background: linear-gradient(135deg, #f5c842, #e8b741);
  color: #111118;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.send-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(245,200,66,0.24);
}

.send-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: saturate(0.85);
}

@media (max-width: 900px) {
  .form-flex {
    grid-template-columns: 1fr;
  }
}
.tx-item:last-child { border-bottom: none; padding-bottom: 0; }
.tx-item:hover { opacity: 0.8; }

.tx-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tx-icon--btc { background: var(--accent-dim); color: var(--accent); }
.tx-icon--ltc { background: var(--red-dim); color: var(--red); }
.tx-icon--eth { background: var(--wait-dim); color: var(--wait); }

.tx-info {
  flex: 1;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.tx-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-date {
  font-size: 11px;
  color: var(--text-muted);
}

.tx-amount {
  text-align: right;
  display: flex; flex-direction: column; gap: 3px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
}
.tx-usd { font-size: 11px; font-weight: 500; }
.tx-amount--pos, .tx-amount--pos .tx-usd { color: var(--green); }
.tx-amount--neg, .tx-amount--neg .tx-usd { color: var(--red); }
.tx-amount--wait, .tx-amount--wait .tx-usd { color: var(--wait); }

/* BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: rgba(17,17,24,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
  z-index: 100;
}
.nav-item {
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  padding: 6px 18px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
  text-decoration: none;
}
.nav-item:hover { color: var(--text-muted); }
.nav-item--active { color: var(--accent); }

/* TOAST */
.toast {
  position: fixed;
  bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-card2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 200;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 12, 25, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 300;
}
.dialog-overlay.visible {
  opacity: 1;
  visibility: visible;
}
.dialog-box {
  width: min(420px, calc(100% - 40px));
  background: rgba(18, 21, 35, 0.96);
  border: 1px solid rgba(245, 200, 66, 0.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  color: #f8f8fb;
}
.dialog-icon {
  font-size: 48px;
  margin-bottom: 14px;
}
.dialog-box h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #f5c842;
}
.dialog-message {
  margin: 0 0 24px;
  line-height: 1.65;
  color: #dbe4f1;
}
.dialog-close {
  border: none;
  background: linear-gradient(135deg, #f5c842, #e7b33a);
  color: #111118;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.dialog-close:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

/* ANIMATION */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}