/* SES Horizon Identity + Login V3
   Presentation only. Preserves Firebase auth, form fields, IDs and handlers.
   Uses SAME sunrise photo as SES Horizon Premium V2. */
:root{--ses-v3-navy:#073e83;--ses-v3-blue:#0065c7;--ses-v3-gold:#ffd25b;}
/* Do not set display: ... !important on #authGate: SES hides it using inline display:none. */
#authGate{
  flex-direction:row;direction:rtl;gap:clamp(18px,3vw,42px);
  background:linear-gradient(125deg,rgba(3,30,77,.83) 0%,rgba(9,82,165,.37) 48%,rgba(2,43,105,.38) 100%),url('ses-horizon-sunrise-v2.webp') center center/cover no-repeat!important;
  padding:clamp(18px,4vw,40px) max(20px,calc((100vw - 1190px)/2));
  color:#0a346b!important;
}
#authGate::before{
  content:"";position:fixed;inset:0;pointer-events:none;
  background:radial-gradient(circle at 56% 16%,rgba(255,233,143,.32),transparent 28%),linear-gradient(0deg,rgba(2,38,92,.28),transparent 40%);
  z-index:0;
}
#authGate .auth-card{
  position:relative;z-index:2;flex:0 0 min(470px,100%);max-width:470px;width:100%;
  background:linear-gradient(144deg,rgba(255,255,255,.98) 0%,rgba(244,250,255,.97) 56%,rgba(219,236,255,.98) 100%)!important;
  border:2px solid rgba(255,232,160,.94)!important;
  border-radius:30px!important;
  padding:clamp(21px,3.5vw,34px)!important;
  box-shadow:inset 0 3px 2px rgba(255,255,255,.98),inset 0 -3px 7px rgba(59,125,198,.14),0 22px 60px rgba(3,22,68,.52),0 4px 0 rgba(12,74,149,.44)!important;
  color:#123a75!important;isolation:isolate;
}
#authGate .auth-card::before{
  content:"منصة إدارة المشاريع · SES Solar Pro";display:block;text-align:center;
  font-size:12px;font-weight:900;letter-spacing:.1px;color:#0a55a4!important;
  margin:0 0 10px!important;
}
#authGate .auth-sun{
  padding:9px 12px 5px;border-radius:22px;
  background:linear-gradient(160deg,#fff,#f8fcff)!important;
  border:1.5px solid #d5e6f7!important;
  box-shadow:inset 0 2px 4px #fff,0 10px 22px rgba(14,85,157,.13)!important;
}
#authGate .ses-official-login{display:block;width:min(300px,100%)!important;height:auto!important;max-height:185px!important;object-fit:contain!important;margin:0 auto!important;filter:none!important}
#authGate .auth-overline{
  color:#b67e00!important;text-shadow:0 1px 0 #fff!important;
  margin:14px 0 5px!important;font-size:12px!important;letter-spacing:.7px!important;
}
#authGate .auth-card>p:not(.gate-message):not(.gate-foot){color:#3d638a!important;font-size:13px!important;font-weight:750;line-height:1.9!important;margin:7px 0 18px!important}
#authGate .login-kind{
  background:linear-gradient(165deg,#d5e9ff,#eff7ff)!important;
  border:1.5px solid #b6d7f7!important;border-radius:17px!important;
  padding:5px!important;gap:6px!important;box-shadow:inset 0 2px 5px rgba(37,93,171,.15)!important;
}
#authGate .login-kind-btn{
  min-height:45px;border-radius:12px!important;color:#1c4b85!important;background:transparent!important;
  font-size:13px!important;font-weight:900!important;transition:filter .15s,transform .15s,box-shadow .15s;
}
#authGate .login-kind-btn.active{
  color:#fff!important;background:linear-gradient(175deg,#1178cf,#07479d)!important;
  border:1px solid #074b9e!important;box-shadow:inset 0 2px 2px rgba(255,255,255,.4),0 5px 11px rgba(5,76,156,.37)!important;
}
#authGate .form-label{display:block;color:#0b478e!important;font-size:13px!important;font-weight:900!important;margin:0 0 7px!important}
#authGate input.form-control{
  display:block;width:100%;min-height:50px;padding:12px 14px!important;border-radius:13px!important;
  background:linear-gradient(#ffffff,#f4faff)!important;color:#133867!important;
  border:1.6px solid #a9cdec!important;font-size:15px!important;font-weight:750!important;
  box-shadow:inset 0 2px 3px rgba(12,83,155,.1),0 2px 0 rgba(255,255,255,.9)!important;
  direction:ltr;text-align:right;
}
#authGate input.form-control::placeholder{color:#6b879f!important;opacity:1!important}
#authGate input.form-control:focus-visible{
  outline:3px solid rgba(255,188,42,.58)!important;outline-offset:2px!important;
  border-color:#0968be!important;box-shadow:0 0 0 5px rgba(0,112,220,.13)!important;
}
#authGate .btn-submit{
  background:linear-gradient(180deg,#fff4b7 0%,#ffd45b 39%,#eea911 100%)!important;
  color:#133f79!important;border:1.5px solid #b78113!important;
  border-radius:16px!important;min-height:53px!important;font-size:16px!important;font-weight:950!important;
  box-shadow:inset 0 3px 3px rgba(255,255,255,.88),0 8px 17px rgba(122,79,6,.32),0 3px 0 #a6760c!important;
  text-shadow:0 1px 0 #fff1b0!important;
}
#authGate .btn-submit:disabled{opacity:.7!important;cursor:wait}
#authGate .btn-submit:active{transform:translateY(2px);box-shadow:inset 0 2px 4px #fff8d3,0 3px 8px rgba(122,79,6,.3)!important}
#authGate .auth-card .gate-message{color:#11538a!important;font-weight:850!important;font-size:12px!important}
#authGate .auth-card .gate-message.error{color:#af2525!important}
#authGate .auth-card .gate-foot{color:#567496!important;font-size:11px!important;font-weight:750!important;line-height:1.85!important}
#authGate .ses-auth-story{
  position:relative;z-index:1;flex:1 1 470px;min-width:0;min-height:490px;display:flex;align-items:flex-end;overflow:hidden;
  border-radius:32px;border:2px solid rgba(255,220,130,.76);
  background:linear-gradient(0deg,rgba(1,29,83,.93) 1%,rgba(0,48,115,.15) 65%),url('ses-horizon-sunrise-v2.webp') 38% center/cover no-repeat;
  box-shadow:0 30px 62px rgba(3,26,68,.48),inset 0 0 0 2px rgba(255,255,255,.2),inset 0 11px 30px rgba(255,255,255,.15);
}
#authGate .ses-auth-story::before{
  content:"";position:absolute;inset:8px;pointer-events:none;border:1px solid rgba(255,244,206,.46);border-radius:25px;
}
#authGate .ses-auth-story-inner{position:relative;z-index:1;width:100%;padding:clamp(20px,4vw,40px);text-align:right;direction:rtl}
#authGate .ses-auth-eyebrow{color:#ffe196;font-size:12px;font-weight:900;letter-spacing:2px;direction:ltr;display:inline-block}
#authGate .ses-auth-story h2{
  font-size:clamp(26px,3.3vw,43px)!important;font-weight:950!important;line-height:1.45!important;
  color:#fff!important;text-shadow:0 4px 14px #00255e!important;margin:11px 0 12px!important;
}
#authGate .ses-auth-story p{font-size:clamp(13px,1.3vw,16px);color:#eaf7ff;font-weight:800;line-height:2;text-shadow:0 2px 5px #002b66}
#authGate .ses-auth-tags{display:flex;gap:9px;flex-wrap:wrap;margin-top:21px}
#authGate .ses-auth-tags span{
  color:#093b7c;background:linear-gradient(175deg,#fff8d8,#f3c85c);border:1px solid #fff0ad;
  border-radius:100px;padding:7px 13px;font-size:12px;font-weight:950;
  box-shadow:inset 0 2px 1px #fff,0 5px 11px #001c496b;
}
/* Official complete SES lockup in place of the former stand-alone S icon. */
#sesWebRoot .ses-brand{
  flex-direction:column!important;justify-content:center!important;gap:4px!important;
  padding:15px 12px 17px!important;
}
#sesWebRoot .ses-brand img{
  display:block;width:min(100%,190px)!important;height:auto!important;aspect-ratio:850/551!important;
  background:#fff!important;object-fit:contain!important;padding:7px!important;
  border:1.5px solid #b5d5f3!important;border-radius:17px!important;
  box-shadow:inset 0 2px 3px #fff,0 8px 19px rgba(6,67,144,.20)!important;
  filter:none!important;
}
#sesWebRoot .ses-brand>div{display:none!important}
#sesWebRoot .ses-page-head .ses-h2-identity{gap:14px!important;align-items:center!important}
#sesWebRoot .ses-page-head .ses-h2-identity img{
  display:block;width:clamp(118px,15vw,160px)!important;height:auto!important;min-height:75px!important;
  border-radius:16px!important;padding:7px!important;object-fit:contain!important;
  box-shadow:inset 0 2px 2px #fff,0 8px 20px rgba(3,29,77,.39)!important;
}
#sesWebRoot .ses-page-head .ses-h2-identity strong{font-size:clamp(15px,2vw,23px)!important;color:#fff!important}
#sesWebRoot .ses-page-head .ses-h2-identity small{color:#ffdf81!important;font-size:12px!important}
@media(max-width:850px){
  #authGate{flex-direction:column;justify-content:center;align-items:center;gap:0;padding:clamp(18px,4.5vw,29px) 14px;}
  #authGate .ses-auth-story{display:none!important}
  #authGate .auth-card{flex:0 1 auto;max-width:470px;margin:auto;padding:clamp(20px,4vw,29px)!important}
}
@media(max-width:440px){
  #authGate{padding:15px 12px;}
  #authGate .auth-card{border-radius:23px!important;padding:18px!important}
  #authGate .ses-official-login{max-height:145px!important;width:min(255px,100%)!important}
  #authGate .auth-sun{padding:7px 9px 4px}
  #authGate .login-kind-btn{font-size:12px!important}
  #sesWebRoot .ses-page-head .ses-h2-identity img{width:115px!important;min-height:69px!important}
}
@media(prefers-reduced-motion:reduce){#authGate .login-kind-btn{transition:none!important}}
