/* ==========================================================
   丽景小学新闻中心 - 后台管理样式
   仅用于 /admin/**（登录页 + 前台风格切换管理）
   ========================================================== */

:root {
  --adm-blue-900: #163A6B;
  --adm-blue-800: #1E4E8C;
  --adm-blue-700: #2A63A8;
  --adm-blue-500: #5FA9E0;
  --adm-blue-50: #EAF3FB;
  --adm-amber: #F0A24B;
  --adm-bg: #F2F5FA;
  --adm-card: #FFFFFF;
  --adm-ink: #233240;
  --adm-ink2: #5C6E7E;
  --adm-line: #E3EBF2;
  --adm-radius: 14px;
  --adm-shadow: 0 4px 16px rgba(22, 58, 107, .08);
  --adm-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --adm-serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--adm-sans); color: var(--adm-ink); background: var(--adm-bg); line-height: 1.7; font-size: 14.5px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
.adm-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.adm-mono { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12.5px; word-break: break-all; }

/* ============ 通用按钮 / 提示 ============ */
.adm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 20px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; transition: background .2s, border-color .2s, color .2s;
}
.adm-btn-primary { background: var(--adm-blue-800); color: #fff; }
.adm-btn-primary:hover { background: var(--adm-blue-700); }
.adm-btn-primary:disabled { background: #B9C6D4; cursor: default; }
.adm-btn-ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff; background: transparent; }
.adm-btn-ghost:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .6); }
.adm-btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.adm-btn-block { width: 100%; }

