/* ReSiRai Login — approved reference recreation */
.login-app-hidden{display:none!important}
body.resirai-login-active{overflow:hidden}
body.resirai-login-active .app-sidebar,
body.resirai-login-active .app-shell{visibility:hidden!important}
body.resirai-login-active .app-sidebar{display:none!important}

.login-screen{
  position:fixed;
  inset:0;
  z-index:99999;
  min-height:100vh;
  box-sizing:border-box;
  display:grid;
  place-items:center;
  padding:42px;
  background:
    radial-gradient(circle at 0% 50%,rgba(53,164,190,.10),transparent 34%),
    radial-gradient(circle at 100% 8%,rgba(70,154,181,.08),transparent 30%),
    #f3f8fb;
  direction:rtl;
  font-family:inherit;
}
.login-shell{
  width:min(1120px,100%);
  /* Height follows the viewport so the shell (and the clinic art inside it)
     shrinks on short screens instead of overflowing. */
  height:min(660px,calc(100vh - 84px));
  min-height:min(520px,calc(100vh - 84px));
  display:grid;
  grid-template-columns:1fr 1fr;
  direction:ltr;
  overflow:hidden;
  border-radius:24px;
  background:#fff;
  box-shadow:0 24px 70px rgba(40,88,110,.14);
  border:1px solid rgba(28,112,138,.07);
}
.login-form-panel{
  direction:rtl;
  order:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  padding:40px 92px 28px;
  overflow-y:auto;
  background:#fff;
  position:relative;
  min-height:0;
  overflow-y:auto;
}
.login-form-panel::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:180px;height:180px;
  background:radial-gradient(circle at bottom left,rgba(31,160,185,.055),transparent 68%);
  pointer-events:none;
}
.login-brand-panel{
  direction:rtl;
  order:2;
  position:relative;
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:46px 48px 26px;
  color:#123e61;
  background:#eaf5fa;
  overflow:hidden;
  text-align:center;
}
.login-brand-panel::before{
  content:"";
  position:absolute;
  width:390px;height:390px;
  top:-205px;left:-100px;
  border:2px solid rgba(34,170,201,.17);
  border-radius:50%;
}
.login-brand-panel::after{
  content:"";
  position:absolute;
  width:420px;height:420px;
  right:-225px;bottom:-240px;
  border:2px solid rgba(34,170,201,.15);
  border-radius:50%;
}
.login-brand-top{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  position:relative;
  z-index:3;
}
.login-logo-tooth{width:43px;height:49px;flex:0 0 auto}
.login-logo-tooth svg{width:100%;height:100%;display:block}
.login-logo-tooth img{width:100%;height:100%;object-fit:contain;display:block}
.login-logo-img{width:var(--logo-w-login,260px);max-width:100%;height:auto;object-fit:contain;display:block}
@media (max-width:480px){.login-logo-img{width:var(--logo-w-login-mobile,220px)}}
/* نمایِ کوتاه: لوگو کوچک می‌شود تا دکمهٔ ورود همیشه دیده شود. */
@media (max-height:740px){.login-logo-img{width:var(--logo-w-login-short,200px)}}
.login-logo-name{display:flex;flex-direction:column;align-items:flex-start;line-height:1.05}
.login-logo-name strong{color:#123e61;font-size:27px;letter-spacing:-.7px}
.login-logo-name strong::first-letter{ }
.login-logo-name small{color:#8aa6bd;font-size:9px;letter-spacing:.2px;margin-top:5px}
.login-clinic-art{
  width:calc(100% + 96px);
  max-width:none;
  /* Fills the space left by the header/footer instead of a fixed 470px,
     so it becomes smaller on shorter viewports. */
  flex:1 1 auto;
  min-height:0;
  height:auto;
  margin-top:22px;
  object-fit:cover;
  object-position:center bottom;
  border-radius:0;
  display:block;
  position:relative;
  z-index:2;
  box-shadow:none;
  filter:saturate(.94) brightness(1.04);
  transform:translateY(28px) scale(1.06);
  transform-origin:center bottom;
}
.login-brand-footer{
  width:100%;
  margin-top:auto;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:10px;
  position:relative;
  z-index:3;
  color:#537994;
}
.login-brand-footer .login-logo-tooth{width:31px;height:36px}
.login-brand-footer .login-logo-name strong{font-size:17px}
.login-brand-footer .login-logo-name small{font-size:7px}

.login-form-logo{
  direction:ltr;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin-bottom:22px;
  position:relative;
  z-index:2;
}
.login-form-logo .login-logo-tooth{width:58px;height:64px}
.login-form-logo .login-logo-name{align-items:flex-start}
.login-form-logo .login-logo-name strong{font-size:39px;letter-spacing:-1.2px}
.login-form-logo .login-logo-name small{font-size:12px;margin-top:7px}

.login-form-heading{margin-bottom:35px;position:relative;z-index:2}
.login-form-heading h2{
  margin:0 0 10px;
  color:#103f66;
  font-size:30px;
  font-weight:850;
  letter-spacing:-.6px;
}
.login-form-heading p{
  margin:0;
  color:#7d9bb8;
  font-size:13px;
  line-height:1.9;
}
.login-field{margin-bottom:25px;position:relative;z-index:2}
.login-field label{
  display:block;
  margin:0 0 9px;
  color:#123e61;
  font-size:14px;
  font-weight:750;
}
.login-field input{
  width:100%;
  height:65px;
  box-sizing:border-box;
  padding:0 54px 0 62px;
  border:1.5px solid #c9e4f0;
  border-radius:15px;
  background:#fff;
  color:#244b62;
  font:inherit;
  font-size:14px;
  outline:none;
  transition:.18s ease;
  direction:rtl;
}
.login-field input::placeholder{color:#94acc0}
.login-field input:focus{
  border-color:#35a8c3;
  box-shadow:0 0 0 4px rgba(53,168,195,.10);
}
.login-field-icon{
  position:absolute;
  right:16px;
  bottom:20px;
  width:20px;height:20px;
  color:#6286a3;
  pointer-events:none;
}
.login-field-icon svg{width:100%;height:100%}
.login-password-row{position:relative}
.login-password-row input{padding-left:54px}
.login-password-toggle{
  position:absolute;
  left:15px;
  bottom:17px;
  width:27px;height:27px;
  padding:0;
  border:0;
  background:transparent;
  color:#6286a3;
  cursor:pointer;
}
.login-password-toggle svg{width:100%;height:100%}
.login-submit{
  width:100%;
  height:65px;
  margin-top:7px;
  border:0;
  border-radius:15px;
  background:linear-gradient(135deg,#1995ad,#30acc0);
  color:#fff;
  font:inherit;
  font-size:16px;
  font-weight:850;
  cursor:pointer;
  box-shadow:0 12px 25px rgba(31,154,178,.18);
  transition:.18s ease;
  position:relative;
  z-index:2;
}
.login-submit:hover{transform:translateY(-1px)}
.login-submit:disabled{opacity:.65;cursor:wait;transform:none}
.login-submit .login-submit-arrow{display:inline-flex;margin-right:13px;font-size:25px;vertical-align:-2px}
.login-status{
  min-height:23px;
  margin:0 0 4px;
  font-size:12px;
  line-height:1.7;
  position:relative;
  z-index:2;
}
.login-status.info{color:#54798e}
.login-status.error{color:#b42318}
.login-recovery-link{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:100%;
  margin-top:30px;
  padding:0;
  border:0;
  background:transparent;
  color:#1596b2;
  cursor:pointer;
  font:inherit;
  font-size:12px;
  text-align:center;
  position:relative;
  z-index:2;
}
.login-recovery-link:hover{text-decoration:underline}
.login-recovery-help{
  width:18px;height:18px;
  border:1.5px solid currentColor;
  border-radius:50%;
  display:inline-grid;
  place-items:center;
  font-size:11px;
  font-weight:800;
}
.login-footer{
  margin-top:auto;
  padding-top:20px;
  border-top:1px solid #e6eef3;
  text-align:center;
  color:#91a9bc;
  font-size:10px;
  line-height:1.8;
  position:relative;
  z-index:2;
}
.login-footer .login-shield{display:inline-block;width:17px;height:17px;margin-left:7px;vertical-align:-4px;color:#6d93ae}

@media(max-width:900px){
  .login-screen{padding:22px}
  .login-shell{width:min(900px,100%);height:min(600px,calc(100vh - 44px));min-height:min(480px,calc(100vh - 44px))}
  .login-form-panel{padding:48px 54px 28px}
  .login-brand-panel{padding:40px 34px 24px}
  .login-form-logo .login-logo-name strong{font-size:32px}
  .login-form-heading h2{font-size:25px}
}
@media(max-width:720px){
  body.resirai-login-active{overflow:auto}
  .login-screen{position:absolute;min-height:100%;padding:12px}
  .login-shell{grid-template-columns:1fr;height:auto;min-height:auto;border-radius:20px}
  .login-form-panel{order:2;padding:34px 24px 26px}
  .login-brand-panel{order:1;min-height:360px;padding:30px 24px 22px}
  /* Stacked layout: the art becomes a normal block with a fixed box again. */
  .login-clinic-art{flex:0 0 auto;height:360px;margin-top:8px;max-width:none;transform:translateY(18px) scale(1.05)}
  .login-brand-footer{margin-top:18px}
  .login-form-logo{margin-bottom:30px}
}
@media(max-width:420px){
  .login-form-panel{padding:28px 18px 22px}
  .login-brand-panel{min-height:310px}
  .login-clinic-art{display:block;height:300px;width:calc(100% + 36px);transform:translateY(14px) scale(1.03)}
  .login-form-logo .login-logo-name strong{font-size:29px}
  .login-form-heading h2{font-size:23px}
}

/* ==========================================================
   Short screens: the login column must fit without scrolling.
   Vertical space is tightened instead of letting the form
   scroll, so the submit button is always visible.
   ========================================================== */
@media (max-height: 900px){
  .login-form-panel{padding:30px 70px 20px}
  .login-form-logo{margin-bottom:22px}
  .login-form-logo .login-logo-tooth{width:46px;height:51px}
  .login-form-logo .login-logo-name strong{font-size:32px}
  .login-form-heading{margin-bottom:18px}
  .login-form-heading h2{font-size:26px;margin-bottom:6px}
  .login-field{margin-bottom:14px}
  .login-field label{margin-bottom:7px}
  .login-field input{height:56px}
  .login-password-toggle{bottom:14px}
  .login-submit{height:56px;margin-top:4px}
  .login-status{min-height:18px}
}
@media (max-height: 740px){
  .login-form-panel{padding:20px 46px 14px}
  .login-form-logo{margin-bottom:14px}
  .login-form-logo .login-logo-tooth{width:38px;height:42px}
  .login-form-logo .login-logo-name strong{font-size:27px}
  .login-form-heading{margin-bottom:12px}
  .login-form-heading h2{font-size:23px}
  .login-field{margin-bottom:11px}
  .login-field input{height:50px}
  .login-password-toggle{bottom:11px}
  .login-submit{height:50px}
  .login-status{min-height:16px}
}