.auth-page, .cabinet-page {
  min-height: 100vh;
  background: var(--background, #0f172a);
  color: var(--text, #e2e8f0);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  padding: 1.5rem;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.auth-card h1 { margin: 0 0 0.25rem; font-size: 1.6rem; }
.auth-subtitle { margin: 0 0 1.5rem; color: #94a3b8; }

.tabs { display: flex; gap: 0.25rem; background: #0b1220; padding: 4px; border-radius: 10px; margin-bottom: 1rem; }
.tab { flex: 1; padding: 0.5rem; background: transparent; color: #94a3b8; border: none; border-radius: 8px; cursor: pointer; }
.tab.active { background: #6366f1; color: white; }

.auth-form { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-form.hidden { display: none; }
.auth-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; color: #cbd5e1; }
.auth-form input {
  background: #0b1220; color: #e2e8f0; border: 1px solid #1f2937;
  padding: 0.6rem 0.75rem; border-radius: 8px; font-size: 1rem;
}
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white; border: none; padding: 0.7rem 1rem; border-radius: 10px;
  font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-secondary {
  background: #1f2937; color: #e2e8f0; border: 1px solid #334155;
  padding: 0.5rem 0.9rem; border-radius: 8px; cursor: pointer;
}
.btn-back { color: #94a3b8; text-decoration: none; }

.divider { text-align: center; color: #64748b; margin: 1rem 0; position: relative; }
.divider::before, .divider::after {
  content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: #1f2937;
}
.divider::before { left: 0; } .divider::after { right: 0; }

.tg-login { display: flex; justify-content: center; }
.hint { color: #64748b; font-size: 0.85rem; margin-top: 0.5rem; text-align: center; }
.error { color: #f87171; margin-top: 0.75rem; min-height: 1.2em; text-align: center; }

/* Cabinet */
.cabinet-header {
  max-width: 900px; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.cabinet-header h1 { margin: 0; font-size: 1.3rem; }
.cabinet-main { max-width: 900px; margin: 0 auto; display: grid; gap: 1rem; }
.card { background: #111827; border: 1px solid #1f2937; border-radius: 14px; padding: 1.25rem 1.5rem; }
.card h2 { margin: 0 0 0.75rem; font-size: 1.05rem; color: #cbd5e1; }
.balance-big { font-size: 2.2rem; font-weight: 700; }
.balance-big .unit { color: #94a3b8; font-size: 1rem; margin-left: 0.25rem; }
.topup-form { display: flex; gap: 0.5rem; align-items: end; flex-wrap: wrap; }
.topup-form label { display: flex; flex-direction: column; gap: 0.25rem; color: #cbd5e1; flex: 1; min-width: 140px; }
.topup-form input { background: #0b1220; color: #e2e8f0; border: 1px solid #1f2937; padding: 0.55rem; border-radius: 8px; font-size: 1rem; }

.row { padding: 0.5rem 0; border-bottom: 1px solid #1f2937; }
.row:last-child { border-bottom: none; }
.muted { color: #64748b; font-size: 0.9rem; }
.pos { color: #34d399; } .neg { color: #f87171; }
.invoice { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
