/* ==========================================================================
   NavStation 后台样式
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --adm-bg: #f4f6fa;
  --adm-card: #ffffff;
  --adm-border: #e6eaf2;
  --adm-text: #111827;
  --adm-text-soft: #374151;
  --adm-muted: #6b7280;
  --adm-brand: #3b6cf6;
  --adm-brand-2: #7c5cff;
  --adm-soft: #eef3ff;
  --adm-danger: #dc2626;
  --adm-success: #059669;
  --adm-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --adm-radius: 14px;
}

[data-theme="dark"] {
  --adm-bg: #0a0e15;
  --adm-card: #121821;
  --adm-border: #222b39;
  --adm-text: #e6ebf3;
  --adm-text-soft: #c2cad8;
  --adm-muted: #8b95a7;
  --adm-soft: #16203a;
  --adm-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body {
  margin: 0;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* ---------- 框架 ---------- */

.adm-shell {
  display: flex;
  min-height: 100vh;
}

.adm-side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  background: #0e1522;
  color: #c9d3e3;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 16px;
  color: #fff;
}

.adm-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  background: linear-gradient(135deg, #3b6cf6, #7c5cff);
  box-shadow: 0 8px 18px rgba(59, 108, 246, 0.3);
}

.adm-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.adm-brand-text strong {
  font-size: 15px;
}

.adm-brand-text small {
  font-size: 10.5px;
  color: #7f8ea4;
  margin-top: 2px;
}

.adm-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.adm-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: #94a1b6;
  transition: 0.15s;
}

.adm-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.adm-menu-item.active {
  background: rgba(59, 108, 246, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(59, 108, 246, 0.35);
}

.adm-menu-item svg {
  flex: 0 0 18px;
  opacity: 0.9;
}

.adm-badge {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
}

.adm-side-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 8px 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #7f8ea4;
}

.adm-side-foot a:hover {
  color: #fff;
}

.adm-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 20, 0.5);
  z-index: 35;
}

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

.adm-top {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--adm-card) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--adm-border);
}

.adm-title {
  min-width: 0;
}

.adm-title h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.2px;
}

.adm-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--adm-soft);
  color: var(--adm-brand);
}

.adm-pill.warn {
  background: #fff7ed;
  color: #c2410c;
}

[data-theme="dark"] .adm-pill.warn {
  background: rgba(251, 146, 60, 0.12);
  color: #fdba74;
}

.adm-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
}

.adm-user:hover {
  background: var(--adm-soft);
}

.adm-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--adm-brand), var(--adm-brand-2));
}

.adm-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.adm-user-info strong {
  font-size: 12.5px;
}

.adm-user-info small {
  font-size: 10.5px;
  color: var(--adm-muted);
}

.adm-content {
  padding: 22px 24px 40px;
  width: 100%;
  max-width: 1360px;
}

.adm-menu-btn {
  display: none;
}

.adm-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--adm-border);
  background: var(--adm-card);
  color: var(--adm-text-soft);
  cursor: pointer;
}

.adm-icon-btn:hover {
  color: var(--adm-brand);
  border-color: color-mix(in srgb, var(--adm-brand) 40%, var(--adm-border));
}

/* ---------- 卡片与通用 ---------- */

.adm-card {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  padding: 20px;
}

.adm-card + .adm-card {
  margin-top: 16px;
}

.adm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.adm-card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.adm-card-head p {
  margin: 0;
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-card-head .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.adm-grid-2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: start;
}

.adm-grid-half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.muted {
  color: var(--adm-muted);
}

.small {
  font-size: 12px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 按钮 ---------- */

.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s;
  white-space: nowrap;
  background: transparent;
}

.adm-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--adm-brand), color-mix(in srgb, var(--adm-brand) 55%, var(--adm-brand-2)));
  box-shadow: 0 6px 14px rgba(59, 108, 246, 0.22);
}

.adm-btn.primary:hover {
  filter: brightness(1.05);
}

.adm-btn.ghost {
  background: var(--adm-card);
  border-color: var(--adm-border);
  color: var(--adm-text-soft);
}

.adm-btn.ghost:hover {
  border-color: color-mix(in srgb, var(--adm-brand) 40%, var(--adm-border));
  color: var(--adm-brand);
}

