@font-face {
  font-family: "ProximaNova";
  src: url("../res/Fonts/Brand_Proximanova/moon_proximanova_regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "ProximaNova";
  src: url("../res/Fonts/Brand_Proximanova/moon_proximanova_medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "ProximaNova";
  src: url("../res/Fonts/Brand_Proximanova/moon_proximanova_semibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #0b0e11;
  --bg-card: #1e2329;
  --bg-elevated: #2b3139;
  --yellow: #fcd535;
  --yellow-bnb: #f0b90b;
  --text: #eaecef;
  --text-secondary: #848e9c;
  --text-muted: #5e6673;
  --green: #0ecb81;
  --red: #f6465d;
  --border: #2a323c;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: ProximaNova, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #181a20;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.bn-login-body {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: #202630;
}
.phone.bn-login {
  width: 100%;
  max-width: 390px;
  min-height: 100dvh;
  background: #202630;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (max-width: 520px) {
  .phone.bn-login { max-width: none; }
}
.bn-login-body-scroll {
  padding: 20px 24px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.bn-brand {
  display: flex;
  align-items: center;
  margin: 8px 0 28px;
}
.bn-brand-logo {
  height: 28px;
  width: auto;
  display: block;
  mix-blend-mode: screen;
}
.bn-out {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}
.bn-out img {
  height: 36px;
  width: auto;
  mix-blend-mode: screen;
}
.bn-out.hide { opacity: 0; pointer-events: none; }
.bn-login h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  line-height: 1.15;
  color: #fff;
}
.bn-field { display: block; margin-bottom: 16px; }
.bn-field[hidden], .bn-step[hidden], .bn-links[hidden], .bn-or[hidden], .bn-social[hidden], .bn-alt[hidden] {
  display: none !important;
}
.bn-field > span {
  display: block;
  font-size: 14px;
  color: #848e9c;
  margin-bottom: 8px;
}
.bn-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #202630;
  border: 1px solid #474d57;
  border-radius: 8px;
  min-height: 48px;
}
.bn-box:focus-within {
  border-color: #fcd535;
  box-shadow: 0 0 0 1px #fcd535, 0 0 10px rgba(252, 213, 53, 0.45);
}
.bn-box.err {
  border-color: #f6465d;
  box-shadow: none;
}
.bn-box.err:focus-within {
  border-color: #f6465d;
  box-shadow: 0 0 0 1px #f6465d;
}
.bn-box input {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 16px;
  padding: 12px 44px 12px 14px;
  outline: none;
  box-shadow: none;
}
.bn-box input:invalid,
.bn-box input:user-invalid,
.bn-box input:-moz-ui-invalid {
  box-shadow: none;
}
.bn-box input::placeholder { color: #5e6673; }
.bn-id-wrap { position: relative; }
.bn-bubble {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 12;
  margin-top: 4px;
  background: #202630;
  border: 1px solid #2b3139;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  overflow: hidden;
}
.bn-bubble[hidden] { display: none !important; }
.bn-email-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}
.bn-email-item:hover,
.bn-email-item[aria-selected="true"] { background: #2b3139; }
.bn-email-local { color: #5e6673; }
.bn-email-domain { color: #fff; }
.bn-clear, .bn-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: #848e9c;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.bn-clear[hidden] { display: none !important; }
.bn-clear svg, .bn-eye svg { width: 20px; height: 20px; }
.bn-primary {
  width: 100%;
  border: 0;
  background: #fcd535;
  color: #181a20;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  height: 48px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.bn-primary:disabled {
  background: #fcd535;
  color: #181a20;
  opacity: 1;
  cursor: pointer;
}
.bn-primary.loading,
.bn-primary.loading:disabled {
  pointer-events: none;
  background: #fcd535;
  color: #181a20;
}
.bn-primary.loading .bn-btn-label { display: none; }
.bn-btn-load {
  display: none;
  align-items: center;
  justify-content: center;
  height: 22px;
}
.bn-primary.loading .bn-btn-load { display: flex; }
.bn-sa-gif {
  height: 22px;
  width: auto;
  display: none;
}
.bn-sa-gif.ok { display: block; }
.bn-sa-gif.ok + .bn-eq { display: none; }
.bn-eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}
.bn-eq i {
  display: block;
  width: 3px;
  background: #181a20;
  border-radius: 1px;
  transform-origin: bottom;
  animation: bn-eq 0.55s ease-in-out infinite;
}
.bn-eq i:nth-child(1) { height: 7px; animation-delay: 0s; }
.bn-eq i:nth-child(2) { height: 16px; animation-delay: 0.12s; }
.bn-eq i:nth-child(3) { height: 10px; animation-delay: 0.24s; }
@keyframes bn-eq {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.bn-error {
  color: #f6465d;
  font-size: 12px;
  line-height: 1.35;
  margin: 4px 0 0;
}
.bn-error[hidden] { display: none !important; }
#idWrap { margin-bottom: 16px; }
#idWrap .bn-error { margin-top: 4px; }
.bn-or {
  margin: 28px 0 18px;
  text-align: center;
  position: relative;
  color: #848e9c;
  font-size: 12px;
}
.bn-or::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #2b3139;
}
.bn-or span {
  position: relative;
  background: #202630;
  padding: 0 12px;
  color: #fff;
}
.bn-social {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bn-soc {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #474d57;
  background: #202630;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  position: relative;
}
.bn-soc svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}
.bn-links {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.bn-text {
  border: 0;
  background: none;
  color: #fcd535;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.bn-foot {
  margin-top: auto;
  padding: 18px 0 12px;
  display: flex;
  justify-content: center;
  gap: 22px;
  color: #848e9c;
  font-size: 12px;
}
.bn-foot button, .bn-foot a {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bn-foot svg { width: 14px; height: 14px; color: #fff; stroke: #fff; }

.auth-body {
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 16px 48px;
  background: #0b0e11;
}
.auth-phone { width: 100%; max-width: 420px; }
.auth-top {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 18px; margin-bottom: 36px;
}
.auth-top img { border-radius: 6px; }
.auth-phone h1 { font-size: 32px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.03em; }
.auth-sub { color: var(--text-secondary); margin: 0 0 22px; font-size: 14px; }
.auth-hint { color: var(--text-muted); font-size: 12px; line-height: 1.55; margin: 22px 0 10px; }
.auth-hint b { color: var(--text-secondary); font-weight: 500; }
.auth-admin-link { color: var(--yellow-bnb); font-size: 13px; text-decoration: none; }

.auth-field, .adm-field { display: block; }
.auth-field span, .adm-field span { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.auth-field input, .adm-field input, .adm-field select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  outline: none;
}
.auth-btn, .adm-btn {
  width: 100%;
  border: 0;
  background: var(--yellow);
  color: #181a20;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 13px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
}
.auth-error { color: var(--red); font-size: 13px; }

.adm-shell { min-height: 100dvh; }
.adm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #12161c;
  position: sticky;
  top: 0;
  z-index: 5;
}
.adm-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.adm-brand img { border-radius: 6px; }
.adm-brand small { color: var(--text-secondary); font-weight: 400; margin-left: 4px; }
.adm-bar-actions { display: flex; gap: 8px; align-items: center; }
.adm-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 10px;
}
.adm-link:hover { color: var(--text); }
.adm-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }
.adm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.adm-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.adm-stat .k { color: var(--text-secondary); font-size: 12px; margin-bottom: 6px; }
.adm-stat .v { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.adm-stat .v.g { color: var(--green); }
.adm-stat .v.y { color: var(--yellow); }
.adm-stat .v.r { color: var(--red); }
.adm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.adm-toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
}
.adm-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}
table.adm {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.adm th, table.adm td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.adm th { color: var(--text-secondary); font-weight: 500; font-size: 12px; }
table.adm tr:last-child td { border-bottom: 0; }
table.adm .mono { font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}
.pill.active { color: var(--green); background: rgba(14, 203, 129, 0.12); }
.pill.frozen { color: var(--yellow); background: rgba(240, 185, 11, 0.12); }
.pill.disabled { color: var(--red); background: rgba(246, 70, 93, 0.12); }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-mini {
  border: 0;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.adm-mini.warn { color: var(--yellow); }
.adm-mini.danger { color: var(--red); }
.adm-mini.ok { color: var(--green); }
.adm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}
.adm-modal.open { display: flex; }
.adm-dialog {
  width: min(420px, 100%);
  background: #1e2329;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.adm-dialog h3 { margin: 0 0 14px; font-size: 18px; }
.adm-dialog.wide { width: min(560px, 100%); max-height: 88dvh; overflow: auto; }
.adm-field { margin-bottom: 12px; }
.adm-field span { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.row-btns { display: flex; gap: 8px; margin-top: 8px; }
.row-btns .adm-btn { flex: 1; margin-top: 0; }
.ghost { background: var(--bg-elevated) !important; color: var(--text) !important; }

.adm-tabs { display: flex; gap: 6px; margin: 0 0 18px; }
.adm-tab {
  border: 0;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.adm-tab.on { background: #fcd535; color: #0b0e11; }
.adm-panel[hidden] { display: none !important; }

.adm-coin-add {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 8px;
  margin-bottom: 14px;
}
.adm-coin-add input {
  background: #2b3139;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
}
.adm-toggle {
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 99px;
  background: #474d57;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
}
.adm-toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eaecef;
  top: 3px;
  left: 3px;
  transition: transform .15s ease;
}
.adm-toggle.on { background: #0ecb81; }
.adm-toggle.on::after { transform: translateX(18px); }
.adm-toggle:disabled { opacity: .45; cursor: not-allowed; }

.adm-wallet-grid { display: grid; gap: 10px; margin: 4px 0 14px; }
.adm-wallet-row {
  display: grid;
  grid-template-columns: 28px 1fr 140px;
  gap: 10px;
  align-items: center;
}
.adm-wallet-row img { width: 28px; height: 28px; border-radius: 50%; background: #2b3139; }
.adm-wallet-row .sym { font-weight: 600; font-size: 13px; }
.adm-wallet-row .nm { font-size: 11px; color: var(--text-secondary); }
.adm-wallet-row input {
  width: 100%;
  background: #2b3139;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.adm-hint { font-size: 12px; color: var(--text-secondary); margin: 0 0 12px; }

@media (max-width: 860px) {
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-coin-add { grid-template-columns: 1fr; }
}
