/* ============================================================
   教师文件管理 v1 —— 现代化界面样式（无框架、中文友好、响应式）
   ============================================================ */

:root {
  --bg: #f5f6fb;
  --bg-soft: #eef1f8;
  --card: #ffffff;
  --card-subtle: #f8fafc;
  --border: #e6e9f2;
  --border-strong: #d6dbe8;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #eef2ff;
  --primary-text: #3730a3;
  --success: #16a34a;
  --success-soft: #ecfdf3;
  --success-border: #bbf7d0;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.35), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lift: 0 18px 44px -20px rgba(79, 70, 229, 0.45), 0 4px 10px rgba(15, 23, 42, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  background: var(--bg);
  background-image:
    radial-gradient(60rem 32rem at 110% -10%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(48rem 30rem at -10% 0%, rgba(14, 165, 233, 0.12), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

svg {
  display: block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.topbar-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5 55%, #4338ca);
  box-shadow: 0 6px 14px -6px rgba(79, 70, 229, 0.7);
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-sub {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
  margin-left: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--primary-text);
  background: var(--primary-soft);
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-strong);
  background: #e5e9ff;
  text-decoration: none;
}

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
}

.avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.nav-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.nav-username {
  font-weight: 400;
  color: var(--muted);
  font-size: 12.5px;
}

.logout-form {
  margin: 0;
}

.link-button {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  background: none;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.link-button:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* ---------- 布局 ---------- */

.container {
  flex: 1;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding: 30px 24px 46px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
}

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

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.card-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.card-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.hint-flush {
  margin-top: 0;
  margin-bottom: 14px;
}

.hint a {
  font-weight: 500;
}

.empty {
  margin: 0;
  padding: 46px 16px;
  text-align: center;
  color: var(--muted);
}

.empty-illustration {
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  color: #c7cff0;
}

.empty-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.empty-sub {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 页面头部（问候 + 统计） ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head-main {
  min-width: 240px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--primary-text);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.page-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -0.3px;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  gap: 12px;
  min-width: 380px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.stat-label svg {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.stat-value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
  white-space: nowrap;
}

.stat-value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}

/* ---------- 上传区 ---------- */

.upload-card {
  overflow: hidden;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 34px 20px;
  border: 1.8px dashed #c9d2f0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfcff, #f5f7ff);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropzone:hover {
  border-color: var(--primary);
  background: linear-gradient(180deg, #f8f9ff, #eef2ff);
}

.dropzone:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.28);
  outline-offset: 2px;
}

.dropzone.is-dragging {
  border-color: var(--primary);
  background: #eef2ff;
  transform: scale(1.004);
}

.dropzone-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--primary);
  background: #fff;
  box-shadow: 0 8px 20px -12px rgba(79, 70, 229, 0.6);
  border: 1px solid var(--border);
}

.dropzone-icon svg {
  width: 22px;
  height: 22px;
}

.dropzone-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.dropzone-title em {
  font-style: normal;
  color: var(--primary);
}

.dropzone-sub {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 560px;
}

.selected-file {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-subtle);
}

.selected-file-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.selected-file-main {
  flex: 1;
  min-width: 0;
}

.selected-file-name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-meta {
  font-size: 12px;
  color: var(--muted);
}

.icon-button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.icon-button svg {
  width: 15px;
  height: 15px;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.progress {
  flex: 1;
  min-width: 180px;
  height: 8px;
  border-radius: 999px;
  background: #e8ecf7;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #4f46e5);
  transition: width 0.18s ease;
}

.status {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.status-busy {
  color: var(--primary);
}

.status-ok {
  color: var(--success);
}

.status-error {
  color: var(--danger);
}

/* ---------- 文件列表 ---------- */

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--border);
}

.file-row:first-child {
  padding-top: 4px;
}

.file-row:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.file-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  text-transform: uppercase;
}