.adm-btn.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--adm-danger);
}

[data-theme="dark"] .adm-btn.danger {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

.adm-btn.danger:hover {
  background: var(--adm-danger);
  color: #fff;
}

.adm-btn.sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 7px;
}

.adm-btn.block {
  width: 100%;
}

.adm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--adm-muted);
  cursor: pointer;
  font-size: 12px;
}

.link-btn:hover {
  color: var(--adm-brand);
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- 表单 ---------- */

.adm-field {
  margin-bottom: 16px;
}

.adm-field label,
.adm-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--adm-text-soft);
}

.adm-field label em {
  color: var(--adm-danger);
  font-style: normal;
}

.adm-field input[type="text"],
.adm-field input[type="url"],
.adm-field input[type="number"],
.adm-field input[type="password"],
.adm-field input[type="email"],
.adm-field select,
.adm-field textarea,
.adm-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--adm-border);
  border-radius: 9px;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-size: 13.5px;
  outline: 0;
  transition: 0.16s;
}

.adm-field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.adm-field input:focus,
.adm-field select:focus,
.adm-field textarea:focus,
.adm-input:focus {
  background: var(--adm-card);
  border-color: color-mix(in srgb, var(--adm-brand) 55%, var(--adm-border));
  box-shadow: 0 0 0 3px var(--adm-soft);
}

.adm-field small {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--adm-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--adm-text-soft);
  margin-bottom: 10px;
}

.check-line input {
  width: 15px;
  height: 15px;
  accent-color: var(--adm-brand);
}

.radio-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--adm-text-soft);
  margin: 0;
}

/* ---------- 提示 ---------- */

.adm-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}

.adm-alert.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.adm-alert.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

[data-theme="dark"] .adm-alert.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

[data-theme="dark"] .adm-alert.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.adm-alert-close {
  border: 0;
  background: none;
  color: inherit;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.6;
}

/* ---------- 表格 ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 680px;
}

.adm-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-muted);
  background: var(--adm-bg);
  border-bottom: 1px solid var(--adm-border);
  white-space: nowrap;
}

.adm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--adm-border);
  vertical-align: middle;
}

.adm-table tr:last-child td {
  border-bottom: 0;
}

.adm-table tbody tr:hover {
  background: color-mix(in srgb, var(--adm-brand) 3%, transparent);
}

.adm-table .cell-main {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 180px;
}

.adm-table .mini-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  overflow: hidden;
}

.adm-table .mini-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--adm-card);
  padding: 2px;
}

.adm-table .cell-title {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.adm-table .cell-title strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.adm-table .cell-title small {
  font-size: 11px;
  color: var(--adm-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.adm-table th.check,
.adm-table td.check {
  width: 40px;
  padding-right: 0;
}

.adm-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--adm-brand);
}

.adm-table .num {
  color: var(--adm-muted);
  font-variant-numeric: tabular-nums;
}

/* 状态徽章 */
.st {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.st::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.st.on {
  background: #ecfdf5;
  color: #047857;
}

.st.pending {
  background: #fff7ed;
  color: #c2410c;
}

.st.off {
  background: var(--adm-bg);
  color: var(--adm-muted);
}

[data-theme="dark"] .st.on {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}

[data-theme="dark"] .st.pending {
  background: rgba(251, 146, 60, 0.12);
  color: #fdba74;
}

/* ---------- 筛选条 ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.filter-bar select,
.filter-bar input[type="text"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--adm-border);
  border-radius: 9px;
  background: var(--adm-card);
  color: var(--adm-text);
  font-size: 13px;
  outline: 0;
}

.filter-bar input[type="text"] {
  min-width: 200px;
}

.filter-bar .spacer {
  flex: 1;
}

/* ---------- 分页 ---------- */

.adm-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 16px;
}

.adm-pager a,
.adm-pager span {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--adm-text-soft);
  background: var(--adm-card);
}

.adm-pager a:hover {
  border-color: color-mix(in srgb, var(--adm-brand) 40%, var(--adm-border));
  color: var(--adm-brand);
}

