/* ESAC student account screens (v5.0): sign in, create account, reset request, new password.
   Phone-first: brand header with the form as a sheet beneath it; from 900px a two-panel layout. */
.esac-auth2{position:relative;overflow-x:clip;--a-navy:#092c45;--a-deep:#061d2e;--a-gold:#c49b38;--a-gold-2:#e2c47e;--a-ink:#15364b;--a-muted:#647a89;--a-line:#d9e2e8;--a-bg:#f2f5f8;box-sizing:border-box;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:var(--a-bg);color:var(--a-ink);font-family:Arial,"Noto Kufi Arabic",sans-serif;font-size:15px;line-height:1.6;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
.esac-auth2 *,.esac-auth2 *::before,.esac-auth2 *::after{box-sizing:border-box}
.esac-auth2.is-rtl,.esac-auth2.is-rtl button,.esac-auth2.is-rtl input{font-family:"ESAC Noto Kufi Arabic","Noto Kufi Arabic",Tahoma,Arial,sans-serif;letter-spacing:0}
.esac-auth2.is-rtl{line-height:1.8}
.esac-auth2-icon{width:20px;height:20px;flex:0 0 auto;display:block}
.esac-auth2 a{color:#8a6a1d;font-weight:700;text-decoration:none}
.esac-auth2 a:hover{text-decoration:underline}
.esac-auth2 :focus-visible{outline:2px solid var(--a-gold);outline-offset:2px}
.esac-auth2 .esac-honeypot,.esac-auth2-hidden-user{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;opacity:0;pointer-events:none;left:auto!important;right:auto!important;inset-inline-start:0!important;top:0!important}

/* Brand */
.esac-auth2-brand{position:relative;overflow:hidden;background:linear-gradient(150deg,var(--a-deep),#0b3a58 68%,#0e4868);color:#fff;padding:calc(18px + env(safe-area-inset-top,0px)) 20px 54px}
.esac-auth2-brand::after{content:"";position:absolute;inset-inline-end:-70px;top:-90px;width:230px;height:230px;border-radius:50%;border:30px solid #c49b3824;pointer-events:none}
.esac-auth2-brand-top{display:flex;align-items:center;gap:10px;position:relative;z-index:1}
.esac-auth2-brand-top img{width:44px;height:44px;object-fit:contain}
.esac-auth2-brand-top span{font-size:11px;font-weight:800;letter-spacing:.16em;color:var(--a-gold-2)}
.esac-auth2-brand-copy{position:relative;z-index:1;margin-top:14px}
.esac-auth2-brand h1{margin:0;color:#fff;font-size:22px;line-height:1.4;font-weight:800}
.esac-auth2-brand p{margin:4px 0 0;color:#cfe0ea;font-size:13px;line-height:1.75;max-width:520px}
.esac-auth2-benefits{display:none;list-style:none;margin:0;padding:0}

/* Panel + card */
.esac-auth2-panel{flex:1;display:flex;flex-direction:column;padding:0 14px calc(20px + env(safe-area-inset-bottom,0px));margin-top:-34px}
.esac-auth2-card{position:relative;z-index:2;background:#fff;border:1px solid #e3eaef;border-radius:22px;box-shadow:0 14px 40px #092c4514;padding:18px 16px 20px}
.esac-auth2-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:#eef3f6;border-radius:13px;padding:4px;margin-bottom:18px}
.esac-auth2-tabs a{display:flex;align-items:center;justify-content:center;min-height:42px;border-radius:10px;color:#557080;font-size:14px;font-weight:800;text-decoration:none!important}
.esac-auth2-tabs a.is-active{background:#fff;color:var(--a-navy);box-shadow:0 2px 8px #092c451f}
.esac-auth2-head{margin-bottom:16px}
.esac-auth2-badge{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:#fbf3df;color:#97721f;margin-bottom:10px}
.esac-auth2-badge .esac-auth2-icon{width:23px;height:23px}
.esac-auth2-head.is-success .esac-auth2-badge{background:#e7f4ec;color:#23704a}
.esac-auth2-head.is-warning .esac-auth2-badge{background:#fdeee6;color:#b0491e}
.esac-auth2-head h2{margin:0;color:var(--a-navy);font-size:21px;line-height:1.45;font-weight:800}
.esac-auth2-head p{margin:4px 0 0;color:var(--a-muted);font-size:13.5px;line-height:1.8}

.esac-auth2-alert{display:flex;align-items:flex-start;gap:10px;border-radius:13px;padding:12px 14px;margin:0 0 14px;font-size:13.5px;line-height:1.7;font-weight:600}
.esac-auth2-alert .esac-auth2-icon{margin-top:2px;width:18px;height:18px}
.esac-auth2-alert.is-error{background:#fdecec;color:#8f2626;border:1px solid #f4cccc}
.esac-auth2-alert.is-success{background:#e8f6ee;color:#17623a;border:1px solid #c4e5d2}

/* Form */
.esac-auth2-form{display:grid;gap:14px;margin:0}
.esac-auth2-grid{display:grid;gap:14px}
.esac-auth2-field{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0}
.esac-auth2-field>span:first-child{font-size:13px;font-weight:700;color:var(--a-ink)}
.esac-auth2-input{display:flex;align-items:center;gap:10px;min-height:52px;background:#f8fafb;border:1.5px solid var(--a-line);border-radius:14px;padding:0 14px;color:#8094a2;transition:border-color .15s,box-shadow .15s,background .15s}
.esac-auth2-input:focus-within{background:#fff;border-color:var(--a-gold);box-shadow:0 0 0 4px #c49b3826;color:#97721f}
.esac-auth2-input input{flex:1;min-width:0;width:100%;height:48px;min-height:0;border:0!important;background:transparent!important;box-shadow:none!important;outline:0!important;padding:0!important;margin:0;font:inherit;font-size:16px;color:var(--a-navy);border-radius:0}
.esac-auth2.is-rtl .esac-auth2-input input[dir=ltr]{text-align:right}
.esac-auth2-input input::placeholder{color:#9fb0bb}
.esac-auth2-field.is-invalid .esac-auth2-input{border-color:#d86b6b;background:#fff8f8}
.esac-auth2-reveal{flex:0 0 auto;width:40px;height:40px;margin-inline-end:-8px;display:grid;place-items:center;border:0;border-radius:10px;background:none;color:#7b8f9c;padding:0;cursor:pointer}
.esac-auth2-reveal:hover{background:#eef3f6}
.esac-auth2-reveal[aria-pressed=true]{color:var(--a-navy);background:#eef3f6}
.esac-auth2-field small{font-size:12px;color:var(--a-muted)}
.esac-auth2-rules{list-style:none;margin:-4px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px 14px}
.esac-auth2-rules li{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;color:#7b8f9c}
.esac-auth2-rules li .esac-auth2-icon{width:16px;height:16px;padding:2px;border-radius:50%;background:#e6edf1;color:#fff;stroke-width:3}
.esac-auth2-rules li.is-ok{color:#23704a}
.esac-auth2-rules li.is-ok .esac-auth2-icon{background:#2e8b5c}
.esac-auth2-check{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px;margin:0;width:auto;font-size:13.5px;font-weight:600;color:var(--a-ink);line-height:1.7;cursor:pointer}
.esac-auth2-check input{flex:0 0 20px;display:inline-block!important;width:20px!important;height:20px!important;min-height:0!important;padding:0!important;margin:2px 0 0!important;accent-color:var(--a-navy)}
.esac-auth2-options{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap}
.esac-auth2-options .esac-auth2-check{flex:0 1 auto;align-items:center}
.esac-auth2-options .esac-auth2-check input{margin:0!important}
.esac-auth2-check>span{flex:1 1 auto;min-width:0}
.esac-auth2-options a{font-size:13.5px;min-height:32px;display:inline-flex;align-items:center}
.esac-auth2-note{display:flex;align-items:flex-start;gap:9px;margin:0;background:#f6f9fb;border:1px solid #e6edf1;border-radius:12px;padding:10px 12px;font-size:12.5px;line-height:1.8;color:#557080}
.esac-auth2-note .esac-auth2-icon{width:17px;height:17px;margin-top:3px;color:#97721f}
.esac-auth2-form-error{margin:0;color:#a32b2b;font-size:13px;font-weight:700}
.esac-auth2-form-error[hidden]{display:none}
.esac-auth2-submit{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:52px;border:0;border-radius:14px;background:linear-gradient(180deg,#d0a744,#c0942f);color:var(--a-navy)!important;font:inherit;font-size:15.5px;font-weight:800;padding:0 18px;cursor:pointer;text-decoration:none!important;box-shadow:0 8px 18px #c49b3840;transition:transform .1s,filter .15s}
.esac-auth2-submit:hover{filter:brightness(1.04)}
.esac-auth2-submit:active{transform:translateY(1px)}
.esac-auth2-submit.is-secondary{background:#fff;border:1.5px solid var(--a-line);box-shadow:none}
.esac-auth2-submit[disabled]{opacity:.75;cursor:progress}
.esac-auth2-submit.is-busy::before{content:"";width:18px;height:18px;border-radius:50%;border:2.5px solid #092c4540;border-top-color:var(--a-navy);animation:esac-auth2-spin .8s linear infinite}
@keyframes esac-auth2-spin{to{transform:rotate(360deg)}}
.esac-auth2-switch{margin:16px 0 0;text-align:center;font-size:14px;color:var(--a-muted)}
.esac-auth2-help{margin:16px 0 0;text-align:center;font-size:13px;color:var(--a-muted)}

/* Phone toolbar sits inside the brand header */
.esac-auth2-toolbar{display:flex;align-items:center;gap:8px;position:absolute;z-index:3;top:calc(22px + env(safe-area-inset-top,0px));inset-inline-end:14px}
.esac-auth2-toolbar a{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:999px;background:#ffffff1f;color:#fff;font-size:12.5px;font-weight:700;text-decoration:none!important}
.esac-auth2-toolbar a .esac-auth2-icon{width:15px;height:15px}
.esac-auth2.is-rtl .esac-auth2-back .esac-auth2-icon{transform:none}
.esac-auth2:not(.is-rtl) .esac-auth2-back .esac-auth2-icon{transform:scaleX(-1)}

@media (max-width:479px){.esac-auth2-brand-top span{display:none}}
@media (min-width:560px){
 .esac-auth2-panel{width:100%;max-width:560px;margin-inline:auto}
 .esac-auth2-card{padding:26px 26px 28px}
 .esac-auth2-grid{grid-template-columns:1fr 1fr}
}

/* Desktop (v2): one navy stage — brand message on one side, the form card floating on the other. */
@media (min-width:900px){
 .esac-auth2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,470px);grid-template-rows:auto 1fr auto;column-gap:clamp(36px,6vw,96px);row-gap:18px;align-items:center;padding:22px max(36px,calc((100% - 1160px)/2)) 22px;background:radial-gradient(900px 520px at 12% 8%,#12507455,transparent 60%),radial-gradient(700px 460px at 92% 96%,#c49b3826,transparent 62%),linear-gradient(140deg,#051724 0%,#092c45 52%,#0c3a57 100%);color:#fff;overflow:hidden}
 .esac-auth2::before{content:"";position:absolute;inset:0;background-image:radial-gradient(#ffffff14 1px,transparent 1.4px);background-size:26px 26px;-webkit-mask-image:linear-gradient(120deg,#000 0%,transparent 55%);mask-image:linear-gradient(120deg,#000 0%,transparent 55%);pointer-events:none}
 .esac-auth2.is-rtl::before{-webkit-mask-image:linear-gradient(240deg,#000 0%,transparent 55%);mask-image:linear-gradient(240deg,#000 0%,transparent 55%)}
 .esac-auth2::after{content:"";position:absolute;inset-inline-start:-180px;bottom:-240px;width:560px;height:560px;border-radius:50%;border:64px solid #c49b381f;pointer-events:none}
 .esac-auth2-panel{display:contents}
 .esac-auth2-toolbar{grid-column:1 / -1;grid-row:1;position:relative;top:auto;inset-inline-end:auto;z-index:3;justify-content:flex-end;gap:10px;margin:0;width:auto;max-width:none}
 .esac-auth2-toolbar a{min-height:40px;padding:0 16px;background:#ffffff14;border:1px solid #ffffff26;color:#fff;font-size:13px;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
 .esac-auth2-toolbar a:hover{background:#ffffff26}

 .esac-auth2-brand{grid-column:1;grid-row:2;position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;gap:26px;max-width:560px;padding:0;background:none;overflow:visible}
 .esac-auth2-brand::after{display:none}
 .esac-auth2-brand-top{gap:14px}
 .esac-auth2-brand-top img{width:78px;height:78px}
 .esac-auth2-brand-top span{display:inline;font-size:12px;letter-spacing:.22em}
 .esac-auth2-brand-copy{margin:0}
 .esac-auth2-brand-copy::before{content:"";display:block;width:56px;height:4px;border-radius:4px;background:linear-gradient(90deg,var(--a-gold),var(--a-gold-2));margin-bottom:18px}
 .esac-auth2-brand h1{font-size:clamp(34px,3.5vw,48px);line-height:1.25;letter-spacing:0}
 .esac-auth2-brand p{font-size:16.5px;line-height:1.9;margin-top:14px;color:#c9dbe6;max-width:480px}
 .esac-auth2-benefits{display:grid;gap:14px;list-style:none;margin:0;padding:0}
 .esac-auth2-benefits li{display:flex;align-items:center;gap:14px;font-size:15px;font-weight:600;color:#e8f1f6;background:none;border:0;padding:0}
 .esac-auth2-benefits .esac-auth2-icon{box-sizing:content-box;width:20px;height:20px;padding:10px;border-radius:12px;background:#c49b3824;border:1px solid #c49b3847;color:var(--a-gold-2)}

 .esac-auth2-card{grid-column:2;grid-row:2;align-self:center;width:100%;max-width:none;padding:28px 32px 28px;border:0;border-radius:26px;box-shadow:0 30px 80px #02101b80,0 0 0 1px #ffffff1a;color:var(--a-ink);overflow:hidden}
 .esac-auth2-card::before{content:"";position:absolute;inset-inline:0;top:0;height:5px;background:linear-gradient(90deg,var(--a-gold),var(--a-gold-2),var(--a-gold))}
 .esac-auth2-tabs{margin-bottom:20px}
 .esac-auth2-head{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:14px;align-items:center;margin-bottom:18px}
 .esac-auth2-badge{grid-row:1 / span 2;width:52px;height:52px;border-radius:16px;margin:0}
 .esac-auth2-head h2{font-size:23px;line-height:1.4}
 .esac-auth2-head p{margin-top:2px}
 .esac-auth2-help{grid-column:2;grid-row:3;position:relative;z-index:2;margin:0;color:#b9cdd9}
 .esac-auth2-help a{color:var(--a-gold-2)}
 .esac-auth2-switch{margin-top:14px}
 .esac-auth2[data-view="register"] .esac-auth2-form{gap:12px}
 .esac-auth2[data-view="register"] .esac-auth2-input{min-height:48px}
 .esac-auth2[data-view="register"] .esac-auth2-input input{height:44px}
 .esac-auth2[data-view="register"]{grid-template-columns:minmax(0,1fr) minmax(0,540px)}
}
@media (min-width:900px) and (max-width:1099px){
 .esac-auth2{column-gap:32px;padding-inline:28px;grid-template-columns:minmax(0,1fr) minmax(0,440px)}
 .esac-auth2-brand h1{font-size:32px}
 .esac-auth2-brand p{font-size:15px}
}
@media (min-width:900px) and (max-height:760px){
 .esac-auth2-brand{gap:18px}
 .esac-auth2-brand-top img{width:64px;height:64px}
 .esac-auth2-card{padding:22px 30px}
}
@media (prefers-reduced-motion:reduce){.esac-auth2-submit.is-busy::before{animation:none}.esac-auth2-input,.esac-auth2-submit{transition:none}}
