/* ── Hamdoos standalone auth pages ─────────────────────────────
   Split-screen auth (branding panel + centered card), ported from the
   asha-ai-app AuthLayout/Login visual system and recoloured with the
   shop theme. Every color comes from site_config.THEME / NOTICE_STYLES
   via the --t-* variables set in auth_base.html — no hardcoded colors
   in this file (translucency via color-mix on those same tokens).
   Vanilla CSS, RTL-first, 8px spacing rhythm. No shop header/footer. */

.asha-auth-body {
  margin: 0;
  font-family: Vazirmatn, "IRANSans", Tahoma, sans-serif;
  background: var(--t-body-bg);
  color: var(--t-text);
}

.asha-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Branding panel ── */
.asha-auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, var(--t-primary) 0%, var(--t-primary-hover) 100%);
  color: var(--t-surface);
}
.asha-auth-brand .orb {
  position: absolute;
  border-radius: 50%;
  background: color-mix(in srgb, var(--t-surface) 7%, transparent);
  pointer-events: none;
}
.asha-auth-brand .orb-1 { width: 18rem; height: 18rem; top: -6rem; right: -6rem; }
.asha-auth-brand .orb-2 { width: 14rem; height: 14rem; bottom: -5rem; left: -5rem; }
.asha-auth-brand .orb-3 { width: 10rem; height: 10rem; top: 33%; left: 25%; }
.asha-auth-brand .orb-glow {
  position: absolute;
  top: 50%; left: 50%;
  width: 28rem; height: 28rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--t-announce-bg) 22%, transparent) 0%, transparent 65%);
  pointer-events: none;
}
.asha-auth-brand-inner { position: relative; z-index: 1; max-width: 26rem; text-align: right; }
.asha-auth-brand-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.asha-auth-logo-badge {
  width: 3rem; height: 3rem;
  border-radius: 0.9rem;
  background: var(--t-surface);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--t-shadow) 30%, transparent);
}
.asha-auth-logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.asha-auth-brand-name { font-size: 1.4rem; font-weight: 800; line-height: 1.4; color: var(--t-surface); }
.asha-auth-brand-sub { font-size: 0.8rem; color: color-mix(in srgb, var(--t-surface) 72%, transparent); }
.asha-auth-brand-title { font-size: 1.7rem; font-weight: 800; line-height: 1.7; margin: 0 0 0.5rem; color: var(--t-surface); }
.asha-auth-brand-desc { font-size: 1rem; line-height: 2; color: color-mix(in srgb, var(--t-surface) 85%, transparent); margin: 0 0 1.75rem; }
.asha-auth-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.asha-auth-features li { display: flex; align-items: center; gap: 0.65rem; color: color-mix(in srgb, var(--t-surface) 90%, transparent); font-size: 0.92rem; }
.asha-auth-features svg { flex-shrink: 0; color: var(--t-announce-bg); }

/* ── Form side ── */
.asha-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2.5rem;
}
.asha-auth-cardwrap { width: 100%; max-width: 28rem; }
.asha-card {
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  border-radius: 1.1rem;
  box-shadow: 0 12px 40px color-mix(in srgb, var(--t-shadow) 12%, transparent);
  padding: 2rem;
}
.asha-card-head { text-align: center; margin-bottom: 1.5rem; }
.asha-card-logo { display: block; width: auto; max-width: 7.5rem; height: auto; max-height: 2.64rem; margin: 0 auto 1rem; }
/* Embedded variant: full auth (panel + form) inside a store page */
.asha-auth--embedded { min-height: auto; border: 1px solid var(--t-border); border-radius: 1.1rem; overflow: hidden; margin: 2rem 0 3rem; }
.asha-card-title { font-size: 1.35rem; font-weight: 800; margin: 0 0 0.25rem; color: var(--t-text); }
.asha-card-sub { font-size: 0.88rem; color: var(--t-muted); margin: 0; }

/* ── Tabs (segmented) ── */
.asha-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
  background: var(--t-surface-dim);
  border: 1px solid var(--t-border);
  border-radius: 0.8rem;
}
.asha-tab {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--t-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.asha-tab:hover { color: var(--t-text-soft); }
.asha-tab.active {
  background: var(--t-surface);
  color: var(--t-text);
  border-color: var(--t-border);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--t-shadow) 10%, transparent);
}
.asha-tabpane { display: none; }
.asha-tabpane.active { display: block; }

/* ── Fields ── */
.asha-field { margin-bottom: 1rem; }
.asha-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--t-text-soft);
  margin-bottom: 0.4rem;
}
.asha-input {
  width: 100%;
  height: 2.9rem;
  padding: 0 0.9rem;
  border: 1px solid var(--t-border);
  border-radius: 0.65rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--t-text);
  background: var(--t-surface);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.asha-input::placeholder { color: var(--t-placeholder); }
.asha-input:focus {
  outline: none;
  border-color: var(--t-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-primary) 18%, transparent);
}
.asha-input.invalid { border-color: var(--t-error); }
.asha-input-ltr { direction: ltr; text-align: left; }
.asha-input-code {
  direction: ltr;
  text-align: center;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  font-size: 1.15rem;
  font-weight: 600;
}
.asha-hint { font-size: 0.75rem; color: var(--t-muted); margin-top: 0.4rem; }
.asha-error { font-size: 0.78rem; color: var(--t-error-text); margin-top: 0.4rem; }