.adm-pager .active {
  background: var(--adm-brand);
  border-color: var(--adm-brand);
  color: #fff;
}

.adm-pager .disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- 仪表盘 ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  position: relative;
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 17px 18px;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--adm-soft);
  opacity: 0.7;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--adm-muted);
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--adm-soft);
  color: var(--adm-brand);
}

.stat-value {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1px;
  line-height: 1.15;
}

.stat-sub {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  color: var(--adm-muted);
  margin-top: 2px;
}

.trend {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 168px;
  padding-top: 10px;
}

.trend-item {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.trend-bar {
  width: 100%;
  max-width: 42px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--adm-brand), color-mix(in srgb, var(--adm-brand) 40%, var(--adm-brand-2)));
  min-height: 4px;
  transition: 0.3s;
}

.trend-value {
  font-size: 11px;
  color: var(--adm-muted);
  font-variant-numeric: tabular-nums;
}

.trend-label {
  font-size: 11px;
  color: var(--adm-muted);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--adm-text-soft);
  transition: 0.15s;
}

.quick-item:hover {
  border-color: color-mix(in srgb, var(--adm-brand) 40%, var(--adm-border));
  color: var(--adm-brand);
  background: var(--adm-soft);
}

.quick-item span.qi {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--adm-soft);
  font-size: 14px;
}

/* ---------- 分类管理 ---------- */

.cat-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-cell .emoji {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--adm-bg);
  font-size: 15px;
}

.cat-cell .emoji img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.cat-child {
  padding-left: 30px;
  color: var(--adm-muted);
}

.cat-child::before {
  content: "└";
  margin-right: 6px;
  opacity: 0.5;
}

/* ---------- 站点表单 ---------- */

.icon-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-preview {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 13px;
  border: 1px dashed var(--adm-border);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--adm-bg);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--adm-card);
  padding: 6px;
}

.icon-preview-row .grow {
  flex: 1;
  min-width: 0;
}

/* ---------- 导入 ---------- */

.import-help {
  background: var(--adm-bg);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--adm-muted);
  line-height: 1.8;
}

.import-help code {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11.5px;
}

.import-text {
  width: 100%;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.8;
  outline: 0;
  resize: vertical;
}

.import-text:focus {
  background: var(--adm-card);
  border-color: color-mix(in srgb, var(--adm-brand) 45%, var(--adm-border));
}

.report {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
}

.report.ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.report.bad {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.report ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

/* ---------- 空状态 ---------- */

.adm-empty {
  text-align: center;
  padding: 46px 20px;
  color: var(--adm-muted);
  font-size: 13px;
}

.adm-empty .big {
  font-size: 34px;
  margin-bottom: 10px;
}

/* ---------- 备份 ---------- */

.danger-zone {
  border: 1px solid #fecaca;
  background: #fffafa;
  border-radius: var(--adm-radius);
  padding: 20px;
  margin-top: 16px;
}

[data-theme="dark"] .danger-zone {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.25);
}

.danger-zone h2 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #b91c1c;
}

[data-theme="dark"] .danger-zone h2 {
  color: #fca5a5;
}

.danger-zone p {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--adm-muted);
}

/* ---------- 登录页 ---------- */

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(59, 108, 246, 0.16), transparent 60%),
    radial-gradient(800px 460px at 100% 10%, rgba(124, 92, 255, 0.14), transparent 60%),
    var(--adm-bg);
}

.auth-wrap {
  width: 100%;
  max-width: 900px;
}

.auth-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(16, 24, 40, 0.14);
}

.auth-aside {
  position: relative;
  overflow: hidden;
  padding: 46px 40px;
  color: #fff;
  background: linear-gradient(150deg, #101a30 0%, #1b2b52 48%, #3b2f7a 100%);
}

.auth-aside h1 {
  margin: 34px 0 14px;
  font-size: 30px;
  line-height: 1.28;
  letter-spacing: -0.6px;
}

.auth-aside p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.8;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.auth-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #3b6cf6, #7c5cff);
  box-shadow: 0 10px 20px rgba(59, 108, 246, 0.35);
}

.auth-points {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-points span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-glow {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.5), transparent 65%);
  filter: blur(10px);
}

.auth-form {
  padding: 46px 40px;
}

