/* ============================================================
   AuthSite 管理后台样式
   ============================================================ */

/* ---------- 布局骨架 ---------- */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px; flex-shrink: 0;
  background: var(--page-2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  transition: background-color .35s ease, border-color .35s ease;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 9px;
  padding: 18px 20px; font-size: 17px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.sidebar-logo .grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 14px; color: var(--text-2);
  transition: all .2s;
}
.side-link svg { flex-shrink: 0; }
.side-link:hover { color: var(--text-1); background: var(--page); }
.side-link.active { color: #fff; background: var(--brand-grad); font-weight: 500; box-shadow: 0 4px 12px rgba(245, 63, 63, .3); }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }

.main { flex: 1; margin-left: 224px; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  transition: background-color .35s ease, border-color .35s ease;
}
.topbar .crumb { font-size: 15px; font-weight: 600; }
.topbar .right { display: flex; align-items: center; gap: 14px; }
.topbar .admin-name { font-size: 13.5px; color: var(--text-2); }

.content { padding: 28px; flex: 1; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 24px;
}
.login-glow { position: absolute; width: 760px; height: 760px; top: -320px; left: 50%; transform: translateX(-50%); background: radial-gradient(circle, rgba(245, 63, 63, .22), transparent 65%); pointer-events: none; }
.login-card { position: relative; width: 100%; max-width: 400px; padding: 40px 36px; }
.login-card h1 { font-size: 24px; text-align: center; }
.login-card .sub { text-align: center; color: var(--text-3); font-size: 13.5px; margin: 10px 0 28px; }
.login-card .logo-row { display: flex; justify-content: center; margin-bottom: 18px; }
.login-card form { display: flex; flex-direction: column; gap: 16px; }
.login-card .btn { padding: 11px; font-size: 15px; }
.login-theme { position: absolute; top: 20px; right: 20px; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px 22px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 63, 63, .12), transparent 70%); }
.stat-card .num { font-size: 30px; font-weight: 700; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .label { margin-top: 6px; font-size: 13px; color: var(--text-3); }

/* ---------- 面板与表格 ---------- */
.panel { padding: 22px 24px; margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-title { font-size: 16px; font-weight: 600; }
.panel-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel-tools .input, .panel-tools .select { width: auto; min-width: 140px; padding: 7px 12px; font-size: 13px; }

.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th, table.grid td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th { color: var(--text-3); font-weight: 500; font-size: 12.5px; }
table.grid tbody tr { transition: background .15s; }
table.grid tbody tr:hover { background: var(--table-hover); }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; }
.copyable { cursor: pointer; }
.copyable:hover { color: var(--brand); }
.ops { display: flex; gap: 6px; }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; font-size: 14px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.form-grid .span-2 { grid-column: span 2; }
.detail-head { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:22px; }
.back-link { color:var(--text-3); font-size:13px; }
.detail-title { margin:8px 0 4px; font-size:26px; }
.detail-sub { color:var(--text-3); font-size:13px; }
.info-grid, .credential-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:14px; }
.info-grid > div, .credential-grid > div { display:flex; flex-direction:column; gap:6px; padding:13px 15px; border:1px solid var(--line); border-radius:8px; }
.info-grid span, .credential-grid span { color:var(--text-3); font-size:12px; }
.credential-grid code { overflow-wrap:anywhere; color:var(--brand); cursor:pointer; }
.hint, .table-sub { color:var(--text-3); font-size:12px; margin-top:10px; }
.link-list { display:flex; gap:8px; flex-wrap:wrap; }
.check { display:flex; align-items:center; gap:8px; min-height:38px; color:var(--text-2); font-size:13px; }
.textarea { resize:vertical; min-height:90px; }
.inline-form { display: inline; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); padding-bottom: 10px; }
.checkbox-row input { width: 15px; height: 15px; accent-color: var(--brand); }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 16px; font-size: 13px; color: var(--text-3); }
.pager a { padding: 5px 12px; border-radius: 6px; border: 1px solid var(--line); color: var(--text-2); transition: all .2s; }
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager a.cur { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .txt, .sidebar-logo .txt, .sidebar-foot { display: none; }
  .side-link { justify-content: center; padding: 12px; }
  .main { margin-left: 64px; }
  .content { padding: 18px; }
  .form-grid .span-2 { grid-column: span 1; }
}
