/* ==================================================
   GALILE — account.css
   صفحه حساب کاربری (ورود / ثبت‌نام)
   ================================================== */

/* ============================================
   ۱. بخش ورود (Auth)
   ============================================ */
.auth-section {
  padding: 140px 20px 80px;
  background: var(--bg);
  min-height: 70vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 32px 36px;
  box-shadow: var(--shadow-md);
  position: relative;
}

/* ============================================
   ۲. تب‌های ورود / ثبت‌نام
   ============================================ */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  background: var(--bg-alt);
  border-radius: var(--radius-pill);
  margin-bottom: 32px;
}

.auth-tab {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: inherit;
}

.auth-tab:hover {
  color: var(--ink);
}

.auth-tab.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(23, 23, 25, 0.15);
}

/* ============================================
   ۳. مراحل
   ============================================ */
.auth-step {
  display: none;
}

.auth-step.active {
  display: block;
  animation: authFadeIn 0.4s var(--ease);
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 24px;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.4;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.8;
}

.auth-subtitle strong {
  color: var(--ink);
  font-family: var(--ff-en);
  letter-spacing: 0.02em;
  direction: ltr;
  display: inline-block;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ورودی‌ها */
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px 14px;
  transition: all 0.3s var(--ease);
  background: var(--bg);
}

.auth-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.auth-prefix {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  padding-left: 10px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  direction: ltr;
  user-select: none;
}

.auth-prefix-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 15px;
  padding-left: 10px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
}

.auth-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
  font-family: inherit;
}

.auth-input-wrap[dir="ltr"] .auth-input {
  font-family: var(--ff-en);
  letter-spacing: 0.04em;
  text-align: left;
  direction: ltr;
}

.auth-input::placeholder {
  color: var(--text-faint);
  font-size: 13.5px;
  letter-spacing: 0;
}

/* فیلد نام (بدون dir) */
.auth-name-wrap .auth-input {
  text-align: right;
  direction: rtl;
}

.auth-error {
  font-size: 12px;
  color: #e63946;
  min-height: 16px;
  text-align: right;
  margin: -4px 0 0;
  padding: 0 4px;
  line-height: 1.5;
}

.auth-submit {
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14.5px;
  margin-top: 4px;
}

/* لینک پایین (ورود / ثبت‌نام) */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.auth-switch-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  font-family: inherit;
  transition: opacity 0.3s;
}

.auth-switch-btn:hover {
  opacity: 0.75;
}

/* دکمه بازگشت */
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-soft);
  margin-bottom: 20px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
  font-family: inherit;
}

.auth-back:hover {
  color: var(--gold);
}

.auth-back i {
  font-size: 11px;
}

/* OTP */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  direction: ltr;
  margin-bottom: 8px;
}

.otp-input {
  width: 52px;
  height: 60px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--ff-en);
  color: var(--ink);
  outline: none;
  transition: all 0.3s var(--ease);
  background: var(--bg);
  padding: 0;
}

.otp-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.otp-input.filled {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.otp-timer {
  font-size: 12px;
  color: var(--text-soft);
  text-align: center;
  margin: 6px 0 0;
}

.otp-timer strong {
  color: var(--ink);
  font-family: var(--ff-en);
  font-weight: 700;
  font-size: 13px;
}

.otp-resend {
  text-align: center;
  margin: 6px 0 0;
}

.otp-resend button {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  transition: all 0.3s var(--ease);
  font-family: inherit;
}

.otp-resend button:hover {
  gap: 10px;
}

@media (max-width: 480px) {
  .auth-section {
    padding: 110px 16px 60px;
  }
  .auth-card {
    padding: 26px 20px 30px;
  }
  .otp-input {
    width: 44px;
    height: 52px;
    font-size: 20px;
  }
  .otp-inputs {
    gap: 6px;
  }
}

/* ============================================
   ۴. داشبورد
   ============================================ */
.account-section {
  padding: 140px 0 80px;
  background: var(--bg);
  min-height: 70vh;
}

.account-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.account-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.account-welcome {
  font-size: 13.5px;
  color: var(--text-soft);
}

.account-welcome strong {
  color: var(--ink);
  font-weight: 700;
}

.account-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: inherit;
}

.account-logout:hover {
  border-color: #e63946;
  color: #e63946;
  background: rgba(230, 57, 70, 0.06);
}

.account-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.account-tabs::-webkit-scrollbar {
  display: none;
}

.account-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: inherit;
  white-space: nowrap;
}

.account-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.account-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.account-tab.active i {
  color: var(--gold);
}

.account-panel {
  display: none;
  animation: authFadeIn 0.4s var(--ease);
}

.account-panel.active {
  display: block;
}

.panel-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.panel-header .panel-title {
  margin-bottom: 0;
}

.account-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  transition: all 0.3s var(--ease);
  outline: none;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.form-group input[readonly] {
  background: var(--bg-alt);
  color: var(--text-soft);
  cursor: not-allowed;
}

.form-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

.account-form .btn {
  align-self: flex-start;
  margin-top: 8px;
}

/* حالت خالی */
.orders-empty,
.empty-message {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  color: var(--text-faint);
}

.orders-empty i,
.empty-message i {
  font-size: 48px;
  color: var(--gold);
  opacity: 0.4;
  margin-bottom: 16px;
  display: block;
}

.orders-empty h3 {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 6px;
  font-weight: 600;
}

.orders-empty p,
.empty-message p {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 18px;
  line-height: 1.7;
}

.empty-message p {
  margin-bottom: 0;
}

.wishlist-link {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.wishlist-link p {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 20px;
}

/* تنظیمات */
.settings-list {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s var(--ease);
  flex-wrap: wrap;
}

.settings-item:hover {
  border-color: rgba(184, 154, 90, 0.3);
}

.settings-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.settings-item p {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.6;
}

.settings-item.danger h4 {
  color: #e63946;
}

.settings-item.danger .btn {
  border-color: #e63946;
  color: #e63946;
}

.settings-item.danger .btn:hover {
  background: #e63946;
  color: #fff;
}

@media (max-width: 768px) {
  .account-section {
    padding: 110px 0 60px;
  }
  .settings-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-item .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   ۵. SHAKE (خطای OTP)
   ============================================ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}