:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f5f7f7;
  color: #093a1d;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f5f7f7;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.page-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  padding: 24px 24px 18px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background: #117a5a;
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
}
.brand-logo {
  height: 35px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  filter: brightness(1.1) saturate(0.9);
}

.content {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0 24px 16px;
}

.login-panel {
  width: min(100%, 500px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  border: none;
  padding: 48px 44px 40px;
}

.hero-text {
  text-align: center;
  margin-bottom: 32px;
}

.hero-text h1 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #137850;
  font-weight: 400;
}

.hero-text p {
  margin: 12px auto 0;
  color: #7a8c89;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.15px;
}

.login-form {
  display: grid;
  gap: 28px;
}

.login-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #3a4c48;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.login-form input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #d3dce0;
  background: #fff;
  color: #3a4c48;
  font-size: 0.95rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input[type="text"]:hover {
  border-color: #b8ccc9;
}

.login-form input[type="text"]:focus {
  outline: none;
  border-color: #137850;
  box-shadow: 0 0 0 3px rgba(19, 120, 80, 0.1);
}

.login-form input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid #d3dce0;
  background: #fff;
  color: #3a4c48;
  font-size: 0.95rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input[type="password"]:hover {
  border-color: #b8ccc9;
}

.login-form input[type="password"]:focus {
  outline: none;
  border-color: #137850;
  box-shadow: 0 0 0 3px rgba(19, 120, 80, 0.1);
}

.password-field-wrapper {
  position: relative;
  margin-bottom: 28px;
}

.caps-lock-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 4px;
  color: #856404;
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideDown 0.2s ease;
}

.warning-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #ffc107;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-id-display {
  background: #f0f7f4;
  padding: 18px 16px;
  border-radius: 6px;
  margin-bottom: 28px;
  border: 1px solid #d5e8e3;
}

.user-id-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.user-id-header div {
  flex: 1;
}

.user-id-display label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #3a4c48;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.user-id-display p {
  margin: 0;
  font-size: 0.98rem;
  color: #137850;
  font-weight: 500;
  line-height: 1.4;
}

.edit-user-id-btn {
  width: auto;
  min-height: auto;
  padding: 8px 16px;
  margin: 0;
  border: 1px solid #137850;
  border-radius: 4px;
  background: #fff;
  color: #137850;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  font-family: 'Segoe UI', Arial, sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.edit-user-id-btn:hover {
  background: #f0f7f4;
  border-color: #0f6a44;
  color: #0f6a44;
}

.edit-user-id-btn:active {
  background: #e8f2f0;
}

.checkbox-row {
  display: flex;
  align-items: center;
  margin: 16px 0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.88rem;
  gap: 10px;
  color: #3a4c48;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  border: 1.5px solid #137850;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #137850;
}

button {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 6px;
  background: #e8ecf0;
  color: #9aaca8;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: not-allowed;
  transition: background 0.25s ease, color 0.25s ease, cursor 0.25s ease, box-shadow 0.25s ease;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin-top: 8px;
}

button:not(:disabled) {
  background: #137850;
  color: #fff;
  cursor: pointer;
}

button:not(:disabled):hover {
  background: #0f6a44;
  box-shadow: 0 4px 12px rgba(19, 120, 80, 0.2);
}

button:not(:disabled):active {
  background: #0d5838;
}

button:disabled {
  background: #e8ecf0;
  color: #9aaca8;
  cursor: not-allowed;
}

#step1,
#step2 {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#step1 > label:first-child,
#step2 > label:first-of-type {
  margin-bottom: 10px;
}

#step1 > input,
#step2 > input {
  margin-bottom: 28px;
}

.support-links {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  text-align: center;
}

.support-links a {
  color: #137850;
  font-weight: 600;
  text-decoration: underline;
  font-size: 0.88rem;
  letter-spacing: 0.2px;
}

.support-links a:hover {
  text-decoration: underline;
}

.password-support-links {
  margin-top: 24px;
  margin-bottom: 0;
}

.footer {
  background: #f5f6f7;
  padding: 16px 24px 22px;
  border-top: 1px solid #e8eaea;
  margin-top: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

.footer-links a {
  color: #137850;
  font-size: 0.84rem;
  text-decoration: underline;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-note {
  text-align: center;
  color: #7d8987;
  font-size: 0.8rem;
  line-height: 1.4;
}

.footer-note::before {
  content: "⌂ ";
  margin-right: 4px;
}

@media (max-width: 768px) {
  .page-header {
    padding: 20px 16px 14px;
  }

  .brand-logo {
    height: 32px;
  }

  .content {
    padding: 16px 16px 20px;
  }

  .login-panel {
    width: min(100%, 100%);
    border-radius: 12px;
    padding: 36px 24px 28px;
    margin: 0 16px;
  }

  .hero-text {
    margin-bottom: 24px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
    line-height: 1.1;
  }

  .hero-text p {
    font-size: 0.88rem;
  }

  .login-form {
    gap: 18px;
  }

  .login-form label {
    font-size: 0.83rem;
  }

  .login-form input[type="text"] {
    min-height: 48px;
    font-size: 0.9rem;
  }

  button {
    min-height: 48px;
    font-size: 0.9rem;
  }

  .checkbox-label {
    font-size: 0.83rem;
  }

  .support-links {
    gap: 12px;
    margin-top: 24px;
  }

  .support-links a {
    font-size: 0.83rem;
  }

  .footer {
    padding: 14px 16px 18px;
  }

  .footer-links {
    gap: 12px;
    margin-bottom: 10px;
  }

  .footer-links a {
    font-size: 0.78rem;
  }

  .footer-note {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 16px 12px 10px;
  }

  .brand-logo {
    height: 28px;
  }

  .content {
    padding: 12px 12px 16px;
  }

  .login-panel {
    padding: 28px 16px 20px;
    border-radius: 10px;
    margin: 0 8px;
  }

  .hero-text {
    margin-bottom: 20px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
    line-height: 1.1;
  }

  .hero-text p {
    font-size: 0.8rem;
    margin: 10px auto 0;
  }

  .login-form {
    gap: 16px;
  }

  .login-form label {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }

  .login-form input[type="text"] {
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.85rem;
  }

  button {
    min-height: 44px;
    font-size: 0.85rem;
    font-weight: 700;
  }

  .checkbox-label {
    font-size: 0.75rem;
    gap: 8px;
  }

  .checkbox-label input {
    width: 16px;
    height: 16px;
  }

  .support-links {
    gap: 10px;
    margin-top: 20px;
  }

  .support-links a {
    font-size: 0.75rem;
  }

  .footer {
    padding: 12px 12px 14px;
  }

  .footer-links {
    gap: 10px;
    margin-bottom: 8px;
    flex-direction: column;
  }

  .footer-links a {
    font-size: 0.7rem;
    display: inline;
  }

  .footer-note {
    font-size: 0.68rem;
  }
}
