:root {
  --page-bg: #f3f7f8;
  --panel: #ffffff;
  --text: #182431;
  --muted: #687688;
  --line: #d9e1e7;
  --primary: #0e7c73;
  --primary-strong: #09665f;
  --blue: #24589d;
  --warm: #f0a43b;
  --danger: #b63c35;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  width: min(980px, 100%);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(28, 49, 67, 0.12);
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  min-width: 0;
  padding: 44px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--primary) 100%);
  color: #ffffff;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark,
.panel-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 900;
}

.brand-mark {
  background: #ffffff;
  color: var(--primary-strong);
}

.hero-brand strong,
.hero-brand span {
  display: block;
}

.hero-brand strong {
  font-size: 18px;
  line-height: 1.2;
}

.hero-brand div > span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 700;
}

.hero-copy {
  max-width: 520px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #dcefff;
  font-size: 12px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  max-width: 520px;
  font-size: 34px;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-copy > p:last-child {
  margin: 18px 0 0;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.8;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.capability-list li {
  min-width: 0;
  padding: 13px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.capability-list li:last-child {
  border-right: 0;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 46px 38px;
  border-top: 4px solid var(--warm);
}

.panel-heading {
  margin-bottom: 28px;
  text-align: center;
}

.panel-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  background: var(--blue);
  color: #ffffff;
  font-size: 26px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.panel-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

#loginForm {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #3f4e5d;
  font-size: 13px;
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5de;
  border-radius: 6px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  padding: 0 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 124, 115, 0.13);
}

.form-message {
  min-height: 20px;
  margin: -4px 0 -2px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.login-button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
}

.login-button:hover {
  background: var(--primary-strong);
}

.login-button:focus-visible {
  outline: 3px solid rgba(14, 124, 115, 0.24);
  outline-offset: 2px;
}

.login-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-loading {
  display: none;
}

.login-button.is-loading .button-label {
  display: none;
}

.login-button.is-loading .button-loading {
  display: inline;
}

@media (max-width: 720px) {
  .login-page {
    place-items: start center;
    padding: 16px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    width: min(520px, 100%);
    min-height: 0;
  }

  .login-hero {
    gap: 18px;
    padding: 22px 28px;
  }

  .hero-copy h1 {
    font-size: 26px;
  }

  .eyebrow {
    margin-bottom: 9px;
  }

  .hero-copy > p:last-child {
    margin-top: 10px;
    line-height: 1.65;
  }

  .capability-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-list li:nth-child(2) {
    border-right: 0;
  }

  .capability-list li:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .capability-list li {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .login-panel {
    padding: 26px 24px;
  }

  .panel-heading {
    margin-bottom: 20px;
  }

  .panel-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    font-size: 23px;
  }

  #loginForm {
    gap: 14px;
  }

  .field input,
  .login-button {
    min-height: 44px;
  }

  .form-message {
    min-height: 18px;
  }
}

@media (max-width: 380px) {
  .login-page {
    padding: 0;
  }

  .login-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .login-hero,
  .login-panel {
    padding-right: 20px;
    padding-left: 20px;
  }
}
