:root {
  /* Core palette - dark crypto theme with USDT green accent */
  --bg: #0b0f14;
  --bg-elevated: #121821;
  --surface: #161d28;
  --surface-2: #1d2632;
  --border: #232e3c;
  --text: #e7edf3;
  --text-muted: #8a97a8;
  --text-dim: #5b6776;

  --primary: #26a17b;       /* USDT green */
  --primary-600: #1f8e6c;
  --primary-700: #18785a;
  --primary-soft: rgba(38, 161, 123, 0.12);

  --accent: #f0b90b;        /* gold for highlights */
  --danger: #e5484d;
  --warning: #f5a524;
  --success: #30a46c;
  --info: #4493f8;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);

  --maxw: 480px;            /* mobile-app container width */
  --nav-h: 64px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ------------------------------------------------------------------ Layout */
.app-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: calc(var(--nav-h) + 24px);
}

.page {
  padding: 16px 16px 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.topbar .brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.icon-btn .badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--danger); color: #fff;
  border-radius: 9px; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}

/* ------------------------------------------------------------------ Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card.tight { padding: 14px; }

.balance-card {
  background: linear-gradient(135deg, var(--primary-700), var(--primary));
  border: none;
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.balance-card .label { opacity: 0.85; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; }
.balance-card .amount { font-size: 34px; font-weight: 800; margin: 6px 0 2px; letter-spacing: -0.5px; }
.balance-card .sub { opacity: 0.85; font-size: 13px; }
.balance-actions { display: flex; gap: 10px; margin-top: 18px; }
.balance-actions .btn { flex: 1; }

/* ------------------------------------------------------------------ Stats grid */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.stat .stat-label { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .stat-value { font-size: 20px; font-weight: 700; margin-top: 4px; }
.stat .stat-value.green { color: var(--primary); }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600; font-size: 15px;
  background: var(--surface-2); color: var(--text);
  transition: transform 0.05s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-light { background: rgba(255,255,255,0.16); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 22px; font-size: 16px; }

/* ------------------------------------------------------------------ Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 7px; font-weight: 500; }
.form-control, select.form-control, textarea.form-control {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease;
}
.form-control:focus { border-color: var(--primary); }
.form-control::placeholder { color: var(--text-dim); }
.form-hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
textarea.form-control { resize: vertical; min-height: 90px; }

.input-file {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 18px; text-align: center; color: var(--text-muted);
  background: var(--bg-elevated); cursor: pointer;
}

/* ------------------------------------------------------------------ Section headings */
.section-title { font-size: 17px; font-weight: 700; margin: 4px 0 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.section-head a { color: var(--primary); font-size: 13px; font-weight: 600; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.center { text-align: center; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}

/* ------------------------------------------------------------------ Lists */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 14px;
}
.list-item .li-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 600; font-size: 14px; }
.list-item .li-sub { color: var(--text-muted); font-size: 12px; }
.list-item .li-amount { font-weight: 700; font-size: 15px; }
.li-amount.credit { color: var(--primary); }
.li-amount.debit { color: var(--danger); }

/* ------------------------------------------------------------------ Badges */
.badge-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: rgba(48,164,108,0.16); color: var(--success); }
.badge-warning { background: rgba(245,165,36,0.16); color: var(--warning); }
.badge-danger { background: rgba(229,72,77,0.16); color: var(--danger); }
.badge-secondary { background: var(--surface-2); color: var(--text-muted); }

