:root {
  --infomm-teal: #1e3a5f;
  --infomm-teal-deep: #132c48;
  --infomm-teal-soft: #2a5080;
  --infomm-blue: #1e3a5f;
  --infomm-blue-hover: #132c48;
  --infomm-text: #2c3a44;
  --infomm-muted: #8a97a3;
  --infomm-border: #d7dee5;
  --infomm-footer: #3a4552;
  --panel-right: 380px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 13px;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--infomm-text);
  background: #fff;
}

body.login-page {
  min-height: 100vh;
}

.login-shell {
  display: flex;
  min-height: 100vh;
}

.login-brand {
  position: relative;
  flex: 1;
  background: var(--infomm-teal);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand__pattern {
  position: absolute;
  inset: -10% -5% auto auto;
  width: 72%;
  height: 70%;
  opacity: 0.22;
  pointer-events: none;
}

.login-brand__pattern svg {
  width: 100%;
  height: 100%;
  color: #8fb4d9;
}

.login-brand__logo {
  position: relative;
  z-index: 1;
  width: min(220px, 36vw);
  color: #fff;
  animation: brandIn 700ms ease-out both;
}

.login-brand__logo svg {
  width: 100%;
  height: auto;
  display: block;
}

.login-panel {
  width: var(--panel-right);
  max-width: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.login-panel__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 36px 24px;
}

.login-wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  color: var(--infomm-teal);
  text-decoration: none;
}

.login-wordmark__mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.login-wordmark__text {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2f3b45;
}

.login-title {
  margin: 0 0 28px;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  color: #3a4650;
}

.login-form {
  width: 100%;
}

.field {
  position: relative;
  margin-bottom: 16px;
}

.field__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #9aa6b2;
  pointer-events: none;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--infomm-border);
  border-radius: 2px;
  font-size: 0.95rem;
  color: var(--infomm-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #a0adb8;
}

.field input:focus {
  border-color: var(--infomm-teal);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.15);
}

.btn-primary {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: 4px;
  border: 0;
  border-radius: 2px;
  background: var(--infomm-blue);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--infomm-blue-hover);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-links {
  margin-top: 22px;
  text-align: center;
}

.login-links a {
  display: block;
  margin: 8px 0;
  color: var(--infomm-teal);
  text-decoration: none;
  font-size: 0.92rem;
}

.login-links a:hover {
  text-decoration: underline;
}

.login-links a.is-hidden {
  display: none;
}

.login-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #fdecea;
  color: #b42318;
  border: 1px solid #f5c2c0;
  border-radius: 2px;
  font-size: 0.88rem;
  text-align: center;
}

.login-success {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: #eaf7ef;
  color: #1b7a3d;
  border: 1px solid #b7e0c4;
  border-radius: 2px;
  font-size: 0.88rem;
  text-align: center;
}

.login-hint {
  margin: 0 0 14px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--infomm-muted);
}

.login-hint strong {
  color: var(--infomm-text);
}

.login-panel__footer {
  height: 44px;
  background: var(--infomm-footer);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px;
  color: #fff;
  font-size: 0.78rem;
  gap: 8px;
}

.login-panel__footer span {
  opacity: 0.85;
}

.login-panel__footer .mini-mark {
  width: 16px;
  height: 16px;
  color: #fff;
}

.login-panel__footer strong {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.step-password {
  display: none;
}

.step-forgot {
  display: none;
  margin-top: 0;
}

.step-password.is-visible,
.step-user.is-visible,
.step-forgot.is-visible {
  display: block;
}

.step-user.is-hidden {
  display: none;
}

@keyframes brandIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 860px) {
  .login-shell {
    flex-direction: column;
  }

  .login-brand {
    min-height: 220px;
    flex: none;
  }

  .login-brand__logo {
    width: 140px;
  }

  .login-panel {
    width: 100%;
    min-height: calc(100vh - 220px);
  }
}
