* { box-sizing: border-box; }
body {
  margin: 0;
  color: #1f2430;
  background: #f4f6fa;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
}
a { color: #1f6feb; text-decoration: none; }
button, input, select { font: inherit; }
.sider {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  background: linear-gradient(180deg, #0c1e3a 0%, #1a4578 52%, #4d8ec8 100%);
  color: #fff;
  padding: 22px 14px;
}
.brand {
  padding: 0 10px 18px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.brand-num,
.brand-text {
  display: inline-block;
  line-height: 1;
  vertical-align: baseline;
}
.brand .brand-num {
  font-size: 25px;
  position: relative;
  top: 2px;
}
.sider nav { display: flex; flex-direction: column; gap: 4px; }
.sider a { color: #d5e4f8; padding: 10px 12px; border-radius: 8px; }
.sider a.on, .sider a:hover { background: rgba(255,255,255,.12); color: #fff; }
.main { margin-left: 220px; min-height: 100vh; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: #fff;
  border-bottom: 1px solid #e7ebf2;
}
.topbar h1 { margin: 0; font-size: 18px; }
.top-user { color: #667085; }
.content { padding: 22px 28px 40px; }
.desc { margin: 0 0 16px; color: #667085; line-height: 1.6; }
.flash { margin-bottom: 16px; padding: 10px 12px; border-radius: 8px; background: #e8f7ee; color: #137333; }
.flash.err { background: #fdecea; color: #b42318; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.card {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 6px 18px rgba(18, 49, 92, .05);
}
.card span { color: #667085; }
.card strong { display: block; margin: 8px 0 2px; font-size: 28px; color: #12315c; }
.card em { font-style: normal; color: #98a2b3; font-size: 12px; }
.panel { background: #fff; border-radius: 12px; padding: 18px 18px 8px; margin-bottom: 16px; box-shadow: 0 6px 18px rgba(18, 49, 92, .05); }
.panel h2 { margin: 0; font-size: 16px; }
.list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .45);
}
.modal.show { display: flex; }
.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 20px;
  line-height: 1;
}
button.link.edit-btn { color: #1f6feb; margin-right: 8px; }
.form { display: grid; gap: 12px; max-width: 640px; padding-bottom: 12px; }
.form label { display: grid; gap: 6px; color: #344054; }
.form.wide { max-width: 880px; }
.form textarea {
  min-height: 460px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.7;
  resize: vertical;
}
.form input, .form select {
  height: 38px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.form input[type="file"] { height: auto; padding: 8px 0; border: 0; }
.form-actions { display: flex; gap: 10px; align-items: center; }
button, .btn {
  height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #1f6feb;
  color: #fff;
  cursor: pointer;
}
.btn.ghost { display: inline-flex; align-items: center; background: #eef2f7; color: #344054; }
table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
th, td { padding: 10px 8px; border-top: 1px solid #eef1f6; text-align: left; vertical-align: middle; word-break: break-all; }
th { color: #667085; font-weight: 600; }
.thumb { display: block; width: 120px; height: 48px; object-fit: contain; object-position: center; border-radius: 6px; background: #f2f4f7; }
.thumb.splash-preview { width: 120px; height: 214px; object-fit: cover; }
.form label.check { display: flex; align-items: center; gap: 8px; }
.form input[type="checkbox"] { width: 16px; height: 16px; }
.preview[hidden] { display: none; }
.ops { white-space: nowrap; }
.ops form { display: inline; margin-left: 8px; }
button.link { height: auto; padding: 0; background: none; color: #b42318; }
.login-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background:
    linear-gradient(180deg, rgba(4, 8, 18, .28) 0%, rgba(4, 8, 18, .42) 55%, rgba(4, 8, 18, .55) 100%),
    url("/admin/assets/login-bg.jpg") center 30% / cover no-repeat;
  color: #e8f2ff;
}
.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 34px 32px 26px;
  border-radius: 18px;
  background: rgba(7, 12, 24, .62);
  border: 1px solid rgba(126, 196, 255, .38);
  box-shadow:
    0 0 0 1px rgba(255, 70, 48, .16),
    0 28px 70px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(14px);
}
.login-kicker {
  color: #7fd0ff;
  font-size: 12px;
  letter-spacing: .42em;
}
.login-card h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
  letter-spacing: .08em;
  background: linear-gradient(100deg, #8fd4ff 0%, #ffffff 42%, #ffc2b3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card h1::first-letter {
  font-size: 50px;
}
.login-card p,
.login-card .hint {
  margin: 0;
  color: rgba(214, 226, 244, .72);
  line-height: 1.6;
  font-size: 13px;
}
.login-card label {
  display: grid;
  gap: 6px;
  color: #d5e4f7;
  font-size: 13px;
}
.login-card input {
  height: 44px;
  border: 1px solid rgba(150, 190, 255, .32);
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
}
.login-card input::placeholder { color: rgba(214, 226, 244, .38); }
.login-card input:focus {
  outline: none;
  border-color: #4eb6ff;
  box-shadow: 0 0 0 3px rgba(78, 182, 255, .22);
}
.login-card button {
  height: 46px;
  margin-top: 4px;
  border-radius: 10px;
  letter-spacing: .28em;
  font-weight: 700;
  background: linear-gradient(90deg, #155dff, #3ec8ff);
  box-shadow: 0 10px 28px rgba(28, 120, 255, .38);
}
.login-card button:hover { filter: brightness(1.08); }
.login-card .flash.err {
  margin: 0;
  background: rgba(160, 32, 24, .35);
  color: #ffd4cc;
  border: 1px solid rgba(255, 130, 100, .4);
}
@media (max-width: 720px) {
  .login-body {
    padding: 24px;
    background:
      linear-gradient(180deg, rgba(4, 8, 18, .35), rgba(4, 8, 18, .72)),
      url("/admin/assets/login-bg.jpg") center 20% / cover no-repeat;
  }
}
