/* Bargchi Auth UI 8.3 — refined crisp login/OTP */
@font-face{font-family:'BargchiYekan';src:url('../../fonts/yekan/woff/iranyekanwebregularfanum.woff') format('woff');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'BargchiYekan';src:url('../../fonts/yekan/woff/iranyekanwebmediumfanum.woff') format('woff');font-style:normal;font-weight:500;font-display:swap}
@font-face{font-family:'BargchiYekan';src:url('../../fonts/yekan/woff/iranyekanwebboldfanum.woff') format('woff');font-style:normal;font-weight:700;font-display:swap}
@font-face{font-family:'BargchiYekan';src:url('../../fonts/yekan/woff/iranyekanwebextraboldfanum.woff') format('woff');font-style:normal;font-weight:800;font-display:swap}

:root{
  --bargchi-navy:#103a67;
  --bargchi-navy-hover:#0b315a;
  --bargchi-orange:#ef6c22;
  --bargchi-text:#1f2937;
  --bargchi-text-strong:#111827;
  --bargchi-muted:#667085;
  --bargchi-border:#d9dee5;
  --bargchi-border-hover:#aeb7c2;
  --bargchi-input:#ffffff;
  --bargchi-error:#c73535;
  --bargchi-white:#ffffff;
}

*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#fff}
body.bargchi-auth-page{
  direction:rtl;
  color:var(--bargchi-text);
  background:#fff;
  font-family:'BargchiYekan',Tahoma,Arial,sans-serif;
  font-weight:400;
  -webkit-font-smoothing:subpixel-antialiased;
  -moz-osx-font-smoothing:auto;
  text-rendering:auto;
  font-synthesis:none;
}
button,input,select{font:inherit}
button{font-family:inherit}

.bargchi-auth{
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 18px;
}

.bargchi-auth__panel{
  width:404px;
  max-width:100%;
  background:var(--bargchi-white);
  border:1px solid #dfe3e8;
  border-radius:10px;
  padding:29px 32px 27px;
  box-shadow:0 1px 2px rgba(16,24,40,.025);
}
.bargchi-auth__panel--register{width:572px;padding:29px 32px 28px}

.bargchi-auth__brand-row{
  min-height:48px;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:27px;
}
.bargchi-auth__back{
  position:absolute;
  right:-2px;
  top:5px;
  width:32px;
  height:32px;
  padding:0;
  margin:0;
  border:0;
  background:transparent !important;
  color:#111827;
  cursor:pointer;
  border-radius:0;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  transition:color .12s ease,opacity .12s ease;
}
.bargchi-auth__back:hover{
  background:transparent !important;
  color:#111827;
  opacity:.78;
}
.bargchi-auth__back:active{opacity:.62}
.bargchi-auth__back:focus-visible{
  outline:2px solid rgba(17,24,39,.14);
  outline-offset:3px;
}
/* Force the Digikala-style back arrow even if an older SVG is still cached in the PHP template. */
.bargchi-auth__back svg{display:none !important}
.bargchi-auth__back::before{
  content:"→";
  display:block;
  font-family:Arial,Tahoma,sans-serif;
  font-size:27px;
  font-weight:400;
  line-height:1;
  letter-spacing:0;
  transform:translateY(-1px);
  color:currentColor;
}


.bargchi-auth__logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  color:var(--bargchi-navy);
  text-decoration:none;
}
.bargchi-auth__logo img{display:block;width:41px;height:41px;object-fit:contain}
.bargchi-auth__logo strong{font-size:29px;font-weight:800;line-height:1;letter-spacing:-1.15px;color:var(--bargchi-navy)}

.bargchi-auth__step[hidden]{display:none!important}
.bargchi-auth__step{animation:none}

.bargchi-auth__heading{margin:0 0 24px}
.bargchi-auth__heading h1{
  margin:0 0 8px;
  color:var(--bargchi-text-strong);
  font-size:19px;
  line-height:1.65;
  font-weight:700;
  letter-spacing:-.25px;
}
.bargchi-auth__heading p{
  margin:0;
  color:var(--bargchi-muted);
  font-size:13.5px;
  line-height:1.9;
  font-weight:400;
}
.bargchi-auth__heading--otp{margin-bottom:18px}

