:root {
  --bg: #12101c; --panel: #1d1a2e; --panel2: #262240; --line: #352f57;
  --text: #f1eefc; --muted: #9d97bd; --accent: #ffb703; --accent-ink: #1c1400;
  --good: #3ddc97; --bad: #ff5d73; --info: #6ea8ff;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] { }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.wide { max-width: 1100px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.center { text-align: center; }
.hidden { display: none !important; }

input, select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label { display: block; font-size: .85rem; color: var(--muted); margin: 10px 0 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; font: inherit; font-weight: 600; cursor: pointer;
  color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 12px;
  min-height: 46px; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .88rem; border-radius: 9px; }
.btn.block { width: 100%; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem;
  background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.badge.good { color: var(--good); border-color: var(--good); }
.badge.bad { color: var(--bad); border-color: var(--bad); }
.badge.accent { color: var(--accent); border-color: var(--accent); }

.error { background: rgba(255,93,115,.12); border: 1px solid var(--bad); color: #ffc0c9;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.ok { background: rgba(61,220,151,.12); border: 1px solid var(--good); color: #b7f5da;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }

@media (max-width: 480px) {
  .wrap { padding: 12px; }
  .btn { width: 100%; }
  .btn.small { width: auto; }
}
