:root {
  --blue: #1677ff;
  --deep: #1f2937;
  --muted: #7a8aa0;
  --line: #e8eef7;
  --bg: #f4f8ff;
  --card: #ffffff;
  --danger: #f04438;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--deep);
  background: linear-gradient(180deg, #eef6ff 0%, #f8fbff 100%);
}

button {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #2f8cff, #006bff);
  cursor: pointer;
}

button:hover {
  transform: translateY(-1px);
}

button.ghost {
  color: var(--blue);
  background: #eaf3ff;
}

button.danger {
  background: #fff1f0;
  color: var(--danger);
}

input,
textarea,
select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7a8aa0 50%), linear-gradient(135deg, #7a8aa0 50%, transparent 50%);
  background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

textarea {
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238, 247, 255, 0.72), rgba(255, 255, 255, 0.9)),
    url("./login-campus-bg.png") center / cover no-repeat;
}

.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.login-page::before {
  width: 520px;
  height: 520px;
  left: -180px;
  top: -170px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  background: linear-gradient(145deg, rgba(47, 128, 255, 0.12), rgba(255, 255, 255, 0.18));
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.36);
}

.login-page::after {
  width: 420px;
  height: 420px;
  right: -150px;
  bottom: -170px;
  background: radial-gradient(circle, rgba(47, 128, 255, 0.12), rgba(255, 255, 255, 0.05) 68%);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, 94vw);
  min-height: 690px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border: 1px solid rgba(210, 230, 255, 0.82);
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 26px 80px rgba(30, 128, 255, 0.16);
  backdrop-filter: blur(18px);
}

.login-hero {
  position: relative;
  overflow: hidden;
  padding: 48px;
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(22, 119, 255, 0.74) 0%, rgba(47, 128, 255, 0.48) 48%, rgba(255, 255, 255, 0.1) 100%),
    url("./login-campus-bg.png") center / cover no-repeat;
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(1px);
}

.hero-glow-a {
  width: 260px;
  height: 260px;
  right: -80px;
  top: -60px;
}

.hero-glow-b {
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: 120px;
}

.hero-brand,
.form-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 16px;
  color: #1677ff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(30, 128, 255, 0.14);
}

.login-hero .brand-mark {
  color: #1677ff;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(19, 79, 166, 0.16);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-mark.small {
  width: 46px;
  height: 46px;
  padding: 8px;
  border-radius: 14px;
  font-size: 14px;
}

.hero-brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-brand-sub {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin-top: 96px;
}

.hero-copy h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 900;
}

.hero-copy p {
  margin: 20px 0 0;
  max-width: 500px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-tags span {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero-tags svg,
.input-wrap svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.campus-illustration {
  position: absolute;
  left: 40px;
  right: 34px;
  bottom: 0;
  height: 220px;
  display: none;
  opacity: 0;
}

.campus-wave {
  position: absolute;
  left: -50px;
  right: -50px;
  bottom: -56px;
  height: 146px;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.92));
}

.campus-sun {
  position: absolute;
  right: 118px;
  top: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
}

.campus-building {
  position: absolute;
  bottom: 58px;
  display: flex;
  justify-content: space-evenly;
  align-items: flex-end;
  padding: 26px 16px 16px;
  border-radius: 18px 18px 8px 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 40px rgba(15, 91, 255, 0.12);
}

.campus-building i {
  width: 14px;
  height: 44px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(47, 128, 255, 0.34);
}

.main-building {
  left: 50%;
  width: 180px;
  height: 132px;
  transform: translateX(-50%);
}

.main-building::before {
  content: "";
  position: absolute;
  top: -48px;
  left: 50%;
  width: 70px;
  height: 70px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: rgba(255, 255, 255, 0.72);
}

.side-building {
  width: 126px;
  height: 96px;
}

.left-building {
  left: 78px;
}

.right-building {
  right: 70px;
}

.campus-tree {
  position: absolute;
  bottom: 62px;
  width: 34px;
  height: 70px;
  border-radius: 999px 999px 12px 12px;
  background: rgba(255, 255, 255, 0.54);
}

.tree-a {
  left: 28px;
}

.tree-b {
  right: 26px;
  height: 86px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
  background:
    radial-gradient(circle at 86% 18%, rgba(234, 244, 255, 0.88), transparent 30%),
    rgba(255, 255, 255, 0.92);
}

.form-card {
  width: min(420px, 100%);
}

.form-brand-text {
  color: #172033;
  font-weight: 800;
  font-size: 18px;
}