/* Default field styles (also used on OTP and register page). */
.bargchi-auth__field{display:block;margin:0;position:relative}
.bargchi-auth__field>span{display:block;margin:0 0 7px;color:#344054;font-size:12.5px;line-height:1.5;font-weight:500}
.bargchi-auth__field>span em{font-style:normal;color:#d04444;font-size:11px}
.bargchi-auth__field input,.bargchi-auth__field select{
  display:block;
  width:100%;
  height:52px;
  padding:0 14px;
  border:1px solid var(--bargchi-border);
  border-radius:8px;
  background:var(--bargchi-input);
  color:#1d2939;
  outline:0;
  font-size:15px;
  font-weight:400;
  line-height:1;
  transition:border-color .13s ease,box-shadow .13s ease,background-color .13s ease;
}
.bargchi-auth__field input:hover,.bargchi-auth__field select:hover{border-color:var(--bargchi-border-hover)}
.bargchi-auth__field input:focus,.bargchi-auth__field select:focus{border-color:var(--bargchi-navy);box-shadow:0 0 0 1px var(--bargchi-navy)}

/* Login mobile input: behaves like a real product-auth field.
   Empty: label sits inside the field.
   Focused / filled: label moves onto the border. */
.bargchi-auth__field--floating{margin-top:1px}
.bargchi-auth__field--floating input{
  direction:ltr;
  text-align:left;
  padding:0 15px;
  font-size:15.5px;
  font-weight:500;
  letter-spacing:.05px;
  font-variant-numeric:tabular-nums;
}
.bargchi-auth__field--floating>span{
  position:absolute;
  z-index:2;
  right:14px;
  top:26px;
  transform:translateY(-50%);
  margin:0;
  padding:0;
  color:#596273;
  background:#fff;
  font-size:13.5px;
  line-height:1;
  font-weight:400;
  pointer-events:none;
  transition:top .13s ease,font-size .13s ease,color .13s ease,padding .13s ease;
}
.bargchi-auth__field--floating input:focus+span,
.bargchi-auth__field--floating input:not(:placeholder-shown)+span{
  top:0;
  padding:0 5px;
  color:#344054;
  font-size:11.5px;
  font-weight:500;
}
.bargchi-auth__field--floating input:focus+span{color:var(--bargchi-navy)}

.bargchi-auth__primary{
  position:relative;
  width:100%;
  height:50px;
  margin-top:18px;
  border:0;
  border-radius:8px;
  background:var(--bargchi-navy);
  color:#fff;
  font-size:14.5px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
  transition:background-color .12s ease,transform .08s ease;
}
.bargchi-auth__primary:hover{background:var(--bargchi-navy-hover)}
.bargchi-auth__primary:active{transform:translateY(1px)}
.bargchi-auth__primary:focus-visible{outline:3px solid rgba(16,58,103,.17);outline-offset:2px}
.bargchi-auth__primary:disabled{opacity:.58;cursor:default}
.bargchi-auth__primary.is-loading span{opacity:0}
.bargchi-auth__primary.is-loading:after{
  content:"";
  position:absolute;
  width:18px;height:18px;
  top:50%;left:50%;
  margin:-9px 0 0 -9px;
  border:2px solid rgba(255,255,255,.42);
  border-top-color:#fff;
  border-radius:50%;
  animation:bargchiSpin .65s linear infinite;
}
@keyframes bargchiSpin{to{transform:rotate(360deg)}}

.bargchi-auth__legal{
  margin:18px -8px 0;
  text-align:center;
  color:#596273;
  font-size:11.2px;
  line-height:1.8;
  font-weight:400;
  white-space:nowrap;
  letter-spacing:-.08px;
}
.bargchi-auth__legal strong{color:#344054;font-weight:700}
.bargchi-auth__legal a{
  color:var(--bargchi-navy);
  font-weight:700;
  text-decoration:none;
  text-underline-offset:3px;
}
.bargchi-auth__legal a:hover{color:var(--bargchi-orange);text-decoration:underline}
.bargchi-auth__legal a:focus-visible{outline:2px solid rgba(16,58,103,.2);outline-offset:2px;border-radius:2px}

.bargchi-auth__inline-error{margin:9px 1px -2px;color:var(--bargchi-error);font-size:12px;line-height:1.8;font-weight:500}

/* OTP */

.bargchi-auth__otp-message{white-space:normal;max-width:100%;color:#475467!important;font-size:13.4px!important;line-height:2.05!important;font-weight:500!important;letter-spacing:0!important}
.bargchi-auth__otp-message strong{color:#182230;font-weight:700}
.bargchi-auth__otp-meta{justify-content:center;min-height:34px;margin-top:8px}
.bargchi-auth__otp-meta>span{color:#344054;font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}
.bargchi-auth__otp-meta button[hidden]{display:none!important}

.bargchi-auth__otp-field input{direction:ltr;text-align:center;font-size:23px;font-weight:700;letter-spacing:10px;font-variant-numeric:tabular-nums;color:#101828}
.bargchi-auth__otp-meta{min-height:38px;display:flex;align-items:center;justify-content:center;gap:12px;margin-top:6px;color:#667085;font-size:12px}
.bargchi-auth__otp-meta button{border:0;background:none;padding:2px 0;color:var(--bargchi-orange);font:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
.bargchi-auth__otp-meta button:disabled{color:#98a2b3;cursor:default}

/* Registration styles retained for the separate /register/ page. */
.bargchi-auth__phone-line{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:11px;margin:-2px 0 20px;padding:0 0 15px;border-bottom:1px solid #e4e7ec;font-size:11.5px}
.bargchi-auth__phone-line>span{color:#858a92}.bargchi-auth__phone-line strong{direction:ltr;text-align:right;font-size:13px;font-weight:700;color:#25282e}.bargchi-auth__phone-line a{color:var(--bargchi-orange);font-weight:700;text-decoration:none}
.bargchi-auth__form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 12px}.bargchi-auth__field--wide{grid-column:1/-1}.bargchi-auth__address-mini{grid-column:1/-1;display:grid;grid-template-columns:84px 84px 1fr;gap:12px}.bargchi-auth__field--postcode{grid-column:auto}
.bargchi-auth-page--register .bargchi-auth{align-items:flex-start;padding-top:24px;padding-bottom:24px}.bargchi-auth-page--register .bargchi-auth__heading{margin-bottom:18px}.bargchi-auth-page--register .bargchi-auth__primary{margin-top:20px}

.bargchi-auth[data-ui-version="8.3.0"]{}

@media(max-width:620px){
  .bargchi-auth__legal{white-space:normal;margin-left:0;margin-right:0;font-size:11.5px}
  .bargchi-auth{align-items:flex-start;padding:0}
  .bargchi-auth__panel,.bargchi-auth__panel--register{width:100%;max-width:none;min-height:100dvh;border:0;border-radius:0;padding:24px 20px 30px;box-shadow:none}
  .bargchi-auth__brand-row{margin-bottom:29px}
  .bargchi-auth-page--register .bargchi-auth{padding:0}
  .bargchi-auth-page--register .bargchi-auth__brand-row{margin-bottom:22px}
  .bargchi-auth__form-grid{grid-template-columns:1fr}
  .bargchi-auth__field--wide{grid-column:auto}
  .bargchi-auth__address-mini{grid-column:auto;grid-template-columns:1fr 1fr}
  .bargchi-auth__address-mini .bargchi-auth__field--postcode{grid-column:1/-1}
}

/* V8.3 clarity pass: darker copy, no composited text animation, crisp Windows rendering. */
.bargchi-auth__heading h1{color:#182230;font-weight:700}
.bargchi-auth__heading p{color:#475467;font-weight:500}
.bargchi-auth__otp-field{margin-top:2px}
