:root {
  --bg: #0f1115;
  --card: #1a1d24;
  --border: #2a2f3a;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --orange: #e67e22;
  --orange-dim: #c66a1a;
  --green: #2ecc71;
  --red: #e74c3c;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(230, 126, 34, 0.18), transparent 60%),
    radial-gradient(800px 400px at 100% 0%, rgba(52, 152, 219, 0.12), transparent 50%),
    var(--bg);
  color: var(--text);
}
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}
.wrap.wide { max-width: 860px; }

.brand { text-align: center; margin-bottom: 1.5rem; }
.brand h1 { margin: 0.4rem 0 0.2rem; font-size: 1.75rem; letter-spacing: -0.02em; }
.logo {
  width: 64px; height: 64px; margin: 0 auto;
  display: grid; place-items: center;
  font-size: 2rem;
  background: linear-gradient(145deg, #f39c12, #e67e22);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(230, 126, 34, 0.35);
}
.logo-sm { font-size: 1.4rem; }

.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.card h2 { margin: 0 0 1rem; font-size: 1.15rem; }

.form { display: grid; gap: 1rem; margin-top: 1rem; }
label { display: grid; gap: 0.4rem; font-size: 0.9rem; color: var(--muted); }
input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #12151b;
  color: var(--text);
  font-size: 1rem;
}
input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
}
.btn.primary {
  background: linear-gradient(180deg, #f39c12, var(--orange));
  color: #1a1208;
  border: none;
  width: 100%;
  padding: 0.85rem;
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn.ghost:hover { border-color: var(--orange); color: var(--orange); text-decoration: none; }

.alert {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.alert.error {
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #ffb4a9;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.brand-inline { display: flex; align-items: center; gap: 0.5rem; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.balance-card {
  background: linear-gradient(135deg, #2a1f14 0%, #1a1d24 55%);
  border: 1px solid rgba(230, 126, 34, 0.35);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  margin-bottom: 1.25rem;
}
.balance {
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.2rem 0 0.5rem;
}
.balance span { font-size: 0.55em; color: var(--orange); font-weight: 600; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.plus { color: var(--green); font-weight: 600; white-space: nowrap; }
.minus { color: var(--red); font-weight: 600; white-space: nowrap; }

.foot { text-align: center; margin-top: 2rem; font-size: 0.85rem; }

@media (max-width: 560px) {
  th:first-child, td:first-child { display: none; }
}