.form-title {
  margin: 46px 0 30px;
}

.form-title h2 {
  margin: 0;
  color: #172033;
  font-size: 34px;
  line-height: 1.2;
}

.form-title p {
  margin: 12px 0 0;
  color: #7a8aa0;
  font-size: 15px;
  line-height: 1.7;
}

.login-field {
  display: block;
  margin-bottom: 18px;
}

.login-field > span {
  display: block;
  margin-bottom: 8px;
  color: #536276;
  font-size: 14px;
  font-weight: 700;
}

.input-wrap {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid #dbe7f6;
  border-radius: 17px;
  background: #f8fbff;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.input-wrap:focus-within {
  border-color: #78b7ff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1);
}

.input-wrap svg {
  color: #8aa5c4;
}

.input-wrap input {
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #172033;
  font-size: 15px;
}

.input-wrap input::placeholder {
  color: #a0aec0;
}

.login-submit {
  width: 100%;
  height: 56px;
  margin-top: 8px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(22, 119, 255, 0.24);
}

.login-submit:hover {
  box-shadow: 0 20px 40px rgba(22, 119, 255, 0.3);
}

.login-tip {
  margin-top: 22px;
  color: #9aa8b8;
  text-align: center;
  font-size: 13px;
}

.login-card {
  width: 380px;
  padding: 32px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 20px 60px rgba(30, 128, 255, 0.12);
}