/* ------------------------------------------------------------------ Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(18, 24, 33, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 50;
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-dim); font-size: 11px; font-weight: 500;
  flex: 1; padding: 6px 0;
}
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav .mine-btn {
  margin-top: -22px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(38,161,123,0.5);
  flex: 0 0 auto;
}
.bottom-nav .mine-btn svg { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ Flash */
.flash-wrap { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 456px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-sm);
  animation: slideDown 0.3s ease;
}
.flash-success { background: var(--success); color: #fff; }
.flash-error { background: var(--danger); color: #fff; }
.flash-info { background: var(--info); color: #fff; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ------------------------------------------------------------------ Mining visual */
.miner {
  text-align: center; padding: 8px 0 4px;
}
.miner-orb {
  width: 180px; height: 180px; margin: 16px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--primary-soft), transparent 70%);
  display: grid; place-items: center; position: relative;
}
.miner-orb .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--primary); opacity: 0.25;
}
.miner-orb .ring.r2 { inset: 18px; opacity: 0.4; }
.miner-orb .ring.r3 { inset: 36px; opacity: 0.6; }
.miner-orb.active .ring { animation: pulse 2s ease-in-out infinite; }
.miner-orb.active .ring.r2 { animation-delay: 0.3s; }
.miner-orb.active .ring.r3 { animation-delay: 0.6s; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.06); opacity: 0.7; } }
.miner-orb .hash { font-size: 26px; font-weight: 800; color: var(--primary); }
.miner-orb .hash small { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ------------------------------------------------------------------ Power / plan cards */
.power-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; margin-bottom: 12px;
}
.power-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-soft); }
.power-card .pc-head { display: flex; align-items: center; justify-content: space-between; }
.power-card .pc-name { font-weight: 700; font-size: 16px; }
.power-card .pc-price { font-size: 22px; font-weight: 800; color: var(--primary); }
.power-card .pc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.power-card .pc-meta .m { background: var(--bg-elevated); border-radius: 8px; padding: 8px 10px; }
.power-card .pc-meta .m span { display: block; font-size: 11px; color: var(--text-muted); }
.power-card .pc-meta .m b { font-size: 14px; }

/* ------------------------------------------------------------------ Misc */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--text-dim); }
.empty svg { width: 48px; height: 48px; margin-bottom: 10px; opacity: 0.5; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.tag-copy { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-elevated); border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; font-family: monospace; font-size: 14px; }

.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.menu-list { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 4px; border-bottom: 1px solid var(--border); }
.menu-item:last-child { border-bottom: none; }
.menu-item .mi-icon { color: var(--text-muted); }
.menu-item .chev { margin-left: auto; color: var(--text-dim); }

.currency-switch { display: flex; gap: 6px; }
.currency-switch button { padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); font-size: 12px; font-weight: 600; }
.currency-switch button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.topbar-actions{
    display:flex;
    align-items:center;
    gap:12px;
}

.currency-dropdown{
    position:relative;
}

.currency-select{
    height:42px;
    min-width:90px;
    padding:0 36px 0 14px;

    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;

    background:#111827;
    color:#fff;

    font-size:14px;
    font-weight:600;

    outline:none;
    cursor:pointer;

    appearance:none;
    -webkit-appearance:none;
}

.currency-dropdown::after{
    content:"▼";

    position:absolute;
    right:12px;
    top:50%;

    transform:translateY(-50%);

    font-size:10px;
    color:#94a3b8;

    pointer-events:none;
}

