:root {
  --bg: #050609;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #ce5815;
  --accent-soft: rgba(206, 88, 21, 0.18);
  --success: #22c55e;
  --danger: #ef4444;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #26273a 0, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-page {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.25rem;
}

.auth-brand p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(206, 88, 21, 0.8);
}

.auth-form { display: grid; gap: 0.85rem; }

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.form-group input:focus {
  outline: none;
  border-color: rgba(206, 88, 21, 0.65);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #f0a040, var(--accent));
  color: #fff;
}

.btn-primary:not(:disabled):hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}

.btn-block { width: 100%; }

.auth-switch {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.alert {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topbar-left h1 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.balance-box {
  text-align: right;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(206, 88, 21, 0.35);
}

.balance-box span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.balance-box strong {
  font-size: 1rem;
  color: #fbbf24;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.card-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.amount-chip {
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}

.amount-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #ffd7b0;
}

.custom-amount-wrap {
  margin-bottom: 0.85rem;
}

.custom-amount-wrap label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.custom-amount-wrap input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.summary-box {
  margin: 0.85rem 0;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}

.summary-row strong { color: var(--text); }

.qris-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.qris-wrap img {
  width: min(260px, 100%);
  border-radius: 14px;
  background: #fff;
  padding: 0.5rem;
}

.qris-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
}

.status-dot.paid { background: var(--success); }
.status-dot.failed { background: var(--danger); }

.text-muted {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
}

.hidden { display: none !important; }

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-right {
    justify-content: space-between;
  }
}
