:root {
  --bg: #0b1220;
  --bg-soft: #101a2e;
  --card: #141f36;
  --card-2: #182643;
  --line: #22304f;
  --text: #e8eefc;
  --muted: #8fa3c8;
  --accent: #4f8cff;
  --accent-2: #7aa5ff;
  --green: #2fbf71;
  --red: #ff5d6c;
  --amber: #ffb454;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

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

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #6f5bff);
  font-size: 14px; font-weight: 800; color: #fff;
}
.nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button {
  padding: 8px 14px; border-radius: 8px; font-size: 14px;
  color: var(--muted); cursor: pointer; border: none; background: transparent;
  font-family: inherit;
}
.nav a:hover, .nav button:hover { color: var(--text); background: var(--card); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--card); }
.nav .pill { background: var(--accent); color: #fff; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit;
  transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

/* cards & layout */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.card h2 { font-size: 17px; margin-bottom: 14px; }
.card h3 { font-size: 15px; margin-bottom: 10px; color: var(--accent-2); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* hero */
.hero { padding: 64px 0 32px; text-align: center; }
.hero h1 { font-size: 38px; margin-bottom: 14px; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), #9f6bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto 24px; font-size: 17px; }
.hero .btn { margin: 0 6px; }

.features { padding: 20px 0 40px; }
.feature-icon { font-size: 26px; margin-bottom: 8px; }

/* stats */
.stat { text-align: center; padding: 18px; }
.stat .num { font-size: 26px; font-weight: 800; color: var(--accent-2); }
.stat .lbl { color: var(--muted); font-size: 13px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin: 0 auto; }
.form label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 4px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
  font-family: inherit; font-size: 15px;
}
.form input:focus, .form select:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form-hint { font-size: 12px; color: var(--muted); }
.form-actions { display: flex; gap: 10px; align-items: center; }

/* auth pages */
.auth-wrap { max-width: 440px; margin: 60px auto; }

/* tables */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: right; padding: 10px 12px; color: var(--muted);
  font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .mono { font-family: Consolas, monospace; direction: ltr; display: inline-block; }

/* badges */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.badge.green { background: rgba(47, 191, 113, .15); color: var(--green); }
.badge.red { background: rgba(255, 93, 108, .15); color: var(--red); }
.badge.amber { background: rgba(255, 180, 84, .15); color: var(--amber); }
.badge.blue { background: rgba(79, 140, 255, .15); color: var(--accent-2); }
.badge.gray { background: rgba(143, 163, 200, .15); color: var(--muted); }

/* alerts */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.alert.error { background: rgba(255, 93, 108, .12); color: var(--red); border: 1px solid rgba(255, 93, 108, .3); }
.alert.success { background: rgba(47, 191, 113, .12); color: var(--green); border: 1px solid rgba(47, 191, 113, .3); }
.alert.info { background: rgba(79, 140, 255, .1); color: var(--accent-2); border: 1px solid rgba(79, 140, 255, .3); }

/* tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  padding: 9px 16px; border-radius: 10px 10px 0 0; border: none; cursor: pointer;
  background: transparent; color: var(--muted); font-family: inherit; font-size: 14px;
}
.tabs button.active { background: var(--card); color: var(--text); border: 1px solid var(--line); border-bottom-color: var(--card); }

/* misc */
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 16px; }
.mono { font-family: Consolas, "Courier New", monospace; direction: ltr; unicode-bidi: embed; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: none; }
.key-secret {
  background: var(--bg-soft); border: 1px dashed var(--accent);
  padding: 12px; border-radius: 10px; word-break: break-all;
  font-family: Consolas, monospace; direction: ltr; margin: 10px 0;
}
.copy-note { font-size: 12px; color: var(--amber); }
.spin {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; vertical-align: middle; margin-inline-start: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.deposit-ref {
  background: var(--bg-soft); border: 1px solid var(--accent); border-radius: 10px;
  padding: 14px; text-align: center; font-family: Consolas, monospace;
  font-size: 20px; direction: ltr; letter-spacing: 1px; margin: 12px 0;
}
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.space-between { justify-content: space-between; }
.api-snippet {
  background: #0a0f1c; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; font-family: Consolas, monospace; font-size: 12.5px;
  direction: ltr; text-align: left; overflow-x: auto; white-space: pre;
  color: #9ecbff; margin-top: 10px;
}
footer.footer { margin-top: 60px; padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
