:root {
  --blue: #1677ff;
  --blue-hover: #4096ff;
  --blue-bg: #f0f6ff;
  --deep: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --success: #10b981;
  --success-bg: #ecfdf5;
  
  /* 登录页专属高级调色板 */
  --brand-blue: #1677ff;
  --brand-blue-hover: #4096ff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: rgba(226, 232, 240, 0.8);
  
  /* 阴影体系 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--deep);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ===== 通用组件精修 ===== */
button {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.2);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

button.ghost {
  color: var(--blue);
  background: var(--blue-bg);
  border: 1px solid transparent;
}

button.ghost:hover {
  background: #e1effe;
  border-color: #bfdbfe;
}

button.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid transparent;
}

button.danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--deep);
  font-size: 14px;
  transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.15);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-position: calc(100% - 14px) center;
  background-size: 16px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

textarea {
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

.hidden {
  display: none !important;
}

/* ==================== 登录页全景重塑（极致流光弥散 × 青春活力数字校园插画） ==================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  /* 青春通透的浅蓝微渐变背景底衬 */
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 50%, #e0e7ff 100%);
}

/* 极光背景层析弥散球 */
.login-page::before,
.login-page::after {
  content: "";
  position: absolute;
  filter: blur(100px);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}
.login-page::before {
  width: 400px;
  height: 400px;
  left: -100px;
  top: -100px;
  background: linear-gradient(135deg, #bfdbfe, #3b82f6);
}
.login-page::after {
  width: 500px;
  height: 500px;
  right: -150px;
  bottom: -100px;
  background: linear-gradient(135deg, #e0e7ff, #818cf8);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: 580px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.8);
  /* 超细腻微质感多重悬浮投影 */
  box-shadow: 
    0 10px 30px -5px rgba(14, 165, 233, 0.05),
    0 25px 60px -10px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* 左侧：动态插画视窗 */
.login-hero {
  position: relative;
  overflow: hidden;
  background: #e0f2fe;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 让插画图元完美平铺 */
.campus-vector-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* 覆盖在矢量图上方的精致交互文字图层 */
.hero-text-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to right, rgba(224, 242, 254, 0.5) 0%, transparent 100%);
}

.login-hero .brand-mark {
  width: 54px;
  height: 54px;
  padding: 7px;
  flex: 0 0 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  overflow: hidden;
}

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

.hero-brand-name {
  font-size: 19px;
  font-weight: 800;
  color: #0369a1;
  letter-spacing: 0.5px;
}

.hero-brand-sub {
  font-size: 11px;
  color: #0284c7;
  font-weight: 600;
  opacity: 0.8;
  margin-top: 1px;
}

.hero-copy {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 440px;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: 36px;
  font-weight: 900;
  color: #0c4a6e;
  line-height: 1.25;
}

.hero-copy p {
  margin: 0;
  font-size: 14px;
  color: #334155;
  line-height: 1.7;
  font-weight: 500;
}

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

.hero-tags span {
  height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #0369a1;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(14, 165, 233, 0.15);
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.04);
}

/* 右侧：高白金级纯净登录板 */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #ffffff;
}

.form-card {
  width: 100%;
  max-width: 310px;
}

.form-title h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.form-title p {
  margin: 0 0 32px;
  color: #64748b;
  font-size: 13.5px;
}

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

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

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap svg {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  fill: #94a3b8;
  transition: fill 0.2s;
  pointer-events: none;
}

.input-wrap input {
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.01);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrap input::placeholder {
  color: #94a3b8;
}

.input-wrap input:focus {
  border-color: #1677ff;
  background: #ffffff;
  box-shadow: 
    inset 0 1px 2px rgba(0, 0, 0, 0.01),
    0 0 0 4px rgba(22, 119, 255, 0.12);
}

.input-wrap input:focus + svg {
  fill: #1677ff;
}

.login-submit {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #1677ff;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin-top: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.15);
  transition: all 0.2s;
}

.login-submit:hover {
  background: #4096ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.25);
}

.login-submit:active {
  transform: translateY(0);
}