.auth-form-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.3px;
}

.auth-form-head p {
  margin: 4px 0 24px;
  color: var(--adm-muted);
  font-size: 12.5px;
}

.auth-form .adm-field input {
  height: 44px;
  font-size: 14px;
}

.auth-form .adm-btn {
  height: 44px;
  margin-top: 6px;
  font-size: 14px;
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  font-size: 12px;
  color: var(--adm-muted);
}

.auth-foot a:hover {
  color: var(--adm-brand);
}

.auth-copy {
  text-align: center;
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--adm-muted);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .adm-side {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .adm-side.open {
    transform: translateX(0);
  }

  .adm-mask.show {
    display: block;
  }

  .adm-main {
    margin-left: 0;
  }

  .adm-menu-btn {
    display: grid;
  }

  .adm-content {
    padding: 16px;
  }

  .adm-top {
    padding: 0 16px;
  }

  .adm-grid-2,
  .adm-grid-half {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }

  .auth-form {
    padding: 34px 26px;
  }
}

@media (max-width: 720px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .adm-user-info {
    display: none;
  }

  .adm-pill {
    display: none;
  }

  .adm-title h1 {
    font-size: 15px;
  }

  .adm-top-actions .adm-btn.sm {
    display: none;
  }
}

.adm-field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--adm-border);
  border-radius: 9px;
  background: var(--adm-bg);
  color: var(--adm-text);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.adm-field input[type="file"]:hover {
  border-color: color-mix(in srgb, var(--adm-brand) 45%, var(--adm-border));
  background: var(--adm-card);
}

.adm-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 5px 12px;
  border: 1px solid var(--adm-border);
  border-radius: 7px;
  background: var(--adm-card);
  color: var(--adm-text);
  font-size: 12px;
  cursor: pointer;
}

.adm-field input[type="file"]::file-selector-button:hover {
  border-color: var(--adm-brand);
  color: var(--adm-brand);
}


/* 批量图标抓取 */
.crawl-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--adm-border);
  background: color-mix(in srgb, var(--adm-brand) 3%, var(--adm-card));
}

.crawl-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crawl-label strong {
  font-size: 13px;
}

.crawl-label .muted.small {
  font-size: 11.5px;
}

.crawl-select {
  height: 34px;
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  padding: 0 8px;
  background: var(--adm-card);
  color: var(--adm-text);
  font-size: 12.5px;
}

.crawl-progress {
  flex-basis: 100%;
  margin-top: 2px;
}

.crawl-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--adm-text-soft);
}

.crawl-track {
  height: 8px;
  border-radius: 999px;
  background: var(--adm-bg);
  overflow: hidden;
}

.crawl-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--adm-brand);
  transition: width .25s ease;
}

/* 伪静态设置 */
.pretty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pretty-result {
  font-size: 13px;
  color: var(--adm-muted);
}

.pretty-result.ok { color: var(--adm-success); }
.pretty-result.bad { color: var(--adm-danger); }

.pretty-codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .pretty-codes { grid-template-columns: 1fr; }
}

.pretty-code {
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--adm-bg);
}

.pretty-code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--adm-border);
  font-size: 12px;
  color: var(--adm-text-soft);
  background: var(--adm-card);
}

.pretty-code pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  max-height: 240px;
  font-size: 12px;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}

/* ==========================================================================
   AJAX 提交提示
   ========================================================================== */
.adm-toast-wrap {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.adm-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 440px;
  padding: 12px 16px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: var(--adm-card);
  color: var(--adm-text);
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.18);
  animation: adm-toast-in 0.22s ease;
  pointer-events: auto;
}

.adm-toast-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--adm-success);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.adm-toast.error .adm-toast-ico { background: var(--adm-danger); }
.adm-toast.warning .adm-toast-ico { background: #d97706; }
.adm-toast.error { border-color: rgba(220, 38, 38, 0.35); }
.adm-toast.warning { border-color: rgba(217, 119, 6, 0.35); }

.adm-toast.out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

@keyframes adm-toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 640px) {
  .adm-toast-wrap { left: 14px; right: 14px; bottom: 14px; }
  .adm-toast { max-width: none; }
}
