/* 管理后台 — 按企业分班授课 */
.view-admin {
  flex: 1 1 auto;
  min-height: calc(100vh - 5.5rem);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #eef3f8 0%, #f8fafc 42%, #f4f0e8 100%);
}

.admin-header {
  position: relative;
  background: linear-gradient(135deg, #0c1833 0%, #152a52 48%, #0f1f3d 100%);
  color: #fff;
  padding: 1.1rem 1.5rem 1.25rem;
  box-shadow: 0 4px 24px rgba(15, 31, 61, 0.22);
}

.admin-header-accent {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold, #b8892a), #d4a84b 40%, rgba(255, 255, 255, 0.25));
  opacity: 0.95;
}

.admin-header-inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.admin-brand-logo-wrap {
  flex-shrink: 0;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-logo-img--admin {
  display: block;
  max-height: 42px;
  width: auto;
  max-width: min(200px, 38vw);
  height: auto;
  object-fit: contain;
}

.admin-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.admin-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-btn-back {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.84rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s, border-color 0.15s;
}

.admin-btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.admin-user {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.72);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-btn-logout {
  background: rgba(184, 137, 42, 0.22);
  border: 1px solid rgba(212, 168, 75, 0.45);
  color: #fdf8ec;
  font-size: 0.8rem;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.admin-btn-logout:hover {
  background: rgba(184, 137, 42, 0.35);
}

.admin-btn-logout:active {
  transform: scale(0.98);
}

.admin-body {
  flex: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  width: 100%;
}

.admin-intro {
  margin-bottom: 1.35rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, #fff 0%, #f9fafb 100%);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.admin-intro-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-mid);
}

.admin-intro-text strong {
  color: var(--navy);
  font-weight: 600;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 560px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 200px));
  }
}

.admin-stat-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 14px rgba(15, 31, 61, 0.06);
  overflow: hidden;
}

.admin-stat-card--org::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy-light), #4a6fa8);
  opacity: 0.85;
}

.admin-stat-card--stu::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #d4a84b);
  opacity: 0.9;
}

.admin-stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 1.1rem;
  color: var(--navy-light);
  background: linear-gradient(145deg, var(--fog), #fff);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.admin-stat-icon--stu {
  color: var(--gold);
  background: linear-gradient(145deg, var(--gold-pale), #fff);
}

.admin-stat-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.admin-stat-num {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

.admin-stat-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.admin-stat-hint {
  font-size: 0.72rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

.admin-tabs {
  display: inline-flex;
  gap: 0.2rem;
  margin-bottom: 1.35rem;
  padding: 0.3rem;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.admin-tab {
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 600;
  color: var(--text-mid);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
}

.admin-tab:hover {
  color: var(--navy);
  background: var(--fog);
}

.admin-tab.active {
  color: var(--navy);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 31, 61, 0.09);
}

.admin-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 0;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 28px rgba(15, 31, 61, 0.07);
  overflow: hidden;
}

.admin-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--navy-light), var(--navy));
  opacity: 0.9;
}

.admin-card-accent--gold {
  background: linear-gradient(180deg, #d4a84b, var(--gold));
}

.admin-card > .admin-card-header,
.admin-card > .admin-form-block,
.admin-card > .admin-filter-row,
.admin-card > .admin-list-wrap {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.admin-card > .admin-card-header {
  padding-top: 1.5rem;
  padding-bottom: 0;
  padding-left: 2rem;
}

.admin-card > .admin-form-block,
.admin-card > .admin-filter-row {
  padding-top: 1.5rem;
}

.admin-card > .admin-list-wrap {
  padding-left: 1.75rem;
  padding-right: 1.75rem;
  padding-bottom: 1.5rem;
}

.admin-card-header {
  margin-bottom: 0;
}

.admin-card-kicker {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-light);
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}

.admin-card-students .admin-card-kicker {
  color: var(--gold);
}

.admin-card-header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.admin-card-header p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  max-width: 52ch;
}

.admin-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.admin-form-block {
  margin-bottom: 0;
}

.admin-form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.admin-form-row .admin-input {
  flex: 1;
  min-width: 200px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.admin-input,
.admin-select {
  padding: 0.62rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-input:focus,
.admin-select:focus {
  outline: none;
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(43, 77, 140, 0.1);
}

.admin-select {
  cursor: pointer;
  min-width: 140px;
}

.admin-select--wide {
  min-width: 220px;
  flex: 1;
  max-width: 360px;
}

.btn-admin-primary {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 100%);
  color: #fff;
  border: none;
  padding: 0.62rem 1.25rem;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn-admin-primary:hover {
  filter: brightness(1.08);
}

.btn-admin-primary:active {
  transform: scale(0.98);
}

.admin-filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.admin-filter-row label {
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 600;
  flex-shrink: 0;
}

.admin-list-wrap {
  position: relative;
  min-height: 72px;
}

.admin-list-wrap .admin-empty {
  display: none;
  padding: 2.25rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0;
  background: var(--fog);
  border-radius: 0 0 12px 12px;
  border: 1px dashed var(--border);
}

.admin-list-wrap:has(.admin-list:empty) .admin-empty,
.admin-list-wrap .admin-list:empty + .admin-empty {
  display: block;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #fafbfc;
}

.admin-list--org .admin-list-item,
.admin-list--student .admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.admin-list li:last-child {
  border-bottom: none;
}

.admin-list-item:hover {
  background: var(--fog);
}

.admin-list-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.admin-list-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy-light);
  background: var(--fog);
  border-radius: 6px;
  flex-shrink: 0;
}

.admin-list-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.admin-list-title {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.admin-stu-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-stu-user {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--navy);
  font-weight: 500;
}

.admin-stu-name {
  font-size: 0.82rem;
  color: var(--text-light);
}

.admin-btn-del {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-family: var(--font);
  color: var(--text-mid);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.admin-btn-del:hover {
  border-color: #f87171;
  color: #dc2626;
  background: #fef2f2;
}

/* 兼容旧类名 btn-del */
.btn-del {
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-family: var(--font);
  color: var(--text-mid);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-del:hover {
  border-color: #f87171;
  color: #dc2626;
  background: #fef2f2;
}