.login-card h1 {
  margin: 18px 0 8px;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.login-card input {
  margin-bottom: 12px;
}

.login-card button {
  width: 100%;
  margin-top: 8px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
}

.sidebar {
  padding: 22px 16px;
  background: rgba(255,255,255,0.82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.side-title {
  margin: 8px 8px 22px;
  font-size: 20px;
  font-weight: 800;
}

.menu {
  display: grid;
  gap: 8px;
}

.menu-item {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
}

.menu-item.active {
  color: var(--blue);
  background: #eaf3ff;
  font-weight: 700;
}

.main {
  padding: 24px;
  overflow: hidden;
}

.topbar,
.toolbar,
.card {
  border: 1px solid rgba(232, 238, 247, 0.9);
  border-radius: 18px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 12px 36px rgba(30, 128, 255, 0.08);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.topbar h2 {
  margin: 0;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px auto auto auto;
  gap: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.card {
  padding: 0;
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #42526b;
  background: #f7fbff;
  font-weight: 700;
}

td {
  color: #283548;
}

.status {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  color: #0b7a4b;
  background: #eafbf4;
  font-size: 12px;
}

.status.bad {
  color: #b42318;
  background: #fff1f0;
}

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

.row-actions button {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 32, 50, 0.36);
}

.modal-card {
  width: min(720px, 96vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 80px rgba(15, 23, 42, 0.22);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.message-modal-card {
  width: min(560px, 94vw);
  border-radius: 28px;
  overflow: hidden;
}

.message-modal-head {
  align-items: flex-start;
  background:
    radial-gradient(circle at 92% 0%, rgba(47, 128, 255, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
}

.message-modal-head h3 {
  margin: 4px 0 6px;
  color: #172033;
  font-size: 24px;
}

.message-modal-head p {
  margin: 0;
  color: #7a8aa0;
  font-size: 13px;
}

.modal-kicker {
  color: #1677ff;
  font-size: 12px;
  font-weight: 900;
}

.message-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.message-form .field span {
  display: block;
  margin-bottom: 8px;
  color: #42526b;
  font-size: 13px;
  font-weight: 800;
}

.message-form textarea {
  min-height: 150px;
  resize: vertical;
}

.message-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #dbe7f6;
  border-radius: 16px;
  color: #7a8aa0;
  background: #f8fbff;
}

.message-target strong {
  color: #1677ff;
}

.icon-btn {
  width: 34px;
  padding: 0;
  color: var(--muted);
  background: #f3f7fc;
}

.form-area {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: #536276;
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.86);
}

.menu-group { margin-bottom: 14px; }
.menu-group-title { margin: 12px 10px 6px; color: #9aa8b8; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.empty-td { padding: 40px !important; text-align: center; color: var(--muted); }
.thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; margin-bottom: 4px; }
.entry-icon-thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.entry-icon { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: #eef6ff; border: 1px solid #dbe7f6; display: block; }
.entry-icon-fallback { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #1677ff; background: #eaf3ff; font-weight: 800; margin-bottom: 4px; }
.url-text { max-width: 180px; color: var(--muted); font-size: 12px; word-break: break-all; }
.status.warn { color: #b76e00; background: #fff6db; }
.upload-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.upload-row input[type=file] { padding: 7px 10px; min-height: 38px; }
.image-preview { margin-top: 8px; min-height: 0; }
.image-preview img { width: 180px; max-height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.upload-box { display: grid; gap: 12px; }
.upload-preview { width: 96px; height: 96px; border-radius: 18px; border: 1px dashed #bcd4f6; background: #f5f9ff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview span { color: #8a98aa; font-size: 13px; }
.upload-actions { display: flex; gap: 10px; align-items: center; }
.upload-actions button { height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid #d8e8ff; background: #f0f6ff; color: #1677ff; cursor: pointer; }
.upload-actions button:hover { background: #e8f3ff; }
.color-field { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: center; }
.color-field input[type=color] { min-height: 38px; padding: 4px; cursor: pointer; }
.color-swatch { width: 24px; height: 24px; display: inline-block; border-radius: 8px; border: 1px solid var(--line); vertical-align: middle; margin-right: 8px; }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.preview-images { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.preview-img { width: 160px; height: 100px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 6px 0;
}
.preview-row {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e3edf9;
  border-radius: 14px;
  background: #f8fbff;
}
.preview-row span {
  color: #7a8aa0;
  font-size: 12px;
  font-weight: 700;
}
.preview-row strong {
  color: #172033;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  word-break: break-word;
}

/* Admin main shell */
.admin-layout {
  min-height: 100vh;
  grid-template-columns: 276px minmax(0, 1fr);
  background:
    radial-gradient(circle at 88% 8%, rgba(47, 128, 255, 0.12), transparent 30%),
    radial-gradient(circle at 10% 94%, rgba(111, 182, 255, 0.16), transparent 36%),
    #f4f8ff;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #dfeaf8;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 12px 0 36px rgba(30, 128, 255, 0.06);
  backdrop-filter: blur(14px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid #edf3fb;
}

.admin-brand .brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(30, 128, 255, 0.16);
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  color: #172033;
  line-height: 1.25;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: #8a9ab0;
}

.admin-menu {
  flex: 1;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 6px 0 14px;
  overflow: auto;
}

.menu-group {
  margin-bottom: 0;
}

.menu-group-title {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  color: #42526b;
  background: transparent;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.menu-group-title:hover {
  color: #1677ff;
  background: #eef6ff;
  transform: none;
}

.menu-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #1677ff;
  background: #eaf4ff;
  font-size: 13px;
}

.menu-arrow {
  margin-left: auto;
  color: #9aa8b8;
  transition: transform .18s ease;
}

.menu-group.is-open .menu-arrow {
  transform: rotate(180deg);
}

.menu-children {
  display: none;
  gap: 6px;
  padding: 6px 0 2px 38px;
}

.menu-group.is-open .menu-children {
  display: grid;
}

.menu-item {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 12px;
  color: #65758b;
  background: transparent;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover {
  color: #1677ff;
  background: #f2f8ff;
  transform: none;
}

.menu-item.active {
  color: #1677ff;
  background: #eaf4ff;
  font-weight: 900;
  box-shadow: inset 3px 0 0 #1677ff;
}

.menu-logout {
  color: #e5484d;
}

.sidebar-footer {
  padding: 14px 10px 4px;
  border-top: 1px solid #edf3fb;
  color: #9aa8b8;
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 26px 30px 40px;
  overflow: auto;
}

.topbar,
.toolbar,
.card {
  border: 1px solid rgba(219, 231, 246, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 42px rgba(30, 128, 255, 0.08);
}

.topbar {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 22px 24px;
  margin-bottom: 18px;
  background:
    radial-gradient(circle at 94% 10%, rgba(47, 128, 255, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
}

.topbar::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -56px;
  width: 260px;
  height: 160px;
  border-radius: 999px;
  background: rgba(47, 128, 255, 0.08);
  pointer-events: none;
}

.page-hero-left {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ff 0%, #1468f2 100%);
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(22, 119, 255, 0.24);
}

.topbar h2 {
  margin: 0;
  color: #172033;
  font-size: 26px;
  font-weight: 900;
}

.topbar p {
  margin: 7px 0 0;
  color: #7a8aa0;
  font-size: 14px;
}

.top-actions {
  position: relative;
  z-index: 1;
  gap: 10px;
  flex-wrap: wrap;
}

.top-actions button,
.toolbar button {
  min-width: 82px;
  height: 44px;
  border-radius: 14px;
  font-weight: 800;
}

button.ghost,
.btn-ghost {
  color: #1677ff;
  border: 1px solid #d8e8ff;
  background: #f0f6ff;
}

button.danger,
.btn-danger-soft {
  color: #e5484d;
  border: 1px solid #ffd8d8;
  background: #fff1f1;
}

.toolbar {
  grid-template-columns: minmax(280px, 1.2fr) 240px auto auto auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field span {
  color: #65758b;
  font-size: 12px;
  font-weight: 800;
}

.filter-field input {
  width: 100%;
  height: 46px;
  min-height: 46px;
  border-radius: 14px;
  background: #f8fbff;
}

.filter-field input:focus {
  border-color: #78b7ff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.1);
}

.card {
  overflow: hidden;
}

th {
  color: #42526b;
  background: #f3f8ff;
  font-weight: 900;
}

tbody tr:hover td {
  background: #f8fbff;
}

.status {
  min-width: 64px;
  height: 26px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  color: #14804a;
  background: #e9f8f0;
  font-weight: 800;
}

.status.warn {
  color: #b86b00;
  background: #fff4df;
}

.status.bad {
  color: #d93025;
  background: #ffecec;
}

.row-actions {
  gap: 8px;
}

.row-actions button,
.action-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.action-preview {
  color: #1677ff;
  background: #eef6ff;
}

.action-edit {
  color: #ffffff;
  background: #1677ff;
}

.action-offline {
  color: #b86b00;
  background: #fff4df;
}

.action-delete {
  color: #d93025;
  background: #ffecec;
}

.pager {
  padding: 16px;
  background: #fbfdff;
}

.pager button {
  height: 36px;
  min-width: 76px;
  border-radius: 12px;
}

.empty-td {
  padding: 46px !important;
  text-align: center;
  color: #7a8aa0;
  background: #fbfdff;
}

@media (max-width: 1200px) {
  .admin-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .main {
    padding: 22px;
  }

  .toolbar {
    grid-template-columns: minmax(220px, 1fr) 220px auto auto auto;
  }
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .page-hero-left {
    align-items: flex-start;
  }
}
@media (max-width: 900px) {
  .login-page {
    padding: 20px;
    align-items: flex-start;
  }
  .login-shell {
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 26px;
  }
  .login-hero {
    min-height: 360px;
    padding: 30px;
  }
  .hero-copy {
    margin-top: 48px;
  }
  .hero-copy h1 {
    font-size: 38px;
  }
  .hero-copy p {
    font-size: 16px;
  }
  .campus-illustration {
    height: 150px;
    opacity: 0.58;
  }
  .login-panel {
    padding: 32px 24px 38px;
  }
  .form-title {
    margin: 30px 0 24px;
  }
  .form-title h2 {
    font-size: 28px;
  }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .topbar { flex-direction: column; }
}

@media (max-width: 560px) {
  .login-page {
    padding: 12px;
  }
  .login-shell {
    border-radius: 22px;
  }
  .login-hero {
    padding: 24px;
  }
  .hero-brand-name {
    font-size: 17px;
  }
  .hero-copy h1 {
    font-size: 32px;
  }
  .hero-tags span {
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
  .login-panel {
    padding: 26px 18px 32px;
  }
}


/* ===== Modal z-index and scroll fix for admin dialogs ===== */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 24px 40px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  overflow-y: auto;
}
.modal.hidden { display: none !important; }
.modal-card {
  width: min(920px, calc(100vw - 48px));
  max-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(219, 231, 246, 0.96);
  box-shadow: 0 30px 100px rgba(15, 23, 42, 0.32);
  box-sizing: border-box;
}
.modal-head {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 68px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8eef7;
  background: radial-gradient(circle at 92% 0%, rgba(47, 128, 255, 0.12), transparent 34%), linear-gradient(135deg, #ffffff 0%, #f6faff 100%);
  box-sizing: border-box;
}
.modal-head h3 { margin: 0; color: #172033; font-size: 22px; font-weight: 900; }
.form-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: #fbfdff;
  box-sizing: border-box;
}
.form-area .field, .form-area label.field { display: grid; gap: 8px; min-width: 0; }
.form-area .field span, .form-area label.field span { color: #65758b; font-size: 13px; font-weight: 800; }
.form-area input, .form-area textarea, .form-area select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #dbe7f6; border-radius: 14px; color: #172033; background: #fff; outline: none; box-sizing: border-box;
}
.form-area textarea { min-height: 110px; resize: vertical; grid-column: 1 / -1; }
.form-area input:focus, .form-area textarea:focus, .form-area select:focus { border-color: #78b7ff; box-shadow: 0 0 0 4px rgba(22,119,255,.1); }
.preview-grid, .detail-grid, .field-full, .wide { grid-column: 1 / -1; }
.modal-actions {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  min-height: 72px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid #e8eef7;
  border-bottom: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}
.modal-actions button { min-width: 88px; height: 42px; border-radius: 13px; font-weight: 800; }
.message-modal-card { width: min(620px, calc(100vw - 48px)); max-height: calc(100vh - 96px); border-radius: 26px; overflow: hidden; }
.message-form { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; gap: 16px; padding: 24px; background: #fbfdff; box-sizing: border-box; }
.review-modal-card { width: min(640px, calc(100vw - 48px)); }
.review-form { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; gap: 16px; padding: 24px; background: #fbfdff; box-sizing: border-box; }
.review-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.review-meta-grid > div, .readonly-box { border: 1px solid #dbe7f6; border-radius: 16px; background: #fff; padding: 14px; box-sizing: border-box; }
.review-meta-grid span, .review-form .field span { display: block; margin-bottom: 7px; color: #65758b; font-size: 13px; font-weight: 800; }
.review-meta-grid strong { color: #172033; font-size: 15px; font-weight: 900; }
.readonly-box { min-height: 52px; color: #45556b; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.review-reason-wrap { display: grid; gap: 8px; }
.review-form textarea { width: 100%; min-height: 130px; padding: 12px 14px; border: 1px solid #dbe7f6; border-radius: 16px; color: #172033; background: #fff; outline: none; resize: vertical; box-sizing: border-box; }
.review-form textarea:focus { border-color: #78b7ff; box-shadow: 0 0 0 4px rgba(22,119,255,.1); }
.confirm-modal-card { width: min(460px, calc(100vw - 48px)); }
.confirm-body { padding: 24px; background: #fbfdff; color: #45556b; font-size: 15px; line-height: 1.7; }
.confirm-body p { margin: 0; }
.confirm-modal-card .modal-actions .danger { background: #ef4444; color: #fff; }
@media (max-width: 760px) {
  .modal { padding: 20px 12px; }
  .modal-card, .message-modal-card { width: calc(100vw - 24px); max-height: calc(100vh - 40px); border-radius: 20px; }
  .form-area { grid-template-columns: 1fr; padding: 18px; }
  .modal-head, .modal-actions { padding-left: 18px; padding-right: 18px; }
}

/* 组织管理表单与小程序预览 */
.form-section {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e2ecf8;
  box-sizing: border-box;
}
.form-section-title {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 900;
  color: #172033;
}
.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.org-preview-section { background: #ffffff; }
.org-admin-preview { display: grid; gap: 12px; }
.org-preview-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #2f80ff, #8b7bff);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: 0 18px 40px rgba(47,128,255,.18);
}
.org-preview-logo {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  color: #1677ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  overflow: hidden;
  flex-shrink: 0;
}
.org-preview-logo img { width: 100%; height: 100%; object-fit: cover; }
.org-preview-name { font-size: 24px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.org-preview-name span { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.72); }
.org-preview-sub, .org-preview-stats { margin-top: 6px; font-size: 13px; opacity: .92; }
.org-preview-desc { color: #334155; line-height: 1.7; background: #f7fbff; border-radius: 14px; padding: 12px 14px; }
.tag-row-admin { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row-admin span { padding: 6px 10px; border-radius: 999px; background: #eaf4ff; color: #1677ff; font-size: 12px; font-weight: 800; }
.gallery-row-admin { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-row-admin img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; border: 1px solid #dbe7f6; background: #f1f6ff; }

@media (max-width: 760px) {
  .section-grid { grid-template-columns: 1fr; }
}

/* 组织精彩瞬间上传：与快捷入口图标一样使用受控预览，避免只上传不保存 */
.org-gallery-field .org-gallery-upload {
  display: grid;
  gap: 12px;
}
.gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 92px;
  padding: 10px;
  border: 1px dashed #bcd4f6;
  border-radius: 14px;
  background: #f7fbff;
}
.gallery-thumb {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #dbe7f6;
  background: #eef6ff;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  line-height: 22px;
  cursor: pointer;
}
