html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #1f2937;
  font-size: 14px;
}

/* 登录页：整屏科技背景。表单卡片始终居中，背景预览只在宽屏作为装饰层展示。 */
.login-page {
  min-height: 100%;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 48px;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 184, 166, 0.06) 1px, transparent 1px),
    linear-gradient(135deg, #07111f 0%, #0f172a 48%, #123f46 100%);
  background-size: 42px 42px, 42px 42px, auto;
}

/* 斜向高光和横向扫描线，增强后台控制台氛围，不承载任何交互。 */
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(94, 234, 212, 0.12) 42.2%, transparent 44%),
    linear-gradient(180deg, transparent 0 68%, rgba(148, 163, 184, 0.12) 68.2%, transparent 68.5%);
  pointer-events: none;
}

/* 页面内框线用于收束视觉边界，避免深色背景显得太空。 */
.login-page::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  pointer-events: none;
}

/* 登录表单层级高于所有背景装饰，保证任何屏幕宽度下都不会被背景遮住。 */
.login-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(440px, 100%);
  padding: 0;
  background: transparent;
}

/* 登录卡片使用不透明背景，避免验证码和输入框被背景图形干扰。 */
.login-box {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 34px 36px 36px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-top: 3px solid #14b8a6;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.34);
}

/* 品牌区保持简洁，管理员首先看到产品和当前登录入口。 */
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

/* 用字母标识替代图片 logo，第一阶段无需额外静态资源。 */
.login-mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #0f766e;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.login-brand h1 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  color: #0f172a;
}

.login-brand p {
  margin: 0;
  color: #64748b;
}

/* 背景预览层不接收鼠标事件，避免挡住登录表单或验证码刷新按钮。 */
.login-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 64px;
  color: #fff;
  pointer-events: none;
  background: transparent;
}

/* 大屏右侧的静态数据面板，给登录页一点业务语境。 */
.login-cover-inner {
  width: min(680px, 44vw);
  position: absolute;
  right: 5vw;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.72;
}

.login-cover-copy {
  margin-bottom: 22px;
}

.login-cover-copy span {
  color: #99f6e4;
  font-size: 13px;
  letter-spacing: 0;
}

.login-cover-copy h2 {
  width: min(480px, 100%);
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

/* 预览卡片模拟后台数据面板，但不展示真实数据。 */
.login-preview {
  width: min(500px, 100%);
  padding: 22px;
  border: 1px solid rgba(204, 251, 241, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.46)),
    repeating-linear-gradient(90deg, rgba(94, 234, 212, 0.08) 0 1px, transparent 1px 14px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.preview-topbar {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.preview-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5eead4;
  opacity: 0.8;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.preview-metric {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.preview-metric span {
  display: block;
  color: #cbd5e1;
  font-size: 12px;
}

.preview-metric strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
  color: #f8fafc;
}

.preview-chart {
  height: 150px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
}

.preview-chart i {
  flex: 1;
  display: block;
  border-radius: 4px 4px 0 0;
  background: #5eead4;
}

.preview-table {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.preview-table span {
  height: 12px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.26);
}

.preview-table span:nth-child(2) {
  width: 82%;
}

.preview-table span:nth-child(3) {
  width: 64%;
}

.login-form .layui-form-item {
  margin-bottom: 20px;
}

/* 登录表单改成上 label 下输入框，避免 Layui 默认横向表单在窄屏被压缩。 */
.login-form .layui-form-label {
  float: none;
  display: block;
  width: auto;
  padding: 0 0 8px;
  line-height: 1.2;
  text-align: left;
  color: #334155;
  font-weight: 600;
}

/* 取消 Layui 默认 input-block 左边距，让输入框按卡片宽度自然伸展。 */
.login-form .layui-input-block {
  width: auto;
  margin-left: 0;
}

.login-form .layui-input {
  height: 46px;
  border-color: #dbe3ed;
  border-radius: 6px;
}

.login-form .layui-input:focus {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.login-form .layui-btn {
  height: 46px;
  line-height: 46px;
  width: 100%;
  border-radius: 6px;
  background: #0f766e;
}

.login-form .layui-btn:hover {
  background: #115e59;
}

/* 验证码行固定图片宽度，剩余空间给输入框；移动端会改成上下排列。 */
.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 12px;
}

.captcha-input {
  min-width: 0;
}

.captcha-image-btn {
  width: 156px;
  height: 46px;
  padding: 0;
  border: 1px solid #dbe3ed;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
}

.captcha-image-btn img {
  display: block;
  width: 154px;
  height: 44px;
}

.admin-shell .layui-layout-admin .layui-header {
  background: #0f172a;
}

.admin-shell .layui-logo {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
}

.admin-shell .layui-side {
  background: #111827;
}

.admin-shell .layui-side .layui-nav {
  background: #111827;
}

.admin-shell .layui-side-scroll {
  overflow-x: hidden;
}

.admin-shell .layui-nav-tree .layui-nav-bar {
  width: 3px;
  right: auto;
  background: #14b8a6;
}

.admin-shell .layui-nav-tree .layui-this > a,
.admin-shell .layui-nav-tree .layui-this > a:hover {
  background: #14b8a6;
}

.admin-shell .layui-body {
  background: #f5f7fb;
}

.content-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.header-action-item {
  display: inline-flex;
  align-items: center;
  height: 60px;
}

.header-action-item::after {
  display: none;
}

.header-action-btn {
  height: 60px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.header-action-btn:hover {
  color: #fff;
}

.password-form {
  padding: 22px 26px 10px 0;
}

.password-actions {
  text-align: right;
}

.page {
  padding: 18px;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.page-title h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0;
}

.page-title p {
  margin: 2px 0 0;
  color: #64748b;
}

.toolbar-band,
.table-band,
.summary-band {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.toolbar-band {
  padding: 14px;
  margin-bottom: 14px;
}

.table-band {
  padding: 0 12px 12px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0;
  margin-bottom: 14px;
}

.summary-item {
  padding: 18px;
  border-right: 1px solid #e5e7eb;
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  color: #0f172a;
}

.summary-item span {
  color: #64748b;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 24px;
  background: #e5e7eb;
  color: #374151;
}

.status-active,
.status-normal,
.status-approved {
  background: #dcfce7;
  color: #166534;
}

.status-pending_review {
  background: #fef3c7;
  color: #92400e;
}

.status-rejected,
.status-disabled,
.status-deleted,
.status-removed {
  background: #fee2e2;
  color: #991b1b;
}

.status-frozen,
.status-archived {
  background: #e0f2fe;
  color: #075985;
}

.money-expense {
  color: #dc2626;
}

.money-income {
  color: #15803d;
}

.detail-list {
  padding: 16px 20px;
}

.detail-list dl {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.detail-list dt {
  color: #64748b;
}

.detail-list dd {
  margin: 0;
  color: #111827;
  word-break: break-word;
}

/* 中等屏幕隐藏右侧预览，只保留科技背景，避免预览面板和居中登录卡片重叠。 */
@media (max-width: 1500px) {
  .login-cover-inner {
    display: none;
  }
}

/* 手机和窄屏只保留登录核心流程，验证码图片放到输入框下方。 */
@media (max-width: 760px) {
  .login-page {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .login-cover {
    display: none;
  }

  .login-panel {
    width: min(440px, 100%);
  }

  .login-form .layui-input-block {
    width: auto;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .captcha-image-btn,
  .captcha-image-btn img {
    width: 100%;
  }

  .summary-band {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .summary-item {
    border-bottom: 1px solid #e5e7eb;
  }
}
