/* V31: better use of the existing desktop login-panel space. */
@media (min-width:980px) and (min-height:650px){
  #loginScreen .v25-login-panel{padding:clamp(14px,1.6vw,24px) clamp(17px,1.9vw,30px)!important;}
  #loginScreen .v25-login-title{margin-bottom:clamp(9px,1.2vh,16px)!important;gap:13px!important;}
  #loginScreen .v25-login-title h2{font-size:clamp(25px,2.3vw,33px)!important;line-height:1.15!important;}
  #loginScreen .v25-login-title p{font-size:clamp(12px,1.03vw,14px)!important;line-height:1.28!important;}
  #loginScreen .login-form,#loginScreen .login-form .login-options{gap:clamp(8px,1.1vh,12px)!important;}
  #loginScreen .login-form label{font-size:clamp(13px,1.08vw,15.5px)!important;line-height:1.25!important;font-weight:650!important;}
  #loginScreen .login-form input,#loginScreen .login-form select{height:clamp(38px,5.3vh,44px)!important;margin-top:5px!important;padding:6px 12px!important;font-size:clamp(14px,1.05vw,16px)!important;}
  #loginScreen #loginForm button[type=submit]{height:clamp(40px,5.8vh,47px)!important;font-size:clamp(16px,1.3vw,19px)!important;margin:7px 0 0!important;}
  #loginScreen .hint-line,#loginScreen .security-note{font-size:clamp(11px,.92vw,12.5px)!important;line-height:1.35!important;}
  #loginScreen .password-control button{height:38px!important;min-width:44px!important;}
}
@media (min-width:980px) and (min-height:650px) and (max-height:729px){
  #loginScreen .v25-login-panel{padding:10px 16px!important;}
  #loginScreen .login-form,#loginScreen .login-form .login-options{gap:5px!important;}
  #loginScreen .login-form input,#loginScreen .login-form select{height:36px!important;margin-top:3px!important;}
  #loginScreen .hint-line,#loginScreen .security-note{margin-top:3px!important;}
}
/* A recovered draft is clearly distinguished from data saved to Supabase. */
#v31RecoverNotice{position:fixed;bottom:18px;left:max(18px,calc(50% - 340px));z-index:20020;max-width:min(680px,calc(100vw - 36px));background:#fffdf4;border:1px solid #d9b966;box-shadow:0 8px 30px rgba(23,45,81,.23);border-radius:12px;padding:15px 18px;color:#21394c;font:14px/1.5 system-ui,sans-serif;}
#v31RecoverNotice strong{font-size:15px;color:#163861;display:block;margin-bottom:4px;}
#v31RecoverNotice p{margin:0 0 10px!important;}
#v31RecoverNotice button{background:#14588c;color:white;border:0;border-radius:8px;padding:7px 12px;cursor:pointer;margin-right:8px;font-weight:600;}
#v31RecoverNotice button.v31-dismiss{background:#f0f3f8;color:#243d56;}

/* Suppress misleading login flash while refreshing a saved, valid session. */
html.v31-restoring #loginScreen{visibility:hidden!important;}
html.v31-restoring body::after{content:'Restoring your E-Logbook session…';position:fixed;z-index:30000;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;border:1px solid #c9dbef;border-radius:12px;padding:18px 24px;box-shadow:0 8px 28px rgba(15,55,103,.15);color:#123f71;font:600 16px/1.5 system-ui,sans-serif;text-align:center;}
