.admin-workspace {
  width: min(1560px, calc(100% - 32px));
  margin: 18px auto 34px;
}

.admin-gate {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(520px, 100%);
  margin: 70px auto;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.admin-gate p { margin: 0; color: var(--muted); }
.admin-gate-icon { color: var(--gold); font-size: 28px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.admin-stat-card,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 130px),
    var(--panel);
  box-shadow: var(--shadow);
}

.admin-stat-card { display: grid; gap: 8px; padding: 20px; }
.admin-stat-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.admin-stat-card strong { color: var(--teal); font-size: 31px; }

.admin-panel { margin-bottom: 14px; padding: 18px; }
.admin-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.admin-kicker { margin: 0 0 3px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.admin-search { width: min(330px, 100%); }
.admin-filter-actions { display: flex; gap: 8px; }

.admin-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.admin-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.admin-table th,
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-size: 13px; }
.admin-table th { position: sticky; top: 0; z-index: 1; background: var(--panel-soft); color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(32, 214, 191, 0.035); }
.admin-strong-cell { color: var(--ink); font-weight: 800; }
.admin-mono-cell { font-family: "SFMono-Regular", Consolas, monospace; }
.admin-query-cell { max-width: 390px; overflow: hidden; white-space: pre-line; text-overflow: ellipsis; }
td[data-role="admin"] { color: var(--gold); font-weight: 800; }
td[data-result="ok"] { color: var(--green); }
td[data-result="warn"] { color: var(--rose); }
.admin-empty { margin: 16px 0 0; color: var(--muted); text-align: center; }

.admin-password-modal { width: min(450px, 100%); }
.admin-password-account { margin: 8px 0 16px; color: var(--gold); font-weight: 800; }

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 48px));
  padding: 13px 17px;
  border: 1px solid rgba(52, 211, 153, .45);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--green);
  font-weight: 800;
}
.admin-toast[data-type="error"] { border-color: rgba(251, 113, 133, .5); color: var(--rose); }

@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-panel-head { align-items: stretch; flex-direction: column; }
  .admin-search { width: 100%; }
  .admin-filter-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .admin-workspace { width: min(100% - 20px, 1560px); }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-panel { padding: 12px; }
}
