/* OneBit Exchange — premium admin */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #0b0d10;
  --bg-elev: #12151a;
  --bg-soft: #181c23;
  --line: rgba(255,255,255,.06);
  --line-strong: rgba(255,255,255,.12);
  --text: #eef1f6;
  --muted: #8b93a7;
  --gold: #d4a853;
  --gold-soft: rgba(212,168,83,.15);
  --gold-strong: #f0c674;
  --ok: #3dcf8e;
  --ok-bg: rgba(61,207,142,.12);
  --warn: #f0b429;
  --warn-bg: rgba(240,180,41,.12);
  --danger: #ff6b6b;
  --danger-bg: rgba(255,107,107,.12);
  --info: #5b8def;
  --radius: 14px;
  --shadow: 0 20px 50px rgba(0,0,0,.45);
  --font: 'IBM Plex Sans', system-ui, sans-serif;
  --display: 'Sora', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(212,168,83,.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(91,141,239,.08), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--gold-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%), var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 1.35rem;
  margin: 0 0 4px;
}
.brand span { color: var(--gold); }
.brand-sub { color: var(--muted); font-size: .9rem; margin: 0 0 28px; }

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: rgba(18,21,26,.92);
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { padding: 0 10px; margin-bottom: 6px; }
.sidebar .brand-sub { padding: 0 10px; margin-bottom: 28px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 4px;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav a.active {
  background: var(--gold-soft);
  color: var(--gold-strong);
  box-shadow: inset 0 0 0 1px rgba(212,168,83,.25);
}

.content { padding: 28px 32px 48px; }
.page-title {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.page-desc { color: var(--muted); margin: 0 0 24px; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
}
.stat .label { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.stat .value {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.02em;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.card h2 {
  font-family: var(--display);
  font-size: 1.05rem;
  margin: 0 0 16px;
  font-weight: 600;
}

.flash {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: .92rem;
}
.flash.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(61,207,142,.25); }
.flash.err { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255,107,107,.25); }

label {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 500;
}
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 90px; resize: vertical; font-family: var(--mono); font-size: .88rem; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(212,168,83,.55);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.form-row { margin-bottom: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s, opacity .15s;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #e0b45f, #c9962f);
  color: #1a1408;
}
.btn-ghost {
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(61,207,142,.3); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255,107,107,.3); }
.btn-sm { padding: 7px 10px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
th, td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
td.mono, .mono { font-family: var(--mono); font-size: .84rem; }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-waiting { background: var(--warn-bg); color: var(--warn); }
.badge-processing { background: rgba(91,141,239,.15); color: #8eb6ff; }
.badge-completed { background: var(--ok-bg); color: var(--ok); }
.badge-cancelled { background: var(--danger-bg); color: var(--danger); }

.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 140px; }

.footer-note {
  color: var(--muted);
  font-size: .8rem;
  margin-top: 28px;
}

@media (max-width: 1100px) {
  .grid-stats { grid-template-columns: 1fr 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
}
