/* ============================================================
   pages.css — 登录页 / 打印文档 / 图表
   ============================================================ */

/* ============================================================
   登录页
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #0b1020;
  overflow: hidden;
}

.login-left {
  position: relative;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(79, 70, 229, .35), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, .35), transparent 45%),
    linear-gradient(135deg, #0b1020 0%, #131a35 100%);
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, .4), transparent 70%);
  top: -150px;
  left: -100px;
  filter: blur(60px);
}

.login-left::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, .35), transparent 70%);
  bottom: -120px;
  right: -80px;
  filter: blur(60px);
}

.login-left .l-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
}

.login-left .l-brand .logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-grad);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 10px 28px rgba(79, 70, 229, .55);
}

.login-left .l-hero {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.login-left .l-hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-left .l-hero p {
  color: #94a3b8;
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 26px;
}

.login-left .l-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-left .l-features div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13.5px;
}

.login-left .l-features div span {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(79, 70, 229, .18);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #a5b4fc;
  border: 1px solid rgba(79, 70, 229, .3);
}

.login-left .l-foot {
  position: relative;
  z-index: 1;
  color: #64748b;
  font-size: 12.5px;
}

.login-right {
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 40px;
  overflow-y: auto;
}

.login-form {
  width: 100%;
  max-width: 380px;
}

.login-form h2 {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.5px;
  margin-bottom: 8px;
}

.login-form .sub {
  color: #64748b;
  font-size: 13.5px;
  margin-bottom: 30px;
}

.login-form .field {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.login-form .field label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 7px;
}

.login-form .field input {
  padding: 13px 15px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  transition: all .2s;
  font-size: 14px;
  color: #0f172a;
  width: 100%;
}

.login-form .field input:focus {
  border-color: #4f46e5;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.login-form button[type=submit] {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary-grad);
  color: #fff !important;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 10px 24px rgba(79, 70, 229, .4);
  transition: all .2s;
}

.login-form button[type=submit]:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(79, 70, 229, .5);
}

.login-form .hint {
  text-align: center;
  margin-top: 22px;
  color: #94a3b8;
  font-size: 12.5px;
}

.login-form .hint code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
  color: #4f46e5;
  font-weight: 600;
}

.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 14px;
  font-size: 13px;
  color: #475569;
  flex-wrap: wrap;
  gap: 6px;
}

.remember-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.remember-row input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* ============================================================
   图表
   ============================================================ */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.chart-box {
  height: 300px;
  width: 100%;
}

/* ============================================================
   打印文档
   ============================================================ */
.doc-page {
  background: #fff;
  padding: 40px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, .08);
  font-family: "SimSun", "宋体", serif;
  color: #111;
}

.doc-page .doc-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 8px;
  margin-bottom: 6px;
}

.doc-page .doc-sub {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-bottom: 18px;
}

.doc-page .doc-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
}

.doc-page .doc-info {
  border: 1px solid #333;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}

.doc-page .doc-info .row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.doc-page .doc-info .row > div {
  flex: 1;
  min-width: 120px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.doc-table th,
.doc-table td {
  border: 1px solid #333;
  padding: 7px 8px;
  text-align: center;
}

.doc-table th {
  background: #f2f2f2;
  font-weight: 700;
}

.doc-table td.text-left  { text-align: left; }
.doc-table td.text-right { text-align: right; }

.doc-total {
  text-align: right;
  font-size: 15px;
  margin-top: 10px;
  font-weight: 700;
}

/* 底部签字区（4 列网格） */
.doc-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 50px;
  font-size: 13px;
}

.doc-footer .sign-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.doc-footer .sign-label {
  color: #666;
  font-size: 12px;
  margin-bottom: 6px;
}

.doc-footer .sign-name {
  min-height: 20px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
  word-break: break-all;
}

.doc-footer .sign-line {
  border-bottom: 1px solid #333;
  height: 1px;
  margin-top: 4px;
}

.doc-note {
  font-size: 12px;
  color: #666;
  margin-top: 24px;
  line-height: 1.7;
}

.toolbar-print {
  max-width: 820px;
  margin: 0 auto 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   响应式
   ============================================================ */

/* 大屏 */
@media (max-width: 1400px) {
  .login-left .l-hero h1 {
    font-size: 36px;
  }
}

/* 平板（≤1200px）：登录页标题变小 */
@media (max-width: 1200px) {
  .login-left {
    padding: 40px;
  }
  .login-left .l-hero h1 {
    font-size: 32px;
  }
}

/* 平板竖屏（≤1024px）：登录页单列，隐藏左侧品牌区 */
@media (max-width: 1024px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-left {
    display: none;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

/* 手机（≤640px）：打印文档紧凑、图表更矮 */
@media (max-width: 640px) {
  .login-right {
    padding: 24px;
  }
  .login-form h2 {
    font-size: 22px;
  }
  .chart-box {
    height: 240px;
  }
  .doc-page {
    padding: 24px 18px;
  }
  .doc-page .doc-title {
    font-size: 22px;
    letter-spacing: 6px;
  }
  .doc-page .doc-info .row {
    flex-direction: column;
    gap: 6px;
  }
  .doc-footer {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
  }
  .doc-table th,
  .doc-table td {
    padding: 5px 4px;
    font-size: 11.5px;
  }
  .toolbar-print {
    padding: 0 12px;
  }
}

/* 超小屏（≤420px）：打印表格进一步缩小 */
@media (max-width: 420px) {
  .doc-table th,
  .doc-table td {
    padding: 4px 3px;
    font-size: 10.5px;
  }
  .doc-footer {
    grid-template-columns: 1fr;
  }
}