.login-tip {
  margin-top: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

/* ==================== ⚡ SVG 极速流体与脉冲粒子动画核心控制 ==================== */
.tech-flow-line-1 {
  stroke: #0ea5e9;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 12, 120;
  animation: techStream 3s linear infinite;
}

.tech-flow-line-2 {
  stroke: #10b981;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 20, 160;
  animation: techStream 4s linear infinite reverse;
}

@keyframes techStream {
  from { stroke-dashoffset: 360; }
  to { stroke-dashoffset: 0; }
}

.pulse-node-1 {
  transform-origin: 295px 145px;
  animation: lightPulse 2s ease-in-out infinite;
}

@keyframes lightPulse {
  0%, 100% { r: 5px; opacity: 0.7; }
  50% { r: 8px; opacity: 1; fill: #06b6d4; }
}

.float-particle {
  fill: #ffffff;
  opacity: 0.6;
  animation: floatingObj 6s ease-in-out infinite;
}
.p1 { animation-delay: 0s; fill: #38bdf8; }
.p2 { animation-delay: 1.5s; fill: #60a5fa; }
.p3 { animation-delay: 3s; fill: #34d399; }
.p4 { animation-delay: 4.5s; fill: #f43f5e; opacity: 0.4; }

@keyframes floatingObj {
  0%, 100% { transform: translateY(0px) scale(1); opacity: 0.4; }
  50% { transform: translateY(-15px) scale(1.2); opacity: 0.8; }
}

/* ===== 核心管理后台布局 ===== */
.shell.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  height: 100vh;
  position: sticky;
  top: 0;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-brand .brand-mark.small {
  width: 52px;
  height: 52px;
  padding: 7px;
  flex: 0 0 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.12);
  overflow: hidden;
}

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

.admin-brand .brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--deep);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.admin-menu {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}

/* 经典风琴菜单美化 */
.menu-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.menu-group-title {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.menu-group-title:hover {
  background: transparent;
  color: var(--deep);
  transform: none;
  box-shadow: none;
}

.menu-icon {
  width: 22px;
  height: 22px;
  background: var(--blue-bg);
  color: var(--blue);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-arrow {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.5;
  transition: transform 0.2s;
}

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

.menu-children {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 30px;
}

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

.menu-item {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #4b5563;
  font-size: 13.5px;
  font-weight: 500;
 text-align: left;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
}

.menu-item:hover {
  background: var(--bg);
  color: var(--deep);
  transform: none;
  box-shadow: none;
}

.menu-item.active {
  background: var(--blue-bg);
  color: var(--blue);
  font-weight: 600;
}

.menu-logout {
  color: var(--danger) !important;
}
.menu-logout:hover {
  background: var(--danger-bg) !important;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

/* ===== 主面板工作区 ===== */
.main {
  padding: 32px;
  background: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.page-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.2);
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--deep);
}

.topbar p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

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

/* 工具栏高级自适应网格 */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-search { flex: 2 1 240px; }
.filter-field:not(.filter-search) { flex: 1 1 160px; }

.filter-field span {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.toolbar button {
  height: 40px;
  padding: 0 20px;
}

.dashboard-panel {
  display: block;
}

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

.overview-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.overview-title {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.overview-value {
  margin-top: 12px;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  color: #0f172a;
}

.overview-sub {
  margin-top: 8px;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.overview-split {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.overview-split b {
  color: var(--blue);
  font-size: 16px;
}

.overview-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--blue-bg);
  color: #2563eb;
  font-size: 13px;
}

/* ===== 核心卡片与数据表高阶打磨 ===== */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 16px 18px;
  font-size: 13.5px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

tbody tr {
  transition: background 0.15s;
}

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

/* 复选框专栏 */
.select-col {
  width: 48px;
  text-align: center;
  padding: 0;
}

.select-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* 优雅的状态徽章 */
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--blue-bg);
  color: var(--blue);
}

.status.warn {
  background: var(--warning-bg);
  color: var(--warning);
}

.status.bad {
  background: var(--danger-bg);
  color: var(--danger);
}

/* 多图与文本单元格格式化 */
td img.thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.url-text {
  font-size: 11px;
  color: var(--muted);
  max-width: 96px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

/* 行内操作按钮群 */
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.row-actions button,
.action-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none !important;
  transform: none !important;
}

.action-preview { color: var(--muted); background: #f1f5f9; }
.action-preview:hover { background: #e2e8f0; }
.action-edit { color: #fff; background: var(--blue); }
.action-edit:hover { background: var(--blue-hover); }
.action-offline { color: var(--warning); background: var(--warning-bg); }
.action-offline:hover { background: #fef3c7; }
.action-delete { color: var(--danger); background: var(--danger-bg); }
.action-delete:hover { background: #fee2e2; }

/* 分页器美化 */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.pager button {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

/* ===== 模态弹窗系统高级重叠控制 ===== */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: all 0.3s;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@pragma modalScaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 20px;
}
.icon-btn:hover {
  background: #e2e8f0;
  color: var(--deep);
}

.form-area {
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #fff;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field input,
.field textarea,
.field select,
.upload-row,
.upload-box,
.org-gallery-upload,
.form-section,
.section-grid {
  min-width: 0;
  max-width: 100%;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.field-full,
textarea {
  grid-column: span 2;
}

.field-help {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.modal-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* 特殊特定弹窗结构细化 */
.message-modal-card { max-width: 520px; }
.message-form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.message-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--blue-bg);
  border-radius: 10px;
  font-size: 13px;
}
.message-target strong { color: var(--blue); }

.confirm-modal-card { max-width: 400px; }
.confirm-body { padding: 24px; font-size: 14.5px; line-height: 1.6; color: #475569; }

.review-modal-card { max-width: 580px; }
.review-form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.review-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review-meta-grid > div {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.readonly-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 13.5px;
  color: #475569;
  min-height: 40px;
}

/* ===== 复杂模块特供：组织管理及精彩瞬间组件美化 ===== */
.form-section {
  grid-column: span 2;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  margin-bottom: 8px;
}
.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 12px;
}
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.org-admin-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.org-preview-card {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  padding: 20px;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}
.org-preview-logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--blue);
}
.org-preview-logo img { width: 100%; height: 100%; object-fit: cover; }
.org-preview-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.org-preview-name span { font-size: 11px; background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 999px; }
.org-preview-sub { font-size: 13px; opacity: 0.8; margin-top: 4px; }
.org-preview-stats { font-size: 12px; opacity: 0.9; margin-top: 8px; }
.org-preview-desc { margin-top: 12px; font-size: 13px; color: #475569; background: #f1f5f9; padding: 10px; border-radius: 8px; }

/* 动态多图异步预览池（精彩瞬间） */
.gallery-preview,
.preview-images,
.image-preview-grid,
.image-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 96px));
  gap: 10px;
  margin-top: 8px;
  max-width: 100%;
  overflow: hidden;
  align-items: start;
}
.gallery-thumb,
.preview-image-card,
.image-preview > img {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.02);
}
.gallery-thumb img,
.preview-image-card img,
.image-preview > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-image-card a,
.preview-image-url {
  display: none;
}
.preview-img-error {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: #f8fafc;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.preview-img-error span {
  color: var(--muted);
  font-size: 11px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.image-more-tip {
  width: 96px;
  height: 96px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
}
.gallery-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  padding: 0;
  font-size: 12px;
}

/* 全局吐司提示 */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: #0f172a;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: toastMoveIn 0.2s ease-out;
}

@keyframes toastMoveIn {
  from { bottom: 16px; opacity: 0; }
  to { bottom: 32px; opacity: 1; }
}

/* ===== 移动端及复杂响应式断点自适应补丁 ===== */
@media (max-width: 900px) {
  .shell.admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { height: auto; position: static; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .form-area { grid-template-columns: 1fr; }
  .field-full, textarea { grid-column: span 1; }
}

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; min-height: auto; border-radius: 20px; }
  .login-hero { display: none; }
  .login-panel { padding: 48px 24px; }
}

@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; min-height: auto; border-radius: 20px; }
  .login-hero { display: none; }
  .login-panel { padding: 48px 32px; }
}

@media (max-width: 600px) {
  .toolbar { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
  .form-area { padding: 16px; }
  .gallery-preview,
  .preview-images,
  .image-preview-grid,
  .image-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .gallery-thumb,
  .preview-image-card,
  .image-preview > img,
  .image-more-tip {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ===== 快捷入口图标与文字兜底专项修复 ===== */
.entry-icon-thumb {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.entry-icon-fallback {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: var(--blue-bg);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(22, 119, 255, 0.18);
  box-shadow: inset 0 1px 2px rgba(22, 119, 255, 0.05);
}

/* ===== Admin table/layout safety patch ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.shell.admin-layout,
.admin-layout {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  grid-template-columns: 276px minmax(0, 1fr);
  overflow-x: hidden;
}

.admin-sidebar,
.sidebar {
  width: 276px;
  max-width: 276px;
  min-width: 0;
  flex: none;
  overflow-x: hidden;
}

.admin-menu,
.menu,
.menu-children {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.menu-item,
.menu-group-title {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

.topbar,
.toolbar,
.card,
.pager {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.topbar {
  overflow: hidden;
}

.page-hero-left {
  flex: 1 1 auto;
  min-width: 0;
}

.top-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.toolbar {
  overflow: hidden;
}

.filter-field,
.filter-search,
.post-only-filter,
.filter-field input,
.filter-field select {
  min-width: 0;
  max-width: 100%;
}

.toolbar button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  min-width: 1020px;
  table-layout: auto;
}

th,
td {
  max-width: 260px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

td img {
  max-width: 88px;
  max-height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

#batchDeleteBtn {
  min-width: 118px;
}

#batchDeleteBtn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.select-col {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
  text-align: center;
}

.select-col input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* ===== Mobile admin adaptation ===== */
.admin-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--deep);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.admin-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.admin-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.admin-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.admin-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.admin-mask {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
}

body.admin-menu-open {
  overflow: hidden;
}

body.modal-open .admin-menu-toggle { visibility: hidden; pointer-events: none; }

@media (min-width: 768px) and (max-width: 1199px) {
  .shell.admin-layout,
  .admin-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-sidebar,
  .sidebar {
    width: 220px;
    max-width: 220px;
    padding: 20px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .main {
    padding: 24px 18px;
  }

  .toolbar {
    padding: 16px;
    gap: 12px;
  }

  .filter-search {
    flex: 1 1 260px;
  }

  .table-wrap table {
    min-width: 900px;
  }

  .form-area {
    padding: 20px;
  }
}

@media (max-width: 767px) {
  .shell.admin-layout,
  .admin-layout {
    display: block;
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .admin-menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1110;
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .admin-sidebar,
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1100;
    width: min(82vw, 300px);
    max-width: min(82vw, 300px);
    height: 100vh;
    height: 100dvh;
    padding: 72px 14px 18px;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .admin-sidebar.open,
  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    padding: 72px 12px 18px;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    overflow: visible;
  }

  .page-hero-left {
    width: 100%;
    align-items: flex-start;
    gap: 10px;
  }

  .page-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    font-size: 16px;
  }

  .topbar h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  .topbar p {
    font-size: 12px;
    line-height: 1.45;
  }

  .top-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .top-actions button {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 8px;
    font-size: 12px;
  }

  .toolbar {
    padding: 12px;
    gap: 10px;
    border-radius: 12px;
    align-items: stretch;
    overflow: visible;
  }

  .filter-field,
  .filter-search,
  .filter-field:not(.filter-search),
  .post-only-filter {
    flex: 1 1 100%;
    width: 100%;
  }

  .toolbar button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  #batchDeleteBtn {
    min-width: 0;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .overview-card {
    padding: 14px;
    border-radius: 12px;
  }

  .overview-value {
    font-size: 28px;
  }

  .card {
    border-radius: 12px;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
  }

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

  th,
  td {
    max-width: 180px;
    padding: 12px 10px;
    font-size: 12.5px;
  }

  td img {
    max-width: 56px;
    max-height: 56px;
    border-radius: 8px;
  }

  .row-actions {
    gap: 6px;
  }

  .row-actions button,
  .action-btn {
    min-width: 0;
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }

  .pager {
    padding: 12px;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }

  .pager span {
    flex: 1 1 100%;
    order: -1;
    text-align: center;
  }

  .pager button {
    flex: 1 1 calc(50% - 8px);
  }

  .modal {
    align-items: stretch;
    justify-content: center;
    padding: 10px;
  }

  .modal-card,
  .message-modal-card,
  .confirm-modal-card,
  .review-modal-card {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .modal-head {
    padding: 14px 16px;
    gap: 10px;
  }

  .modal-head h3 {
    font-size: 16px;
  }

  .form-area,
  .message-form,
  .review-form {
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .field-full,
  textarea,
  .form-section {
    grid-column: span 1;
  }

  .section-grid,
  .review-meta-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    padding: 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .modal-actions button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

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

  .upload-row input[type="file"] {
    max-width: 100%;
  }

  .login-page {
    align-items: stretch;
    padding: 12px;
  }

  .login-shell {
    width: 100%;
    min-height: calc(100vh - 24px);
    min-height: calc(100dvh - 24px);
    border-radius: 18px;
  }

  .login-panel {
    padding: 28px 18px;
  }

  .form-card {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .top-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .toolbar button {
    flex-basis: calc(50% - 8px);
  }

  .table-wrap table {
    min-width: 680px;
  }

  .gallery-preview,
  .preview-images,
  .image-preview-grid,
  .image-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .modal-actions button {
    flex-basis: 100%;
  }
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
  min-width: 0;
}
.preview-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e8edf3;
  overflow-wrap: anywhere;
}
.preview-row > span { color: #63758d; }
.preview-row > strong { min-width: 0; font-weight: 500; }
@media (max-width: 767px) {
  .preview-grid { grid-template-columns: minmax(0, 1fr); }
}
