/* ============================================================
   Admin dashboard — layered on top of style.css
   ============================================================ */

.admin-login-wrap { max-width: 400px; margin: 8vh auto 0; }

.admin-shell { display: grid; grid-template-columns: 232px 1fr; gap: 24px; align-items: start; padding: 24px 0 60px; }
@media (max-width: 860px) { .admin-shell { grid-template-columns: 1fr; } }

.admin-sidebar {
  position: sticky; top: 88px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 4px;
}
@media (max-width: 860px) {
  .admin-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
}
.tab-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 13px; border-radius: 9px; border: none; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-weight: 500;
  font-size: 0.94rem; text-align: left; transition: background .15s, color .15s;
}
.tab-btn:hover { background: var(--panel-2); color: var(--text); }
.tab-btn.active { background: rgba(232,195,126,0.13); color: var(--gold-2); font-weight: 600; }
.tab-btn .ic { width: 18px; text-align: center; opacity: 0.9; }

.panel { display: none; }
.panel.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 1.45rem; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 180px; }
.toolbar input[type="text"] { margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 16px; }
.pager .info { color: var(--muted); font-size: 0.88rem; }

/* balance editor */
.balance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px) { .balance-grid { grid-template-columns: 1fr; } }
.balance-item { background: rgba(0,0,0,0.18); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.balance-item .b-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.balance-item label { font-weight: 600; font-size: 0.96rem; }
.balance-item .b-desc { color: var(--faint); font-size: 0.82rem; margin: 4px 0 12px; }
.slider-row { display: flex; gap: 12px; align-items: center; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--gold); }
.slider-row input[type="number"] { width: 88px; margin: 0; text-align: center; }
.b-current { font-family: var(--font-display); color: var(--gold-2); font-weight: 700; }

.switch-row { display: flex; align-items: center; gap: 12px; }
.switch-row input { width: auto; }

/* toasts */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow);
  font-size: 0.92rem; border: 1px solid var(--border-2); background: #1a2133; color: var(--text);
  animation: toastin .2s ease;
}
.toast.ok { border-color: rgba(102,207,138,0.5); }
.toast.err { border-color: rgba(236,107,102,0.5); }
.toast.warn { border-color: rgba(232,195,126,0.5); }
@keyframes toastin { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: grid; place-items: center; z-index: 90; padding: 20px; }
.modal { background: #141b2c; border: 1px solid var(--border-2); border-radius: var(--radius); padding: 26px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.empty { text-align: center; color: var(--faint); padding: 40px 20px; }
.you-tag { font-size: 0.74rem; }
