:root {
  --navy: #082c68;
  --navy-deep: #061f4d;
  --teal: #08aa96;
  --ink: #13213a;
  --muted: #63718a;
  --line: #cdd8e8;
  --surface: #ffffff;
  --page: #f3f6fb;
  --danger: #b4233c;
  font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
}

button,
input {
  font: inherit;
}

.page-accent {
  position: fixed;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  height: 5px;
}

.page-accent span:first-child {
  flex: 1;
  background: var(--navy);
}

.page-accent span:last-child {
  width: 84px;
  background: var(--teal);
}

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

.login-panel {
  width: min(100%, 480px);
  padding: 46px 48px 34px;
  background: var(--surface);
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 20px 56px rgba(16, 38, 74, 0.12);
}

.login-header {
  margin-bottom: 34px;
}

.brand-name,
.brand-context,
.service-name {
  margin: 0;
}

.brand-name {
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
}

.brand-context {
  display: inline-block;
  margin-top: 7px;
  padding: 4px 8px;
  color: #087f73;
  background: #e6f8f4;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.login-header h1 {
  margin: 30px 0 10px;
  color: #0b275b;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: 0;
}

.service-name {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: #2b3b56;
  font-size: 14px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.form-field input:focus {
  background: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(8, 44, 104, 0.12);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--navy);
  background: #edf3fb;
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(8, 44, 104, 0.2);
  outline-offset: 0;
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: block;
}

.remember-option {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: #44536b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.remember-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.remember-option span {
  position: relative;
  width: 20px;
  height: 20px;
  margin-right: 9px;
  background: #ffffff;
  border: 1px solid #aab8cb;
  border-radius: 4px;
}

.remember-option input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
}

.remember-option input:checked + span::after {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  content: "";
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember-option input:focus-visible + span {
  outline: 3px solid rgba(8, 44, 104, 0.18);
  outline-offset: 2px;
}

.login-error {
  margin: -4px 0 0;
  padding: 10px 12px;
  color: var(--danger);
  background: #fff3f5;
  border-left: 3px solid #e24b68;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.login-error[hidden] {
  display: none;
}

.login-button {
  width: 100%;
  height: 52px;
  margin-top: 2px;
  color: #ffffff;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.login-button:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

.login-button:focus-visible {
  outline: 3px solid rgba(8, 170, 150, 0.3);
  outline-offset: 2px;
}

.login-button:disabled {
  color: #dbe7f7;
  background: #536f9e;
  border-color: #536f9e;
  cursor: wait;
}

.login-panel footer {
  margin-top: 34px;
  color: #8190a5;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .login-page {
    padding: 5px 0 0;
    background: #ffffff;
  }

  .login-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(100svh - 5px);
    padding: 38px 24px 26px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-header {
    margin-bottom: 30px;
  }

  .login-header h1 {
    margin-top: 26px;
    font-size: 28px;
  }

  .login-panel footer {
    margin-top: auto;
    padding-top: 42px;
  }
}
