:root {
  --bg: #0b1220;
  --bg-elevated: #121b2e;
  --border: #24304a;
  --text: #e7ecf5;
  --text-dim: #94a3b8;
  --accent: #f5a524;
  --accent-dim: #b97b17;
  --green: #2ecc71;
  --red: #e74c3c;
  --radius: 10px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.container-wide {
  max-width: 1180px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}
.brand .dot { color: var(--accent); }

.nav-links { display: flex; gap: 18px; align-items: center; font-size: 0.95rem; }
.nav-links .muted { color: var(--text-dim); }

h1 { font-size: 1.6rem; margin: 0 0 8px; }
h2 { font-size: 1.2rem; margin: 32px 0 12px; }
p.lead { color: var(--text-dim); margin-top: 0; }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

a.card-link { display: block; color: inherit; transition: border-color .15s, transform .1s; }
a.card-link:hover { border-color: var(--accent); text-decoration: none; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 700px) { .grid-3 { grid-template-columns: 1fr; } }

.tier-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.tier-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tier-card .price { font-size: 1.7rem; font-weight: 700; margin: 8px 0 4px; }
.tier-card .price small { font-size: 0.9rem; color: var(--text-dim); font-weight: 400; }
.tier-card .limit { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 16px; }

label { display: block; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 6px; }
input[type=email], input[type=password], input[type=text], select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0e1729;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 16px;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #1a1300;
  border: none;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.btn:hover { background: #ffb03a; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--bg-elevated); }
.btn.danger { background: var(--red); color: #fff; }

.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 16px 0; }
.pair-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px;
  background: #0e1729; cursor: pointer; font-size: 0.92rem;
}
.pair-chip input { margin: 0; width: auto; }
.pair-chip.disabled { opacity: 0.4; cursor: not-allowed; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge.active { background: rgba(46,204,113,0.15); color: var(--green); }
.badge.pending { background: rgba(245,165,36,0.15); color: var(--accent); }
.badge.expired, .badge.cancelled { background: rgba(231,76,60,0.15); color: var(--red); }
.badge.admin { background: rgba(148,163,184,0.2); color: var(--text); }

.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.95rem; }
.alert.error { background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.4); color: #ffb3ac; }
.alert.success { background: rgba(46,204,113,0.12); border: 1px solid rgba(46,204,113,0.4); color: #9be8b5; }
.alert.info { background: rgba(245,165,36,0.1); border: 1px solid rgba(245,165,36,0.35); color: #ffd694; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
tr:hover td { background: rgba(255,255,255,0.02); }

.form-narrow { max-width: 380px; }
.text-dim { color: var(--text-dim); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
