* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #ea580c;
  --warning-light: #fed7aa;
  --danger: #dc2626;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius: 10px;
  /* ===== 3D 风格变量（仅视觉，不改布局与交互） ===== */
  --shadow-3d: 0 1px 2px rgba(15,23,42,.06), 0 4px 10px -2px rgba(15,23,42,.10), 0 14px 30px -8px rgba(37,99,235,.16);
  --shadow-3d-hover: 0 2px 4px rgba(15,23,42,.08), 0 12px 22px -4px rgba(15,23,42,.16), 0 28px 54px -12px rgba(37,99,235,.26);
  --edge-top: inset 0 1px 0 rgba(255,255,255,.95);
  --edge-bottom: inset 0 -1px 0 rgba(15,23,42,.06);
  --ease-3d: cubic-bezier(.22,.61,.36,1);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
/* 管理页：仅当管理视图可见时禁止页面级滚动，表格区域内部滚动；
   汇总页/登录页保持正常页面滚动 */
html { height: 100%; }
body { height: 100%; overflow: auto; }
body:has(#managementView:not([style*="display:none"]):not([style*="display: none"])) { overflow: hidden; }
/* Header — 3D 液态玻璃 蓝（顶深底浅垂直渐变） */
.header, .dashboard-header {
  /* 四层叠加：顶部柔光高光 + 双侧辉光 + 主蓝色垂直渐变（顶深→底浅） */
  background:
    radial-gradient(140% 70% at 50% 0%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 55%),
    radial-gradient(80% 60% at 0% 100%, rgba(96,165,250,0.45) 0%, rgba(96,165,250,0) 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(125,180,255,0.30) 0%, rgba(125,180,255,0) 60%),
    linear-gradient(180deg,
      #1e40af 0%,
      #2563eb 28%,
      #3b82f6 60%,
      #7eb6ff 88%,
      #cbe5ff 100%);
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  /* 3D 液态玻璃：顶部亮边 + 底部暗边 + 底部内反光 + 三层大投影 */
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.85),
    inset 0 -2px 0 rgba(30,64,175,0.40),
    inset 0 -30px 60px -20px rgba(255,255,255,0.18),
    0 6px 14px -2px rgba(30,64,175,0.30),
    0 14px 32px -8px rgba(37,99,235,0.40),
    0 28px 60px -16px rgba(125,180,255,0.50);
}
.header {
  flex-shrink: 0;
  z-index: 100;
  padding: 10px 24px;
}
.dashboard-header {
  padding: 3px 24px;   /* 与 .header 对齐：3×2 + 90px logo = 96px，汇总页/工具栏 header 等高 */
}
/* 顶部高光线条（细玻璃裂面） */
.header::before, .dashboard-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.9) 20%,
    rgba(255,255,255,0.95) 50%,
    rgba(255,255,255,0.9) 80%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 1;
}
/* 右下辉光斑（液态水珠） */
.header::after, .dashboard-header::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(20px);
  z-index: 0;
}
/* 内容在液态层之上 + 底部白字可读性补偿 */
.header > *, .dashboard-header > * {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(15,23,42,0.45), 0 0 1px rgba(15,23,42,0.30);
}
.header-left { display: flex; align-items: center; gap: 12px; }
#bookSelector option { color: #1f2937; background: white; }
.header-logo {
  width: 90px; height: 90px;   /* 仅放大 logo；工具栏总高由 .header 的 3px 内边距锁定为 96px 不变 */
  background: transparent;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  padding: 2px;
  /* 3D：倾斜 + 三层投影（紧贴阴影 + 蓝色光晕 + 远投影） */
  transform: perspective(400px) rotateX(8deg) translateZ(8px);
  filter:
    drop-shadow(0 1px 1px rgba(15,23,42,.35))
    drop-shadow(0 3px 6px rgba(15,23,42,.25))
    drop-shadow(0 6px 16px rgba(37,99,235,.20));
  transition: transform .3s var(--ease-3d), filter .3s var(--ease-3d);
}
.header-logo:hover {
  /* 90px 下若仍放大 1.10 会超出 96px 工具栏被 overflow:hidden 切边，改为轻微 1.02 + 抬起，保留 3D 反馈且不裁切 */
  transform: perspective(400px) rotateX(0deg) translateZ(8px) scale(1.02);
  filter:
    drop-shadow(0 1px 1px rgba(15,23,42,.40))
    drop-shadow(0 4px 8px rgba(15,23,42,.30))
    drop-shadow(0 10px 24px rgba(37,99,235,.30));
}
.header-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.header-title { font-size: 20px; font-weight: 700; }
.header-subtitle { font-size: 12px; opacity: 0.85; margin-top: 2px; }
/* Toolbar */
.toolbar {
  background: var(--card-bg);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
/* 顶栏按钮 / select：强化 3D 液态玻璃（更强磨砂 + 拟物高光面 + 立体俯仰） */
.header .btn-outline, .dashboard-header .btn-outline,
.header select, .dashboard-header select {
  position: relative;
  color: #ffffff !important;
  border: 1.5px solid rgba(255,255,255,0.60) !important;
  /* 拟物高光面：上半更亮 → 下半暗 */
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24) 0%, rgba(255,255,255,0.07) 48%, rgba(255,255,255,0.02) 100%),
    rgba(255,255,255,0.10) !important;
  /* 玻璃磨砂质感（更强） */
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  /* 3D 多层阴影：更亮顶边 + 更厚底暗边 + 淡蓝内辉光 + 三层外投影 */
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.85),
    inset 0 -3px 0 rgba(30,64,175,0.45),
    inset 0 0 16px rgba(125,180,255,0.35),
    0 4px 10px -2px rgba(15,23,42,0.40),
    0 10px 26px -6px rgba(37,99,235,0.55),
    0 20px 44px -12px rgba(125,180,255,0.50);
  text-shadow: 0 1px 2px rgba(15,23,42,0.50);
  border-radius: 12px;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, background .2s ease, border-color .2s ease;
  /* 立体俯仰：底部为轴，顶部后仰 8° + 上浮 */
  transform: perspective(500px) rotateX(8deg) translateY(-1px);
  transform-origin: center bottom;
  will-change: transform;
}
/* 玻璃高光面（仅按钮；select 原生控件不支持伪元素） */
.header .btn-outline, .dashboard-header .btn-outline { overflow: hidden; }
.header .btn-outline::before, .dashboard-header .btn-outline::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(255,255,255,0.50) 0%, rgba(255,255,255,0) 100%);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}
.header .btn-outline:hover, .dashboard-header .btn-outline:hover,
.header select:hover, .dashboard-header select:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.34) 0%, rgba(255,255,255,0.11) 48%, rgba(255,255,255,0.02) 100%),
    rgba(255,255,255,0.16) !important;
  border-color: rgba(255,255,255,1) !important;
  color: #ffffff !important;
  /* hover：更平（正面朝用户） + 更高浮 */
  transform: perspective(500px) rotateX(4deg) translateY(-4px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -3px 0 rgba(30,64,175,0.45),
    inset 0 0 20px rgba(125,180,255,0.45),
    0 8px 18px -2px rgba(15,23,42,0.45),
    0 22px 44px -10px rgba(37,99,235,0.65),
    0 32px 64px -16px rgba(125,180,255,0.55);
}
.header .btn-outline:active, .dashboard-header .btn-outline:active {
  /* 按下：几乎平 + 下沉 + 内阴影（实体感） */
  transform: perspective(500px) rotateX(2deg) translateY(0) scale(0.96);
  box-shadow:
    inset 0 2px 6px rgba(15,23,42,0.42),
    inset 0 -1px 0 rgba(255,255,255,0.30);
  transition-duration: .06s;
}
/* dashboard-header 内的 user-badge 也调整为深色字 */
.dashboard-header .user-badge {
  color: #0f172a !important;
  background: rgba(255,255,255,0.40) !important;
  border-color: rgba(15,23,42,0.22) !important;
}
.dashboard-header .user-badge:hover {
  background: rgba(255,255,255,0.65) !important;
  border-color: rgba(15,23,42,0.40) !important;
}
.dashboard-header .user-badge-role {
  background: rgba(37,99,235,0.18) !important;
  color: #1e3a8a !important;
}
.toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.month-selector {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg);
  border-radius: 8px;
  padding: 4px;
}
.month-btn {
  width: 32px; height: 32px;
  border: none; background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.month-btn:hover { background: var(--border); color: var(--text); }
.month-display {
  font-size: 15px; font-weight: 600;
  min-width: 90px; text-align: center;
  color: var(--text);
}
/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* 3D：按钮有厚度，抬起→按下形成物理反馈 */
  transition: transform .14s var(--ease-3d), box-shadow .14s var(--ease-3d), background .15s;
  white-space: nowrap;
  position: relative;
  box-shadow: 0 2px 0 rgba(15,23,42,.14), 0 3px 8px -1px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.28);
  transform: translateY(0);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(15,23,42,.14), 0 8px 16px -2px rgba(15,23,42,.22), inset 0 1px 0 rgba(255,255,255,.30); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(15,23,42,.14), 0 2px 4px -1px rgba(15,23,42,.18), inset 0 1px 3px rgba(15,23,42,.16); }