.currency-select:focus{
    border-color:#22c55e;
}
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 80; display: none; align-items: flex-end; justify-content: center; }
.modal-backdrop.open { display: flex; }
.modal { width: 100%; max-width: var(--maxw); background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: slideUp 0.25s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal h3 { margin-bottom: 14px; }

/* ==================================================================== */
/*  USER PORTAL COMPONENTS (classes used across the current views)      */
/* ==================================================================== */

/* ---- Generic inputs (forms that omit .form-control) ---- */
.panel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.panel select,
.panel textarea,
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
.panel input:focus, .panel select:focus, .panel textarea:focus,
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.panel input::placeholder, .form-group input::placeholder { color: var(--text-dim); }
.panel input:disabled, .panel select:disabled,
.form-group input:disabled { opacity: 0.6; cursor: not-allowed; }
.panel textarea, .form-group textarea { resize: vertical; min-height: 90px; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; min-width: 0; }

/* ---- Page headings ---- */
.page-head { margin-bottom: 16px; }
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.page-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.back-link:hover { color: var(--primary); }

/* ---- Balance card (new structure) ---- */
.balance-card-top { display: flex; align-items: center; justify-content: space-between; }
.balance-label { opacity: 0.9; font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; }
.balance-amount { font-size: 36px; font-weight: 800; margin: 8px 0 4px; letter-spacing: -0.6px; }
.balance-sub { display: flex; flex-wrap: wrap; gap: 14px; opacity: 0.92; font-size: 13px; }
.balance-sub span { display: inline-flex; align-items: center; gap: 5px; }
.balance-sub svg { opacity: 0.9; }

/* ---- Chips ---- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; }
.chip-on { background: rgba(255,255,255,0.18); color: #fff; }
.balance-card .chip-on { background: rgba(255,255,255,0.22); color: #fff; }
.chip-off { background: var(--surface-2); color: var(--text-muted); }
/* When chip sits on a dark surface (mine/referrals/power) */
.power-card .chip-on, .mine-power-name .chip-on, .team-item .chip-on { background: var(--primary-soft); color: var(--primary); }

/* ---- Quick actions grid ---- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; margin-top: 16px;}
.quick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform 0.05s ease, border-color 0.15s ease;
}
.quick-tile:active { transform: scale(0.97); }
.quick-tile:hover { border-color: var(--primary); }
.quick-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.quick-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* ---- Stat cards (new) ---- */
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; }
.stat-card .stat-label { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .stat-value { font-size: 22px; font-weight: 800; margin-top: 5px; letter-spacing: -0.4px; }
.stat-card .stat-value.green { color: var(--primary); }
.stat-card .stat-meta { color: var(--text-dim); font-size: 12px; margin-top: 3px; }

/* ---- Panels ---- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-title svg { color: var(--text-muted); }
.panel-link { color: var(--primary); font-size: 13px; font-weight: 600; }

/* ---- Transaction lists ---- */
.tx-list { display: flex; flex-direction: column; gap: 4px; list-style: none; }
.tx-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tx-item:last-child { border-bottom: none; }
.tx-icon { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; }
.tx-in { background: var(--primary-soft); color: var(--primary); }
.tx-out { background: rgba(229,72,77,0.14); color: var(--danger); }
.tx-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tx-title { font-weight: 600; font-size: 14px; }
.tx-desc { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.tx-amount.pos { color: var(--primary); }
.tx-amount.neg { color: var(--danger); }
.tx-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ---- Empty states ---- */
.empty-state { text-align: center; padding: 36px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-dim); }

/* ---- Badges (status) ---- */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; text-transform: capitalize; }
.badge-success { background: rgba(48,164,108,0.16); color: var(--success); }
.badge-warning { background: rgba(245,165,36,0.16); color: var(--warning); }
.badge-danger { background: rgba(229,72,77,0.16); color: var(--danger); }
.badge-secondary { background: var(--surface-2); color: var(--text-muted); }

/* ---- Alerts ---- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; border: 1px solid transparent; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.alert-warn { background: rgba(245,165,36,0.12); border-color: rgba(245,165,36,0.3); color: var(--warning); }
.alert-danger { background: rgba(229,72,77,0.12); border-color: rgba(229,72,77,0.3); color: var(--danger); }
.alert-info { background: rgba(68,147,248,0.12); border-color: rgba(68,147,248,0.3); color: var(--info); }

/* ---- Mining stage ---- */
.mine-stage { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 18px; margin-bottom: 16px; text-align: center; }
.rig { position: relative; width: 150px; height: 150px; margin: 4px auto 18px; display: grid; place-items: center; }
.rig-glow { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--primary-soft), transparent 68%); }
.rig-core { position: relative; z-index: 2; color: var(--primary); }
.rig-ring { position: absolute; inset: 14px; border-radius: 50%; border: 2px solid var(--primary); opacity: 0.35; }
.mine-stage[data-active="1"] .rig-ring { animation: rigpulse 2s ease-in-out infinite; }
.mine-stage.claiming .rig-core { animation: rigspin 0.6s ease; }
@keyframes rigpulse { 0%,100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.12); opacity: 0.7; } }
@keyframes rigspin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.mine-power-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 18px; }

.claim-btn {
  width: 100%; max-width: 280px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px; border: none; border-radius: var(--radius);
  background: var(--primary); color: #fff;
  box-shadow: 0 8px 22px rgba(38,161,123,0.45);
  transition: transform 0.06s ease, opacity 0.15s ease;
}
.claim-btn:active { transform: scale(0.97); }
.claim-btn:disabled { background: var(--surface-2); color: var(--text-dim); box-shadow: none; cursor: not-allowed; }
.claim-btn-label { font-size: 16px; font-weight: 700; }
.claim-btn-reward { font-size: 13px; opacity: 0.9; }

