/* =============================================
   وصلك — Auth Pages Stylesheet
   ============================================= */

/* ── LAYOUT ── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: linear-gradient(145deg, #1A1A1A 0%, #2A2A2A 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 60px;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content:'';
  position: absolute; top: -100px; right: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,87,34,.2) 0%, transparent 70%);
  pointer-events: none;
}
.auth-left::after {
  content:'';
  position: absolute; bottom: -80px; left: -80px;
  width: 350px; height: 350px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,87,34,.1) 0%, transparent 70%);
  pointer-events: none;
}
.auth-left-content { position: relative; z-index: 1; }

.auth-logo {
  font-size: 2.2rem; font-weight: 900;
  color: var(--primary); text-decoration: none;
  letter-spacing: -1px; display: block; margin-bottom: 48px;
}
.auth-logo span { color: white; }

.auth-tagline {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900; color: white;
  line-height: 1.25; margin-bottom: 20px;
}
.auth-tagline em { color: var(--primary); font-style: normal; }

.auth-desc { color: #888; font-size: 1rem; line-height: 1.7; margin-bottom: 40px; }

.auth-perks { display: flex; flex-direction: column; gap: 16px; }
.perk {
  display: flex; align-items: center; gap: 14px;
  color: #bbb; font-size: 0.92rem; font-weight: 600;
}
.perk-icon {
  width: 42px; height: 42px; border-radius: var(--radius-md);
  background: rgba(255,87,34,.15); border: 1px solid rgba(255,87,34,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}

/* ── RIGHT PANEL ── */
.auth-right {
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
  overflow-y: auto;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.auth-card-title {
  font-size: 1.6rem; font-weight: 900;
  color: var(--dark); margin-bottom: 6px;
}
.auth-card-sub {
  color: var(--gray); font-size: 0.9rem; margin-bottom: 32px;
}
.auth-card-sub a {
  color: var(--primary); font-weight: 700; text-decoration: none;
}
.auth-card-sub a:hover { text-decoration: underline; }

/* ── FORM ── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-weight: 700; font-size: 0.88rem; color: var(--dark);
}
.field-label span { color: #e53935; margin-right: 2px; }

.field-wrap {
  position: relative; display: flex; align-items: center;
}
.field-icon {
  position: absolute; right: 14px;
  color: var(--gray-light); font-size: 1rem; pointer-events: none;
  transition: color 0.2s;
}
.field-wrap:focus-within .field-icon { color: var(--primary); }

.field-input {
  width: 100%; padding: 13px 42px 13px 16px;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  font-family: 'Cairo', sans-serif; font-size: 0.95rem;
  color: var(--dark); background: var(--bg);
  outline: none; transition: border-color 0.2s, background 0.2s;
}
.field-input:focus { border-color: var(--primary); background: white; }
.field-input.error { border-color: #e53935; background: #FFF5F5; }
.field-input.success { border-color: #2E7D32; }

.field-toggle {
  position: absolute; left: 14px;
  background: none; border: none; color: var(--gray-light);
  cursor: pointer; font-size: 1rem; padding: 0;
  transition: color 0.2s;
}
.field-toggle:hover { color: var(--primary); }

.field-error {
  font-size: 0.78rem; color: #e53935; font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}
.field-hint { font-size: 0.78rem; color: var(--gray); }

/* ── PASSWORD STRENGTH ── */
.pw-strength { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pw-bars { display: flex; gap: 4px; }
.pw-bar {
  height: 4px; flex: 1; border-radius: 2px;
  background: var(--border); transition: background 0.3s;
}
.pw-bar.weak   { background: #e53935; }
.pw-bar.fair   { background: #FF9800; }
.pw-bar.good   { background: #4CAF50; }
.pw-bar.strong { background: #2E7D32; }
.pw-label { font-size: 0.76rem; font-weight: 700; color: var(--gray); }

/* ── OTP ── */
.otp-row {
  display: flex; gap: 10px; justify-content: center;
}
.otp-input {
  width: 52px; height: 60px; text-align: center;
  font-size: 1.5rem; font-weight: 900; font-family: 'Cairo', sans-serif;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg); outline: none; transition: border-color 0.2s;
  color: var(--dark);
}
.otp-input:focus { border-color: var(--primary); background: white; }
.otp-input.filled { border-color: var(--primary); background: var(--primary-pale); }

/* ── DIVIDER ── */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--gray-light); font-size: 0.82rem; margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content:''; flex:1; height:1px; background: var(--border);
}

/* ── SUBMIT BUTTON ── */
.auth-submit {
  width: 100%; padding: 15px;
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius-full); font-family: 'Cairo', sans-serif;
  font-weight: 900; font-size: 1.05rem; cursor: pointer;
  transition: all 0.2s; position: relative; overflow: hidden;
}
.auth-submit:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { background: #ccc; transform: none; box-shadow: none; cursor: not-allowed; }
.auth-submit .spinner {
  display: none; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: white; border-radius: 50%;
  animation: spin 0.6s linear infinite;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.auth-submit.loading .spinner { display: block; }
.auth-submit.loading .btn-text { opacity: 0; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── ALERT ── */
.auth-alert {
  padding: 13px 16px; border-radius: var(--radius-md);
  font-size: 0.88rem; font-weight: 600;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 8px;
}
.auth-alert.error   { background: #FFEBEE; color: #C62828; border: 1px solid #FFCDD2; }
.auth-alert.success { background: #E8F5E9; color: #2E7D32; border: 1px solid #C8E6C9; }
.auth-alert.info    { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }
.auth-alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ── TERMS ── */
.auth-terms {
  font-size: 0.78rem; color: var(--gray); text-align: center; line-height: 1.6;
}
.auth-terms a { color: var(--primary); font-weight: 700; text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left  { display: none; }
  .auth-right { padding: 32px 20px; min-height: 100vh; }
  .auth-card  { padding: 28px 24px; }
}

/* ── PROFILE PAGE ── */
.profile-layout {
  display: grid; grid-template-columns: 280px 1fr;
  gap: 28px; padding: 40px 0 80px;
  align-items: start;
}
.profile-sidebar {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  position: sticky; top: 100px;
}
.profile-avatar-section {
  background: linear-gradient(135deg, var(--dark) 0%, #2D2D2D 100%);
  padding: 32px 24px; text-align: center;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--primary); color: white;
  font-size: 2rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; border: 3px solid rgba(255,255,255,.2);
}
.profile-name  { color: white; font-weight: 800; font-size: 1.05rem; }
.profile-phone { color: #888; font-size: 0.82rem; margin-top: 4px; }

.profile-nav { padding: 8px 0; }
.profile-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; color: var(--gray);
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  transition: all 0.15s; border-right: 3px solid transparent;
}
.profile-nav-item:hover { color: var(--dark); background: var(--bg); }
.profile-nav-item.active {
  color: var(--primary); background: var(--primary-pale);
  border-right-color: var(--primary);
}
.profile-nav-item .nav-icon { font-size: 1.1rem; }
.profile-nav-item .nav-badge {
  margin-right: auto; background: var(--primary); color: white;
  font-size: 0.72rem; font-weight: 800;
  padding: 2px 8px; border-radius: var(--radius-full);
}

.profile-main { display: flex; flex-direction: column; gap: 20px; }
.profile-card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
}
.profile-card-header {
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.profile-card-title { font-size: 1.05rem; font-weight: 900; }
.profile-card-body  { padding: 24px; }

/* ── ORDER HISTORY ── */
.order-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 14px; transition: box-shadow 0.2s;
}
.order-card:last-child { margin-bottom: 0; }
.order-card:hover { box-shadow: var(--shadow-md); }
.order-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--bg);
  border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap;
}
.order-num  { font-weight: 900; font-size: 0.92rem; color: var(--primary); }
.order-date { font-size: 0.8rem; color: var(--gray); }
.order-card-body { padding: 14px 18px; }
.order-items-preview {
  color: var(--gray); font-size: 0.85rem; margin-bottom: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.order-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-top: 1px solid var(--border); gap: 12px;
}
.order-total  { font-weight: 900; font-size: 1rem; }
.order-rest   { font-size: 0.82rem; color: var(--gray); }
.reorder-btn {
  background: var(--primary-pale); color: var(--primary);
  border: 1px solid rgba(255,87,34,.2); border-radius: var(--radius-full);
  font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 0.82rem;
  padding: 7px 16px; cursor: pointer; transition: all 0.2s;
  text-decoration: none; white-space: nowrap;
}
.reorder-btn:hover { background: var(--primary); color: white; }

/* ── ADDRESS CARD ── */
.address-list { display: flex; flex-direction: column; gap: 12px; }
.address-item {
  border: 2px solid var(--border); border-radius: var(--radius-md);
  padding: 16px 18px; display: flex; align-items: flex-start;
  gap: 14px; transition: border-color 0.2s; cursor: pointer;
}
.address-item:hover   { border-color: var(--primary); }
.address-item.default { border-color: var(--primary); background: var(--primary-pale); }
.address-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.address-item.default .address-radio { border-color: var(--primary); background: var(--primary); }
.address-item.default .address-radio::after { content:''; width:8px; height:8px; background:white; border-radius:50%; }
.address-icon  { font-size: 1.4rem; flex-shrink: 0; }
.address-label { font-weight: 800; font-size: 0.9rem; margin-bottom: 3px; }
.address-text  { font-size: 0.83rem; color: var(--gray); line-height: 1.5; }
.address-badge { font-size: 0.72rem; color: var(--primary); font-weight: 700; }

@media (max-width: 850px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: relative; top: 0; }
}
