@font-face {
  font-display: swap;
  font-family: Ray;
  src: url('../fonts/Ray-Light.woff') format('woff');
  font-style: normal;
  font-weight: 300;
}
@font-face {
  font-display: swap;
  font-family: Ray;
  src: url('../fonts/Ray-Medium.woff') format('woff');
  font-style: normal;
  font-weight: 500;
}
@font-face {
  font-display: swap;
  font-family: Ray;
  src: url('../fonts/Ray-Bold.woff') format('woff');
  font-style: normal;
  font-weight: 700;
}
@font-face {
  font-display: swap;
  font-family: Ray;
  src: url('../fonts/Ray-ExtraBold.woff') format('woff');
  font-style: normal;
  font-weight: 800;
}
@font-face {
  font-display: swap;
  font-family: Ray;
  src: url('../fonts/Ray-Black.woff') format('woff');
  font-style: normal;
  font-weight: 900;
}
@font-face {
  font-display: swap;
  font-family: Ray;
  src: url('../fonts/Ray-ExtraBlack.woff') format('woff');
  font-style: normal;
  font-weight: 950;
}

/* ============================================================
   انیمیشن‌های اپل دیزاین (Apple Design Fluid Springs & Motion)
   ============================================================ */
@keyframes arka-auth-card-enter {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes arka-backdrop-fade {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes arkaViewEnterForward {
  0% {
    opacity: 0;
    transform: translateX(12px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes arkaViewEnterBackward {
  0% {
    opacity: 0;
    transform: translateX(-12px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes arkaViewExitForward {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-10px) scale(0.99);
  }
}

@keyframes arkaViewExitBackward {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(10px) scale(0.99);
  }
}

/* پاپ فنری باکس‌های OTP هنگام لود صفحه */
@keyframes arkaOtpSpringPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.86);
  }
  70% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* پالس و جهش لمسی اپل هنگام تایپ رقم در باکس */
@keyframes arkaOtpDigitPunch {
  0% {
    transform: scale(0.93);
  }
  50% {
    transform: scale(1.09);
  }
  100% {
    transform: scale(1);
  }
}

/* انیمیشن لرزش میراشونده فیزیکی اپل در صورت خطای OTP */
@keyframes arkaOtpDampedShake {
  0%   { transform: translateX(0); }
  15%  { transform: translateX(-8px); }
  30%  { transform: translateX(7px); }
  45%  { transform: translateX(-5px); }
  60%  { transform: translateX(3px); }
  75%  { transform: translateX(-1.5px); }
  90%  { transform: translateX(0.5px); }
  100% { transform: translateX(0); }
}

/* ضربه ملایم فوکوس اینپوت */
@keyframes arkaInputFocusBounce {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.006); }
  100% { transform: scale(1); }
}

@keyframes arka-auth-spin {
  to { transform: rotate(360deg); }
}

@keyframes arka-auth-ripple {
  to { transform: scale(2.6); opacity: 0; }
}

@keyframes arka-auth-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ============================================================
   پوسته اصلی (Base Container & Design System Variables)
   ============================================================ */
.arka-auth-shell {
  --arka-form-primary: var(--ark-primary, #8860ff);
  --arka-form-cta: var(--ark-accent, var(--ark-primary, #1d1d1d));
  --arka-form-accent: var(--arka-form-primary);
  --arka-font: var(--ark-font, var(--ark-font-family-body, Ray, Vazirmatn, Tahoma, sans-serif));
  
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit:  cubic-bezier(0.2, 0, 0.4, 1);
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
  --duration-fast: 120ms;
  --duration-normal: 240ms;
  --duration-slow: 360ms;

  /* متغیرهای پایه و پیش‌فرض در حالت روشن (Light Mode) */
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --input-placeholder: #94a3b8;
  --tab-selector-bg: #f1f5f9;
  --tab-active-bg: #ffffff;
  --tab-text: #64748b;
  --tab-active-text: var(--arka-form-primary);
  --phone-color: var(--text-primary);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --current-radius: var(--radius-lg);

  box-sizing: border-box;
  color: var(--text-primary) !important;
  direction: rtl;
  font-family: var(--arka-font);
  isolation: isolate;
  position: relative;
}

.arka-auth-shell * {
  box-sizing: border-box;
}

.arka-auth-shell input, 
.arka-auth-shell button {
  font: inherit;
}

.arka-auth-shell:not(.arka-auth-modal) {
  margin: 24px auto;
  max-width: 460px;
  width: 100%;
}

.arka-auth-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 999999;
}

.arka-auth-modal[hidden] {
  display: none !important;
}

.arka-auth-shell:not(.arka-auth-modal) .arka-auth-backdrop,
.arka-auth-shell:not(.arka-auth-modal) .arka-auth-close {
  display: none !important;
}

.arka-auth-modal .arka-auth-backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  inset: 0;
  position: fixed;
  animation: arka-backdrop-fade 280ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 250ms var(--ease-out);
}

.arka-auth-card {
  animation: arka-auth-card-enter 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--current-radius);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
  max-width: 460px;
  overflow: hidden;
  padding: 36px;
  position: relative;
  width: 100%;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

/* ============================================================
   تنظیمات پالت رنگی اختصاصی حالت تاریک (Dark Mode Palette)
   ============================================================ */
.arka-auth-shell[data-template="dark"],
.arka-auth-shell.is-dark {
  --bg-color: #0b0f17;
  --card-bg: #131823;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #232a3b;
  --input-bg: #1a202c;
  --input-border: #2d3748;
  --input-placeholder: #718096;
  --tab-selector-bg: #0f131d;
  --tab-active-bg: #222938;
  --tab-text: #94a3b8;
  --tab-active-text: #ffffff;
  --phone-color: #f8fafc;
}

.arka-auth-shell[data-template="dark"] .arka-auth-card,
.arka-auth-shell.is-dark .arka-auth-card {
  background: var(--card-bg, #131823);
  border-color: var(--border-color, #232a3b);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

@media (prefers-color-scheme: dark) {
  .arka-auth-shell[data-dark="true"]:not([data-template="minimal"]):not([data-template="glass"]):not([data-template="floating"]):not([data-template="split"]):not([data-template="neomorphic"]):not([data-template="gradient"]):not([data-template="clay"]):not([data-template="brutalist"]) {
    --bg-color: #0b0f17;
    --card-bg: #131823;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #232a3b;
    --input-bg: #1a202c;
    --input-border: #2d3748;
    --input-placeholder: #718096;
    --tab-selector-bg: #0f131d;
    --tab-active-bg: #222938;
    --tab-text: #94a3b8;
    --tab-active-text: #ffffff;
    --phone-color: #f8fafc;
  }
}

/* ============================================================
   ۱. قالب مینیمال (Minimal)
   ============================================================ */
.arka-auth-shell[data-template="minimal"] {
  --bg-color: #f1f5f9;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --input-placeholder: #94a3b8;
}

.arka-auth-shell[data-template="minimal"]:not(.is-dark) .arka-auth-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 1px 4px rgba(15, 23, 42, 0.04);
}

.arka-auth-shell[data-template="minimal"].is-dark {
  --bg-color: #0b0f17;
  --card-bg: #131823;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #232a3b;
  --input-bg: #1a202c;
  --input-border: #2d3748;
  --input-placeholder: #718096;
}

.arka-auth-shell[data-template="minimal"].is-dark .arka-auth-card {
  background: var(--card-bg, #131823) !important;
  border-color: var(--border-color, #232a3b) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

/* ============================================================
   ۲. قالب شیشه‌ای (Glassmorphism)
   ============================================================ */
.arka-auth-shell[data-template="glass"] {
  --bg-color: rgba(248, 250, 252, 0.85);
  --card-bg: rgba(255, 255, 255, 0.88);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: rgba(255, 255, 255, 0.95);
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-border: rgba(203, 213, 225, 0.8);
  --input-placeholder: #64748b;
}

.arka-auth-shell[data-template="glass"]:not(.is-dark) .arka-auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 1);
}

.arka-auth-shell[data-template="glass"]:not(.is-dark) input:not(.arka-otp-input),
.arka-auth-shell[data-template="glass"]:not(.is-dark) .arka-auth-phone,
.arka-auth-shell[data-template="glass"]:not(.is-dark) .arka-otp-input {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  backdrop-filter: blur(10px);
}

.arka-auth-shell[data-template="glass"].is-dark {
  --bg-color: #080c14;
  --card-bg: rgba(19, 24, 35, 0.85);
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgba(255, 255, 255, 0.16);
  --border-color: rgba(255, 255, 255, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --input-placeholder: #718096;
}

.arka-auth-shell[data-template="glass"].is-dark .arka-auth-card {
  background: var(--card-bg) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.arka-auth-shell[data-template="glass"].is-dark input:not(.arka-otp-input),
.arka-auth-shell[data-template="glass"].is-dark .arka-auth-phone,
.arka-auth-shell[data-template="glass"].is-dark .arka-otp-input {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
}

/* ============================================================
   ۳. قالب شناور (Floating)
   ============================================================ */
.arka-auth-shell[data-template="floating"] {
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-placeholder: #94a3b8;
}

.arka-auth-shell[data-template="floating"]:not(.is-dark) .arka-auth-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 30px 60px -15px color-mix(in srgb, var(--arka-form-primary) 18%, rgba(0,0,0,0.08)), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.arka-auth-shell[data-template="floating"].is-dark {
  --bg-color: #0b0f17;
  --card-bg: #131823;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #232a3b;
  --input-bg: #1a202c;
  --input-border: #2d3748;
  --input-placeholder: #718096;
}

.arka-auth-shell[data-template="floating"].is-dark .arka-auth-card {
  background: var(--card-bg, #131823) !important;
  border-color: var(--border-color, #232a3b) !important;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6) !important;
}

.arka-auth-shell[data-template="floating"] .arka-auth-card::before {
  content: "";
  position: absolute;
  inset: -60px -80px auto auto;
  width: 240px;
  height: 200px;
  background: radial-gradient(circle, color-mix(in srgb, var(--arka-form-primary) 22%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================================
   ۴. قالب دوتکه (Split)
   ============================================================ */
.arka-auth-shell[data-template="split"]:not(.arka-auth-modal) {
  max-width: 860px;
}

.arka-auth-shell[data-template="split"] .arka-auth-card {
  max-width: 860px;
  display: flex;
  padding: 0;
  flex-direction: row-reverse;
}

.arka-auth-shell:not([data-template="split"]) .arka-auth-split-banner {
  display: none !important;
}

.arka-auth-shell:not([data-template="split"]) .arka-auth-split-content {
  display: contents;
}

.arka-auth-shell[data-template="split"] .arka-auth-split-content {
  flex: 1;
  padding: 42px;
  max-width: 450px;
}

.arka-auth-shell[data-template="split"] .arka-auth-split-banner {
  flex: 1.1;
  background-color: var(--arka-form-primary);
  background-image: linear-gradient(135deg, var(--arka-form-primary) 0%, color-mix(in srgb, var(--arka-form-primary) 65%, #1d1d1d) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 42px;
  overflow: hidden;
}

.arka-auth-shell[data-template="split"] .arka-auth-split-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 65%);
}

.arka-auth-shell[data-template="split"] .arka-auth-split-quote {
  position: relative;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
  z-index: 2;
}

/* ============================================================
   ۵. قالب نئومورفیک (Neumorphic)
   ============================================================ */
.arka-auth-shell[data-template="neomorphic"] {
  --bg-color: #e6eaf0;
  --card-bg: #e6eaf0;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --border-color: transparent;
  --input-bg: #e6eaf0;
  --input-border: transparent;
  --input-placeholder: #8c9ba8;
  --tab-selector-bg: #e6eaf0;
}

.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-auth-card {
  background: #e6eaf0;
  border: none;
  box-shadow:
    10px 10px 26px rgba(163, 177, 198, 0.55),
    -10px -10px 26px rgba(255, 255, 255, 0.92);
}

.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) input:not(.arka-otp-input),
.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-auth-phone,
.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-otp-input {
  background: #e6eaf0 !important;
  border: none !important;
  box-shadow:
    inset 4px 4px 9px rgba(163, 177, 198, 0.5),
    inset -4px -4px 9px rgba(255, 255, 255, 0.85);
}

.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) input:focus,
.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-otp-input:focus,
.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-auth-phone:focus-within {
  box-shadow:
    inset 5px 5px 10px rgba(163, 177, 198, 0.6),
    inset -5px -5px 10px rgba(255, 255, 255, 0.9),
    0 0 0 3px color-mix(in srgb, var(--arka-form-primary) 20%, transparent) !important;
}

.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-auth-methods {
  border: none;
  box-shadow:
    inset 3px 3px 7px rgba(163, 177, 198, 0.45),
    inset -3px -3px 7px rgba(255, 255, 255, 0.8);
}

.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-auth-methods button.is-active {
  background: #e6eaf0 !important;
  box-shadow:
    3px 3px 7px rgba(163, 177, 198, 0.5),
    -3px -3px 7px rgba(255, 255, 255, 0.85) !important;
}

.arka-auth-shell[data-template="neomorphic"]:not(.is-dark) .arka-auth-button {
  box-shadow: 5px 5px 12px rgba(163, 177, 198, 0.55), -5px -5px 12px rgba(255, 255, 255, 0.9) !important;
}

.arka-auth-shell[data-template="neomorphic"].is-dark {
  --bg-color: #1a202c;
  --card-bg: #1a202c;
  --input-bg: #1a202c;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --input-placeholder: #718096;
  --tab-selector-bg: #1a202c;
}

.arka-auth-shell[data-template="neomorphic"].is-dark .arka-auth-card {
  background: #1a202c !important;
  border: none !important;
  box-shadow:
    9px 9px 24px rgba(0, 0, 0, 0.55),
    -9px -9px 24px rgba(255, 255, 255, 0.04) !important;
}

.arka-auth-shell[data-template="neomorphic"].is-dark input:not(.arka-otp-input),
.arka-auth-shell[data-template="neomorphic"].is-dark .arka-auth-phone,
.arka-auth-shell[data-template="neomorphic"].is-dark .arka-otp-input {
  background: #1a202c !important;
  border: none !important;
  box-shadow:
    inset 4px 4px 9px rgba(0, 0, 0, 0.55),
    inset -4px -4px 9px rgba(255, 255, 255, 0.04);
}

.arka-auth-shell[data-template="neomorphic"].is-dark .arka-auth-methods {
  border: none;
  box-shadow:
    inset 3px 3px 7px rgba(0, 0, 0, 0.5),
    inset -3px -3px 7px rgba(255, 255, 255, 0.035);
}

.arka-auth-shell[data-template="neomorphic"].is-dark .arka-auth-methods button.is-active {
  background: #1a202c !important;
  box-shadow:
    3px 3px 7px rgba(0, 0, 0, 0.55),
    -3px -3px 7px rgba(255, 255, 255, 0.04) !important;
}

.arka-auth-shell[data-template="neomorphic"].is-dark .arka-auth-button {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.5), -5px -5px 12px rgba(255, 255, 255, 0.04) !important;
}

/* ============================================================
   ۶. قالب گرادینت (Gradient)
   ============================================================ */
.arka-auth-shell[data-template="gradient"] {
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --input-bg: #f8fafc;
  --input-border: #cbd5e1;
  --input-placeholder: #94a3b8;
}

.arka-auth-shell[data-template="gradient"]:not(.is-dark) .arka-auth-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 24px 60px -20px color-mix(in srgb, var(--arka-form-primary) 35%, transparent),
    0 0 0 1px rgba(15, 23, 42, 0.04);
}

.arka-auth-shell[data-template="gradient"].is-dark {
  --bg-color: #0b0f17;
  --card-bg: #131823;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #232a3b;
  --input-bg: #1a202c;
  --input-border: #2d3748;
  --input-placeholder: #718096;
}

.arka-auth-shell[data-template="gradient"].is-dark .arka-auth-card {
  background: var(--card-bg, #131823) !important;
  border: 1px solid var(--border-color, #232a3b) !important;
  box-shadow:
    0 24px 60px -20px color-mix(in srgb, var(--arka-form-primary) 45%, rgba(0, 0, 0, 0.5)),
    0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

.arka-auth-shell[data-template="gradient"] .arka-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--arka-form-primary), var(--arka-form-cta), var(--arka-form-primary));
  background-size: 200% 100%;
  animation: arka-auth-gradient-shift 4s ease infinite;
  z-index: 3;
}

.arka-auth-shell[data-template="gradient"]:not(.is-dark) .arka-auth-view h2 {
  background: linear-gradient(120deg, var(--arka-form-primary), var(--arka-form-cta));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.arka-auth-shell[data-template="gradient"].is-dark .arka-auth-view h2 {
  background: linear-gradient(120deg, var(--arka-form-primary), color-mix(in srgb, var(--arka-form-primary) 40%, #ffffff));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.arka-auth-shell[data-template="gradient"] .arka-auth-button {
  background: linear-gradient(135deg, var(--arka-form-primary) 0%, var(--arka-form-cta) 100%) !important;
  background-size: 160% 160% !important;
  background-position: 0% 50% !important;
  transition: background-position 450ms ease,
              transform 100ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.arka-auth-shell[data-template="gradient"] .arka-auth-button:hover,
.arka-auth-shell[data-template="gradient"] .arka-auth-button:focus-visible {
  background-position: 100% 50% !important;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--arka-form-primary) 40%, transparent) !important;
  transform: translateY(-1px);
}

/* ============================================================
   ۷. قالب خمیری (Claymorphism)
   ============================================================ */
.arka-auth-shell[data-template="clay"] {
  --bg-color: #f1ecfc;
  --card-bg: #f6f2fd;
  --text-primary: #24173d;
  --text-secondary: #5e507b;
  --border-color: #e4d7fa;
  --input-bg: #ffffff;
  --input-border: #e6dbfc;
  --input-placeholder: #9488b0;
  --tab-selector-bg: #ebe0fc;
  --tab-active-bg: #ffffff;
  --tab-text: #5e507b;
  --tab-active-text: color-mix(in srgb, var(--arka-form-primary) 78%, #14082e);
  --phone-color: #24173d;
  --current-radius: 30px;
}

.arka-auth-shell[data-template="clay"].is-dark {
  --bg-color: #120e1d;
  --card-bg: #1c172a;
  --text-primary: #f5f0ff;
  --text-secondary: #b1a6cc;
  --border-color: #2e2642;
  --input-bg: #251e37;
  --input-border: #352b4d;
  --input-placeholder: #7c7097;
  --tab-selector-bg: #181324;
  --tab-active-bg: #2d2443;
  --tab-text: #b1a6cc;
  --tab-active-text: color-mix(in srgb, var(--arka-form-primary) 60%, #ffffff);
  --phone-color: #f5f0ff;
}

.arka-auth-shell[data-template="clay"]:not(.is-dark) .arka-auth-card {
  background: var(--card-bg);
  border: 1px solid #e4d7fa;
  box-shadow:
    0 26px 50px -22px color-mix(in srgb, var(--arka-form-primary) 45%, transparent),
    0 14px 28px -18px rgba(74, 45, 120, 0.28),
    inset 0 3px 4px rgba(255, 255, 255, 0.9),
    inset 0 -6px 14px color-mix(in srgb, var(--arka-form-primary) 7%, transparent);
}

.arka-auth-shell[data-template="clay"].is-dark .arka-auth-card {
  background: var(--card-bg) !important;
  border: 1px solid #2e2642 !important;
  box-shadow:
    0 28px 54px -22px rgba(0, 0, 0, 0.65),
    0 12px 26px -16px color-mix(in srgb, var(--arka-form-primary) 42%, #000000),
    inset 0 2px 3px rgba(255, 255, 255, 0.06),
    inset 0 -6px 16px rgba(0, 0, 0, 0.4) !important;
}

.arka-auth-shell[data-template="clay"] .arka-auth-view input:not(.arka-otp-input),
.arka-auth-shell[data-template="clay"] .arka-auth-phone {
  border-radius: 18px;
  min-height: 52px;
}

.arka-auth-shell[data-template="clay"] .arka-auth-view input:not(.arka-otp-input) {
  padding: 0 16px;
}

.arka-auth-shell[data-template="clay"] .arka-otp-input {
  border-radius: 18px;
}

.arka-auth-shell[data-template="clay"]:not(.is-dark) .arka-auth-view input:not(.arka-otp-input),
.arka-auth-shell[data-template="clay"]:not(.is-dark) .arka-auth-phone,
.arka-auth-shell[data-template="clay"]:not(.is-dark) .arka-otp-input {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  box-shadow:
    6px 7px 15px -7px color-mix(in srgb, var(--arka-form-primary) 34%, transparent),
    -5px -5px 12px -8px rgba(255, 255, 255, 0.9),
    inset 0 2px 3px rgba(255, 255, 255, 0.9),
    inset 0 -3px 6px color-mix(in srgb, var(--arka-form-primary) 9%, transparent);
}

.arka-auth-shell[data-template="clay"].is-dark .arka-auth-view input:not(.arka-otp-input),
.arka-auth-shell[data-template="clay"].is-dark .arka-auth-phone,
.arka-auth-shell[data-template="clay"].is-dark .arka-otp-input {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  box-shadow:
    6px 8px 18px -8px color-mix(in srgb, var(--arka-form-primary) 34%, #05010f),
    inset 0 2px 3px rgba(255, 255, 255, 0.07),
    inset 0 -3px 7px rgba(0, 0, 0, 0.45);
}

.arka-auth-shell[data-template="clay"]:not(.is-dark) .arka-auth-methods {
  border: none;
  border-radius: 18px;
  padding: 5px;
  box-shadow:
    inset 2px 2px 6px color-mix(in srgb, var(--arka-form-primary) 14%, transparent),
    inset -3px -3px 6px rgba(255, 255, 255, 0.9);
}

.arka-auth-shell[data-template="clay"].is-dark .arka-auth-methods {
  border: none;
  border-radius: 18px;
  padding: 5px;
  box-shadow:
    inset 2px 2px 6px rgba(0, 0, 0, 0.5),
    inset -2px -2px 5px rgba(255, 255, 255, 0.04);
}

.arka-auth-shell[data-template="clay"] .arka-auth-methods button {
  border-radius: 14px !important;
}

.arka-auth-shell[data-template="clay"]:not(.is-dark) .arka-auth-methods button.is-active {
  background: var(--tab-active-bg) !important;
  color: var(--tab-active-text) !important;
  box-shadow:
    3px 4px 10px -3px color-mix(in srgb, var(--arka-form-primary) 34%, transparent),
    -2px -2px 6px rgba(255, 255, 255, 0.85),
    inset 0 1px 2px rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-2px) scale(1.02);
}

.arka-auth-shell[data-template="clay"].is-dark .arka-auth-methods button.is-active {
  background: var(--tab-active-bg) !important;
  color: var(--tab-active-text) !important;
  box-shadow:
    3px 4px 10px -3px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.07) !important;
  transform: translateY(-2px) scale(1.02);
}

.arka-auth-shell[data-template="clay"] .arka-auth-button,
.arka-auth-shell[data-template="clay"] button[type="submit"],
.arka-auth-shell[data-template="clay"] button[type="button"].arka-auth-button {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--arka-form-primary) 78%, #ffffff) 0%,
    color-mix(in srgb, var(--arka-form-primary) 90%, #150829) 34%,
    color-mix(in srgb, var(--arka-form-primary) 76%, #150829) 100%) !important;
  border-radius: 20px !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(20, 8, 45, 0.32);
  min-height: 54px;
  height: 54px;
  box-shadow:
    0 16px 26px -10px color-mix(in srgb, var(--arka-form-primary) 60%, transparent),
    0 6px 12px -6px color-mix(in srgb, var(--arka-form-primary) 42%, transparent),
    inset 0 2px 2px rgba(255, 255, 255, 0.5),
    inset 0 -4px 7px color-mix(in srgb, var(--arka-form-primary) 45%, #10052a);
  transition: transform 160ms var(--ease-spring),
              box-shadow 240ms var(--ease-out),
              background 200ms ease;
}

/* ============================================================
   ۸. قالب نئوبروتالیسم (Neo-Brutalism)
   ============================================================ */
.arka-auth-shell[data-template="brutalist"] {
  --bg-color: #fdf6ec;
  --card-bg: #ffffff;
  --text-primary: #111827;
  --text-secondary: #374151;
  --border-color: #111827;
  --input-bg: #ffffff;
  --input-border: #111827;
  --input-placeholder: #6b7280;
  --tab-selector-bg: #f3f4f6;
  --tab-active-bg: var(--arka-form-primary);
  --tab-text: #111827;
  --tab-active-text: #ffffff;
  --current-radius: 12px;
}

.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-auth-card {
  background: #ffffff;
  border: 3px solid #111827;
  box-shadow: 6px 6px 0px #111827;
}

.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-auth-view input:not(.arka-otp-input),
.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-auth-phone,
.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-otp-input {
  background: #ffffff !important;
  border: 2.5px solid #111827 !important;
  box-shadow: 3px 3px 0px #111827;
}

.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-auth-view input:focus,
.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-otp-input:focus,
.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-auth-phone:focus-within {
  border-color: var(--arka-form-primary) !important;
  box-shadow: 4px 4px 0px var(--arka-form-primary) !important;
  transform: translate(-1px, -1px);
}

.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-auth-methods {
  border: 2.5px solid #111827;
  background: #f3f4f6;
  padding: 3px;
  box-shadow: 3px 3px 0px #111827;
}

.arka-auth-shell[data-template="brutalist"]:not(.is-dark) .arka-auth-methods button.is-active {
  background: #111827 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none;
}

.arka-auth-shell[data-template="brutalist"] .arka-auth-button {
  border: 2.5px solid #111827 !important;
  box-shadow: 4px 4px 0px #111827 !important;
  font-weight: 800 !important;
  transition: all 120ms ease !important;
}

.arka-auth-shell[data-template="brutalist"] .arka-auth-button:hover,
.arka-auth-shell[data-template="brutalist"] .arka-auth-button:focus-visible {
  transform: translate(-2px, -2px) !important;
  box-shadow: 6px 6px 0px #111827 !important;
}

.arka-auth-shell[data-template="brutalist"] .arka-auth-button:active {
  transform: translate(2px, 2px) !important;
  box-shadow: 1px 1px 0px #111827 !important;
}

.arka-auth-shell[data-template="brutalist"].is-dark {
  --bg-color: #0d111a;
  --card-bg: #151a26;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #3b4256;
  --input-bg: #0d111a;
  --input-border: #3b4256;
  --tab-selector-bg: #0d111a;
  --tab-active-bg: var(--arka-form-primary);
  --tab-text: #f8fafc;
  --tab-active-text: #ffffff;
}

.arka-auth-shell[data-template="brutalist"].is-dark .arka-auth-card {
  background: #151a26 !important;
  border: 2.5px solid #475569 !important;
  box-shadow: 6px 6px 0px color-mix(in srgb, var(--arka-form-primary) 60%, #000000) !important;
}

.arka-auth-shell[data-template="brutalist"].is-dark input:not(.arka-otp-input),
.arka-auth-shell[data-template="brutalist"].is-dark .arka-auth-phone,
.arka-auth-shell[data-template="brutalist"].is-dark .arka-otp-input {
  background: #0d111a !important;
  border: 2px solid #3b4256 !important;
  box-shadow: 3px 3px 0px #000000;
}

.arka-auth-shell[data-template="brutalist"].is-dark input:focus,
.arka-auth-shell[data-template="brutalist"].is-dark .arka-otp-input:focus,
.arka-auth-shell[data-template="brutalist"].is-dark .arka-auth-phone:focus-within {
  border-color: var(--arka-form-primary) !important;
  box-shadow: 3px 3px 0px var(--arka-form-primary) !important;
}

.arka-auth-shell[data-template="brutalist"].is-dark .arka-auth-methods {
  border: 2px solid #3b4256;
  box-shadow: 3px 3px 0px #000000;
}

.arka-auth-shell[data-template="brutalist"].is-dark .arka-auth-methods button.is-active {
  background: var(--arka-form-primary) !important;
  color: #ffffff !important;
}

.arka-auth-shell[data-template="brutalist"].is-dark .arka-auth-button {
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 4px 4px 0px var(--arka-form-primary) !important;
}

/* ============================================================
   هدر و لوگو (Header & Brand Lockup)
   ============================================================ */
.arka-auth-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.arka-auth-brand {
  align-items: center;
  color: var(--text-primary);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
}

.arka-auth-brand-lockup {
  align-items: center;
  display: flex;
  gap: 10px;
  direction: rtl;
}

.arka-auth-brand img,
.arka-auth-brand-lockup img {
  display: block;
  max-height: 36px !important;
  max-width: 130px !important;
  height: auto;
  width: auto;
  object-fit: contain;
}

.arka-auth-brand-lockup strong {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
  line-height: 1.2;
  white-space: nowrap;
}

.arka-auth-badge {
  background: color-mix(in srgb, var(--arka-form-primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--arka-form-primary) 20%, transparent);
  border-radius: var(--radius-full);
  color: var(--arka-form-primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  white-space: nowrap;
}

.arka-auth-close {
  position: absolute;
  top: 18px;
  left: 18px;
  background: transparent !important;
  border: 0 !important;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 6px;
  border-radius: 50%;
  transition: all 180ms ease;
  z-index: 10;
}

.arka-auth-close:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05) !important;
}

/* ============================================================
   انتخاب‌گر روش‌های ورود (Segmented Control Tabs)
   ============================================================ */
.arka-auth-methods {
  background: var(--tab-selector-bg, rgba(0, 0, 0, 0.05));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(var(--arka-method-count, 2), minmax(0, 1fr));
  margin-top: 20px;
  padding: 4px;
  position: relative;
  transition: background 200ms ease, border-color 200ms ease;
}

.arka-auth-shell .arka-auth-methods button {
  background: transparent !important;
  border: 0 !important;
  border-radius: calc(var(--radius-md) - 4px) !important;
  color: var(--tab-text, var(--text-secondary));
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 40px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: normal !important;
  transition: color 150ms ease,
              transform 90ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background 180ms ease;
}

.arka-auth-shell .arka-auth-methods button:hover {
  color: var(--text-primary);
}

.arka-auth-shell .arka-auth-methods button:active {
  transform: scale(0.96) !important;
  transition-duration: 60ms !important;
}

.arka-auth-shell .arka-auth-methods button.is-active {
  background: var(--tab-active-bg, var(--card-bg)) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  color: var(--tab-active-text, var(--arka-form-primary)) !important;
  transform: scale(1.01);
}

/* ============================================================
   بخش‌های نمایشی فرم (Views & Layout)
   ============================================================ */
.arka-auth-views-wrap {
  display: grid;
  grid-template-columns: 100%;
  position: relative;
  margin-top: 16px;
}

.arka-auth-view {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  will-change: opacity, transform;
}

.arka-auth-view[hidden] {
  display: none !important;
}

.arka-auth-view.is-exiting {
  display: block !important;
  pointer-events: none;
  grid-column: 1;
  grid-row: 1;
}

.arka-auth-view h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--text-primary) !important;
}

.arka-auth-view p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 20px;
}

.arka-auth-view label {
  color: var(--text-primary) !important;
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 8px;
}

/* ============================================================
   فیلدهای ورودی و استایل‌های متنی (Inputs & Placeholders)
   ============================================================ */
.arka-auth-view input:not(.arka-otp-input) {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  font-size: 14px;
  min-height: 48px;
  outline: none;
  padding: 0 14px;
  width: 100%;
  transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow   180ms cubic-bezier(0.16, 1, 0.3, 1),
              background   180ms ease;
}

.arka-auth-view input:not(.arka-otp-input):focus {
  border-color: var(--arka-form-primary) !important;
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--arka-form-primary) 18%, transparent) !important;
  animation: arkaInputFocusBounce 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* فیلد اختصاصی شماره موبایل (بدون +۹۸) */
.arka-auth-phone {
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--input-border, var(--border-color));
  border-radius: var(--radius-md);
  display: flex;
  direction: ltr;
  min-height: 48px;
  overflow: hidden;
  position: relative;
  transition: border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow   180ms cubic-bezier(0.16, 1, 0.3, 1),
              background   180ms ease;
}

.arka-auth-phone:focus-within {
  border-color: var(--arka-form-primary) !important;
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--arka-form-primary) 18%, transparent) !important;
}

.arka-auth-phone input {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--phone-color, var(--text-primary)) !important;
  -webkit-text-fill-color: var(--phone-color, var(--text-primary)) !important;
  direction: ltr;
  text-align: right;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0 16px;
  width: 100%;
  min-height: 48px;
  outline: none;
}

/* کنتراست بالای Placeholder */
.arka-auth-shell input::placeholder,
.arka-auth-shell input::-webkit-input-placeholder,
.arka-auth-shell input::-moz-placeholder,
.arka-auth-shell input:-ms-input-placeholder {
  color: var(--input-placeholder, #94a3b8) !important;
  -webkit-text-fill-color: var(--input-placeholder, #94a3b8) !important;
  opacity: 1 !important;
  font-weight: 500;
}

.arka-auth-shell input {
  color: var(--text-primary, #0f172a) !important;
  -webkit-text-fill-color: var(--text-primary, #0f172a) !important;
}

.arka-auth-shell .arka-auth-phone input,
.arka-auth-shell input[name="arka_auth_phone"],
.arka-auth-shell input[name="arka_mobile_login_phone"],
.arka-auth-shell input[name="arka_reset_phone"] {
  color: var(--phone-color, var(--text-primary, #0f172a)) !important;
  -webkit-text-fill-color: var(--phone-color, var(--text-primary, #0f172a)) !important;
}

/* حل تداخل رنگ در Autofill مرورگر */
.arka-auth-shell input:-webkit-autofill,
.arka-auth-shell input:-webkit-autofill:hover,
.arka-auth-shell input:-webkit-autofill:focus,
.arka-auth-shell input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg, #f8fafc) inset !important;
  -webkit-text-fill-color: var(--text-primary, #0f172a) !important;
  box-shadow: 0 0 0 1000px var(--input-bg, #f8fafc) inset !important;
  color: var(--text-primary, #0f172a) !important;
  caret-color: var(--text-primary, #0f172a) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.arka-auth-phone input:-webkit-autofill,
.arka-auth-phone input:-webkit-autofill:hover,
.arka-auth-phone input:-webkit-autofill:focus,
.arka-auth-phone input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg, #f8fafc) inset !important;
  -webkit-text-fill-color: var(--phone-color, var(--text-primary, #0f172a)) !important;
  box-shadow: 0 0 0 1000px var(--input-bg, #f8fafc) inset !important;
  color: var(--phone-color, var(--text-primary, #0f172a)) !important;
  caret-color: var(--phone-color, var(--text-primary, #0f172a)) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ============================================================
   باکس‌های ورود کد تأیید (Apple-style OTP Digit Boxes)
   ============================================================ */
.arka-otp-group {
  display: flex;
  gap: 8px;
  direction: ltr;
  justify-content: space-between;
  margin: 16px 0 20px;
}

.arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input {
  animation: arkaOtpSpringPop 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input:nth-child(1) { animation-delay: 0ms; }
.arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input:nth-child(2) { animation-delay: 25ms; }
.arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input:nth-child(3) { animation-delay: 50ms; }
.arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input:nth-child(4) { animation-delay: 75ms; }
.arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input:nth-child(5) { animation-delay: 100ms; }
.arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input:nth-child(6) { animation-delay: 125ms; }

.arka-otp-group.is-error {
  animation: arkaOtpDampedShake 420ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.arka-otp-input {
  width: 48px;
  height: 54px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border, var(--border-color));
  border-radius: var(--radius-md);
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  font-family: inherit;
  font-size: 22px !important;
  font-weight: 800;
  text-align: center;
  outline: none;
  direction: ltr;
  transition: transform 140ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 180ms ease,
              box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1),
              background 180ms ease;
}

.arka-otp-input:focus {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--arka-form-primary) !important;
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--arka-form-primary) 20%, transparent),
              0 6px 14px -4px color-mix(in srgb, var(--arka-form-primary) 22%, transparent);
}

.arka-otp-input.is-punch {
  animation: arkaOtpDigitPunch 180ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.arka-otp-input.is-filled {
  border-color: color-mix(in srgb, var(--arka-form-primary) 60%, var(--input-border, var(--border-color)));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.arka-otp-group.is-error .arka-otp-input {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.18) !important;
}

.arka-auth-code-hidden {
  display: none !important;
}

/* ============================================================
   دکمهٔ اصلی و تعاملات لمسی (Tactile Buttons & CTAs)
   ============================================================ */
.arka-auth-shell .arka-auth-button,
.arka-auth-shell button[type="submit"],
.arka-auth-shell button[type="button"].arka-auth-button {
  align-items: center !important;
  background: var(--arka-form-cta) !important;
  border: 0 !important;
  border-radius: var(--radius-md) !important;
  color: #ffffff !important;
  cursor: pointer;
  display: flex !important;
  font-size: 14px;
  font-weight: 800;
  justify-content: center !important;
  text-align: center !important;
  line-height: normal !important;
  margin-top: 22px;
  min-height: 50px;
  height: 50px;
  outline: none;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--arka-form-cta) 22%, transparent);
  transition: transform 90ms cubic-bezier(0.16, 1, 0.3, 1),
              background 180ms ease,
              box-shadow  200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.arka-auth-button:hover,
.arka-auth-button:focus-visible {
  background: var(--arka-form-primary) !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--arka-form-primary) 32%, transparent);
  transform: translateY(-1px);
}

.arka-auth-button:active {
  transform: scale(0.97) !important;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--arka-form-cta) 18%, transparent) !important;
  transition-duration: 60ms !important;
}

.arka-auth-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.arka-auth-button.is-loading {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  pointer-events: none;
}

.arka-auth-button.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: arka-auth-spin 0.65s linear infinite;
}

.arka-auth-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: arka-auth-ripple 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.arka-auth-shell .arka-auth-link, 
.arka-auth-shell .arka-auth-back {
  background: transparent !important;
  border: 0 !important;
  color: var(--arka-form-primary) !important;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  margin-top: 14px;
  padding: 4px 0;
  text-align: right;
  transition: opacity 150ms ease, transform 90ms ease;
  display: inline-block;
}

.arka-auth-link:active, .arka-auth-back:active {
  opacity: 0.7;
  transform: scale(0.98);
}

.arka-auth-link:disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
}

.arka-auth-back {
  margin: 0 0 10px;
}

.arka-auth-notice {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  margin-top: 16px;
  min-height: 22px;
  text-align: center;
  transition: all 200ms ease;
}

.arka-auth-notice[data-type="error"] {
  color: #ef4444;
}

.arka-auth-notice[data-type="success"] {
  color: #10b981;
}

/* ============================================================
   واکنش‌گرایی (Responsive)
   ============================================================ */
@media (max-width: 768px) {
  .arka-auth-shell[data-template="split"] .arka-auth-card {
    flex-direction: column-reverse;
  }
  .arka-auth-shell[data-template="split"] .arka-auth-split-banner {
    min-height: 180px;
    padding: 24px;
  }
  .arka-auth-shell[data-template="split"] .arka-auth-split-content {
    padding: 28px 20px;
  }
  .arka-auth-card {
    padding: 28px 20px;
  }
}

/* ============================================================
   دسترس‌پذیری و کاهش حرکت (Accessibility & Reduced Motion)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .arka-auth-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .arka-auth-view {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .arka-otp-input {
    transition: border-color 150ms ease, box-shadow 150ms ease !important;
    transform: none !important;
  }

  .arka-otp-input:focus {
    transform: none !important;
  }

  .arka-auth-button,
  .arka-auth-button:hover,
  .arka-auth-button:active {
    transform: none !important;
    transition: background 150ms ease, box-shadow 150ms ease !important;
  }

  .arka-otp-group.is-error {
    animation: none !important;
  }

  .arka-otp-group.is-error .arka-otp-input {
    border-color: #ef4444 !important;
  }

  .arka-auth-view.is-exiting {
    animation: none !important;
    opacity: 0 !important;
  }

  .arka-auth-view[data-arka-view="otp"]:not([hidden]) .arka-otp-input {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .arka-auth-view input:focus {
    animation: none !important;
  }

  .arka-auth-shell[data-template="gradient"] .arka-auth-card::before {
    animation: none !important;
  }

  .arka-auth-ripple {
    animation: none !important;
    display: none !important;
  }

  .arka-auth-button.is-loading::after {
    animation-duration: 1.2s !important;
  }
}

/* ============================================================
   قرنطینه و تضمین نمایش ۱۰۰٪ منطبق پیش‌نمایش در پنل مدیریت وردپرس
   (WordPress Admin Isolation & High-Specificity Reset)
   ============================================================ */
.arka-preview .arka-auth-shell,
#wpbody-content .arka-preview .arka-auth-shell {
  max-width: 100% !important;
  margin: 0 auto !important;
  font-family: var(--arka-font) !important;
  direction: rtl !important;
  box-sizing: border-box !important;
}

.arka-preview .arka-auth-shell .arka-auth-card,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-card {
  margin: 0 auto !important;
}

/* ریست کامل استایل‌های فرم هسته ادمین وردپرس روی تمام اینپوت‌ها */
.arka-preview .arka-auth-shell input:not(.arka-otp-input),
#wpbody-content .arka-preview .arka-auth-shell input:not(.arka-otp-input) {
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: normal !important;
  min-height: 48px !important;
  height: 48px !important;
  max-height: 48px !important;
  padding: 0 14px !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
}

.arka-preview .arka-auth-shell input:not(.arka-otp-input):focus,
#wpbody-content .arka-preview .arka-auth-shell input:not(.arka-otp-input):focus {
  border-color: var(--arka-form-primary) !important;
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--arka-form-primary) 18%, transparent) !important;
}

/* فیلد ورودی شماره موبایل در پیش‌نمایش */
.arka-preview .arka-auth-shell .arka-auth-phone,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-phone {
  align-items: center !important;
  background: var(--input-bg) !important;
  border: 1px solid var(--input-border, var(--border-color)) !important;
  border-radius: var(--radius-md) !important;
  display: flex !important;
  direction: ltr !important;
  min-height: 48px !important;
  height: 48px !important;
  max-height: 48px !important;
  overflow: hidden !important;
  position: relative !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.arka-preview .arka-auth-shell .arka-auth-phone:focus-within,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-phone:focus-within {
  border-color: var(--arka-form-primary) !important;
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--arka-form-primary) 18%, transparent) !important;
}

.arka-preview .arka-auth-shell .arka-auth-phone input,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-phone input {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--phone-color, var(--text-primary)) !important;
  -webkit-text-fill-color: var(--phone-color, var(--text-primary)) !important;
  direction: ltr !important;
  text-align: right !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  padding: 0 16px !important;
  width: 100% !important;
  min-height: 48px !important;
  height: 48px !important;
  max-height: 48px !important;
  outline: none !important;
  margin: 0 !important;
}

/* باکس‌های ارقام OTP در پیش‌نمایش */
.arka-preview .arka-auth-shell .arka-otp-input,
#wpbody-content .arka-preview .arka-auth-shell .arka-otp-input {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 54px !important;
  min-height: 54px !important;
  max-height: 54px !important;
  background: var(--input-bg) !important;
  border: 1.5px solid var(--input-border, var(--border-color)) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  font-family: inherit !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  text-align: center !important;
  line-height: 54px !important;
  outline: none !important;
  direction: ltr !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.arka-preview .arka-auth-shell .arka-otp-input:focus,
#wpbody-content .arka-preview .arka-auth-shell .arka-otp-input:focus {
  transform: translateY(-2px) scale(1.04) !important;
  border-color: var(--arka-form-primary) !important;
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--arka-form-primary) 20%, transparent),
              0 6px 14px -4px color-mix(in srgb, var(--arka-form-primary) 22%, transparent) !important;
}

/* دکمه پیش‌نمایش */
.arka-preview .arka-auth-shell .arka-auth-button,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-button {
  align-items: center !important;
  background: var(--arka-form-cta) !important;
  border: 0 !important;
  border-radius: var(--radius-md) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  cursor: pointer !important;
  display: flex !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: normal !important;
  margin-top: 22px !important;
  min-height: 50px !important;
  height: 50px !important;
  max-height: 50px !important;
  outline: none !important;
  padding: 0 20px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--arka-form-cta) 22%, transparent) !important;
}

.arka-preview .arka-auth-shell[data-template="gradient"] .arka-auth-button,
#wpbody-content .arka-preview .arka-auth-shell[data-template="gradient"] .arka-auth-button {
  background: linear-gradient(135deg, var(--arka-form-primary) 0%, var(--arka-form-cta) 100%) !important;
}

.arka-preview .arka-auth-shell[data-template="clay"] .arka-auth-button,
#wpbody-content .arka-preview .arka-auth-shell[data-template="clay"] .arka-auth-button {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--arka-form-primary) 78%, #ffffff) 0%,
    color-mix(in srgb, var(--arka-form-primary) 90%, #150829) 34%,
    color-mix(in srgb, var(--arka-form-primary) 76%, #150829) 100%) !important;
  border-radius: 20px !important;
}

.arka-preview .arka-auth-shell[data-template="brutalist"] .arka-auth-button,
#wpbody-content .arka-preview .arka-auth-shell[data-template="brutalist"] .arka-auth-button {
  border: 2.5px solid #111827 !important;
  box-shadow: 4px 4px 0px #111827 !important;
}

/* تیترها و متون پیش‌نمایش */
.arka-preview .arka-auth-shell .arka-auth-view h2,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-view h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.35 !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  color: var(--text-primary) !important;
}

.arka-preview .arka-auth-shell[data-template="gradient"]:not(.is-dark) .arka-auth-view h2,
#wpbody-content .arka-preview .arka-auth-shell[data-template="gradient"]:not(.is-dark) .arka-auth-view h2 {
  background: linear-gradient(120deg, var(--arka-form-primary), var(--arka-form-cta)) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.arka-preview .arka-auth-shell[data-template="gradient"].is-dark .arka-auth-view h2,
#wpbody-content .arka-preview .arka-auth-shell[data-template="gradient"].is-dark .arka-auth-view h2 {
  background: linear-gradient(120deg, var(--arka-form-primary), color-mix(in srgb, var(--arka-form-primary) 40%, #ffffff)) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.arka-preview .arka-auth-shell .arka-auth-view p,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-view p {
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
}

.arka-preview .arka-auth-shell .arka-auth-view label,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-view label {
  color: var(--text-primary) !important;
  display: block !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  margin: 16px 0 8px !important;
  padding: 0 !important;
}

/* تب‌های پیش‌نمایش */
.arka-preview .arka-auth-shell .arka-auth-methods,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-methods {
  background: var(--tab-selector-bg, rgba(0, 0, 0, 0.05)) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  display: grid !important;
  gap: 4px !important;
  grid-template-columns: repeat(var(--arka-method-count, 2), minmax(0, 1fr)) !important;
  margin-top: 20px !important;
  padding: 4px !important;
}

.arka-preview .arka-auth-shell .arka-auth-methods button,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-methods button {
  background: transparent !important;
  border: 0 !important;
  border-radius: calc(var(--radius-md) - 4px) !important;
  color: var(--tab-text, var(--text-secondary)) !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  min-height: 40px !important;
  height: 40px !important;
  max-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: normal !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.arka-preview .arka-auth-shell .arka-auth-methods button.is-active,
#wpbody-content .arka-preview .arka-auth-shell .arka-auth-methods button.is-active {
  background: var(--tab-active-bg, var(--card-bg)) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  color: var(--tab-active-text, var(--arka-form-primary)) !important;
}
