/* ── Account widget (top-bar) ─────────────────────────────────────────────── */
#accountWidget {
  display: flex;
  align-items: center;
  gap: 6px;
}

.acc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.acc-link {
  background: var(--surface, #1e2330);
  color: var(--text, #e4e7f0);
}
.acc-link:hover { background: var(--surface-hi, #252b3b); }

.acc-signin {
  background: var(--accent, #ff4e00);
  color: #fff;
}
.acc-signin:hover { opacity: 0.88; }

.acc-name {
  color: var(--text, #e4e7f0);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-bal {
  color: var(--accent, #ff4e00);
  font-variant-numeric: tabular-nums;
}

.acc-logout {
  background: transparent;
  color: var(--text-faint, #888);
  font-size: 0.75rem;
  padding: 4px 8px;
}
.acc-logout:hover { color: var(--text, #e4e7f0); }

/* ── Page card ───────────────────────────────────────────────────────────── */
.page-card {
  max-width: 820px;
  margin: 32px auto;
  padding: 32px;
  background: var(--surface, #1e2330);
  border-radius: 16px;
  border: 1px solid var(--border, #2a3045);
}

/* ── Auth form ───────────────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-tab {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1px solid var(--border, #2a3045);
  background: transparent;
  color: var(--text-faint, #888);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.auth-tab.active,
.auth-tab:hover {
  background: var(--accent, #ff4e00);
  color: #fff;
  border-color: var(--accent, #ff4e00);
}

.auth-hint {
  color: var(--text-faint, #888);
  font-size: 0.82rem;
  margin: 0 0 16px;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint, #888);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border, #2a3045);
  background: var(--bg, #151822);
  color: var(--text, #e4e7f0);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.form-input:focus {
  border-color: var(--accent, #ff4e00);
}

.auth-err {
  color: #f55;
  font-size: 0.82rem;
  min-height: 1.2em;
  margin: 0 0 12px;
}

.btn-primary {
  padding: 11px 28px;
  border-radius: 8px;
  background: var(--accent, #ff4e00);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.88; }

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-header h2 { margin: 0 0 4px; font-size: 1.3rem; }
.acc-hi { color: var(--accent, #ff4e00); }

.balance-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg, #151822);
  border-radius: 12px;
  border: 1px solid var(--border, #2a3045);
  padding: 20px 40px;
  margin-bottom: 28px;
}
.bal-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-faint, #888);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bal-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent, #ff4e00);
  font-variant-numeric: tabular-nums;
}

.dash-section {
  margin-bottom: 28px;
}
.dash-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text, #e4e7f0);
  border-bottom: 1px solid var(--border, #2a3045);
  padding-bottom: 8px;
}

.how-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-faint, #888);
  font-size: 0.875rem;
  line-height: 2;
}
.how-list strong { color: var(--text, #e4e7f0); }
.how-list code {
  background: var(--bg, #151822);
  border: 1px solid var(--border, #2a3045);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.82rem;
  color: var(--accent, #ff4e00);
}

/* ── Item grid ───────────────────────────────────────────────────────────── */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg, #151822);
  border: 1px solid var(--border, #2a3045);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
}
.item-name { color: var(--text, #e4e7f0); }
.item-pts  { color: var(--accent, #ff4e00); font-weight: 700; white-space: nowrap; margin-left: 8px; }

/* ── Transaction table ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.tx-table th, .tx-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border, #2a3045);
}
.tx-table th {
  color: var(--text-faint, #888);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.tx-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.tx-deposit  { background: #1a3a22; color: #4caf80; }
.tx-withdraw { background: #3a1a1a; color: #f55; }
