:root {
  --auth-primary: #7c5cff;
  --auth-primary-dark: #6a4df0;
  --auth-bg: #f3f4fb;
  --auth-card: #fff;
  --auth-text: #1f2340;
  --auth-muted: #8b90a8;
  --auth-border: #e8eaf3;
  --auth-danger: #e74c3c;
  --auth-success: #27ae60;
  --auth-warning: #f39c12;
  --auth-info: #3498db;
}

* { box-sizing: border-box; }
body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 50%, #f8f9fd 100%);
  color: var(--auth-text);
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card);
  border-radius: 24px;
  padding: 36px 32px 28px;
  box-shadow: 0 20px 60px rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.08);
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  width: 76px; height: 76px; margin: 0 auto 12px;
  border-radius: 18px;
  background: transparent;
  color: var(--auth-primary); font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: none;
}
.auth-logo-img {
  display: block; width: 76px; height: 76px; object-fit: contain;
  border-radius: 18px; background: transparent;
}
.auth-brand h1 {
  margin: 0; font-size: 28px; color: var(--auth-primary);
}
.auth-brand p {
  margin: 6px 0 0; color: var(--auth-muted); font-size: 14px;
}

.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px;
}
.auth-field input, .auth-field textarea, .auth-field select {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--auth-border); font-size: 14px;
  outline: none; transition: border .2s, box-shadow .2s;
}
.auth-field input:focus, .auth-field textarea:focus, .auth-field select:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; font-size: 13px;
}
.auth-row label { display: flex; align-items: center; gap: 6px; color: var(--auth-muted); cursor: pointer; }
.auth-link { color: var(--auth-primary); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.btn-auth {
  width: 100%; border: none; border-radius: 999px; padding: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, #8b7bff, #6a4df0);
  color: #fff; box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
  transition: transform .15s, box-shadow .15s;
}
.btn-auth:hover { transform: translateY(-1px); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-footer {
  margin-top: 20px; text-align: center; font-size: 13px; color: var(--auth-muted);
}
.auth-footer a { color: var(--auth-primary); text-decoration: none; margin: 0 8px; }
.auth-https-hint { text-align: center; margin-top: 14px; font-size: 13px; color: var(--auth-muted); }
.https-login-link { color: var(--auth-primary); text-decoration: underline; }
.https-login-link:hover { opacity: 0.85; }

.auth-error {
  background: #fff0f0; color: var(--auth-danger); border: 1px solid #ffd6d6;
  padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 14px;
}
.auth-error:empty,
.auth-error.hidden { display: none !important; }

.hidden { display: none !important; }

/* Admin layout */
.admin-body { background: var(--auth-bg); min-height: 100vh; }
.admin-top {
  background: #fff; border-bottom: 1px solid var(--auth-border);
  padding: 14px 24px; display: flex; align-items: center; justify-content: space-between;
}
.admin-top-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.admin-top-brand h1 { margin: 0; font-size: 18px; color: var(--auth-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-header-logo {
  width: 38px; height: 38px; border-radius: 11px; background: transparent; border: 1px solid var(--auth-border);
  color: var(--auth-primary); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.admin-header-logo-img { width: 38px; height: 38px; border-radius: 11px; object-fit: contain; background: transparent; flex-shrink: 0; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 24px; }

.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: #fff; border-radius: 16px; padding: 20px; border: 1px solid var(--auth-border);
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
}
.stat-card .num { font-size: 32px; font-weight: 800; }
.stat-card .label { font-size: 13px; color: var(--auth-muted); margin-top: 4px; }
.stat-card.purple .num { color: var(--auth-primary); }
.stat-card.green .num { color: var(--auth-success); }
.stat-card.orange .num { color: var(--auth-warning); }
.stat-card.blue .num { color: var(--auth-info); }

.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px;
}
.quick-btn {
  background: #fff; border: 1px solid var(--auth-border); border-radius: 14px;
  padding: 18px 12px; text-align: center; cursor: pointer; transition: .15s;
}
.quick-btn:hover, .quick-btn.active { border-color: var(--auth-primary); background: #f8f6ff; }
.quick-btn .ico { font-size: 28px; display: block; margin-bottom: 6px; }
.quick-btn .txt { font-size: 13px; font-weight: 600; }

.panel {
  background: #fff; border-radius: 16px; border: 1px solid var(--auth-border);
  padding: 20px; margin-bottom: 20px; display: none;
}
.panel.active { display: block; }
.panel-title { font-size: 16px; font-weight: 700; margin: 0 0 16px; }
.panel-hint { color: var(--auth-muted); font-size: 13px; margin: -8px 0 16px; line-height: 1.5; }
.settings-status { font-size: 13px; margin: 0 0 12px; min-height: 20px; }
.settings-status.ok { color: #16a34a; }
.settings-status.err { color: #dc2626; }
.settings-status.pending { color: #d97706; }
.site-preview-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px;
  background: var(--auth-card); border: 1px solid var(--auth-border); border-radius: 12px;
}
.site-preview-logo {
  width: 48px; height: 48px; border-radius: 12px; background: transparent; border: 1px solid var(--auth-border);
  color: var(--auth-primary); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.site-preview-img { width: 48px; height: 48px; border-radius: 12px; object-fit: contain; background: transparent; flex-shrink: 0; }
.site-preview-text strong { display: block; font-size: 16px; margin-bottom: 4px; }
.site-preview-text p { margin: 0; color: var(--auth-muted); font-size: 13px; line-height: 1.5; }
.img-upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload-preview { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 1px solid var(--auth-border); }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  padding: 10px 8px; border-bottom: 1px solid var(--auth-border); text-align: left;
}
.admin-table th { color: var(--auth-muted); font-weight: 600; }

/* User center cards */
.user-center-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.user-count-pill {
  flex-shrink:0; padding:6px 12px; border-radius:999px; background:#f2efff; color:var(--auth-primary);
  font-size:12px; font-weight:700;
}
.user-center-toolbar { display:grid; grid-template-columns:minmax(180px,1fr) 160px auto; gap:10px; margin:14px 0 18px; }
.user-center-toolbar input, .user-center-toolbar select {
  height:38px; border:1px solid var(--auth-border); border-radius:10px; padding:0 12px; background:#fff; color:var(--auth-text);
}
.user-card-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.user-card {
  border:1px solid var(--auth-border); border-radius:16px; padding:16px; background:linear-gradient(180deg,#fff,#fbfaff);
  box-shadow:0 8px 24px rgba(69,52,130,.06); min-width:0;
}
.user-card.disabled { opacity:.72; background:#fafafa; }
.user-card-head { display:flex; align-items:center; gap:12px; min-width:0; }
.user-avatar {
  width:46px; height:46px; border-radius:14px; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  color:var(--auth-primary); font-weight:800; font-size:18px; background:var(--auth-card); border:1px solid var(--auth-border);
}
.user-card-title { min-width:0; flex:1; }
.user-name-row { display:flex; align-items:center; gap:8px; min-width:0; }
.user-name-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-id { color:var(--auth-muted); font-size:12px; }
.user-badges { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
.user-badge { padding:2px 7px; border-radius:999px; font-size:11px; font-weight:700; background:#eef2ff; color:#4f46e5; }
.user-badge.admin { background:#f3e8ff; color:#7e22ce; }
.user-badge.vip { background:#fff7ed; color:#c2410c; }
.user-badge.ok { background:#ecfdf5; color:#047857; }
.user-badge.off { background:#fef2f2; color:#b91c1c; }
.user-meta-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:14px 0; }
.user-meta-grid div { background:#f8f8fc; border-radius:10px; padding:8px 10px; min-width:0; }
.user-meta-grid span { display:block; color:var(--auth-muted); font-size:11px; margin-bottom:3px; }
.user-meta-grid strong { display:block; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-password-line { display:flex; align-items:center; gap:8px; padding:9px 10px; border:1px dashed #ddd7f5; border-radius:10px; font-size:12px; }
.user-password-line span { color:var(--auth-muted); }
.user-password-line code { letter-spacing:2px; color:var(--auth-primary); }
.user-password-line small { margin-left:auto; color:var(--auth-muted); }
.user-quotas { display:grid; gap:12px; margin:14px 0; }
.user-quota-label { display:flex; justify-content:space-between; font-size:12px; margin-bottom:5px; }
.user-quota-label span { color:var(--auth-muted); }
.user-quota-track { height:7px; background:#ececf3; border-radius:999px; overflow:hidden; }
.user-quota-track i { display:block; height:100%; border-radius:999px; transition:width .2s; }
.user-quota-track i.video { background:linear-gradient(90deg,#8b7bff,#6a4df0); }
.user-quota-track i.image { background:linear-gradient(90deg,#38bdf8,#0ea5e9); }
.user-quota-sub { margin-top:4px; color:var(--auth-muted); font-size:11px; }
.user-card-actions { display:flex; justify-content:flex-end; gap:7px; padding-top:12px; border-top:1px solid var(--auth-border); }
.user-card-actions .btn-sm + .btn-sm { margin-left:0; }
.user-admin-note { color:var(--auth-muted); font-size:12px; }
.user-empty { text-align:center; color:var(--auth-muted); padding:36px 0; }
.password-result { margin-top:14px; padding:12px; border-radius:12px; background:#f0fdf4; border:1px solid #bbf7d0; }
.password-result-label { color:#166534; font-size:12px; margin-bottom:8px; }
.password-result-value { display:flex; align-items:center; gap:10px; }
.password-result-value code { flex:1; padding:9px 10px; background:#fff; border-radius:8px; font-size:15px; font-weight:700; letter-spacing:1px; }

.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--auth-border);
}

.field-hint { font-size: 12px; color: var(--auth-muted); margin-top: 6px; line-height: 1.5; }

.contact-config-card {
  background: linear-gradient(180deg, #faf9ff 0%, #fff 100%);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 8px;
}
.contact-channels { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.contact-channel {
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.contact-channel.active {
  border-color: rgba(124, 92, 255, 0.45);
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.1);
  background: linear-gradient(180deg, #f8f6ff 0%, #fff 100%);
}
.contact-channel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; font-weight: 600; font-size: 14px; cursor: pointer;
  margin: 0;
}
.contact-channel-head input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--auth-primary); cursor: pointer; }
.contact-channel-body { padding: 0 16px 16px; }
.contact-channel-body.hidden { display: none; }
.contact-qr-preview-wrap { position: relative; display: inline-block; margin-top: 12px; }
.contact-qr-preview {
  width: 120px; height: 120px; object-fit: contain; border-radius: 12px;
  border: 1px solid var(--auth-border); background: #fff; padding: 6px;
}
.contact-qr-rm {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
  border-radius: 50%; border: none; background: var(--auth-primary); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(124,92,255,.35);
}
.vip-config-card {
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  border: 1px solid #fde68a; border-radius: 14px; padding: 16px; margin-bottom: 8px;
}

.ui-select, .ui-input {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--auth-border); font-size: 14px; background: #fff;
  outline: none; transition: border .2s, box-shadow .2s;
}
.ui-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b90a8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.ui-select:focus, .ui-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.12);
}

.auth-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b90a8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.btn-sm {
  border-radius: 10px; font-weight: 600;
  background: linear-gradient(135deg, #8b7bff, #6a4df0);
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.2);
  transition: transform .12s, filter .12s;
}
.btn-sm:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-sm:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm.outline { box-shadow: none; }
.btn-sm.danger { background: var(--auth-danger); box-shadow: 0 4px 12px rgba(231,76,60,.25); }
.btn-sm + .btn-sm { margin-left: 6px; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .stat-grid, .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .user-card-grid { grid-template-columns: 1fr; }
  .user-center-toolbar { grid-template-columns: 1fr 1fr; }
  .user-center-toolbar button { grid-column:1/-1; }
  .user-center-head { flex-direction:column; }
}

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal.hidden { display: none; }
.modal-box {
  background: #fff; border-radius: 16px; max-width: 480px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--auth-border);
}
.modal-head h3 { font-size: 16px; margin: 0; color: var(--auth-primary); }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--auth-muted); line-height: 1; }
.modal-body { padding: 20px; }

.quota-cancel-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.quota-cancel-row .btn-sm { flex: 1 1 150px; }

.user-batch-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -6px 0 16px; padding: 10px 12px;
  border: 1px dashed var(--auth-border); border-radius: 12px; background: #faf9ff;
}
.batch-selection-count { color: var(--auth-muted); font-size: 12px; margin-right: auto; }
.user-select-btn {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px;
  border: 1px solid var(--auth-border); background: var(--auth-card); color: transparent;
  font-size: 13px; font-weight: 900; line-height: 1; cursor: pointer;
}
.user-select-btn.active { color: #fff; background: var(--auth-primary); border-color: var(--auth-primary); }

/* 科技感登录页 */
body.auth-body {
  position: relative; overflow-x: hidden; color: #e8f4ff;
  background:
    radial-gradient(circle at 15% 15%, rgba(0, 198, 255, .20), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(124, 92, 255, .24), transparent 36%),
    linear-gradient(145deg, #050812 0%, #0a1226 52%, #080b18 100%);
}
body.auth-body::before {
  content: ""; position: fixed; inset: -30%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 225, 255, .14), transparent 24%),
    radial-gradient(circle at 70% 65%, rgba(130, 80, 255, .16), transparent 28%);
  animation: auth-float 12s ease-in-out infinite alternate;
}
body.auth-body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image:
    linear-gradient(rgba(80, 200, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 200, 255, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  animation: auth-grid 18s linear infinite;
}
.auth-wrap { position: relative; z-index: 1; }
.auth-card {
  position: relative; background: rgba(11, 18, 35, .84);
  border: 1px solid rgba(70, 210, 255, .22);
  box-shadow: 0 0 80px rgba(0, 160, 255, .20), inset 0 0 42px rgba(0, 180, 255, .045);
  backdrop-filter: blur(18px);
}
.auth-brand h1 { color: #eafcff; text-shadow: 0 0 22px rgba(0, 220, 255, .5); letter-spacing: .8px; }
.auth-brand p { color: #8fb8d8; }
.auth-logo { color: #77e9ff; text-shadow: 0 0 20px rgba(0, 220, 255, .45); }
.auth-field label { color: #a9c9e6; }
.auth-field input, .auth-field textarea, .auth-field select {
  background: rgba(4, 11, 25, .82); border-color: rgba(80, 190, 255, .25); color: #eaf9ff;
}
.auth-field input::placeholder, .auth-field textarea::placeholder { color: #5f7b9a; }
.auth-field input:focus, .auth-field textarea:focus, .auth-field select:focus {
  border-color: #35d7ff; box-shadow: 0 0 0 3px rgba(53, 215, 255, .12), 0 0 22px rgba(53, 215, 255, .18);
}
.auth-row label { color: #8fb8d8; }
.btn-auth {
  background: linear-gradient(120deg, #00c6ff, #5b6cff 55%, #a855f7);
  box-shadow: 0 0 30px rgba(0, 198, 255, .32);
}
.auth-footer { color: #7fa1bf; }
.auth-footer a { color: #67e8ff; }
.auth-error { background: rgba(110, 18, 40, .56); color: #ffb6c2; border-color: rgba(255, 80, 120, .3); }
@keyframes auth-float { from { transform: translate3d(-2%, -1%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.08); } }
@keyframes auth-grid { from { background-position: 0 0, 0 0; } to { background-position: 84px 42px, 84px 42px; } }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--auth-border);
}

.user-card { padding:0; overflow:hidden; }
.user-card-details { width:100%; }
.user-card-summary {
  list-style:none; cursor:pointer; display:flex; align-items:center; gap:12px; padding:15px 16px;
  transition:background .15s;
}
.user-card-summary::-webkit-details-marker { display:none; }
.user-card-summary:hover { background:#faf9ff; }
.user-compact-quota { margin-left:auto; display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.user-compact-quota span { background:#f3f1ff; color:#5b43d6; border-radius:999px; padding:4px 8px; font-size:11px; font-weight:700; }
.user-expand-icon { color:var(--auth-muted); font-size:20px; transition:transform .18s; }
.user-card-details[open] .user-expand-icon { transform:rotate(180deg); }
.user-card-expanded { padding:0 16px 16px; border-top:1px solid var(--auth-border); }
.user-vip-line { display:flex; align-items:center; gap:10px; margin:0 0 14px; font-size:12px; color:var(--auth-muted); }
.user-vip-line > div { display:flex; flex-wrap:wrap; gap:6px; }
.user-vip-line b { font-weight:600; color:#9ca3af; background:#f3f4f6; border-radius:999px; padding:3px 8px; }
.user-vip-line b.vip-on { color:#b45309; background:#fff7ed; }

@media (max-width: 768px) {
  .admin-top { padding: 10px 12px; flex-wrap: wrap; gap: 10px; }
  .admin-top > div:last-child { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  .admin-top-brand h1 { font-size: 16px; }
  .admin-main { padding: 12px; }
  .stat-grid { gap: 10px; margin-bottom: 14px; }
  .stat-card { padding: 14px 10px; border-radius: 12px; }
  .stat-card .num { font-size: 24px; }
  .quick-grid { gap: 10px; margin-bottom: 14px; }
  .quick-btn { padding: 12px 8px; border-radius: 12px; }
  .quick-btn .ico { font-size: 22px; }
  .panel { padding: 14px; border-radius: 14px; overflow-x: auto; }
  .panel-title { font-size: 15px; }
  .panel-hint { font-size: 12px; }
  .user-center-toolbar { grid-template-columns: 1fr; gap: 8px; }
  .user-center-toolbar button { grid-column: auto; }
  .user-batch-toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 0; }
  .batch-selection-count { grid-column: 1 / -1; margin-right: 0; }
  .user-card-summary { flex-wrap: wrap; gap: 8px; padding: 12px; }
  .user-card-title { flex: 1; min-width: 140px; }
  .user-compact-quota { width: 100%; justify-content: flex-start; margin-left: 0; }
  .user-expand-icon { margin-left: auto; }
  .user-meta-grid { grid-template-columns: 1fr 1fr; }
  .user-card-actions { flex-wrap: wrap; }
  .user-card-actions .btn-sm { flex: 1 1 30%; }
  .admin-table { min-width: 720px; }
  .admin-table th, .admin-table td { white-space: nowrap; }
  .modal { padding: 10px; align-items: flex-end; }
  .modal-box { max-height: calc(100vh - 20px); overflow: auto; border-radius: 14px; }
  .modal-body { padding: 14px; }
  .modal-foot { flex-wrap: wrap; padding: 10px 14px; }
  .modal-foot .btn-sm { flex: 1; }
  .quota-cancel-row .btn-sm { flex: 1 1 100%; }
  .site-preview-card { align-items: flex-start; }
  .img-upload-row { align-items: stretch; }
  .img-upload-row .btn-sm { flex: 1 1 45%; }
}
@media (max-width: 420px) {
  .stat-grid, .quick-grid { grid-template-columns: 1fr 1fr; }
  .user-meta-grid { grid-template-columns: 1fr; }
  .user-batch-toolbar { grid-template-columns: 1fr; }
  .user-card-actions .btn-sm { flex: 1 1 100%; }
  .auth-wrap { padding: 14px; }
  .auth-card { padding: 28px 20px 22px; border-radius: 20px; }
  .auth-logo, .auth-logo-img { width: 64px; height: 64px; }
  .auth-brand h1 { font-size: 24px; }
  .form-grid { gap: 10px; }
}


/* Admin form inputs: keep white / clean instead of gray */
.admin-body .auth-field input,
.admin-body .auth-field textarea,
.admin-body .auth-field select,
.admin-body .panel input[type=text],
.admin-body .panel input[type=number],
.admin-body .panel input[type=search],
.admin-body .panel textarea,
.admin-body .panel select {
  background: #fff !important;
  color: var(--auth-text) !important;
  border: 1px solid var(--auth-border) !important;
}
.admin-body .auth-field input:focus,
.admin-body .auth-field textarea:focus,
.admin-body .auth-field select:focus,
.admin-body .panel input:focus,
.admin-body .panel textarea:focus,
.admin-body .panel select:focus {
  border-color: var(--auth-primary) !important;
  box-shadow: 0 0 0 3px rgba(124,92,255,.12) !important;
}
.admin-body input[readonly] { background: #fff !important; }

/* Login logo: diffuse glow + draggable, no hard ring */
.auth-logo { position: relative; cursor: grab; touch-action: none; user-select: none; }
.auth-logo.is-dragging { cursor: grabbing; }
.auth-logo::before {
  content: ""; position: absolute; inset: -22px; border-radius: 50%; z-index: -2;
  background: radial-gradient(circle, rgba(56,189,248,.34) 0%, rgba(59,130,246,.16) 42%, transparent 72%);
  filter: blur(14px); opacity: 0; transform: scale(.86); transition: opacity .35s, transform .35s;
}
.auth-logo::after {
  content: ""; position: absolute; inset: -5px; border-radius: 24px; z-index: -1;
  border: 0;
  box-shadow: 0 0 28px rgba(56,189,248,.28), 0 0 62px rgba(37,99,235,.18);
  opacity: 0; transition: opacity .35s;
}
.auth-logo:hover::before, .auth-logo.is-dragging::before { opacity: 1; transform: scale(1.08); }
.auth-logo:hover::after, .auth-logo.is-dragging::after { opacity: .78; }
.auth-logo .auth-logo-img, .auth-logo img {
  position: relative; z-index: 1; transition: filter .3s, transform .3s;
  filter: brightness(1.45) saturate(1.18) drop-shadow(0 0 11px rgba(124,92,255,.38));
}
.auth-logo:hover .auth-logo-img, .auth-logo:hover img { filter: drop-shadow(0 0 18px rgba(56,189,248,.52)) drop-shadow(0 0 36px rgba(59,130,246,.24)); }

/* 蓝色宇宙动态背景 */
.auth-cosmic-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
}
body.auth-body::before, body.auth-body::after { z-index: 0; }
.auth-wrap { z-index: 3; }
body.auth-cosmic-reduced .auth-cosmic-canvas { display: none; }