.mine-meters { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; text-align: left; }
.meter-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.meter-head span:first-child { color: var(--text-muted); }
.meter-head span:last-child { font-weight: 600; }
.meter-bar { height: 8px; border-radius: 999px; background: var(--bg-elevated); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.4s ease; }
.meter-fill.warn { background: var(--accent); }

/* ---- Node check ---- */
.node-check { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.node-info { flex: 1; min-width: 180px; }
.node-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.node-status.ready { color: var(--primary); }
.node-status.wait { color: var(--text-muted); }
.node-check .btn { flex-shrink: 0; }

/* ---- Upsell ---- */
.upsell { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upsell-body { flex: 1; min-width: 180px; }
.upsell-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }

/* ---- Segmented control + deposit channels ---- */
.seg-control { display: flex; gap: 6px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; }
.seg { flex: 1; padding: 9px 8px; border: none; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.seg.active { background: var(--primary); color: #fff; }
.channel-pane[hidden] { display: none; }
.method-select { margin-top: 0; }

/* =========================
   PAYMENT DETAILS
========================= */

.pay-to{
    margin-top:20px;
}

.pay-to-label{
    display:block;
    margin-bottom:12px;
    font-size:13px;
    font-weight:600;
    color:#94a3b8;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.payment-details{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.payment-block{
    background:#111827;
    border:1px solid rgba(255,255,255,.08);
    border-radius:14px;
    padding:14px;
    transition:.2s ease;
}

.payment-block:hover{
    border-color:rgba(255,255,255,.15);
}

.payment-block-label{
    font-size:12px;
    font-weight:600;
    color:#94a3b8;
    margin-bottom:8px;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.payment-block-value{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    min-width:0;
}

.payment-block-value span{
    flex:1;
    font-size:15px;
    font-weight:600;
    color:#ffffff;
    line-height:1.4;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* =========================
   COPY BUTTON
========================= */

.copy-detail-btn{
    width:32px;
    height:32px;
    min-width:32px;
    border:none;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
    background:rgba(255,255,255,.08);
    color:#fff;
    transition:.2s ease;
}

.copy-detail-btn:hover{
    background:rgba(255,255,255,.15);
    transform:translateY(-1px);
}

.copy-detail-btn:active{
    transform:scale(.96);
}

/* =========================
   CHANNEL BUTTONS
========================= */

/* .seg-control{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.seg{
    border:none;
    cursor:pointer;
    padding:10px 16px;
    border-radius:12px;
    background:#1f2937;
    color:#cbd5e1;
    font-weight:600;
    transition:.2s ease;
}

.seg:hover{
    background:#374151;
}

.seg.active{
    background:#2563eb;
    color:#fff;
} */

/* =========================
   SUMMARY BOX
========================= */

.quote-box{
    margin-top:20px;
     background:
        linear-gradient(
            135deg,
            rgba(46,204,113,.08),
            rgba(46,204,113,.02)
        );

    border:1px solid rgba(46,204,113,.2);
     box-shadow:
        0 0 0 1px rgba(46,204,113,.08),
        0 8px 24px rgba(0,0,0,.25);
    border-radius:16px;
    padding:16px;  
}

.quote-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 0;
}

.quote-row:not(:last-child){
    border-bottom:1px solid rgba(255,255,255,.06);
}

.quote-row span{
    color:#94a3b8;
}

.quote-row strong{
    color:#fff;
}

.quote-row.total strong{
    color:#60a5fa;
}

/* =========================
   FILE UPLOAD
========================= */

.file-drop{
    position:relative;
    border:2px dashed rgba(255,255,255,.15);
    border-radius:16px;
    padding:30px 20px;
    text-align:center;
    cursor:pointer;
    overflow:hidden;
}

.file-drop input[type="file"]{
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
}

.file-drop-text{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    color:#94a3b8;
    font-size:14px;
}

.form-hint{
    display:block;
    margin-top:8px;
    font-size:12px;
    color:#94a3b8;
}

/* =========================
   PROOF PREVIEW
========================= */

#proofPreviewWrap{
    margin-top:15px;
}

#proofPreview{
    width:100%;
    max-height:300px;
    object-fit:contain;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.08);
}

/* =========================
   BUY SUMMARY
========================= */

.buy-summary{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.buy-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 0;
    border-bottom:1px solid rgba(255,255,255,.06);
}

.buy-row:last-child{
    border-bottom:none;
}

.buy-row span{
    color:#94a3b8;
}

.buy-row strong{
    color:#fff;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 576px){

    .payment-block-value{
        align-items:flex-start;
    }

    .payment-block-value span{
        font-size:14px;
    }

    .copy-detail-btn{
        width:38px;
        height:38px;
        min-width:38px;
    }

    .seg-control{
        flex-direction:row;
    }

    .seg{
        width:100%;
    }
}
.copy-field input { width: 100%; }
.copy-btn { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.copy-btn.copied { background: var(--primary); color: var(--primary-600); border-color: var(--primary); }
.fa-solid {color: var(--primary-600);}
.link-btn { background: none; border: none; color: var(--primary); font-size: 13px; font-weight: 600; padding: 0; }

/* ---- File drop ---- */
.file-drop { position: relative; border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 22px 16px; text-align: center; background: var(--bg-elevated); color: var(--text-muted); cursor: pointer; transition: border-color 0.15s ease; }
.file-drop:hover { border-color: var(--primary); }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-drop-text { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.file-drop.has-file { border-color: var(--primary); color: var(--primary); }

/* ---- Withdraw quote ---- */
.quote-box { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; }
.quote-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.quote-row span { color: var(--text-muted); }
.quote-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font-size: 16px; }
.quote-row.total strong { color: var(--primary); }

/* --------------------------------------------------
   Withdrawal Fee Card
-------------------------------------------------- */
.fee-card {
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 0 0 1px var(--primary-soft);
}

.fee-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.fee-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.fee-card-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

.fee-amount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.fee-card-note {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.fee-card-note strong {
  color: var(--primary);
  font-weight: 700;
}

/* highlighted payment destination */
.fee-card .pay-to {
  margin-top: 12px;
}

.fee-card .pay-to-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}


/* subtle glow when active */
.fee-card.active {
  animation: feeGlow 2s ease-in-out infinite;
}

@keyframes feeGlow {
  0%,100% {
    box-shadow: 0 0 0 1px var(--primary-soft);
  }
  50% {
    box-shadow:
      0 0 0 1px var(--primary-soft),
      0 0 18px rgba(38,161,123,.18);
  }
}

.fee-card {
  position: relative;
  overflow: hidden;
}

.fee-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
}

.account-detail-block{
    margin-bottom:15px;
    padding:14px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:12px;
    background:rgba(255,255,255,.03);
}

.account-detail-label{
    font-size:12px;
    text-transform:uppercase;
    opacity:.7;
    margin-bottom:8px;
}

.account-detail-value-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.account-detail-value{
    font-size:15px;
    font-weight:600;
    word-break:break-all;
}

.copy-btn{
    flex-shrink:0;
}

/* ==========================================
   SUPPORT PAGE
========================================== */

.support-page{
    max-width:700px;
    margin:0 auto;
    padding:20px;
}

.support-card{
    background:linear-gradient(
        180deg,
        rgba(23,33,53,.95),
        rgba(15,22,36,.95)
    );
    border:1px solid rgba(255,255,255,.08);
    border-radius:20px;
    padding:24px;
    box-shadow:0 15px 40px rgba(0,0,0,.25);
}

.support-header{
    text-align:center;
    margin-bottom:25px;
}

.support-header h2{
    margin:0 0 10px;
    font-size:28px;
    font-weight:700;
    color:#fff;
}

.support-header p{
    margin:0;
    color:#9aa4b5;
    font-size:15px;
    line-height:1.6;
}

.support-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:15px;
    margin-top:25px;
}

