:root{
  --bg1:#0b63d6;
  --bg2:#0a4fb3;

  --text:#0f172a;
  --muted:#6b7280;

  --card:#ffffff;
  --stroke:#e6e9f2;

  --input:#f5f7fb;
  --inputStroke:#dfe5f3;

  --btn1:#1f6fe5;
  --btn2:#0f55c7;

  --shadow: 0 18px 45px rgba(2, 10, 30, 0.22);
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: radial-gradient(1200px 600px at 40% 20%, #2b8cff 0%, transparent 55%),
              linear-gradient(135deg, var(--bg1), var(--bg2));
}

.auth{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.auth-card{
  width:min(980px, 100%);
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  border: 1px solid rgba(255,255,255,0.12);
}

/* LEFT IMAGE */
.auth-media{
  position:relative;
  min-height:520px;
  background:#0b2a66;
}
.auth-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.auth-media__fade{
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 40%);
  pointer-events:none;
}

/* RIGHT PANEL */
.auth-panel{
  padding:50px 44px 34px;
  display:flex;                 /* חשוב */
  flex-direction:column;
  justify-content:flex-start;   /* לא center */
}

.brand{
  margin-bottom:18px;
}
.brand__row{
  display:flex;
  align-items:center;
}

.brand__name{
  font-weight:800;
  letter-spacing:0.6px;
  font-size:20px;
}
.brand__tagline{
  margin-top:-35px;
  margin-left: 100px;
  color:#8a93a7;
  font-weight:500;
}

.title{
  margin:40px 0 10px;   /* במקום 23% */
  font-size:40px;
  line-height:1.1;
  letter-spacing:-0.4px;
  text-align:center;
}
.subtitle{
  margin:0 0 30px;      /* במקום 20% */
  color:var(--muted);
  font-size:14.5px;
  text-align:center;
}

/* ALERT */
.alert{
  background:#fff3f3;
  border:1px solid #ffd7d7;
  color:#b42318;
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  margin-bottom:14px;
}

/* FORM */
.form{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.field{
  position:relative;
  display:flex;
  align-items:center;
  background:var(--input);
  border:1px solid var(--inputStroke);
  border-radius:10px;
  height:48px;
  padding:0 12px 0 44px;
  transition: box-shadow .15s, border-color .15s, background .15s;
}
.field:focus-within{
  border-color:#b7cdfc;
  box-shadow: 0 0 0 4px rgba(31,111,229,0.10);
  background:#ffffff;
}

.field__icon{
  position:absolute;
  left:12px;
  width:18px;
  height:18px;
  color:#7b88a6;
  display:grid;
  place-items:center;
}
.field__icon svg{
  width:18px;
  height:18px;
}

.field input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  font-size:14.5px;
  color:var(--text);
}
.field input::placeholder{ color:#98a2b3; }

.field__action{
  border:1px solid #d7deee;
  background:#ffffff;
  color:#667085;
  height:48px;
  padding:0 10px;
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
.field__action:hover{
  background:#f7f9fe;
}

/* BUTTON */
.btn{
  margin-top:4px;
  height:48px;
  border:0;
  border-radius:10px;
  color:#fff;
  font-weight:700;
  font-size:15px;
  cursor:pointer;
  background: linear-gradient(180deg, var(--btn1), var(--btn2));
  box-shadow: 0 10px 18px rgba(15, 85, 199, 0.22);
  transition: transform .06s ease, filter .15s ease;
}
.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }
.btn:disabled{
  opacity:.75;
  cursor:not-allowed;
}

/* LINKS */
.link{
  margin-top:6px;
  font-size:14px;
  color:#1f6fe5;
  text-decoration:none;
  font-weight:600;
}
.link:hover{ text-decoration:underline; }

.help{
  margin-top:auto;      /* במקום 30% */
  padding-top:50px;
  border-top:1px solid #edf0f6;
  color:#7a8398;
  font-size:13.5px;
  text-align:center;
}
.help__link{
  color:#1f6fe5;
  text-decoration:none;
  font-weight:700;
}
.help__link:hover{ text-decoration:underline; }

.back{
  margin-top:14px;
  background:transparent;
  border:0;
  color:#7a8398;
  cursor:pointer;
  font-size:13.5px;
  font-weight:600;
}
.back:hover{ text-decoration:underline; }


/* ===== Auth Language (flags only) ===== */
.auth-panel{ position: relative; } /* חשוב */

.authLang{
  position:absolute;
  top:16px;
  right:16px;
  z-index: 5;
}

/* RTL: לשים בצד שמאל */
.is-rtl .authLang{ right:auto; left:16px; }

.authLang__btn{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.65);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.authLang__btn:hover{
  transform: translateY(-1px);
  border-color: rgba(15,23,42,.16);
  box-shadow: 0 10px 26px rgba(15,23,42,.12);
}

.authLang__flag{
  width:18px;
  height:18px;
  border-radius:999px;
  object-fit:cover;
  box-shadow: 0 0 0 1px rgba(15,23,42,.10);
}

/* menu */
.authLang__menu{
  position:absolute;
  top:42px;
  right:0;
  display:none;
  padding:8px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 60px rgba(15,23,42,.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-origin: top right;
}

.is-rtl .authLang__menu{ right:auto; left:0; transform-origin: top left; }

.authLang__menu.is-open{
  display:grid;
  grid-auto-flow: column;
  grid-auto-columns: 34px;
  gap:8px;
  animation: authLangPop .16s ease both;
}

@keyframes authLangPop{
  from{ opacity:0; transform: translateY(-6px) scale(.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}

.authLang__opt{
  width:34px;
  height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  border:1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.authLang__opt:hover{
  background: rgba(15,23,42,.04);
  transform: translateY(-1px);
}
.authLang__opt.is-active{
  border-color: rgba(59,130,246,.25);
  background: rgba(59,130,246,.08);
}

.authLang__opt img{
  width:18px;
  height:18px;
  border-radius:999px;
  object-fit:cover;
  box-shadow: 0 0 0 1px rgba(15,23,42,.10);
}

/* FIX: allow dropdown to render outside card */
.auth-card { overflow: visible !important; }
.auth-panel { overflow: visible !important; position: relative; }

/* make sure dropdown is above everything */
.authLang { z-index: 9999; }
.authLang__menu { z-index: 10000; }

/* ===== Brand Table Layout (stable RTL safe) ===== */

.brand{
  display:flex;
  justify-content:center;
  margin-bottom:24px;
}

.brand__table{
  border-collapse:collapse;
}

.brand__logoCell{
  vertical-align:middle;
}

.brand__logo{
  width:90px;
  height:auto;
  display:block;
}

.brand__nameCell{
  font-weight:700;
  font-size:30px;
  letter-spacing:1.5px;
  line-height:1;
  vertical-align:bottom;
}

.brand__taglineCell{
  font-size:13px;
  color:#6b7280;
  padding-top:2px;
  text-align:start;
    padding-top:0;
  line-height:1.05;
}


/* RTL support */
.is-rtl .brand__logoCell{
  padding-inline-end:0;
  padding-inline-start:12px;
}

.otp-resend-wrap{
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.otp-resend-timer{
    font-size: 14px;
    line-height: 1.5;
    color: #64748b;
    text-align: center;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    width: 100%;
    max-width: 320px;
}

.otp-resend-btn{
    width: 100%;
    max-width: 320px;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    transition: all .2s ease;
    cursor: pointer;
}

.otp-resend-btn:hover:not(:disabled){
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.otp-resend-btn:disabled{
    cursor: not-allowed;
    opacity: .55;
    background: #f8fafc;
    color: #94a3b8;
    box-shadow: none;
}

/* ===== UNIFIED BUTTON SYSTEM ===== */

/* גובה אחיד */
.btn,
.field__action,
.otp-resend-btn{
  height: 48px;
  min-height: 48px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  box-sizing: border-box;
}

/* כפתורים משניים (לבנים) */
.field__action,
.otp-resend-btn {
  background: #ffffff;
  border: 1px solid #d7deee;
}

/* אחידות hover */
.field__action:hover,
.otp-resend-btn:hover {
  background: #f7f9fe;
}



/* RESPONSIVE */
@media (max-width: 900px){
  .auth-card{
    grid-template-columns: 1fr;
  }
  .auth-media{
    min-height:260px;
  }
  .auth-panel{
    padding:16% 22px 22px;
  }
  .title{ font-size:40px; }
}

/* slogan stays clean in RTL (keep English LTR) */
.brand__tagline{
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: center;
}



@media (max-width: 420px){
  .auth{ padding:16px; }
  .title{ font-size:28px; 
         margin: 25px 0px 0px;
        text-align: center;}
}
/* הסתרת התמונה במובייל */
@media (max-width: 900px){
  .auth-media{
    display: none;
  }

  .auth-card{
    grid-template-columns: 1fr; /* שהטופס יתפוס את כל הרוחב */
  }
}



