/* 管理后台统一视觉（学生管理 / 报考管理 / 流程配置） */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #1d4ed8;
  --brand-soft: #eff6ff;
  --ok: #059669;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.navbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: #111827;
  color: #fff;
}
.navbar a {
  color: #e5e7eb;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
}
.navbar a:hover,
.navbar a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.navbar .nav-logo {
  font-weight: 700;
  margin-right: 8px;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-head h1,
.page-title {
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.page-head p,
.page-sub {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.search-box { flex: 1; min-width: 220px; }
.search-box input,
.field input,
.field select,
.field textarea,
.form-group input,
.form-group select,
.form-group textarea,
.modal-card input,
.modal-card select,
.modal-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.search-box input:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.modal-card input:focus,
.modal-card select:focus,
.modal-card textarea:focus {
  outline: 2px solid #bfdbfe;
  border-color: var(--brand);
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-success { background: var(--ok); color: #fff; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-info { background: var(--brand-soft); color: var(--brand); }
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid #bfdbfe;
}
.btn-sm { padding: 6px 10px; font-size: 13px; }

.card,
.table-container,
.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}
th {
  background: #f9fafb;
  color: var(--muted);
  font-weight: 600;
}
tr:hover td { background: #fafafa; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty, .empty-state, .loading {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state svg, .empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  opacity: 0.45;
}

.alert {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  display: none;
}
.alert-success {
  display: block;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open,
.modal.show {
  display: flex;
}
.modal-card,
.modal-content {
  background: #fff;
  border-radius: 16px;
  width: min(560px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid var(--line);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
}
.modal-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.modal-body,
.modal-card form,
.modal-card > form {
  padding: 18px 22px 22px;
}
.modal-card > h2 {
  padding: 20px 22px 0;
  font-size: 20px;
}
.close, .modal-close {
  border: none;
  background: #f3f4f6;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}
.close:hover, .modal-close:hover { background: #e5e7eb; color: var(--ink); }

.form-group { margin-bottom: 14px; }
.form-group label,
.modal-card label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 4px;
}
.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-group input { width: auto; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}
.badge-ok { background: #ecfdf5; color: #065f46; }
.badge-off { background: #f3f4f6; color: #6b7280; }

@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
  .page-head h1, .page-title { font-size: 22px; }
}