.support-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:16px;
    border-radius:14px;
    text-decoration:none;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.06);
    transition:.25s ease;
    color:#fff;
}

.support-item:hover{
    transform:translateY(-3px);
    background:rgba(33,150,243,.12);
    border-color:rgba(33,150,243,.4);
}

.support-item i{
    font-size:24px;
    width:28px;
    text-align:center;
}

.support-item span{
    font-size:15px;
    font-weight:600;
}

.support-footer{
    margin-top:25px;
    padding:15px;
    border-radius:14px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.06);
    display:flex;
    align-items:center;
    gap:10px;
    color:#cbd5e1;
}

.support-footer i{
    color:#22c55e;
}

/* Mobile */

@media (max-width:640px){

    .support-page{
        padding:15px;
    }

    .support-grid{
        grid-template-columns:1fr;
    }

    .support-header h2{
        font-size:24px;
    }

    .support-item{
        padding:14px;
    }
}
/* ---- Referrals ---- */
.referral-share .form-label { display: block; margin-bottom: 8px; }
.ref-code-row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 14px; }
.team-list { display: flex; flex-direction: column; gap: 4px; list-style: none; }
.team-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.team-item:last-child { border-bottom: none; }
.team-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.team-name { font-weight: 600; font-size: 14px; }
.team-meta { color: var(--text-muted); font-size: 12px; }

