:root {
  color-scheme: light;
  --bg: #f2f5f7;
  --surface: #ffffff;
  --surface-soft: #edf5f5;
  --text: #18212f;
  --muted: #637083;
  --line: #d7e0e7;
  --accent: #0b7c83;
  --accent-dark: #075f65;
  --danger: #b42318;
  --focus: #f5b640;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.login-shell {
  width: min(960px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  align-items: center;
}

.brand-panel,
.login-panel {
  min-width: 0;
  min-height: 580px;
  border: 1px solid var(--line);
}

.brand-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 54px;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #123b42;
  color: #ffffff;
  overflow: hidden;
}

.brand-panel::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -92px;
  width: 260px;
  height: 260px;
  border: 54px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  pointer-events: none;
}

.brand-mark {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: var(--accent-dark);
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(2, 18, 22, 0.16);
}

.brand-copy {
  margin-top: 62px;
}

.eyebrow {
  display: block;
  color: #78c8cb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-copy h1 {
  max-width: 430px;
  margin: 14px 0 18px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.brand-copy p {
  max-width: 420px;
  margin: 0;
  color: #c5d8dc;
  font-size: 16px;
  line-height: 1.75;
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.platform-list span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.07);
  color: #e8f2f3;
  font-size: 13px;
}

.security-note {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 26px;
  color: #ffffff;
}

.security-note span {
  color: #a9c4c9;
  font-size: 13px;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 50px;
  border-radius: 0 8px 8px 0;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(24, 33, 47, 0.12);
}

.mobile-brand {
  display: none;
}

.login-heading h2 {
  margin: 10px 0 8px;
  font-size: 30px;
  line-height: 1.25;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 19px;
  margin-top: 34px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field > span:first-child {
  font-size: 14px;
  font-weight: 700;
}

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

.field input:hover {
  border-color: #99abb9;
}

.field input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 124, 131, 0.14);
}

.password-control {
  position: relative;
  display: block;
  min-width: 0;
}

.password-control input {
  padding-right: 64px;
}

.password-control button {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 36px;
  border: 0;
  border-radius: 5px;
  padding: 0 10px;
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.password-control button:hover {
  background: var(--surface-soft);
}

.password-control button:focus-visible,
.login-button:focus-visible {
  outline: 3px solid rgba(245, 182, 64, 0.6);
  outline-offset: 2px;
}

.session-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.session-hint > span:first-child {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e5f4ed;
  color: #137047;
  font-weight: 800;
}

.login-error {
  min-height: 20px;
  margin: -5px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.login-button {
  width: 100%;
  height: 46px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.login-button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

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

.login-footnote {
  margin: 30px 0 0;
  color: #7a8797;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 760px) {
  .login-shell {
    width: min(100% - 28px, 460px);
    padding: 20px 0;
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .login-panel {
    min-height: calc(100vh - 40px);
    padding: 32px 24px;
    border-radius: 8px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 48px;
  }

  .mobile-brand .brand-mark {
    width: 38px;
    height: 38px;
    background: var(--accent);
    color: #ffffff;
    font-size: 18px;
    box-shadow: none;
  }

  .login-heading h2 {
    font-size: 27px;
  }
}

@media (max-height: 650px) and (min-width: 761px) {
  .login-shell {
    padding: 24px 0;
  }

  .brand-panel,
  .login-panel {
    min-height: 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
