* {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  background: #f5f7fa;
  color: #17212b;
  font-family: "Microsoft YaHei", system-ui, sans-serif;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
}

.login-gate.hidden {
  display: none;
}

.login-card {
  width: 360px;
  padding: 28px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(23, 33, 43, 0.12);
}

.login-brand {
  color: #2367c9;
  font-weight: 800;
  margin-bottom: 18px;
}

.login-card input {
  width: 100%;
  height: 40px;
  margin: 20px 0 12px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 0 12px;
}

.login-card button {
  width: 100%;
}

.login-error {
  min-height: 20px;
  margin-top: 10px;
  color: #c7372f;
  font-size: 13px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 33, 43, 0.38);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(23, 33, 43, 0.18);
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal-card p {
  line-height: 1.6;
}

.modal-card input {
  width: 100%;
  height: 40px;
  margin-top: 16px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 0 12px;
}

.modal-error {
  min-height: 20px;
  margin-top: 8px;
  color: #c7372f;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.modal-actions button {
  min-width: 76px;
}

.sidebar {
  width: 220px;
  min-width: 220px;
  flex: 0 0 220px;
  background: #17212b;
  color: #fff;
  padding: 22px 16px;
}

.brand {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 28px;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  width: 100%;
  height: 42px;
  margin-bottom: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b9c3cf;
  text-align: left;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.nav.active,
.nav:hover {
  background: #2367c9;
  color: #fff;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

p {
  margin: 0;
  color: #6b7785;
}

button {
  height: 34px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

button.primary {
  background: #2367c9;
  border-color: #2367c9;
  color: #fff;
}

button.danger {
  color: #c7372f;
}

.icon-danger {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border-color: #f1b3ad;
  color: #c7372f;
  font-size: 20px;
  line-height: 20px;
  font-weight: 800;
}

.content {
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  overflow: auto;
}

.panel {
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.toolbar {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #edf1f5;
  background: #fbfcfd;
  align-items: center;
  flex-wrap: wrap;
}

.searchbar {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  align-items: center;
}

.searchbar input {
  width: min(420px, 100%);
  height: 34px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 0 10px;
}

.searchbar span {
  color: #6b7785;
  font-size: 13px;
}

.campus-filter {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f5;
  background: #fbfcfd;
}

.filter-label {
  color: #3a4652;
  font-weight: 800;
}

.check-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.muted-small {
  color: #6b7785;
  font-size: 13px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.section-title p {
  margin: 0;
  color: #6b7785;
  font-size: 13px;
}

.batchbar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f5;
  background: #fff7e6;
}

.category-subnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
}

.category-subnav button {
  min-width: 112px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #3a4652;
}

.category-subnav button.active {
  border-color: #2367c9;
  background: #eaf2ff;
  color: #2367c9;
}

.category-subnav span {
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf1f5;
  color: #3a4652;
  font-size: 12px;
}

.category-subnav button.active span {
  background: #2367c9;
  color: #fff;
}

.category-directory {
  border-bottom: 1px solid #edf1f5;
}

.category-directory:last-child {
  border-bottom: 0;
}

.category-directory-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 14px;
  background: #fbfcfd;
  border-bottom: 1px solid #edf1f5;
}

.category-directory-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.category-directory-head p {
  font-size: 13px;
}

.category-table {
  min-width: 720px;
}

.cloud-panel {
  padding: 18px;
}

.cloud-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.cloud-head h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.cloud-status {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
}

.cloud-status.ok {
  background: #eaf7ef;
  color: #207a3b;
}

.cloud-status.warn {
  background: #fff7e6;
  color: #986100;
}

.cloud-status.danger {
  background: #fff0ef;
  color: #c7372f;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 128px;
  padding: 16px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fbfcfd;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.metric-card.accent {
  border-color: #b9d1f7;
  background: #f4f8ff;
}

.metric-card span {
  color: #6b7785;
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  color: #17212b;
  font-size: 26px;
  line-height: 1.15;
}

.metric-card small {
  color: #6b7785;
  font-size: 12px;
  line-height: 1.5;
}

.quota-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.quota-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.quota-head h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.quota-head p,
.quota-head span {
  margin: 0;
  color: #6b7785;
  font-size: 13px;
  line-height: 1.5;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.quota-card {
  padding: 14px;
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  background: #fbfcfd;
}

.quota-card-head,
.quota-card-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.quota-card-head span,
.quota-card-line b {
  color: #6b7785;
  font-size: 13px;
  font-weight: 800;
}

.quota-card-head strong {
  color: #17212b;
  font-size: 20px;
}

.quota-progress {
  height: 8px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.quota-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #2c6fd6;
}

.quota-card-line {
  margin-top: 8px;
  font-size: 13px;
}

.quota-card small {
  display: block;
  margin-top: 10px;
  color: #6b7785;
  font-size: 12px;
  line-height: 1.5;
}

.cloud-alert {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #f3d28b;
  border-radius: 6px;
  background: #fffaf0;
  color: #6f4a00;
  font-size: 13px;
  line-height: 1.6;
}

.cloud-note {
  margin-top: 12px;
  color: #6b7785;
  font-size: 13px;
  line-height: 1.6;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.security-grid.single {
  grid-template-columns: minmax(260px, 560px);
}

.security-panel,
.security-note {
  padding: 18px;
}

.security-panel h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.security-panel p {
  min-height: 42px;
  margin: 0 0 14px;
  color: #6b7785;
  font-size: 13px;
  line-height: 1.6;
}

.security-panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: #3b4654;
  font-size: 13px;
}

.security-panel input {
  width: 100%;
  height: 38px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 0 10px;
}

.form-message {
  min-height: 22px;
  margin: 2px 0 10px;
  color: #c7372f;
  font-size: 13px;
}

.form-message.success {
  color: #207a3b;
}

.security-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.security-note span {
  color: #6b7785;
}

.announcement-admin {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: #f5f7fa;
}

.announcement-editor,
.announcement-table {
  padding: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 150px;
  gap: 12px;
}

.field-grid label {
  display: grid;
  gap: 7px;
  color: #3a4652;
  font-size: 13px;
  font-weight: 800;
}

.field-grid label.full {
  grid-column: 1 / -1;
}

.field-grid input,
.field-grid select,
.field-grid textarea {
  width: 100%;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
  color: #17212b;
  font: inherit;
  font-weight: 400;
}

.field-grid input,
.field-grid select {
  height: 38px;
  padding: 0 10px;
}

.field-grid textarea {
  min-height: 140px;
  resize: vertical;
  padding: 10px;
  line-height: 1.6;
}

.field-grid .check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 25px;
}

.field-grid .check-line input {
  width: auto;
  height: auto;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.announcement-table table {
  min-width: 760px;
}

.announcement-table strong {
  display: block;
  margin-bottom: 4px;
}

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

.toolbar input,
.toolbar select {
  height: 34px;
  min-width: 140px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.import-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.import-btn input {
  display: none;
}

.import-preview {
  border-bottom: 1px solid #edf1f5;
  background: #fff;
}

.import-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid #edf1f5;
}

.cell-input {
  width: 100%;
  min-width: 120px;
  height: 32px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 0 8px;
}

table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #edf1f5;
  padding: 12px;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

th {
  background: #f8fafc;
  color: #3a4652;
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  background: #eaf2ff;
  color: #2367c9;
  font-size: 12px;
}

.tag-muted {
  background: #f0f2f5;
  color: #6b7785;
}

.empty {
  padding: 36px;
  color: #6b7785;
}

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

.edit-panel {
  padding: 14px;
  border-bottom: 1px solid #edf1f5;
  background: #fbfcfd;
}

.edit-title {
  font-weight: 800;
  margin-bottom: 12px;
}

.edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.edit-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #3a4652;
}

.edit-grid input,
.edit-grid select {
  height: 34px;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
}

.edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .cloud-head {
    display: grid;
  }

  .cloud-actions {
    justify-content: flex-start;
  }

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

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

  .field-grid .check-line {
    padding-top: 0;
  }
}
