@charset "UTF-8";

:root {
  font-family: "Noto Sans JP", "Yu Gothic", YuGothic, "Meiryo", sans-serif;
  color: #183352;
  background: #f7f9fc;
  font-synthesis: none;
  --navy: #0c2445;
  --muted: #53677e;
  --border: #dbe4ed;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
p, h1, h2 { margin: 0; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #0066bf;
  outline-offset: 3px;
}

.login-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 36px 20px 24px;
}

.login-card {
  position: relative;
  width: min(100%, 456px);
  padding: 34px 36px 36px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 40px #0c244508;
}

.login-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 36px;
  right: 36px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #329865 33.333%, #0066bf 33.333%, #0066bf 66.666%, #7643ba 66.666%);
}

.login-heading { text-align: center; }
.brand-mark { display: block; margin: 0 auto 16px; }

h1 {
  margin-top: 13px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.guide-label { margin-top: 3px; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.form-heading { margin: 25px 0 20px; padding-top: 22px; border-top: 1px solid #e8edf3; }
h2 { color: var(--navy); font-size: 18px; font-weight: 700; line-height: 1.6; }
.form-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.field + .field { margin-top: 18px; }
label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 10px 13px;
  border: 1px solid #bbcbdc;
  border-radius: 6px;
  color: var(--navy);
  background: #fff;
  font-size: 16px;
  line-height: 1.5;
}

input:hover { border-color: #7e96b0; }
input[aria-invalid="true"] { border-color: #b33d38; }
.password-field { position: relative; }
.password-field input { padding-right: 65px; }
.password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 50px;
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.password-toggle:hover { color: #0066bf; background: #edf5ff; }
.password-toggle:focus-visible { outline-offset: -2px; }
.login-error {
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid #e5bbb8;
  border-radius: 6px;
  color: #922e2a;
  background: #fff8f7;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 25px;
  padding: 12px 18px;
  border: 1px solid var(--navy);
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  transition: background .15s;
}

.login-submit:hover:not(:disabled) { background: #1a416d; }
.login-submit:disabled { cursor: wait; background: #455e7a; border-color: #455e7a; }
.loading-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #ffffff60;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.login-footer { margin-top: 23px; color: var(--muted); font-size: 10px; line-height: 1.8; text-align: center; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  .login-shell { padding: 24px 16px 20px; }
  .login-card { padding: 27px 24px 28px; }
  .login-card::before { left: 24px; right: 24px; }
  h1 { font-size: 18px; }
}

@media (max-width: 360px), (max-height: 690px) {
  .login-shell { padding-top: 20px; }
  .login-card { padding: 22px 20px 24px; }
  .brand-mark { width: 44px; height: 44px; margin-bottom: 12px; }
  .form-heading { margin: 19px 0 16px; padding-top: 17px; }
  .field + .field { margin-top: 15px; }
  .login-submit { margin-top: 21px; }
  .login-footer { margin-top: 17px; }
}

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