.btn-primary { background: linear-gradient(180deg, #3b82f6 0%, var(--primary) 55%, #1d4ed8 100%); color: white; }
.btn-primary:hover { background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: transparent; border: 1px solid #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
/* Summary cards */
.summary {
  padding: 8px 20px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  .summary { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
@media (max-width: 600px) {
  .summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
.summary-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.06);
  border: 1px solid #e8ecf1;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow .2s, transform .15s;
}
.summary-card:hover {
  box-shadow: 0 4px 12px rgba(15,23,42,.10);
  transform: translateY(-1px);
}
.summary-icon {
  width: 40px; height: 40px;
  min-width: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.summary-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.summary-label { font-size: 12px; color: var(--text-secondary); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-value { font-size: 18px; font-weight: 700; color: var(--text-primary); white-space: nowrap; line-height: 1.25; letter-spacing: -.01em; }
.summary-value small { font-size: 11px; font-weight: 400; color: var(--text-secondary); margin-left: 2px; }
/* Table */
/* 管理页：顶部固定 + 表格滚动 */
/* main.js 显示视图时设 style.display="block"，会覆盖 CSS 的 flex；
   故用 :not 判断未隐藏状态 + !important 压过内联样式，恢复 flex 布局 */
#managementView:not([style*="display:none"]):not([style*="display: none"]) {
  display: flex !important;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
#managementView > .header { flex-shrink: 0; }
#managementView > .toolbar { flex-shrink: 0; position: static; }
#managementView > .unpaid-banner { flex-shrink: 0; }
#managementView > .summary { flex-shrink: 0; }
#managementView > .mgmt-warning { flex-shrink: 0; }
.table-container {
  margin: 0 24px 24px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 1200px;
}
/* 表头整行固定，两行表头作为一个整体 sticky */
thead { position: sticky; top: 0; z-index: 10; }
thead th {
  background: #f8fafc;
  padding: 6px 5px;
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
thead th.group-water { background: #eff6ff; color: #2563eb; }
thead th.group-elec { background: #fff7ed; color: #ea580c; }
thead th.group-total { background: #f0fdf4; color: #16a34a; }
tbody td {
  padding: 5px 6px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr:hover { background: #f8fafc; }
tbody tr.unpaid { background: #fffbeb; }
tbody tr.paid { background: #f0fdf4; }
tbody tr.pay-pink { background: #fecdd3; }
tbody tr.pay-red { background: #fecaca; }
tbody tr.vacant { background: #f1f5f9 !important; }
tbody tr.vacant:hover { background: #e2e8f0 !important; }
/* Input cells */
.cell-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 13px;
  text-align: center;
  background: transparent;
  color: var(--text);
  transition: all 0.15s;
}
.cell-input:hover { border-color: var(--border); background: white; }
.cell-input:focus {
  border-color: var(--primary);
  background: white;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.cell-input.calculated {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: not-allowed;
}
.cell-input.calculated:focus { border-color: transparent; box-shadow: none; }
.room-number {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  transition: all 0.15s;
  border: 1px dashed transparent;
}
.room-number:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.4);
  text-decoration: underline;
}
.status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  line-height: 1.3;
  min-width: 70px;
  text-align: center;
  /* 3D：胶囊形标签浮起，顶部高光 + 底部暗边 + 三层投影 */
  transform: perspective(400px) rotateX(8deg) translateZ(4px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(0,0,0,.08),
    0 1px 1px rgba(15,23,42,.15),
    0 2px 4px rgba(15,23,42,.10),
    0 4px 10px -2px rgba(15,23,42,.10);
  transition: transform .15s var(--ease-3d), box-shadow .15s var(--ease-3d);
}
.status-badge:hover {
  transform: perspective(400px) rotateX(2deg) translateZ(8px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 -1px 0 rgba(0,0,0,.08),
    0 1px 1px rgba(15,23,42,.18),
    0 3px 6px rgba(15,23,42,.14),
    0 6px 14px -2px rgba(15,23,42,.14);
}
.status-badge:active { transform: perspective(400px) rotateX(8deg) translateZ(0px) scale(0.97); }
.unpaid-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin: 0 24px 0;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 14px;
  color: #475569;
}
.unpaid-banner .ub-item b { font-size: 15px; }
.unpaid-banner .ub-overdue { color: #ea580c; font-weight: 600; }
.status-unpaid {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}
.status-paid {
  background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}
.status-rented {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}
.status-vacant {
  background: linear-gradient(180deg, #fbcfe8 0%, #f9a8d4 100%);
  color: #9d174d;
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}
/* Action icons — 去掉租客信息按钮(👤)，剩余3个放大 */
.action-icon.tenant { display: none !important; }
.action-icon {
  width: 34px; height: 34px;
  border: none;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: var(--text-secondary);
  /* 3D：图标按钮凸起 */
  transform: perspective(300px) rotateX(10deg) translateZ(3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(15,23,42,.08),
    0 1px 1px rgba(15,23,42,.12),
    0 2px 4px rgba(15,23,42,.08);
  transition: transform .15s var(--ease-3d), box-shadow .15s var(--ease-3d), background .15s, color .15s;
}
.action-icon:hover {
  transform: perspective(300px) rotateX(0deg) translateZ(8px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(15,23,42,.08),
    0 1px 1px rgba(15,23,42,.16),
    0 4px 8px rgba(15,23,42,.12),
    0 8px 16px -2px rgba(15,23,42,.12);
}
.action-icon:active { transform: perspective(300px) rotateX(10deg) translateZ(0) scale(0.95); }
.action-icon.delete:hover { background: linear-gradient(180deg, #fef2f2 0%, #fecaca 100%); color: var(--danger); }
.action-icon.tenant:hover { background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%); color: #2563eb; }
.action-icon.checkout:hover { background: linear-gradient(180deg, #fff7ed 0%, #fed7aa 100%); color: #ea580c; }
/* Tenant tag in table */
.tenant-tag {
  display: inline-block;
  font-size: 11px;
  color: #2563eb;
  margin-top: 2px;
  cursor: pointer;
}
.tenant-tag:hover { color: #1d4ed8; text-decoration: underline; }
.room-cell { display: flex; flex-direction: column; align-items: center; }
/* Tenant list panel */
.tenant-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.tenant-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.tenant-card:hover { border-color: #93c5fd; background: #eff6ff; }
.tenant-card.vacant { opacity: 0.6; }
.tenant-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.tenant-card-room {
  font-size: 16px; font-weight: 800; color: #1e40af;
}
.tenant-card-status {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
}
.tenant-card-info {
  font-size: 13px; color: #4b5563; line-height: 1.7;
}
.tenant-card-info .label { color: #9ca3af; display: inline-block; width: 52px; }
.tenant-card-empty {
  font-size: 13px; color: #9ca3af; font-style: italic;
}
/* Footer total row */
tfoot td {
  padding: 10px 8px;
  text-align: center;
  font-weight: 700;
  background: #f8fafc;
  border-top: 2px solid var(--border);
  font-size: 14px;
}
tfoot td.total-label { text-align: right; padding-right: 16px; color: var(--text-secondary); }
/* Modal wide */
.modal-wide { max-width: 680px; }
.check-in-receipt {
  background: white;
  max-width: 660px;
  margin: 0 auto;
  padding: 22px 30px;
  font-family: "SimSun", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  box-sizing: border-box;
  border: 1px solid #000;
}
.check-in-receipt-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: 3px;
}
.check-in-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 15px;
  border-bottom: 1px solid #e5e7eb;
}
.check-in-info-row .label {
  font-weight: 700;
  min-width: 90px;
  flex-shrink: 0;
}
.check-in-info-row .value {
  flex: 1;
  text-align: right;
  word-break: break-all;
  padding-left: 12px;
}
.check-in-section-title {
  margin: 16px -30px 10px;
  padding: 5px 0;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: #374151;
  background: #f3f4f6;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}
.check-in-rules {
  font-size: 12px;
  line-height: 1.9;
  color: #1f2937;
  padding: 4px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.check-in-rules div {
  padding: 4px 0;
  text-align: justify;
}
.check-in-footer {
  margin: 16px -30px -22px;
  padding: 12px 30px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
}
.check-in-date-range {
  font-size: 13px;
  color: #4b5563;
}
/* 设施清单：纯文字、无边框装饰、靠左、紧凑、按内容自适应高度 */
.check-in-facilities {
  text-align: left;
  padding: 4px 8px 10px;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  word-break: break-all;
}
.check-in-facilities-empty {
  text-align: left;
  color: #9ca3af;
  font-size: 13px;
  padding: 4px 8px 10px;
}
/* Rent Slip Styles — 按房租收据 Excel 格式 */
.rent-slip {
  background: white;
  margin: 0 auto 20px;
  page-break-after: always;
  width: 560px;
  font-family: "SimSun", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  box-sizing: border-box;
}
.rent-slip:last-child { page-break-after: auto; }
.receipt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}
.receipt-table td {
  border: 1px solid #000;
  padding: 3px 4px;
  text-align: center;
  vertical-align: middle;
  height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.receipt-table td.label {
  font-weight: 700;
  background: #fff;
}
.receipt-table td.header-cell {
  font-weight: 700;
  background: #fff;
}
.receipt-table tr.total-row td {
  background: #FFC000;
  font-weight: 700;
}
.receipt-table tr.total-row .total-amount {
  font-size: 15px;
  font-weight: 700;
}
.receipt-table .remark-cell {
  text-align: left;
  white-space: normal;
  min-height: 28px;
}
/* Column widths: 6 columns (与 Canvas colW 一致，总计 440px) */
.receipt-table col.col-item    { width: 70px; }
.receipt-table col.col-c2      { width: 90px; }
.receipt-table col.col-c3      { width: 80px; }
.receipt-table col.col-c4      { width: 60px; }
.receipt-table col.col-c5      { width: 80px; }
.receipt-table col.col-c6      { width: 60px; }
.rent-slip-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}
/* 入住须知样式 */
.check-in-rules {
  font-size: 13px;
  line-height: 1.9;
  color: #1f2937;
  padding: 6px 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.check-in-rules div {
  padding: 3px 0;
}
/* Print Rent Slips */
/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10001;  /* 高于 .login-screen(9999) 与 .version-tag(10000)，确保登录页弹窗可点击 */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: linear-gradient(165deg, #ffffff 0%, #fbfcfe 65%, #f6f8fc 100%);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  /* 3D：弹窗厚度感 */
  box-shadow:
    0 2px 4px rgba(15,23,42,.10),
    0 20px 44px -10px rgba(15,23,42,.34),
    0 44px 88px -24px rgba(15,23,42,.38),
    var(--edge-top), var(--edge-bottom);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-body { display: flex; flex-direction: column; gap: 14px; }
#rentSlipBody { display: block; gap: 0; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
/* 报表弹窗：标题栏固定在顶部，内容区域可滚动 */
.report-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.report-modal .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.report-modal .modal-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 0;
  padding: 14px 18px;
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
/* 身份证图片弹窗 */
.idcard-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  max-width: 520px;
}
.idcard-modal .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  text-align: center;
  padding: 18px;
}
.idcard-modal .modal-title {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 0;
  padding: 14px 18px;
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
/* 报表弹窗关闭按钮放大 */
.modal-close-x {
  width: 32px; height: 32px;
  font-size: 22px; line-height: 1;
  border: none; background: #fee2e2; color: #dc2626;
  border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-close-x:hover { background: #fecaca; }
/* 租客信息弹窗：标题与按钮栏固定，仅中间表单区域滚动 */
.tenant-fixed {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 20px;
}
.tenant-fixed .modal-title {
  flex: none;
  margin-bottom: 16px;
}
.tenant-fixed .modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.tenant-fixed .modal-footer {
  flex: none;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* 租客信息弹窗：双列/三列布局 */
.tenant-fixed .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
@media (max-width:520px) {
  .tenant-fixed .form-row { grid-template-columns: 1fr; }
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
/* 租客信息-网络费：未勾选时整体浅灰色、金额不可填写 */
#tenantNetworkGroup.net-disabled .form-label,
#tenantNetworkGroup.net-disabled #tenantNetworkFee { color: #9ca3af; }
#tenantNetworkGroup.net-disabled #tenantNetworkFee { background: #f3f4f6; cursor: not-allowed; }
#tenantNetworkGroup.net-disabled .net-toggle-label { color: #9ca3af; }
#tenantNetworkGroup.net-disabled .net-toggle-label input[type="checkbox"] { accent-color: #9ca3af; }
.form-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,0.1); }
/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 90vw;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  z-index: 100000;  /* 始终高于所有模态框(<=~10001)，错误提示不被弹窗遮挡 */
  opacity: 0;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
/* Settings panel */
.settings-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}
.settings-row label { font-size: 13px; color: var(--text-secondary); min-width: 100px; }
/* Responsive */
@media (max-width: 480px) {
  .header { padding: 8px 12px; }
  .header-title { font-size: 14px; }
  .header-subtitle { display: none; }
  .toolbar { padding: 8px; flex-wrap: wrap; gap: 4px; }
  .summary { padding: 8px; grid-template-columns: 1fr 1fr; gap: 6px; }
  .summary-card { padding: 8px; }
  .summary-label { font-size: 11px; }
  .summary-value { font-size: 15px; white-space: nowrap; }
  .summary-value small { font-size: 10px; }
  .table-container { margin: 0 4px 8px; overflow-x: auto; }
  .table-container table { font-size: 12px; }
  .table-container th, .table-container td { padding: 6px 4px; }
  .btn { padding: 4px 8px; font-size: 11px; }
  .modal { padding: 12px; max-width: 95vw; }
  .modal-wide { max-width: 100%; }
  .rent-slip { max-width: 100%; }
}
@media (max-width: 768px) {
  .header-title { font-size: 16px; }
  .header-subtitle { display: none; }
  .toolbar { padding: 10px 12px; top: 65px; }
  .summary { padding: 12px; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* 小屏卡片本就窄，再倾斜会显得挤压变形，只保留阴影层次 */
  .summary-card { padding: 12px; transform: none; }
  .dashboard-card { transform: none; }
  .summary-value { font-size: 18px; white-space: nowrap; }
  .summary-value small { font-size: 11px; }
  .table-container { margin: 0 12px 12px; }
  .btn { padding: 6px 12px; font-size: 12px; }
  .modal { padding: 16px; }
  .modal-wide { max-width: 100%; }
}
/* ===== 汇总页响应式（v4.4.22） ===== */
@media (max-width: 1024px) {
  .dashboard-body { padding: 20px; }
}
@media (max-width: 768px) {
  .dashboard-body { padding: 16px; }
  .dashboard-header { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .dashboard-header > div:last-child { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .dashboard-header h1 { font-size: 18px; }
  .dashboard-logo { width: 60px; height: 60px; }
  .dashboard-section-title { font-size: 14px; margin: 0 2px 10px; }
  .dashboard-card { padding: 16px; }
  .dashboard-card-header { padding: 4px 4px; margin: -4px -4px 14px; }
  .dashboard-stat { padding: 10px 6px; }
  .dashboard-stat-num { font-size: 22px; }
}
@media (max-width: 480px) {
  .dashboard-body { padding: 12px; }
  .dashboard-header { padding: 8px 12px; }
  .dashboard-header h1 { font-size: 16px; }
  .dashboard-card { padding: 14px; }
  .dashboard-card-stats { gap: 8px; margin-bottom: 10px; }
  .dashboard-stat { padding: 8px 4px; }
  .dashboard-stat-num { font-size: 19px; }
  .dashboard-stat-label { font-size: 11px; }
  .dashboard-card-title { font-size: 16px; }
  .dashboard-card-footer { font-size: 12px; flex-wrap: wrap; gap: 4px; }
  .dashboard-perm-badge { font-size: 11px; padding: 2px 7px; }
  .dash-enter-arrow { font-size: 18px; }
}
/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
/* Empty state */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; margin-bottom: 16px; }
/* ===== 3D 降级策略 =====
   1) 触屏设备没有 hover，倾斜只会徒增眩晕感与合成开销 → 摊平；
   2) 系统开启「减弱动态效果」时必须尊重用户偏好（无障碍要求）；
   3) 打印时任何 3D 变换都会导致排版错位 → 全部清零。 */
@media (hover: none), (pointer: coarse) {
  .dashboard-card, .summary-card, .login-card, .login-card-outer, .login-logo-icon {
    transform: none !important;
  }
  .dashboard-card:hover, .summary-card:hover, .login-card:hover {
    transform: translateY(-2px) !important;
  }
  .login-logo-icon:hover {
    transform: scale(1.05) !important;
  }
  .dashboard-card { cursor: pointer; touch-action: manipulation; }
  .dashboard-card .drag-handle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-card, .summary-card, .login-card, .login-card-outer, .login-logo-icon, .login-btn, .login-input, .captcha-code {
    transform: none !important;
    transition: none !important;
  }
  .dashboard-card:hover, .summary-card:hover, .login-card:hover, .login-logo-icon:hover, .login-btn:hover { transform: none !important; }
  .dashboard-card { animation: none !important; }
}
/* Print styles */
@media print {
  /* 3D 变换在打印时会错位，必须全部清零 */
  .dashboard-card, .summary-card, .login-card, .login-card-outer, .modal, .btn {
    transform: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }
  .dashboard-card::after, .summary-card::after, .login-card::after { display: none !important; }
  .dashboard-card > *, .summary-card > *, .login-card > *, .summary-icon, .summary-info { transform: none !important; }
  /* General print */
  .header, .toolbar, .summary, .action-icon, .status-badge { display: none !important; }
  .table-container { box-shadow: none; margin: 0; }
  tbody tr.paid, tbody tr.unpaid, tbody tr.pay-pink, tbody tr.pay-red, tbody tr.vacant { background: none !important; }
  /* Default: print the main table (dashboard view) */
  #dashboardView { display: block !important; }
  /* Modal print mode (toggled via body.print-modal): only the targeted modal is shown */
  body.print-modal * { visibility: hidden; }
  body.print-modal #rentSlipModal, body.print-modal #rentSlipModal *,
  body.print-modal #checkoutReceiptModal, body.print-modal #checkoutReceiptModal *,
  body.print-modal #checkInReceiptModal, body.print-modal #checkInReceiptModal * { visibility: visible; }
  body.print-modal #rentSlipModal, body.print-modal #checkoutReceiptModal, body.print-modal #checkInReceiptModal {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    background: white;
    padding: 0;
    overflow: visible;
  }
  body.print-modal #dashboardView { display: none !important; }
  body.print-modal #rentSlipModal .modal-title,
  body.print-modal #rentSlipModal .modal-footer,
  body.print-modal #checkoutReceiptModal .modal-title,
  body.print-modal #checkoutReceiptModal .modal-footer,
  body.print-modal #checkInReceiptModal .modal-title,
  body.print-modal #checkInReceiptModal .modal-footer { display: none !important; }
  body.print-modal .rent-slip {
    box-shadow: none;
    margin: 0 auto;
    page-break-after: always;
    width: 100%;
    max-width: 560px;
  }
  body.print-modal .rent-slip:last-of-type { page-break-after: auto; }
  body.print-modal .check-in-receipt {
    box-shadow: none !important;
    border: 1px solid #000;
    margin: 0 auto;
    page-break-inside: avoid;
  }
}
/* Dashboard */
.checkout-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}
.checkout-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 16px;
}
.checkout-table th {
  background: #f3f4f6;
  padding: 8px 4px;
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.checkout-table td {
  padding: 6px 4px;
  text-align: center;
  border: 1px solid var(--border);
}
.checkout-table td.label-cell {
  font-weight: 700;
  text-align: left;
  padding-left: 10px;
  white-space: nowrap;
}
.checkout-table input {
  width: 64px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
}
.checkout-table input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}
.checkout-summary {
  background: #f9fafb;
  border-radius: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
}
.checkout-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 14px;
}
.checkout-summary-row.total {
  border-top: 2px dashed var(--border);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 18px;
  font-weight: 700;
}
.checkout-summary-row.total .val { color: #dc2626; font-size: 22px; }
.checkout-summary-row .val { font-weight: 700; }
.checkout-summary-row .val input.ck-val-input {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px dashed currentColor;
  border-radius: 0;
  padding: 2px 4px;
  text-align: right;
}
.checkout-summary-row .val input.ck-val-input:focus {
  outline: none;
  border-bottom: 1px solid currentColor;
  background: #fff;
}
.checkout-summary-row.deduct .val input.ck-val-input { color: #ea580c; }
.checkout-summary-row.total .val input.ck-val-input { color: #dc2626; font-size: 22px; }
.checkout-summary-row.deduct .val { color: #ea580c; }
.dashboard-header h1 { font-size: 22px; font-weight: 700; }
.dashboard-header p { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.dashboard-logo {
  width: 90px; height: 90px;   /* 与顶部工具栏 logo 统一为 90px，header 高度随之对齐为 96px */
  background: transparent;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  padding: 2px;
  /* 3D：中等尺寸 LOGO，三层投影 */
  transform: perspective(500px) rotateX(10deg) translateZ(14px);
  filter:
    drop-shadow(0 1px 1px rgba(15,23,42,.35))
    drop-shadow(0 3px 6px rgba(15,23,42,.25))
    drop-shadow(0 8px 22px rgba(37,99,235,.22));
  transition: transform .35s var(--ease-3d), filter .35s var(--ease-3d);
}
.dashboard-logo:hover {
  transform: perspective(500px) rotateX(0deg) translateZ(16px) scale(1.02);
  filter:
    drop-shadow(0 1px 1px rgba(15,23,42,.40))
    drop-shadow(0 5px 10px rgba(15,23,42,.30))
    drop-shadow(0 14px 32px rgba(37,99,235,.32));
}
.dashboard-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.dashboard-body { padding: 24px; max-width: 1200px; margin: 0 auto; }
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  /* 3D：为子卡片建立透视空间，视点略高于卡片中心，俯视感更自然 */
  perspective: 1400px;
  perspective-origin: 50% 20%;
}
.dashboard-card {
  background: linear-gradient(160deg, #ffffff 0%, #fbfcfe 55%, #f6f8fc 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3d), var(--edge-top), var(--edge-bottom);
  padding: 20px;
  /* 3D：默认即带轻微俯仰，静态截图下也能看出立体 */
  transform: perspective(1400px) rotateX(2.2deg) translateZ(0);
  transform-style: preserve-3d;
  transition: transform .32s var(--ease-3d), box-shadow .32s var(--ease-3d), border-color .2s;
  border: 2px solid transparent;
  position: relative;
  cursor: grab;
  user-select: none;
  will-change: transform;
}
/* 3D：卡片表面斜向光泽，模拟环境光反射 */
.dashboard-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(122deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.10) 26%, rgba(255,255,255,0) 52%);
  opacity: .85;
  pointer-events: none;
  transition: opacity .32s var(--ease-3d);
}
.dashboard-card:hover {
  transform: perspective(1400px) rotateX(5deg) rotateY(-3deg) translateY(-6px) translateZ(24px);
  box-shadow: var(--shadow-3d-hover), var(--edge-top), var(--edge-bottom);
}
.dashboard-card:hover::after { opacity: 1; }
/* 3D：卡片内元素分层，标题与数字浮在表面之上形成视差 */
.dashboard-card > * { position: relative; transform: translateZ(14px); }
.dashboard-card .dashboard-card-title,
.dashboard-card .dashboard-card-name { transform: translateZ(30px); }
.dashboard-card:active {
  cursor: grabbing;
  transform: perspective(1400px) rotateX(1deg) translateZ(6px);
}
/* 拖拽态：必须压过上面的 3D hover/active 规则，否则排序时卡片姿态错乱 */
.dashboard-card.dragging {
  opacity: 0.6;
  transform: perspective(1400px) scale(0.98) rotateX(0deg) translateZ(40px) !important;
  box-shadow: var(--shadow-3d-hover) !important;
  border-color: var(--primary);
}
.dashboard-card.drag-over {
  border-color: var(--primary);
  border-style: dashed;
  background: var(--primary-light);
  transform: perspective(1400px) rotateX(0deg) !important;
}
.dashboard-card.drag-over::after,
.dashboard-card.dragging::after { opacity: 0; }
.dashboard-card .drag-handle {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1;
  cursor: grab;
  padding: 4px 2px;
  border-radius: 4px;
  transition: all 0.15s;
}
.dashboard-card:hover .drag-handle {
  color: #94a3b8;
}
.dashboard-card .drag-handle:active {
  cursor: grabbing;
}
/* ===== 汇总页：按权限分类（可编辑 / 只查看）===== */
.dashboard-section {
  grid-column: 1 / -1;
}
.dashboard-section:not(:first-child) {
  margin-top: 22px;
}
.dashboard-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 12px;
  padding-left: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-left: 4px solid var(--primary);
}
.dashboard-section-viewonly .dashboard-section-title {
  border-left-color: #94a3b8;
}
.dashboard-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--primary);
  border-radius: 11px;
}
.dashboard-section-viewonly .dashboard-section-count {
  background: #94a3b8;
}
.dashboard-cards-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.dashboard-perm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}
.dashboard-perm-badge.badge-edit {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
}
.dashboard-perm-badge.badge-view {
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.dashboard-card-viewonly {
  cursor: pointer;
}
.dashboard-card-viewonly .drag-handle {
  display: none;
}
.dashboard-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-2px);
}
/* 整卡可点击 + 键盘可达 + 入场动画（仅透明度，兼容既有 3D 变换） */
.dash-enter-arrow {
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin-left: auto;
  transition: transform .2s var(--ease-3d);
}
.dashboard-card:hover .dash-enter-arrow { transform: translateX(4px); }
.dashboard-card:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
@keyframes dashCardIn { from { opacity: 0; } to { opacity: 1; } }
.dashboard-card { animation: dashCardIn .45s var(--ease-3d) both; animation-delay: calc(var(--ci, 0) * .045s); }
.dashboard-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 4px 8px;
  margin: -4px -8px 16px;
  transition: background 0.15s;
}
.dashboard-card-header:hover {
  background: var(--primary-light);
}
.dashboard-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.dashboard-card-header > span:last-child {
  margin-top: 0;
  flex-shrink: 0;
}
.dashboard-card-title .dashboard-address {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  width: 100%;
}
.dashboard-card-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.dashboard-stat {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 8px;
  background: var(--bg);
}
.dashboard-stat-num { font-size: 24px; font-weight: 700; }
.dashboard-stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.dashboard-stat-total .dashboard-stat-num { color: var(--primary); }
.dashboard-stat-rented .dashboard-stat-num { color: var(--success); }
.dashboard-stat-unrented .dashboard-stat-num { color: var(--danger); }
.dashboard-unrented {
  padding: 12px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.dashboard-unrented-label {
  font-size: 12px;
  color: #dc2626;
  font-weight: 600;
  margin-bottom: 6px;
}
.dashboard-unrented-rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.room-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: #fee2e2;
  color: #dc2626;
}
.room-tag-clickable {
  cursor: pointer;
  transition: all 0.15s;
}
.room-tag-clickable:hover {
  background: #dc2626;
  color: white;
  transform: scale(1.05);
}
.dashboard-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}
.dashboard-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.dashboard-empty-icon { font-size: 56px; margin-bottom: 16px; }
/* Login Screen —— 高清玻璃城市天际线（原图去水印后） */
.login-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  /* 用户原图（建筑在左/空白在右）+ 右侧白柔光让右侧卡片区更通透 */
  background:
    linear-gradient(270deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0) 60%),
    url('/tech-bg.jpg?v=v4.12.03-20260920-01') center/cover no-repeat,
    linear-gradient(135deg, #e8f3ff 0%, #d6e8ff 100%);
  display: flex;
  flex-direction: row;            /* 横向布局 */
  align-items: center;           /* 垂直居中 */
  justify-content: flex-end;     /* 水平靠右（新图空白区在右，卡片放右） */
  padding-right: 8vw;            /* 偏右位置，padding-right 越小越靠近右边缘；从 12vw 调小即真正向右移 */
  z-index: 9999;
  overflow: hidden;
}
/* 顶部柔光（让右侧卡片区更通透，柔光镜像到右上） */
.login-screen::before {
  content: '';
  position: absolute;
  top: -10%; right: -10%;
  width: 80%; height: 80%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.65), rgba(255,255,255,0) 70%);
  pointer-events: none;
  z-index: 0;
}
/* 底部蓝色光晕（科技辉光），呼应左侧建筑，镜像到左下 */
.login-screen::after {
  content: '';
  position: absolute;
  bottom: -15%; left: -10%;
  width: 70%; height: 80%;
  background:
    radial-gradient(closest-side, rgba(74,134,238,0.40), rgba(74,134,238,0) 70%),
    radial-gradient(closest-side, rgba(125,180,255,0.20) at 70% 60%, rgba(125,180,255,0) 70%);
  pointer-events: none;
  z-index: 0;
}
/* ===== 拟物化彩虹光折射玻璃卡片 ===== */
/* 外层光晕柔光环（位于卡片外侧远处的彩色弥散光） */
.login-card-outer {
  position: relative;
  border-radius: 32px;
  /* 改为纵向 flex，把 .login-card 与备案号 .icp-footer 上下叠放，备案号自然跟在登录卡片下方 */
  display: flex;
  flex-direction: column;
  align-items: center;
  /* 多层彩色弥散光晕，从参考图获得灵感 */
  filter: drop-shadow(0 18px 36px rgba(125,180,255,0.32))
          drop-shadow(0 30px 60px -10px rgba(186,225,255,0.45))
          drop-shadow(0 -8px 24px rgba(255,182,193,0.20))
          drop-shadow(0 -4px 18px rgba(216,191,255,0.28));
  transform: perspective(2000px) rotateX(1.8deg);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-3d), filter .6s var(--ease-3d);
}
.login-card-outer:hover {
  transform: perspective(2000px) rotateX(0deg) translateZ(18px);
  filter: drop-shadow(0 24px 44px rgba(125,180,255,0.42))
          drop-shadow(0 40px 80px -10px rgba(186,225,255,0.55))
          drop-shadow(0 -10px 28px rgba(255,182,193,0.28))
          drop-shadow(0 -6px 22px rgba(216,191,255,0.35));
}
/* 玻璃卡片：磨砂半透明 + 彩虹光折射边 + 拟物化立体厚度 */
.login-card {
  position: relative;
  z-index: 1;
  background:
    /* 多层柔光叠加：顶部白高光 + 半透玻璃主体 + 右下淡光（进一步降低白底不透明度，增强通透感） */
    linear-gradient(180deg, rgba(255,255,255,0.40) 0%, rgba(255,255,255,0.12) 22%, rgba(245,250,255,0.16) 60%, rgba(232,243,255,0.24) 100%),
    linear-gradient(135deg, rgba(174,214,255,0.16) 0%, rgba(255,255,255,0.06) 50%, rgba(216,191,255,0.16) 100%);
  backdrop-filter: blur(60px) saturate(220%);
  -webkit-backdrop-filter: blur(60px) saturate(220%);
  border-radius: 32px;
  border: 1.5px solid rgba(255,255,255,0.35);
  padding: 38px 38px 34px;
  width: 440px;
  max-width: 92vw;
  /* 彩虹光折射边（内嵌透明描边，让边缘有彩色光带） */
  outline: 1px solid rgba(255,255,255,0.55);
  outline-offset: -2px;
  /* 拟物化立体厚度投影 */
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.75),
    inset 0 -1px 0 rgba(174,214,255,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.4),
    /* 内层柔光 - 拟物化的玻璃厚度 */
    inset 0 -3px 12px -2px rgba(125,180,255,0.18),
    inset 0 6px 20px -8px rgba(255,255,255,0.7),
    /* 外层彩虹光折射（粉/蓝/紫 交替） */
    0 0 0 1px rgba(186,225,255,0.80),
    0 0 0 2px rgba(255,255,255,0.20),
    0 0 22px -2px rgba(186,225,255,0.65),
    0 0 32px 0px rgba(255,182,193,0.28),
    0 0 42px -4px rgba(216,191,255,0.45),
    /* 大投影 */
    0 6px 14px rgba(15,23,42,.16),
    0 18px 40px -8px rgba(15,23,42,.28),
    0 40px 80px -20px rgba(15,23,42,.32),
    0 60px 120px -24px rgba(74,134,238,.40);
  transition: transform .5s var(--ease-3d), box-shadow .5s var(--ease-3d), background .5s var(--ease-3d);
}
/* 玻璃顶部反光高线（更明显的拟物化顶部反光） */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 4%; right: 4%;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.95) 30%,
    rgba(255,255,255,1) 50%,
    rgba(255,255,255,0.95) 70%,
    rgba(255,255,255,0) 100%);
  border-radius: 32px 32px 0 0;
  pointer-events: none;
}
/* 玻璃对角反光（光泽面 + 内嵌元素悬浮感） */
.login-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 32px;
  background:
    /* 左上斜面高光（大幅降低白底叠加，让彩色玻璃透出） */
    linear-gradient(122deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.08) 22%, rgba(255,255,255,0) 42%),
    /* 右下淡紫光晕 */
    radial-gradient(140% 80% at 95% 95%, rgba(216,191,255,0.22), transparent 55%),
    /* 左下粉光 */
    radial-gradient(80% 60% at 5% 95%, rgba(255,182,193,0.16), transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
}
.login-card > * { position: relative; transform: translateZ(20px); }
.login-card:hover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.52) 0%, rgba(255,255,255,0.24) 22%, rgba(245,250,255,0.30) 60%, rgba(232,243,255,0.38) 100%),
    linear-gradient(135deg, rgba(174,214,255,0.18) 0%, rgba(255,255,255,0.10) 50%, rgba(216,191,255,0.18) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(174,214,255,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.5),
    inset 0 -4px 16px -2px rgba(125,180,255,0.24),
    inset 0 8px 26px -8px rgba(255,255,255,0.85),
    0 0 0 1px rgba(186,225,255,1),
    0 0 0 2px rgba(255,255,255,0.22),
    0 0 24px 0px rgba(186,225,255,0.7),
    0 0 36px -2px rgba(255,182,193,0.22),
    0 8px 18px rgba(15,23,42,.18),
    0 24px 50px -10px rgba(15,23,42,.34),
    0 50px 100px -20px rgba(15,23,42,.38),
    0 70px 140px -24px rgba(74,134,238,.52);
}
/* ICP 备案号展示（登录页 + 主应用底部通用） */
.icp-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  padding: 14px 16px 0;
  line-height: 1.6;
}
.icp-footer a {
  color: var(--text-secondary, #64748b);
  text-decoration: none;
  border-bottom: 1px solid rgba(100,116,139,0.4);
}
.icp-footer a:hover {
  color: var(--text, #1e293b);
}
/* 备案号：紧贴在登录卡片正下方，跟着 .login-card-outer 一起上下排版（不再 absolute） */
.login-screen .icp-footer {
  /* 取消绝对定位，走 .login-card-outer 的纵向 flex 自然流，自动跟在卡片下方 */
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: auto;
  margin-top: 18px;
  padding: 6px 16px;
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  text-align: center;
  color: rgba(30,41,59,0.72);
  text-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 5;
}
.login-screen .icp-footer,
.login-screen .icp-footer a {
  color: rgba(30,41,59,0.72);
}
.login-screen .icp-footer a {
  border-bottom: 1px solid rgba(30,41,59,0.25);
  transition: border-color .18s, color .18s;
}
.login-screen .icp-footer a:hover {
  color: rgba(30,41,59,0.95);
  border-bottom-color: rgba(30,41,59,0.55);
}
.app-icp-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  padding: 16px;
  line-height: 1.6;
  border-top: 1px solid var(--border, #e2e8f0);
  margin-top: auto;
}
/* 版本号：右下角固定定位，半透明深色药丸+白字+阴影，明亮背景上也清晰可见 */
.version-tag {
  position: fixed;
  right: 12px;
  bottom: 10px;
  z-index: 10000;  /* 高于 .login-screen(9999)，确保在登录页浮于城市背景之上 */
  color: rgba(30,41,59,0.72);
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.12);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.3px;
  user-select: text;
  pointer-events: none;
  text-shadow: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}
.app-icp-footer a {
  color: var(--text-secondary, #64748b);
  text-decoration: none;
  border-bottom: 1px solid rgba(100,116,139,0.4);
}
.app-icp-footer a:hover {
  color: var(--text, #1e293b);
}
.login-logo {
  text-align: center;
  margin-bottom: 16px;
}
/* 纯 Logo 容器——不要边框、不要阴影、不要玻璃方块，让洪运一家亲 logo 直接悬浮在登录卡片中 */
.login-logo-icon {
  width: 120px; height: 120px;          /* 登录页品牌主视觉尺寸微调 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  overflow: visible;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  outline: none;
  box-shadow: none;
  filter: none;
  transform: none;
  transition: none;
  position: relative;
  padding: 0;
}
/* 移除所有 ::before/::after 装饰（按用户要求：不要边框、不要阴影） */
.login-logo-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 0;
  position: relative;
  z-index: 1;
  filter: none;
}
.login-title {
  font-size: 24px;
  font-weight: 800;
  color: #1d4ed8;
  background: linear-gradient(135deg, #1d4ed8 0%, #4a8af4 60%, #7eb6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.08em;
  text-shadow: 0 0 28px rgba(74,134,238,0.35);
}
.login-subtitle {
  font-size: 13px;
  color: rgba(74,99,138,0.85);
  margin-top: 6px;
  letter-spacing: 0.06em;
}
.login-form-group {
  margin-bottom: 16px;
}
.login-form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.04em;
}
.login-input {
  width: 100%;
  padding: 13px 14px;
  border: 2px solid rgba(120,165,225,0.95);
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 14px;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  /* 拟物化内嵌投影 */
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.95),
    inset 0 -1px 0 rgba(174,214,255,0.30),
    inset 2px 0 0 rgba(255,255,255,0.45),
    inset -2px 0 0 rgba(255,255,255,0.30),
    0 1px 2px rgba(15,23,42,0.06),
    0 4px 12px -2px rgba(125,180,255,0.20);
  position: relative;
}
/* 多单位登录：「单位」下拉与输入框保持同一拟物化视觉（去原生箭头，改自绘三角） */
.login-unit-wrap { position: relative; display: block; }
.login-unit-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 0; height: 0; pointer-events: none;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid rgba(74,134,238,0.9);
}
#loginUnit {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  box-sizing: border-box; padding-right: 38px; cursor: pointer;
  font-family: inherit; line-height: 1.35; color: inherit;
}
.login-unit-dropdown { position:absolute; left:0; right:0; top:100%; z-index:100; list-style:none; margin:0; padding:0; max-height:200px; overflow-y:auto; background:#fff; border:1px solid #e0e0e0; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,0.12); display:none; }
.login-unit-option { padding:8px 14px; cursor:pointer; font-size:14px; color:#333; line-height:1.4; word-break:break-all; }
.login-unit-option:hover { background:#f0f5ff; color:#2563eb; }
.login-input:hover {
  border-color: rgba(74,134,238,1);
  background: rgba(255,255,255,0.90);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(174,214,255,0.40),
    inset 2px 0 0 rgba(255,255,255,0.55),
    inset -2px 0 0 rgba(255,255,255,0.40),
    0 2px 4px rgba(15,23,42,0.08),
    0 6px 16px -2px rgba(125,180,255,0.30),
    0 0 0 1px rgba(186,225,255,0.55);
}
.login-input:focus {
  border-color: rgba(74,134,238,1);
  background: rgba(255,255,255,0.97);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(174,214,255,0.45),
    inset 2px 0 0 rgba(255,255,255,0.65),
    inset -2px 0 0 rgba(255,255,255,0.50),
    0 0 0 3px rgba(186,225,255,0.55),
    0 0 0 5px rgba(186,225,255,0.25),
    0 6px 18px rgba(74,134,238,0.30),
    0 0 22px rgba(74,134,238,0.22);
}
.login-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  text-align: center;
  min-height: 20px;
}
.login-locked {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: var(--danger);
  font-size: 14px;
  margin-top: 8px;
}
.email-unlock-section {
  margin-top: 12px;
}
.email-unlock-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 16px;
}
.login-btn {
  width: 100%;
  padding: 14px;
  background:
    /* 顶部白光 + 鲜艳蓝渐变主体（高饱和 Material/Tailwind 蓝） */
    linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0) 35%, rgba(0,0,0,0.16) 100%),
    linear-gradient(180deg, #4fa3ff 0%, #3b82f6 32%, #2563eb 65%, #1d4ed8 100%);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.15);
  outline: none;
  outline-offset: -2px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.18em;
  /* 拟物化立体厚度投影 */
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.55),
    inset 0 -2px 0 rgba(0,0,0,0.22),
    inset 2px 0 0 rgba(255,255,255,0.30),
    inset -2px 0 0 rgba(255,255,255,0.20),
    inset 0 -8px 16px -4px rgba(15,23,42,0.18),
    /* 彩虹光折射边（仅保留蓝色描边，去除白色圈） */
    0 0 0 1px rgba(120,165,225,0.85),
    0 0 12px -1px rgba(186,225,255,0.6),
    0 0 22px 0 rgba(186,225,255,0.32),
    0 0 36px -2px rgba(125,180,255,0.28),
    /* 大投影 */
    0 6px 14px rgba(29,78,216,0.32),
    0 14px 30px -4px rgba(74,134,238,0.50),
    0 24px 50px -10px rgba(29,78,216,0.35),
    0 0 36px rgba(74,134,238,0.30);
  transition: transform .18s var(--ease-3d), box-shadow .18s var(--ease-3d), filter .18s var(--ease-3d);
  position: relative;
  overflow: hidden;
}
.login-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 4%; right: 4%;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.95) 30%,
    rgba(255,255,255,1) 50%,
    rgba(255,255,255,0.95) 70%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 2;
}
.login-btn::after {
  /* 上半部高光面 */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 55%;
  background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0.05) 70%, transparent);
  pointer-events: none;
  z-index: 1;
}
.login-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.40) 0%, rgba(255,255,255,0) 35%, rgba(0,0,0,0.14) 100%),
    linear-gradient(180deg, #66b1ff 0%, #4f95ff 32%, #2f70f0 65%, #2157d8 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.65),
    inset 0 -2px 0 rgba(0,0,0,0.18),
    inset 2px 0 0 rgba(255,255,255,0.40),
    inset -2px 0 0 rgba(255,255,255,0.30),
    inset 0 -10px 20px -4px rgba(15,23,42,0.22),
    0 0 0 1px rgba(120,165,225,1),
    0 0 18px -1px rgba(186,225,255,0.75),
    0 0 28px 0 rgba(186,225,255,0.42),
    0 0 42px -2px rgba(125,180,255,0.36),
    0 8px 18px rgba(29,78,216,0.40),
    0 18px 38px -4px rgba(74,134,238,0.65),
    0 30px 60px -10px rgba(29,78,216,0.45),
    0 0 48px rgba(74,134,238,0.42);
}
.login-btn:active {
  transform: translateY(1px);
  filter: brightness(0.95);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.22) 100%),
    linear-gradient(180deg, #3b82f6 0%, #2563eb 50%, #1e3a8a 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.30),
    inset 0 6px 12px -4px rgba(15,23,42,0.30),
    0 0 0 1px rgba(186,225,255,0.7),
    0 2px 6px rgba(29,78,216,0.45),
    0 6px 16px -2px rgba(74,134,238,0.55);
}
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.login-links {
  margin-top: 12px;
  text-align: right;
  font-size: 13px;
}
.login-links a {
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}
.login-links a:hover { text-decoration: underline; }
/* 密码规则实时校验 */
.pwd-check-box { user-select: none; }
.pwd-check-item {
  color: #94a3b8;
  transition: color .15s ease;
}
.pwd-check-item.ok { color: #16a34a; font-weight: 600; }
/* 登录页验证码：拟物化玻璃 */
.captcha-code {
  display: inline-block;
  padding: 11px 14px;
  border: 1.5px solid rgba(255,255,255,0.65);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.55) 100%),
    linear-gradient(135deg, rgba(186,225,255,0.30) 0%, rgba(216,191,255,0.20) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(174,214,255,0.30),
    0 0 0 1px rgba(186,225,255,0.55),
    0 0 12px -1px rgba(186,225,255,0.35),
    0 4px 10px -2px rgba(125,180,255,0.30),
    0 0 22px rgba(125,180,255,0.18);
  font-family: 'Courier New', Consolas, monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #1e3a8a;
  cursor: pointer;
  user-select: none;
  transition: filter .15s, box-shadow .15s, transform .15s var(--ease-3d);
}
.captcha-code:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(174,214,255,0.40),
    0 0 0 1px rgba(186,225,255,0.85),
    0 0 18px -1px rgba(186,225,255,0.50),
    0 6px 14px -2px rgba(125,180,255,0.40),
    0 0 28px rgba(125,180,255,0.26);
}
/* Privacy policy checkbox */
/* 协议行不换行：《用户服务协议》和《隐私政策》保持在一行 */
.privacy-check { display: block; margin: 12px 0; font-size: 12px; color: #1e3a5f; line-height: 1.6; font-weight: 500; }
.privacy-check input[type="checkbox"] { margin-right: 4px; vertical-align: middle; width: 16px; height: 16px; accent-color: #2563eb; }
.privacy-check > span { white-space: nowrap; vertical-align: middle; }
.privacy-check .privacy-link { color: #2563eb; font-weight: 500; cursor: pointer; text-decoration: none; border-bottom: 1px solid rgba(37,99,235,0.3); }
.privacy-check .privacy-link:hover { color: #1d4ed8; border-bottom-color: #1d4ed8; }
.privacy-check summary {
  cursor: pointer;
  color: #2563eb;
  font-weight: 500;
}
.privacy-check details {
  margin-top: 6px;
}
.privacy-check .privacy-text {
  max-height: 150px;
  overflow-y: auto;
  padding: 10px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 12px;
  color: #475569;
  line-height: 1.8;
  margin-top: 4px;
}
/* Account badge in header */
.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.user-badge:hover { background: rgba(255,255,255,0.25); }
.user-badge-role {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.2);
}
.user-badge-role.super { background: rgba(251,191,36,0.3); color: #fde68a; }
/* Account management */
.acct-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acct-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.acct-item.locked { border-color: #fecaca; background: #fef2f2; }
.acct-info { display: flex; flex-direction: column; gap: 2px; }
.acct-name { font-weight: 600; font-size: 14px; }
.acct-meta { font-size: 12px; color: var(--text-secondary); }
.acct-actions { display: flex; gap: 6px; }
.acct-role-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.acct-role-badge.super { background: #14532d; color: #dcfce7; }
.acct-role-badge.user { background: #dbeafe; color: #1e40af; }
.acct-role-badge.unit-admin { background: rgba(22,163,74,.1); color: #15803d; }
/* 兜底：当绿色管理员badge存在时，隐藏相邻的蓝色/普通用户badge（防止双badge） */
.acct-role-badge.unit-admin ~ .acct-role-badge.user,
.acct-role-badge.unit-admin ~ .acct-role-badge:not(.unit-admin):not(.super) { display: none !important; }
.acct-book-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.acct-book-perm-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e0e7ff;
  color: #3730a3;
}
/* 中央版本库对接块（§4.1）：展示 platform.appVersions[web].current + history */
.central-ver-block{border:1px solid var(--border,#e5e7eb);border-radius:10px;padding:12px 14px;margin-bottom:16px;background:linear-gradient(180deg,#f8faff,#fff);}
.central-ver-block .cv-head{font-weight:600;font-size:13px;color:#3730a3;margin-bottom:6px;}
.central-ver-block .cv-current{font-size:14px;margin-bottom:4px;}
.central-ver-block .cv-current b{color:#1f2937;}
.central-ver-block .cv-warn{font-size:12px;color:#b45309;background:#fffbeb;border:1px solid #fde68a;border-radius:6px;padding:6px 8px;margin:6px 0;}
.central-ver-block .cv-hist-title{font-size:12px;font-weight:600;color:#6b7280;margin:8px 0 4px;}
.central-ver-block .cv-hist,.central-ver-block .cv-hist ul{list-style:none;margin:0;padding-left:14px;}
.central-ver-block .cv-hist>li{font-size:13px;margin:4px 0;color:#374151;}
.central-ver-block .cv-v{font-weight:600;color:#1f2937;margin-right:6px;}
.central-ver-block .cv-d{color:#6b7280;font-size:12px;margin-right:6px;}
.central-ver-block .cv-by{color:#9ca3af;font-size:12px;}
