/* patch2: AIHG-style split login for large screens, stacked on mobile.
   Overrides the centered .login-card in app.j4.css. Dashboard shell is unchanged. */

body.gate,
body.gate-sign-in{
  display:block!important;
  min-height:100vh;
  min-height:100dvh;
  margin:0;
  padding:0;
  background:
    radial-gradient(1200px 640px at 85% -10%,rgba(255,130,102,.26),transparent 60%),
    linear-gradient(160deg,var(--teal),var(--deep))!important;
  overflow-x:hidden;
  color:#fff;
}

body.gate .login-wrap,
.login-wrap{
  width:100%;
  max-width:none;
  margin:0;
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
  background:transparent;
}

.login-stage{
  width:min(1120px,100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:64px;
  box-sizing:border-box;
}

/* Left brand column — hidden on small screens (logo lives on the card). */
.login-brand{
  display:none;
  color:#fff;
  max-width:420px;
  flex:1 1 360px;
  position:relative;
}
.login-brand .lb-lockup{margin:0 0 28px}
.login-brand .lb-mark{
  display:block;
  width:88px;
  height:88px;
  object-fit:contain;
  border-radius:22px;
  background:var(--cream);
  margin:0 0 16px;
  box-shadow:0 10px 28px rgba(0,0,0,.25);
}
.login-brand .lb-name{
  margin:0;
  font-size:1.35rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#fff;
  line-height:1.2;
}
.login-brand .lb-tag{
  margin:6px 0 0;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--aqua);
  opacity:.95;
}
.login-brand h2{
  font-size:44px;
  line-height:1.05;
  margin:0 0 12px;
  letter-spacing:-.5px;
  color:#fff;
}
.login-brand>p{
  font-size:18px;
  line-height:1.45;
  opacity:.92;
  margin:0 0 20px;
  color:#fff;
  max-width:28em;
}
.login-brand ul{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
  font-size:16px;
  opacity:.92;
  color:#fff;
}
.login-brand ul li{
  padding-left:1.05em;
  position:relative;
}
.login-brand ul li::before{
  content:"";
  position:absolute;
  left:0;
  top:.55em;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--coral);
}
.login-brand .lb-phone{
  margin:22px 0 0;
  font-size:16px;
  opacity:1;
}
.login-brand .lb-phone a{
  color:#fff;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.35);
}
.login-brand .lb-phone a:hover{color:var(--aqua);border-bottom-color:var(--aqua)}

.login-brand ul.lb-services{
  list-style:none;
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:14px 20px;
  margin:22px 0 0;
  padding:18px 0 0;
  border-top:1px solid rgba(255,255,255,.16);
  font-size:11px;
  opacity:1;
}
.login-brand ul.lb-services li{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  flex:0 0 auto;
  width:auto;
  min-width:4.6em;
  max-width:6.8em;
  padding-left:0;
  text-align:center;
  font-size:10px;
  font-weight:700;
  letter-spacing:.06em;
  line-height:1.2;
  text-transform:uppercase;
  color:#d6eaed;
  position:static;
}
.login-brand ul.lb-services li::before{display:none;content:none}
.login-brand ul.lb-services svg{
  width:22px;
  height:22px;
  color:var(--aqua);
}

/* Sign-in card (AIHG cream card, JPEG coral button). */
body.gate .login-card,
.login-card{
  box-sizing:border-box;
  width:min(420px,calc(100% - 8px));
  max-width:420px;
  margin:0;
  padding:32px 28px 28px;
  border-radius:24px;
  background:var(--cream);
  color:var(--deep);
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:14px;
  box-shadow:0 24px 60px rgba(0,30,40,.35);
  flex:0 0 auto;
}
.login-logo{
  display:block;
  width:72px;
  height:72px;
  object-fit:contain;
  margin:0 auto 2px;
  border-radius:18px;
}
body.gate .login-card h1,
.login-card h1{
  margin:0;
  text-align:center;
  font-size:24px;
  color:var(--deep);
  letter-spacing:-.02em;
}
.login-card .tag{display:none}
.login-sub{
  margin:-8px 0 4px;
  text-align:center;
  color:var(--slate);
  font-size:14px;
  font-weight:500;
}
body.gate .login-card label,
.login-card label{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
  font-weight:600;
  font-size:14px;
  color:var(--deep);
  margin-bottom:0;
}
body.gate .login-card label .muted,
.login-card label .muted{font-weight:500}
body.gate .login-card input:not([type=checkbox]):not([type=hidden]),
.login-card input:not([type=checkbox]):not([type=hidden]){
  display:block;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  font-size:16px;
  min-height:48px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--deep);
}
body.gate .login-card input:focus,
.login-card input:focus{
  outline:2px solid var(--teal);
  outline-offset:1px;
  border-color:var(--teal);
}
body.gate .login-card form,
.login-card form,
.login-card .stack{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin:0;
  width:100%;
  text-align:left;
}
.login-btn,
body.gate .login-card .btn:not(.btn-ghost):not(.ghost),
.login-card .login-btn{
  display:flex;
  width:100%;
  min-height:50px;
  font-size:17px;
  margin:2px 0 0;
  border-radius:12px;
  border:1px solid var(--coral);
  background:var(--coral);
  color:var(--teal-950);
  font-weight:700;
  cursor:pointer;
}
.login-btn:hover,
body.gate .login-card .btn:not(.btn-ghost):not(.ghost):hover{
  background:var(--coral-500);
  border-color:var(--coral-500);
}
.login-card .btn-ghost,
.login-card .login-google{
  display:flex;
  width:100%;
  min-height:48px;
  border-radius:12px;
  justify-content:center;
}
.login-forgot{
  margin:0;
  text-align:center;
  font-size:13.5px;
  color:var(--mut);
}
.login-forgot a{
  color:var(--teal2);
  font-weight:700;
  text-decoration:none;
}
.login-forgot a:hover{color:var(--coral-700);text-decoration:underline}
.login-card .login-oauth,
.login-card>.muted{
  text-align:center;
  font-size:12.5px;
  line-height:1.45;
  margin:0;
}
.login-card code{
  display:block;
  margin-top:4px;
  font-size:10.5px;
  line-height:1.4;
  overflow-wrap:anywhere;
  word-break:break-word;
  color:var(--slate);
  background:transparent;
}
.login-card .flash,
.login-card .error,
body.gate .flash.error{
  margin:0;
  text-align:center;
  color:#8a2b17;
  background:#fde6e0;
  border:1px solid var(--coral);
  border-radius:12px;
  padding:10px 12px;
}