/* ---- Profile ---- */
.profile-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.avatar-lg { width: 64px; height: 64px; font-size: 26px; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-handle { color: var(--text-muted); font-size: 14px; }

/* ---- Mining power grid ---- */
.power-grid { display: flex; flex-direction: column; gap: 14px; }
.power-card-head { display: flex; align-items: center; justify-content: space-between; }
.power-name { font-size: 17px; font-weight: 700; }
.power-card.is-current { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-soft); }
.power-price { font-size: 26px; font-weight: 800; color: var(--primary); margin: 8px 0 14px; letter-spacing: -0.5px; }
.power-specs { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.power-specs li { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-muted); }
.power-specs li svg { color: var(--primary); flex-shrink: 0; }
.power-specs li span { color: var(--text); }

/* ---- Purchase summary + wallets ---- */
.buy-summary { display: flex; flex-direction: column; gap: 2px; }
.buy-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.buy-row:last-child { border-bottom: none; }
.buy-row span { color: var(--text-muted); }
.wallet-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.wallet-row:last-child { border-bottom: none; }
.wallet-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); width: 100%; }
.wallet-addr { flex: 1; min-width: 0; font-family: monospace; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--bg-elevated); border-radius: 6px; padding: 8px 10px; }

/* ---- Notifications ---- */
.notif-list { display: flex; flex-direction: column; gap: 10px; list-style: none; }
.notif-item { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; }
.notif-item.unread { border-color: var(--primary); }
.notif-item.unread::before { content: ""; position: absolute; top: 16px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.notif-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif-title { font-weight: 600; font-size: 14px; }
.notif-text { color: var(--text-muted); font-size: 13px; }
.notif-time { color: var(--text-dim); font-size: 12px; }

.quick-amounts{
    display:flex;
    gap:10px;
    margin-top:12px;
}

.quick-btn{
    border:none;
    padding:10px 16px;
    border-radius:10px;
    background: var(--primary);
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

.quick-btn:hover{
    opacity:.9;
}

.quick-max{
    background: var(--success);
}

/* ---- Pager ---- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.pager-info { color: var(--text-muted); font-size: 13px; }

/* ==================================================================== */
/*  RESPONSIVE                                                          */
/* ==================================================================== */
@media (max-width: 360px) {
  .quick-grid { gap: 8px; }
  .quick-icon { width: 38px; height: 38px; }
  .balance-amount { font-size: 30px; }
  .stat-card .stat-value { font-size: 19px; }
}
/* On tablet/desktop the app stays a centered mobile-app column, but we
   add breathing room and a subtle frame around the shell. */
@media (min-width: 768px) {
  body { padding: 24px 0; }
  .app-shell { border: 1px solid var(--border); border-radius: 24px; overflow: hidden; min-height: calc(100vh - 48px); box-shadow: var(--shadow); }
  .topbar { border-radius: 0; }
}
@media (min-width: 1024px) {
  body { padding: 32px 0; }
}
