
.admin-body { overflow: hidden; }

.admin-login {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 20px;
  z-index: 1;
}
.login-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 420px;
  background: #2b2b2b;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 28px 24px;
  box-shadow: var(--shadow-2);
  animation: fadeUp var(--slow) var(--ease);
}
.login-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.login-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.login-sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.back-link {
  display: block; text-align: center;
  margin-top: 14px; font-size: 12.5px; color: var(--text-3);
  transition: color var(--fast) var(--ease);
}
.back-link:hover { color: var(--text-1); }

.admin-shell {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
}

.admin-sidebar {
  display: flex; flex-direction: column;
  background: rgba(12, 14, 22, 0.9);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 6px 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.brand-title { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; word-break: break-all; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.snav {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  text-align: left;
  width: 100%;
  transition: all var(--fast) var(--ease);
}
.snav:hover { background: var(--bg-3); color: var(--text-0); }
.snav.active {
  background: var(--accent-grad-soft);
  color: var(--text-0);
  box-shadow: inset 0 0 0 1px rgba(22, 199, 132, 0.25);
}
.snav svg { flex-shrink: 0; }
.badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

.admin-main {
  overflow-y: auto;
  padding: 24px 28px 40px;
}
.view { animation: fadeUp var(--med) var(--ease); }
.view[hidden] { display: none; }
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.view-header h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.link-btn {
  font-size: 13px; font-weight: 600;
  color: var(--accent-2);
  transition: color var(--fast) var(--ease);
}
.link-btn:hover { color: var(--text-0); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform var(--fast) var(--ease);
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card.highlight {
  background: var(--bg-2);
  border-color: rgba(22, 199, 132, 0.25);
}
.stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-val { font-weight: 700; font-size: 26px; letter-spacing: -0.01em; font-feature-settings: 'tnum'; margin-top: 4px; }
.stat-hint { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 14px; font-weight: 600; }

.table-wrap { overflow-x: auto; }
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-feature-settings: 'tnum';
}
.tbl th, .tbl td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.tbl th {
  font-size: 11px; font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.15);
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.row-hover:hover td { background: var(--bg-3); cursor: pointer; }
.tbl .mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.tbl .right { text-align: right; }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; }

.empty {
  padding: 28px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.credited  { background: var(--green-soft);  color: var(--green); }
.pill.pending   { background: rgba(245,158,11,0.12); color: #fbbf24; }
.pill.broadcast { background: rgba(59,130,246,0.12); color: #60a5fa; }
.pill.confirmed { background: var(--green-soft); color: var(--green); }
.pill.rejected  { background: var(--red-soft);    color: var(--red); }
.pill.admin     { background: var(--accent-grad-soft); color: var(--accent-2); }

.filters { display: flex; gap: 8px; }
.select-sm {
  background: var(--bg-3);
  color: var(--text-1);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
.tab-row { display: flex; gap: 4px; padding: 3px; background: var(--bg-2); border-radius: 8px; }
.wtab {
  padding: 6px 14px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-2);
  border-radius: 6px;
  transition: all var(--fast) var(--ease);
}
.wtab:hover { color: var(--text-0); }
.wtab.active { background: var(--bg-1); color: var(--text-0); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }

.btn-sm {
  padding: 5px 10px;
  font-size: 12px; font-weight: 600;
  border-radius: 6px;
  transition: all var(--fast) var(--ease);
}
.btn-sm.approve { background: var(--green); color: #fff; }
.btn-sm.decline { background: var(--red);   color: #fff; }
.btn-sm.ghost   { background: var(--bg-3);  color: var(--text-1); border: 1px solid var(--border); }
.btn-sm.approve:hover, .btn-sm.decline:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-sm.ghost:hover { background: var(--bg-hover); color: var(--text-0); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.detail-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.detail-card h3 {
  font-size: 12.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k { color: var(--text-2); }
.detail-row .v { font-feature-settings: 'tnum'; }

.wallet-row {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  padding: 10px 0;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.wallet-row:last-child { border-bottom: none; }
.wallet-row code { font-size: 11.5px; word-break: break-all; color: var(--text-1); }
.wallet-row .ccy { font-weight: 700; font-size: 13.5px; }
.wallet-row .ccy small { display: block; font-weight: 400; font-size: 10.5px; color: var(--text-3); }

.bal-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr auto;
  gap: 8px;
  padding: 9px 0;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.bal-row:last-child { border-bottom: none; }
.bal-row .ccy { font-weight: 600; }
.bal-row .num { text-align: right; font-feature-settings: 'tnum'; }
.bal-row .lk  { color: var(--text-3); font-size: 11.5px; text-align: right; }

.admin-modal { max-width: 480px; }
.modal-section { margin-bottom: 14px; }
.modal-section h4 {
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px;
}
.kv-grid {
  display: grid; grid-template-columns: 110px 1fr;
  font-size: 13px; gap: 4px 12px;
}
.kv-grid .k { color: var(--text-3); }
.kv-grid .v { font-feature-settings: 'tnum'; word-break: break-all; }
.signed {
  font-weight: 700; font-feature-settings: 'tnum';
}
.signed.pos { color: var(--green); }
.signed.neg { color: var(--red); }
.radio-row {
  display: flex; gap: 8px;
  margin: 8px 0;
}
.radio-card {
  flex: 1;
  padding: 10px;
  background: var(--bg-3);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  text-align: center;
  transition: all var(--fast) var(--ease);
}
.radio-card:hover { background: var(--bg-hover); }
.radio-card.active.credit { background: var(--green-soft); border-color: rgba(22,199,132,0.4); color: var(--green); }
.radio-card.active.debit  { background: var(--red-soft);   border-color: rgba(234,57,67,0.4); color: var(--red); }

textarea.reason-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-0);
  min-height: 70px;
  resize: vertical;
  transition: border-color var(--fast) var(--ease);
}
textarea.reason-input:focus { border-color: var(--accent); outline: none; }

.kyc-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0 18px;
}
.kyc-photos:has(.kyc-photo:only-child) { grid-template-columns: 1fr; }
.kyc-photo h4 {
  font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.kyc-photo-frame {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 180px;
  display: grid; place-items: center;
  overflow: hidden;
}
.kyc-photo-frame img {
  width: 100%; height: auto; max-height: 280px;
  object-fit: contain;
  display: block;
}

.ktab {
  padding: 6px 14px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-2);
  border-radius: 6px;
  transition: all var(--fast) var(--ease);
}
.ktab:hover { color: var(--text-0); }
.ktab.active { background: var(--bg-1); color: var(--text-0); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }

.schedule-form {
  display: flex; flex-direction: column;
  gap: 10px;
  max-width: 480px;
}
.schedule-form .form-field { margin-bottom: 0; }
.schedule-form .select {
  width: 100%;
  background: var(--bg-3);
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13.5px;
  color: var(--text-0);
  transition: border-color var(--fast) var(--ease);
  font-family: inherit;
}
.schedule-form .select:focus { border-color: var(--accent); outline: none; }
.schedule-tabs {
  display: flex; gap: 4px; padding: 3px;
  background: var(--bg-3);
  border-radius: 8px;
  margin-bottom: 10px;
  width: fit-content;
}
.stab {
  padding: 6px 14px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-2);
  border-radius: 6px;
  transition: all var(--fast) var(--ease);
}
.stab:hover { color: var(--text-0); }
.stab.active { background: var(--bg-1); color: var(--text-0); box-shadow: 0 1px 0 rgba(255,255,255,0.06); }

.toggle {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer;
  inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.slider::before {
  content: ''; position: absolute;
  height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: var(--text-1);
  border-radius: 50%;
  transition: transform var(--med) var(--ease), background var(--fast) var(--ease);
}
.toggle input:checked + .slider { background: var(--accent-grad); border-color: transparent; }
.toggle input:checked + .slider::before { transform: translateX(20px); background: #fff; }

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-grad);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(22, 199, 132,0.4);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.admin-mobile-topbar { display: none; }
.admin-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5, 6, 11, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--med) var(--ease);
}
.admin-backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 920px) {
  .cards-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }

  .admin-shell { grid-template-columns: 1fr; }
  .admin-main { padding: 14px 14px 32px; }
  .admin-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: 260px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--med) var(--ease);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
  }
  .admin-sidebar.open { transform: translateX(0); }

  .admin-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 14px;
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(7, 8, 13, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 80;
  }
  .admin-mobile-title {
    font-weight: 700; font-size: 15px;
    color: var(--accent);
  }
  .hamburger {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-1);
    transition: background var(--fast) var(--ease);
    -webkit-tap-highlight-color: transparent;
  }
  .hamburger:active { background: var(--bg-hover); }

  .tbl th, .tbl td { padding: 10px 12px; }
  .btn-sm { padding: 7px 12px; }

  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-val { font-size: 22px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .view-header h1 { font-size: 18px; }
  .admin-modal { max-width: 100%; }

  .tbl th, .tbl td { padding: 8px 10px; font-size: 12px; }
}
