* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 1180px;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: #1f2933;
  background: #f4f6f8;
}
button, input, select { font: inherit; }
button {
  border: 0;
  border-radius: 4px;
  background: #0053a6;
  color: #fff;
  padding: 9px 18px;
  cursor: pointer;
}
button:hover { background: #00458c; }
button:disabled {
  cursor: not-allowed;
  opacity: .65;
}
button.ghost {
  border: 1px solid #c8d1da;
  background: #fff;
  color: #334155;
}
button.ghost:hover { background: #eef3f6; }
.login-body {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  min-height: 100vh;
  background: #fff;
}
.login-layout {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(680px, 1fr) 548px;
}
.login-hero {
  position: relative;
  display: grid;
  place-items: center;
  background: url("/static/assets/login-hero-power-grid.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  overflow: hidden;
}
.login-hero::before,
.login-hero::after { content: none; }
.hero-brand {
  position: relative;
  z-index: 1;
  width: min(1040px, 84%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  text-align: center;
  padding: 0;
  transform: translateY(-4vh);
}
.hero-brand::before {
  content: "";
  position: absolute;
  inset: -58% -16% -48%;
  z-index: -1;
  background:
    radial-gradient(ellipse, rgba(0, 32, 105, .62), rgba(0, 53, 135, .34) 46%, rgba(0, 40, 120, .12) 68%, transparent 80%);
  filter: blur(12px);
}
.hero-logo-mark {
  display: block;
  width: clamp(148px, 11.5vw, 188px);
  height: auto;
  object-fit: contain;
  padding: 6px;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(255,255,255,.16), rgba(255,255,255,.05) 46%, transparent 70%);
  filter: drop-shadow(0 8px 18px rgba(0, 24, 76, .35)) drop-shadow(0 0 12px rgba(190, 225, 255, .24));
}
.hero-short-name {
  margin-top: 2px;
  color: #f7fbff;
  font-size: clamp(34px, 3.3vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(0, 40, 120, .48);
}
.hero-copy {
  display: grid;
  justify-items: center;
  gap: 0;
  margin-top: 0;
}
.hero-copy h1 {
  margin: 0;
  color: #f4fbff;
  max-width: 900px;
  font-size: clamp(36px, 3.1vw, 54px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 40, 120, .45), 0 0 18px rgba(120, 190, 255, .22);
}
.hero-copy p {
  margin: 0;
  color: rgba(238, 248, 255, .94);
  font-size: clamp(20px, 1.9vw, 30px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(0, 40, 120, .45);
}
.login-side {
  display: grid;
  align-content: center;
  gap: 120px;
  padding: 0 82px;
}
.login-panel {
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 0;
  box-shadow: none;
}
.brand-mark {
  display: inline-block;
  border-left: 4px solid #0053a6;
  padding-left: 10px;
  color: #0053a6;
  font-weight: 700;
}
h1, h2, h3, p { margin-top: 0; }
.login-panel h2 {
  margin: 18px 0 8px;
  font-size: 28px;
  color: #003f8f;
  line-height: 1.35;
}
.login-panel p { color: #667085; }
.login-side footer {
  color: #98a2b3;
  text-align: center;
  font-size: 12px;
}
.site-filing {
  display: grid;
  justify-items: center;
  gap: 8px;
  line-height: 1.5;
}
.site-filing a {
  color: #667085;
  text-decoration: none;
}
.site-filing a:hover {
  color: #0053a6;
  text-decoration: underline;
}
.login-form, .panel, .compact {
  display: grid;
  gap: 16px;
}
label { display: grid; gap: 7px; color: #334155; }
input, select {
  min-height: 38px;
  border: 1px solid #cbd5df;
  border-radius: 4px;
  background: #fff;
  padding: 8px 10px;
}
input:focus, select:focus {
  outline: 2px solid rgba(0, 83, 166, .18);
  border-color: #0053a6;
}
.form-msg { min-height: 22px; color: #b42318; }
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 236px;
  border-right: 1px solid #dbe3e9;
  background: #fff;
}
.system-title {
  min-height: 94px;
  display: grid;
  place-items: center;
  padding: 14px;
  background: #0f6b55;
  color: #fff;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}
.nav {
  width: 100%;
  height: 48px;
  border-radius: 0;
  background: transparent;
  color: #334155;
  text-align: left;
  padding-left: 24px;
}
.nav:hover { background: #edf4f1; color: #0f6b55; }
.nav.active {
  background: #dcebe6;
  color: #0f6b55;
  font-weight: 700;
  border-left: 4px solid #0f6b55;
}
.main { margin-left: 236px; }
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dbe3e9;
  background: #fff;
  padding: 0 28px;
}
#userBadge {
  margin-left: 12px;
  color: #667085;
  font-size: 13px;
}
.view {
  display: none;
  padding: 24px 28px;
}
.view.active { display: block; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel {
  border: 1px solid #dbe3e9;
  border-radius: 6px;
  background: #fff;
  padding: 18px;
  margin-bottom: 16px;
}
.panel-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.metrics div {
  border: 1px solid #dbe3e9;
  border-radius: 6px;
  background: #fff;
  padding: 22px;
}
.metrics span {
  display: block;
  font-size: 34px;
  font-weight: 700;
  color: #0f6b55;
}
.metrics small { color: #667085; }
.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}
.checks label, .checkline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checks input, .checkline input { min-height: auto; }
.checks.inline {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}
.hidden { display: none; }
.split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 16px;
  align-items: start;
}
.log-layout {
  grid-template-columns: 440px 1fr;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  border-bottom: 1px solid #edf0f2;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
th {
  color: #475569;
  background: #f8fafb;
}
tr:hover td { background: #fbfcfd; }
.status {
  display: inline-block;
  min-width: 64px;
  text-align: center;
  border-radius: 4px;
  padding: 3px 7px;
  color: #fff;
  background: #64748b;
}
.status.completed { background: #0f6b55; }
.status.failed { background: #b42318; }
.status.running { background: #0969da; }
.logbox {
  max-height: 520px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 12px;
  font-family: Consolas, monospace;
  white-space: pre-wrap;
}
.logbox.large {
  min-height: 520px;
  max-height: 660px;
}
.logbox.process-log {
  min-height: 240px;
  max-height: 360px;
}
.task-summary {
  border-bottom: 1px solid #edf0f2;
  margin-bottom: 14px;
  padding-bottom: 10px;
}
.download-panel {
  border: 1px solid #c9d8e3;
  border-radius: 6px;
  background: #fff;
  padding: 18px;
  margin-bottom: 16px;
}
.download-panel.embedded {
  background: #f8fafb;
}
.download-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #edf0f2;
  margin-bottom: 12px;
  padding-bottom: 10px;
}
.download-head h3, .download-head p {
  margin: 0;
}
.download-head p {
  color: #667085;
  font-size: 13px;
  margin-top: 4px;
}
.download-list {
  display: grid;
  gap: 12px;
}
.download-group {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid #edf0f2;
  background: #fbfcfd;
  padding: 12px;
}
.download-group a {
  display: inline-block;
  margin: 0 12px 8px 0;
  color: #0f6b55;
}
.file-list a {
  display: inline-block;
  margin: 0 10px 8px 0;
  color: #0f6b55;
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }
  .sidebar {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .system-title {
    grid-column: 1 / -1;
    min-height: 70px;
  }
  .nav {
    height: 44px;
    padding: 0 10px;
    text-align: center;
  }
  .main {
    margin-left: 0;
  }
  .log-layout,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-layout {
    grid-template-columns: minmax(335px, 1fr) minmax(250px, 300px);
    height: 100vh;
    min-height: 100vh;
  }
  .login-body { overflow: hidden; }
  .login-hero {
    min-height: 100vh;
  }
  .login-side {
    gap: 54px;
    padding: 0 12px 0 24px;
  }
  .sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .topbar,
  .download-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    height: auto;
    gap: 12px;
    padding: 16px;
  }
  .view {
    padding: 18px 16px;
  }
  .grid.two,
  .checks,
  .checks.inline,
  .metrics {
    grid-template-columns: 1fr;
  }
  .download-group {
    grid-template-columns: 1fr;
  }
}