/* ── Password rules checklist ── */
.asha-pw-rules {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.75rem;
}
.asha-pw-rules li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--t-error-text);
  transition: color 0.2s;
}
.asha-pw-rules li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  transition: background 0.2s;
}
.asha-pw-rules li.ok { color: var(--t-success-text); }
.asha-alert {
  border-radius: 0.65rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.9;
}
.asha-alert-error { background: var(--t-error-bg); border: 1px solid var(--t-error-border); color: var(--t-error-text); }
.asha-alert-ok { background: var(--t-success-bg); border: 1px solid var(--t-success-border); color: var(--t-success-text); }
.asha-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  border-radius: 0.65rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.82rem;
  background: var(--t-announce-bg);
  border: 1px solid var(--t-announce-border);
  color: var(--t-announce);
  margin-bottom: 1rem;
  line-height: 1.9;
}

/* ── Password eye ── */
.asha-passwrap { position: relative; }
.asha-passwrap .asha-input { padding-left: 2.6rem; }
.asha-eye {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.3rem;
  cursor: pointer;
  color: var(--t-muted);
  display: flex;
}
.asha-eye:hover { color: var(--t-text-soft); }
.asha-row-between { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.asha-link {
  background: none; border: none; padding: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--t-primary);
  cursor: pointer;
  text-decoration: none;
}
.asha-link:hover { text-decoration: underline; }

/* ── Captcha ── */
.asha-captcha-img {
  width: auto;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--t-border);
  border-radius: 0.65rem;
  cursor: pointer;
  display: block;
  margin-bottom: 0.6rem;
  background: var(--t-surface-dim);
}
.asha-captcha-row { display: flex; gap: 0.6rem; align-items: stretch; }
.asha-captcha-row .asha-input { flex: 1; }
.asha-refresh {
  flex-shrink: 0;
  width: 2.9rem;
  border: 1px solid var(--t-border);
  border-radius: 0.65rem;
  background: var(--t-surface-dim);
  color: var(--t-primary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.asha-refresh:hover { border-color: var(--t-primary); }
.asha-refresh:disabled { opacity: 0.5; cursor: default; }

/* ── Buttons ── */
.asha-btn {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.65rem;
  background: var(--t-primary);
  color: var(--t-surface);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.asha-btn:hover:not(:disabled) { background: var(--t-primary-hover); }
.asha-btn:disabled { opacity: 0.55; cursor: default; }
.asha-btn-row { display: flex; gap: 0.6rem; }
.asha-btn-row .asha-btn { flex: 1; }
.asha-btn-secondary {
  background: var(--t-surface);
  color: var(--t-primary);
  border: 1.5px solid var(--t-primary);
}
.asha-btn-secondary:hover:not(:disabled) { background: color-mix(in srgb, var(--t-primary) 8%, transparent); }
.asha-timer { font-size: 0.75rem; color: var(--t-muted); }
.asha-foot {
  text-align: center;
  font-size: 0.82rem;
  color: var(--t-muted);
  margin-top: 1.5rem;
}
.asha-support {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 1rem;
  color: var(--t-announce);
}
.asha-support a { color: inherit; font-weight: 700; }

/* ── Modal (forgot-password: unknown / unconfirmed e-mail) ── */
.asha-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: color-mix(in srgb, var(--t-shadow) 55%, transparent);
}
.asha-modal[hidden] { display: none; }
.asha-modal-box {
  width: 100%;
  max-width: 22rem;
  box-sizing: border-box;
  background: var(--t-surface);
  border: 1px solid var(--t-border);
  border-radius: 1rem;
  box-shadow: 0 18px 50px color-mix(in srgb, var(--t-shadow) 28%, transparent);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.asha-modal-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--t-error-bg);
  border: 1px solid var(--t-error-border);
  color: var(--t-error-text);
}
.asha-modal-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--t-text);
}
.asha-modal-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--t-text-soft);
}
.asha-modal-actions { margin-top: 1.25rem; }

@media (min-width: 900px) {
  .asha-auth { flex-direction: row; }
  .asha-auth-brand { width: 46%; max-width: 38rem; padding: 4rem 3rem; }
  .asha-auth-main { padding: 2rem; }
  .asha-auth-card-head .asha-auth-logo-badge { display: none; }
}
@media (max-width: 899px) {
  .asha-auth-brand { padding: 1.75rem 1.25rem 2rem; }
  .asha-auth-brand-desc, .asha-auth-features { display: none; }
  .asha-auth-brand-title { font-size: 1.25rem; margin: 0; }
  .asha-auth-brand-head { margin-bottom: 0.75rem; }
  .asha-card { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .asha-tab, .asha-input, .asha-btn { transition: none; }
}
.asha-tab:focus-visible, .asha-btn:focus-visible, .asha-link:focus-visible,
.asha-input:focus-visible, .asha-eye:focus-visible, .asha-refresh:focus-visible {
  outline: 2px solid var(--t-primary);
  outline-offset: 2px;
}