.adm-alert { border-radius: 10px; padding: 11px 16px; margin-bottom: 18px; font-size: 14px; }
.adm-alert-error { background: #FDECEA; border: 1px solid #F5C6C0; color: #A72A36; }
.adm-alert-ok { background: #EAF7EE; border: 1px solid #BFE0C7; color: #2C6B3D; }

/* ============ 登录页 ============ */
.adm-login-page {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(95, 169, 224, .35), transparent 62%),
    radial-gradient(700px 500px at 92% 100%, rgba(240, 162, 75, .22), transparent 60%),
    linear-gradient(135deg, #102B52 0%, #163A6B 52%, #1E4E8C 100%);
  display: flex; align-items: center; justify-content: center; padding: 40px 20px;
}
.adm-login-shell { width: 100%; max-width: 430px; }
.adm-login-brand { text-align: center; color: #fff; margin-bottom: 26px; }
.adm-login-brand .adm-seal { margin: 0 auto 14px; }
.adm-login-brand h1 { font-family: var(--adm-serif); font-size: 27px; letter-spacing: 3px; font-weight: 700; }
.adm-login-brand p { margin-top: 6px; font-size: 13.5px; letter-spacing: 3px; color: #BCD3EC; }

.adm-seal {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .14); color: #fff;
  font-family: var(--adm-serif); font-size: 28px; font-weight: 700;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .22);
}
.adm-seal-sm { width: 42px; height: 42px; font-size: 20px; flex: 0 0 42px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }

.adm-login-card {
  background: var(--adm-card); border-radius: 18px; padding: 32px 34px 26px;
  box-shadow: 0 24px 60px rgba(4, 22, 48, .35);
}
.adm-login-card h2 { font-family: var(--adm-serif); font-size: 20px; color: var(--adm-blue-900); }
.adm-login-sub { font-size: 13px; color: var(--adm-ink2); margin: 4px 0 22px; }
.adm-field { margin-bottom: 17px; }
.adm-field label { display: block; font-size: 13.5px; color: var(--adm-ink); margin-bottom: 6px; font-weight: 600; }
.adm-field input {
  width: 100%; height: 44px; padding: 0 14px; font-size: 15px;
  border: 1px solid var(--adm-line); border-radius: 10px; background: #FBFDFF;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.adm-field input:focus { border-color: var(--adm-blue-500); box-shadow: 0 0 0 3px var(--adm-blue-50); background: #fff; }
.adm-field input::placeholder { color: #A9B8C5; }
.adm-login-card .adm-btn-block { height: 46px; margin-top: 8px; font-size: 15.5px; letter-spacing: 4px; }
.adm-login-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; font-size: 12.5px; color: var(--adm-ink2); }
.adm-login-links a { color: var(--adm-blue-700); }
.adm-login-links a:hover { color: var(--adm-blue-900); text-decoration: underline; }
.adm-copyright { text-align: center; color: rgba(255, 255, 255, .55); font-size: 12px; margin-top: 22px; letter-spacing: 1px; }

/* ============ 后台头部 ============ */
.adm-header { background: linear-gradient(120deg, var(--adm-blue-900), var(--adm-blue-800)); color: #fff; box-shadow: 0 2px 12px rgba(15, 42, 82, .18); }
.adm-header .adm-wrap { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.adm-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-brand strong { display: block; font-family: var(--adm-serif); font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.adm-brand small { display: block; font-size: 11.5px; letter-spacing: 3px; color: #BFD5EC; }
.adm-user { display: flex; align-items: center; gap: 14px; font-size: 12.5px; }
.adm-user-name { color: #DCEAF8; white-space: nowrap; }
.adm-user .adm-link { color: #CFE3F5; padding: 4px 0; }
.adm-user .adm-link:hover { color: #fff; }
.adm-logout-form { display: inline-flex; }
@media (max-width: 720px) {
  .adm-header .adm-wrap { height: auto; padding-top: 12px; padding-bottom: 12px; flex-direction: column; align-items: flex-start; }
  .adm-user { width: 100%; flex-wrap: wrap; gap: 10px; }
}

/* ============ 后台主体 ============ */
.adm-main { padding: 30px 0 10px; }
.adm-page-head { margin-bottom: 20px; }
.adm-page-head h1 { font-family: var(--adm-serif); font-size: 24px; color: var(--adm-blue-900); letter-spacing: 1px; }
.adm-page-head p { font-size: 13.5px; color: var(--adm-ink2); margin-top: 4px; }

.adm-status {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  background: var(--adm-card); border: 1px solid var(--adm-line); border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow); overflow: hidden; margin-bottom: 26px;
}
.adm-status > div { padding: 14px 18px; border-right: 1px solid var(--adm-line); min-width: 0; }
.adm-status > div:last-child { border-right: none; }
.adm-status-label { display: block; font-size: 12px; color: var(--adm-ink2); margin-bottom: 3px; }
.adm-status strong { font-size: 15px; color: var(--adm-blue-800); }
.adm-status span { font-size: 13.5px; }
@media (max-width: 900px) {
  .adm-status { grid-template-columns: repeat(2, 1fr); }
  .adm-status > div:nth-child(2n) { border-right: none; }
  .adm-status > div:nth-child(-n+2) { border-bottom: 1px solid var(--adm-line); }
}
@media (max-width: 560px) {
  .adm-status { grid-template-columns: 1fr; }
  .adm-status > div { border-right: none; border-bottom: 1px solid var(--adm-line); }
  .adm-status > div:last-child { border-bottom: none; }
}

/* ============ 风格卡片 ============ */
.adm-style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.adm-style-card {
  background: var(--adm-card); border: 1px solid var(--adm-line); border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.adm-style-card:hover { transform: translateY(-3px); border-color: var(--adm-blue-500); box-shadow: 0 10px 26px rgba(22, 58, 107, .13); }
.adm-style-card.is-current { border-color: var(--adm-blue-800); box-shadow: 0 0 0 3px var(--adm-blue-50), 0 10px 26px rgba(22, 58, 107, .13); }

.adm-style-preview {
  height: 124px; padding: 20px 22px; color: #fff; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.adm-style-preview::before {
  content: ""; position: absolute; right: -34px; top: -46px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255, 255, 255, .14);
}
.adm-style-preview::after {
  content: ""; position: absolute; right: 38px; top: 24px; width: 62px; height: 62px;
  border-radius: 50%; background: rgba(255, 255, 255, .1);
}
.adm-preview-title { position: relative; z-index: 2; font-family: var(--adm-serif); font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.adm-preview-dot { position: relative; z-index: 2; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .75); }

.adm-style-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.adm-style-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.adm-style-head h3 { font-family: var(--adm-serif); font-size: 17px; color: var(--adm-blue-900); }
.adm-badge { font-size: 11.5px; color: #fff; background: var(--adm-blue-800); border-radius: 20px; padding: 2px 10px; white-space: nowrap; }
.adm-style-body p { font-size: 13px; color: var(--adm-ink2); flex: 1; }
.adm-swatches { display: flex; gap: 8px; margin: 14px 0 16px; }
.adm-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--adm-line); }
.adm-style-form { margin-top: auto; }

/* ============ 说明区 ============ */
.adm-tips {
  background: var(--adm-card); border: 1px solid var(--adm-line); border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow); padding: 22px 26px; margin-top: 26px;
}
.adm-tips h2 { font-family: var(--adm-serif); font-size: 17px; color: var(--adm-blue-900); display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.adm-tips h2::before { content: ""; width: 6px; height: 18px; border-radius: 3px; background: var(--adm-amber); }
.adm-tips ul { padding-left: 1.4em; color: var(--adm-ink2); font-size: 13.5px; }
.adm-tips li { margin-bottom: 6px; }
.adm-tips li strong { color: var(--adm-ink); }

.adm-footer { border-top: 1px solid var(--adm-line); margin-top: 30px; padding: 16px 0 26px; color: #8C9AAA; font-size: 12px; }

/* ============ 校园图集管理（/admin/gallery） ============ */
.adm-tabs { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
.adm-tab { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--adm-ink2); background: #E9F0F7; }
.adm-tab:hover { color: var(--adm-blue-800); background: #DEEAF6; }
.adm-tab.is-on { background: var(--adm-blue-800); color: #fff; }

.adm-table-wrap { background: var(--adm-card); border-radius: var(--adm-radius); box-shadow: var(--adm-shadow); overflow: hidden; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th, .adm-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--adm-line); vertical-align: middle; }
.adm-table th { background: #F6F9FD; color: var(--adm-ink2); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-thumb { width: 86px; height: 62px; border-radius: 9px; object-fit: cover; background: #E9EFF5; display: block; }
.adm-cell-title b { display: block; font-size: 14px; }
.adm-cell-title small { color: var(--adm-ink2); font-size: 12px; }
.adm-badge-state { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.adm-badge-state.on { background: #E4F3EA; color: #2E7D5B; }
.adm-badge-state.off { background: #F3ECEA; color: #94605A; }
.adm-row-actions { display: flex; gap: 8px; align-items: center; }
.adm-row-actions form { display: inline-flex; }
.adm-btn-danger { background: #FBEDEC; color: #A72A36; }
.adm-btn-danger:hover { background: #F6D9D6; }
.adm-btn-line { border: 1px solid var(--adm-line); color: var(--adm-blue-800); background: #fff; }
.adm-btn-line:hover { border-color: var(--adm-blue-500); background: var(--adm-blue-50); }
.adm-empty { padding: 42px 16px; text-align: center; color: var(--adm-ink2); font-size: 13.5px; }

.adm-form-card { background: var(--adm-card); border-radius: var(--adm-radius); box-shadow: var(--adm-shadow); padding: 26px 28px; }
.adm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; }
.adm-field textarea, .adm-field select, .adm-field input[type="file"] {
  width: 100%; padding: 10px 14px; font-size: 14px; border: 1px solid var(--adm-line); border-radius: 10px;
  background: #FBFDFF; outline: none; font-family: inherit; color: var(--adm-ink);
}
.adm-field textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.adm-field textarea:focus, .adm-field select:focus { border-color: var(--adm-blue-500); box-shadow: 0 0 0 3px var(--adm-blue-50); }
.adm-field-hint { display: block; margin-top: 5px; font-size: 12px; color: var(--adm-ink2); line-height: 1.6; }
.adm-field-full { grid-column: 1 / -1; }
.adm-form-preview { display: flex; gap: 12px; align-items: center; }
.adm-form-preview img { width: 150px; height: 110px; object-fit: cover; border-radius: 10px; background: #E9EFF5; border: 1px solid var(--adm-line); }
.adm-form-foot { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
@media (max-width: 760px) {
  .adm-form-grid { grid-template-columns: 1fr; }
  .adm-table { font-size: 12.5px; }
}