.file-icon-doc { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.file-icon-sheet { background: linear-gradient(135deg, #34d399, #059669); }
.file-icon-slide { background: linear-gradient(135deg, #fb923c, #ea580c); }
.file-icon-image { background: linear-gradient(135deg, #c084fc, #7c3aed); }
.file-icon-archive { background: linear-gradient(135deg, #fbbf24, #d97706); }
.file-icon-media { background: linear-gradient(135deg, #f472b6, #db2777); }
.file-icon-text { background: linear-gradient(135deg, #94a3b8, #475569); }
.file-icon-other { background: linear-gradient(135deg, #a5b4fc, #6366f1); }

.file-main {
  flex: 1;
  min-width: 0;
}

.file-name {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name:hover {
  color: var(--primary);
  text-decoration: none;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.file-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.file-owner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-text);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 0 8px;
  height: 20px;
  font-size: 11.5px;
  font-weight: 600;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.file-actions form {
  margin: 0;
}

.btn-danger-ghost {
  border-color: var(--border);
  background: var(--card);
  color: var(--muted);
}

.btn-danger-ghost:hover {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:hover {
  background: #f8fafc;
  border-color: #c4ccdd;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.26);
  outline-offset: 2px;
}

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

.btn-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5 60%, #4338ca);
  box-shadow: 0 10px 22px -12px rgba(79, 70, 229, 0.8);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  border-color: transparent;
  box-shadow: 0 14px 26px -12px rgba(79, 70, 229, 0.85);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

.btn-small {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 9px;
}

.btn-small svg {
  width: 14px;
  height: 14px;
}

.btn-ghost {
  border-color: var(--border);
  background: var(--card);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--primary);
  border-color: #cfd7ff;
  background: var(--primary-soft);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: #3b4a63;
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder {
  color: var(--muted-2);
}

.input:hover {
  border-color: #c2cbdd;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
  background: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
  align-items: start;
}

.form-grid .field {
  margin-bottom: 12px;
}

.form-grid .field-submit {
  display: flex;
  align-items: flex-end;
  min-height: 72px;
}

.form-actions {
  margin-top: 4px;
}

.stack {
  display: flex;
  flex-direction: column;
}

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

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.alert svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.alert-ok {
  background: var(--success-soft);
  color: #166534;
  border-color: var(--success-border);
}

.alert-error {
  background: var(--danger-soft);
  color: #991b1b;
  border-color: var(--danger-border);
}

.alert-warn {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: var(--amber-border);
}

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

.login-body {
  justify-content: center;
  background-image:
    radial-gradient(46rem 28rem at 18% 12%, rgba(99, 102, 241, 0.22), transparent 58%),
    radial-gradient(40rem 26rem at 88% 82%, rgba(14, 165, 233, 0.18), transparent 55%),
    radial-gradient(30rem 20rem at 78% 8%, rgba(236, 72, 153, 0.12), transparent 60%);
}

.login-body .topbar {
  display: none;
}

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  padding: 40px 20px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  text-align: center;
}

.login-brand-mark {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5 55%, #4338ca);
  box-shadow: 0 18px 34px -14px rgba(79, 70, 229, 0.85);
}

.login-brand-mark svg {
  width: 28px;
  height: 28px;
}

.login-brand-name {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.2px;
}

.login-brand-sub {
  color: var(--muted);
  font-size: 13px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 30px 30px 26px;
  border-radius: 22px;
  box-shadow: 0 30px 70px -30px rgba(30, 41, 59, 0.45), 0 8px 20px -12px rgba(30, 41, 59, 0.2);
}

.login-card .card-title {
  margin-bottom: 4px;
  font-size: 18px;
}

.login-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.login-card .field {
  margin-bottom: 15px;
}

.login-footer {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.login-footer a {
  font-weight: 600;
}

.login-note {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  color: var(--muted-2);
  font-size: 12px;
}

/* ---------- 管理后台 ---------- */

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

.admin-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.admin-stat-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.admin-stat-icon svg {
  width: 21px;
  height: 21px;
}

.admin-stat-icon.is-ok {
  color: var(--success);
  background: var(--success-soft);
}

.admin-stat-icon.is-warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.admin-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
}

.admin-stat-label {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.table th {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card-subtle);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: #fafbff;
}

.cell-name {
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-nowrap {
  white-space: nowrap;
}

.cell-action {
  width: 90px;
  text-align: right;
}

/* 表格内的行内表单（管理员重置密码） */
.inline-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.input--compact {
  width: 142px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border-radius: 9px;
}

@media (max-width: 900px) {
  .inline-form {
    justify-content: flex-start;
  }

  .cell-action .inline-form {
    flex-wrap: wrap;
  }
}

.admin-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eef2ff, #f8faff);
  border: 1px solid #dde4ff;
  margin-top: 4px;
}

.admin-hint p {
  margin: 0;
  font-size: 13.5px;
  color: #3b4a63;
}

/* ---------- 错误页 ---------- */

.error-card {
  max-width: 520px;
  margin: 56px auto;
  text-align: center;
  padding: 40px 28px;
}

.error-code {
  margin: 0 0 6px;
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-message {
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--muted);
}

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

@media (max-width: 900px) {
  .stats {
    min-width: 0;
    width: 100%;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }

  .topbar-inner {
    height: auto;
    padding: 12px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .container {
    padding: 20px 14px 34px;
  }

  .page-title {
    font-size: 22px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats .stat:last-child {
    grid-column: span 2;
  }

  .card {
    padding: 18px 16px;
    border-radius: 16px;
  }

  .dropzone {
    padding: 26px 14px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .file-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .file-main {
    flex-basis: calc(100% - 60px);
  }

  .file-row .btn {
    margin-left: 56px;
  }

  .cell-name {
    max-width: 180px;
  }
}
