:root{
  --navy:#17385e;
  --navy-deep:#102b47;
  --red:#d80a21;
  --ink:#18304b;
  --muted:#66798d;
  --line:#dfe7ef;
  --surface:#ffffff;
  --soft:#f5f8fb;
  --danger:#b42318;
}

*{box-sizing:border-box}
html,body{min-height:100%;margin:0}
body{
  background:#fff8fa;
  color:var(--ink);
  font-family:Inter,Avenir Next,Avenir,Segoe UI,Helvetica Neue,Arial,"Hiragino Sans","Yu Gothic","Noto Sans CJK JP",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{text-decoration:none;color:inherit}
button,input{font:inherit}
button{cursor:pointer}

.page-shell{min-height:100vh}
.login-scene{
  position:relative;
  min-height:100vh;
  overflow:hidden;
  display:grid;
  place-items:center;
  padding:48px 22px;
}
.background-photo{
  position:absolute;
  inset:0;
  background:url('../assets/images/okinawa-login-bg-placeholder.jpg') center center/cover no-repeat;
  transform:scale(1.02);
  overflow:hidden;
}
.background-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 1.2s ease}
.background-photo img.is-loaded{opacity:1}

.scene-shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(255,255,255,.86) 0%,rgba(255,255,255,.70) 40%,rgba(255,255,255,.30) 70%,rgba(255,255,255,.18) 100%),
    linear-gradient(180deg,rgba(255,248,250,.16),rgba(255,255,255,.35));
}
.login-wrap{
  position:relative;
  z-index:1;
  width:min(100%,620px);
  margin:0 auto;
}
.login-card{
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(14px);
  border-radius:32px;
  padding:34px 36px 30px;
  box-shadow:0 26px 68px rgba(16,43,71,.16);
}
.card-topline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:30px;
}
.brand-row{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--navy);
  font-size:1.46rem;
  font-weight:900;
  letter-spacing:-.035em;
  min-width:0;
}
.brand-row img{width:54px;height:54px;object-fit:contain;flex:0 0 54px}
.brand-row span{white-space:nowrap}
.brand-row:hover span{color:#244e79}

.language-dropdown{position:relative;flex:0 0 auto}
.language-trigger{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:40px;
  padding:0 12px;
  border:1px solid #e7edf3;
  border-radius:999px;
  background:#f7f9fb;
  color:var(--navy);
  font-weight:760;
  box-shadow:none;
  -webkit-font-smoothing:antialiased;
}
.language-trigger:hover{background:#f0f5f9;border-color:#dbe5ee}
.language-globe{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:0 0 17px}
.language-chevron{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;opacity:.7}
.language-code{display:none;font-size:.76rem;letter-spacing:.06em}
.language-menu{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  min-width:160px;
  padding:8px;
  background:#fff;
  border:1px solid #edf1f5;
  border-radius:16px;
  box-shadow:0 18px 42px rgba(16,43,71,.14);
  display:none;
  z-index:20;
}
.language-dropdown.open .language-menu{display:block}
.language-option{
  width:100%;
  border:0;
  background:transparent;
  border-radius:11px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  text-align:left;
  color:var(--navy);
  font-weight:700;
  -webkit-font-smoothing:antialiased;
}
.language-option-code{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:8px;background:#eef3f7;color:#526b84;font-size:.7rem;font-weight:850;line-height:1}
.language-option:hover,.language-option.active{background:#f3f7fa}

.login-heading h1{
  margin:0;
  color:var(--navy);
  font-size:2.25rem;
  line-height:1.02;
  letter-spacing:-.05em;
  white-space:nowrap;
}
form{margin-top:28px}
.field{display:block;margin-bottom:18px}
.field>span{
  display:block;
  margin-bottom:7px;
  color:#3b526a;
  font-size:.84rem;
  font-weight:800;
}
.field input{
  width:100%;
  height:50px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:0 14px;
  outline:none;
  background:#fbfdff;
  color:var(--ink);
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.field input:focus{
  border-color:#8ba9c5;
  background:#fff;
  box-shadow:0 0 0 4px rgba(35,86,134,.08);
}
.field input.invalid{
  border-color:#d98982;
  box-shadow:0 0 0 4px rgba(180,35,24,.06);
}
.password-wrap{position:relative}
.field-error{
  display:block;
  min-height:17px;
  margin-top:6px;
  color:var(--danger);
  font-size:.75rem;
  line-height:1.35;
}
.form-meta{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:16px;
  margin-top:-2px;
}
.remember{
  display:flex;
  align-items:center;
  gap:8px;
  color:#596f84;
  font-size:.82rem;
}
.remember input{accent-color:var(--navy)}
.login-error{
  min-height:20px;
  margin:18px 0 10px;
  color:var(--danger);
  font-size:.84rem;
  font-weight:750;
}
.login-button{
  width:100%;
  height:52px;
  border:0;
  border-radius:15px;
  background:linear-gradient(135deg,var(--navy),#29547e);
  color:#fff;
  font-weight:900;
  box-shadow:0 14px 30px rgba(23,56,94,.18);
  transition:transform .14s ease,filter .14s ease;
}
.login-button:hover{filter:brightness(1.06)}
.login-button:active{transform:translateY(1px)}
.copyright{
  margin:34px 0 0;
  padding-top:4px;
  color:#8392a2;
  font-size:.74rem;
  text-align:center;
}

@media(max-width:960px){
  .login-scene{place-items:center;padding-top:40px;padding-bottom:40px}
  .scene-shade{background:linear-gradient(180deg,rgba(255,255,255,.74),rgba(255,255,255,.66)),linear-gradient(180deg,rgba(255,248,250,.12),rgba(255,255,255,.18))}
}
@media(max-width:660px){
  .login-heading h1{white-space:normal}
}
@media(max-width:520px){
  .login-scene{min-height:100vh;padding:24px 16px}
  .login-card{padding:26px 22px 24px;border-radius:26px}
  .card-topline{align-items:flex-start;gap:12px;margin-bottom:26px}
  .brand-row{font-size:1.28rem;gap:10px}
  .brand-row img{width:48px;height:48px;flex-basis:48px}
  .language-label{display:none}
  .language-code{display:inline}
  .language-trigger{height:42px;min-height:42px;padding:0 10px;justify-content:center;gap:6px}
  .language-globe{width:16px;height:16px;flex-basis:16px}
  .login-heading h1{font-size:2rem}
  .copyright{margin-top:30px;font-size:.7rem}
}
.login-button[disabled]{opacity:.68;cursor:wait}