/* 1280-wide and up: show the split layout, capped stage so the card is not a speck. */
@media (min-width:900px){
  .login-brand{display:block}
  .login-stage{width:min(1120px,100%)}
}

/* Shorter laptop viewports (1280x800): tighten the brand column so nothing clips. */
@media (min-width:900px) and (max-height:860px){
  .login-wrap{padding-top:20px;padding-bottom:20px}
  .login-brand .lb-lockup{margin:0 0 16px}
  .login-brand .lb-mark{width:72px;height:72px;border-radius:18px;margin-bottom:10px}
  .login-brand .lb-name{font-size:1.15rem}
  .login-brand h2{font-size:36px;margin-bottom:8px}
  .login-brand>p{font-size:16px;margin-bottom:14px}
  .login-brand ul{gap:7px;font-size:15px}
  .login-brand .lb-phone{margin-top:14px;font-size:15px}
  .login-brand ul.lb-services{margin-top:14px;padding-top:14px;gap:12px 16px}
}

/* 1920-wide: scale type, logo, and card so the stage fills the view comfortably. */
@media (min-width:1600px){
  .login-stage{width:min(1280px,90vw);gap:80px}
  .login-brand{max-width:520px}
  .login-brand .lb-mark{width:104px;height:104px;border-radius:26px}
  .login-brand .lb-name{font-size:1.5rem}
  .login-brand h2{font-size:52px}
  .login-brand>p{font-size:19px}
  body.gate .login-card,
  .login-card{width:460px;max-width:460px;padding:40px 36px 32px}
  .login-logo{width:80px;height:80px;border-radius:20px}
  body.gate .login-card h1,.login-card h1{font-size:26px}
  .login-brand ul.lb-services{gap:16px 24px}
  .login-brand ul.lb-services li{font-size:11px;min-width:5.2em;max-width:7.2em}
  .login-brand ul.lb-services svg{width:24px;height:24px}
}

/* 2560-wide: keep a capped, larger stage — never a tiny form in a huge empty field. */
@media (min-width:2200px){
  body.gate,
  body.gate-sign-in{
    background:
      radial-gradient(1600px 800px at 82% -8%,rgba(255,130,102,.28),transparent 58%),
      linear-gradient(160deg,var(--teal),var(--deep))!important;
  }
  .login-stage{width:min(1520px,78vw);gap:104px}
  .login-brand{max-width:620px}
  .login-brand .lb-mark{width:120px;height:120px;border-radius:30px}
  .login-brand .lb-name{font-size:1.7rem;letter-spacing:.16em}
  .login-brand .lb-tag{font-size:.8rem}
  .login-brand h2{font-size:60px}
  .login-brand>p,
  .login-brand ul{font-size:20px}
  .login-brand ul.lb-services{gap:18px 28px}
  .login-brand ul.lb-services li{font-size:12px;min-width:5.6em;max-width:8em}
  .login-brand ul.lb-services svg{width:28px;height:28px}
  body.gate .login-card,
  .login-card{width:520px;max-width:520px;padding:48px 40px 36px;border-radius:28px}
  .login-logo{width:88px;height:88px;border-radius:22px}
  body.gate .login-card h1,.login-card h1{font-size:28px}
  .login-sub{font-size:15px}
  body.gate .login-card input:not([type=checkbox]):not([type=hidden]),
  .login-card input:not([type=checkbox]):not([type=hidden]){min-height:52px}
  .login-btn,body.gate .login-card .btn:not(.btn-ghost):not(.ghost){min-height:54px;font-size:18px}
}

@media (max-width:899px){
  .login-wrap{flex-direction:column;gap:24px;justify-content:center}
  .login-stage{flex-direction:column;width:min(420px,100%);gap:0;justify-content:center}
  .login-brand{display:none}
  body.gate .login-card,
  .login-card{width:min(420px,100%);max-width:none}
}

@media (max-height:560px){
  .login-wrap{align-items:flex-start}
}

@media (max-width:480px){
  body.gate .login-wrap,
  .login-wrap{padding:max(16px,env(safe-area-inset-top)) 12px max(16px,env(safe-area-inset-bottom))}
  body.gate .login-card,
  .login-card{padding:24px 18px 20px;border-radius:20px}
  .login-btn,body.gate .login-card .btn:not(.btn-ghost):not(.ghost){min-height:48px;font-size:16px}
}
