/*
 * ============================================================
 *  account.css — صفحة الحساب الشخصي
 * ============================================================
 *  يحتوي على كل ما يخص صفحة "حسابي" بالكامل:
 *
 *  [ شاشة تسجيل الدخول ]
 *    • .account-layout-v3      — wrapper رئيسي لصفحة الحساب
 *    • .account-card           — بطاقة تسجيل الدخول
 *    • .account-icon           — أيقونة المستخدم
 *    • .account-form           — فورم الإدخال
 *    • .account-note           — ملاحظة أسفل الفورم
 *    • .hidden-account         — إخفاء العناصر بعد/قبل الدخول
 *
 *  [ لوحة الحساب بعد الدخول ]
 *    • .account-shell          — الشبكة الرئيسية (sidebar + content)
 *    • .account-side-panel     — الشريط الجانبي الأيمن
 *    • .account-user-head      — معلومات المستخدم أعلى الشريط
 *    • .account-avatar         — صورة المستخدم الدائرية
 *    • .account-menu-btn       — أزرار القائمة الجانبية
 *    • .logout-menu-btn        — زر تسجيل الخروج
 *    • .account-content-panel  — منطقة المحتوى الرئيسية
 *    • .account-welcome-banner — بانر الترحيب
 *    • .account-panel          — ألواح المحتوى (نظرة عامة، طلبات، ...)
 *    • .account-dashboard-head — رأس لوح نظرة عامة
 *    • .account-quick-grid     — شبكة الاختصارات السريعة
 *    • .quick-card             — بطاقة اختصار سريع
 *    • .account-empty-state    — حالة الفراغ (لا يوجد طلبات...)
 *
 *  [ ألواح الحساب الفرعية ]
 *    • .wallet-card            — بطاقة المحفظة
 *    • .profile-edit-form      — فورم تعديل البيانات الشخصية
 *    • .gender-btn             — أزرار اختيار الجنس
 *    • .save-profile-btn       — زر حفظ البيانات
 *    • .settings-row           — صف إعداد واحد
 *    • .switch                 — مفتاح التبديل (toggle)
 *    • .panel-head-row         — رأس اللوح مع التاريخ
 *    • .profile-orders-list    — قائمة الطلبات في الحساب
 *    • .profile-product        — عنصر منتج في قائمة الطلبات
 *    • .profile-empty          — رسالة القائمة الفارغة
 * ============================================================
 */

/* ===== شاشة تسجيل الدخول ===== */
.account-header-btn { position: relative; }
.account-layout { display: grid; grid-template-columns: minmax(280px,520px) 1fr; gap: 24px; align-items: start; }
.account-card { background: linear-gradient(180deg,var(--card2),rgba(20,4,40,.92)); border: 1px solid rgba(225,150,255,.25); border-radius: 28px; padding: 26px; box-shadow: var(--shadow); }
.account-icon { width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 24px; background: rgba(255,255,255,.08); border: 1px solid var(--line); font-size: 34px; box-shadow: 0 0 24px rgba(249,102,236,.25); }
.account-card h2 { font-size: 34px; margin: 0 0 10px; }
.account-card p { color: var(--muted); line-height: 1.8; margin: 0 0 20px; }
.account-form { display: grid; gap: 10px; }
.account-form label { font-weight: 900; color: #fff; margin-top: 8px; }
.account-form input { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: rgba(0,0,0,.22); color: #fff; outline: none; font: inherit; }
.account-form input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(182,89,255,.18); }
.account-note { font-size: 13px!important; margin-top: 16px!important; }
.hidden-account { display: none; }


/* قوائم الملف الشخصي القديمة */
.profile-list { display: grid; gap: 12px; margin: 20px 0; }
.profile-list div { display: flex; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.22); }
.profile-list span { color: var(--muted); }
.profile-list strong { color: #fff; text-align: left; }

/* تحسين صفحة حسابي */
.account-profile { max-width: 820px; width: 100%; }
.account-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.account-hero .account-icon { margin: 0; flex: 0 0 auto; }
.account-hero h2 { margin: 0 0 6px!important; font-size: 36px!important; text-shadow: 0 0 22px rgba(249,102,236,.45); }
.account-hero p { margin: 0!important; color: var(--muted); }
.account-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 18px 0; }
.account-stats div { padding: 16px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid var(--line); text-align: center; }
.account-stats strong { display: block; font-size: 24px; color: #fff; margin-bottom: 5px; }
.account-stats span { font-size: 13px; color: var(--muted); font-weight: 800; }
.profile-section { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 22px; background: rgba(0,0,0,.18); }
.profile-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.profile-section-head h3 { margin: 0; color: #fff; font-size: 20px; }
.profile-section-head span { color: var(--muted); font-size: 13px; }
.mini-route-btn { border: 1px solid rgba(255,255,255,.22); background: linear-gradient(135deg,#7b22b8,#b650ff); color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 900; cursor: pointer; }
.profile-products-list, .profile-orders-list { display: grid; gap: 10px; }
.profile-product, .profile-order { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.12); }
.profile-product img { width: 58px; height: 58px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.profile-product div { display: grid; gap: 4px; flex: 1; }
.profile-product strong, .profile-order strong { color: #fff; }
.profile-product span, .profile-order span, .profile-order p { color: var(--muted); margin: 0; }
.profile-product b, .profile-order b { color: #fff; white-space: nowrap; }
.profile-order { display: block; }
.profile-order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.profile-order p { line-height: 1.7; margin-bottom: 8px; }
.profile-empty { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.18); color: var(--muted); text-align: center; font-weight: 800; }

/* ===== ACCOUNT SYSTEM V3 (النظام الكامل) ===== */
.account-top-title { margin-bottom: 24px; }
.account-layout-v3 { min-height: 620px; display: grid; place-items: center; }
.account-shell { width: min(1180px,100%); display: grid; grid-template-columns: 310px 1fr; gap: 22px; align-items: start; direction: rtl; }
.account-side-panel { position: sticky; top: 92px; background: rgba(33,5,50,.86); border: 1px solid rgba(236,204,255,.26); border-radius: 26px; padding: 18px; box-shadow: 0 0 35px rgba(168,55,255,.16); }
.account-user-head { display: flex; align-items: center; gap: 12px; padding: 10px 8px 18px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.account-avatar { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg,#fff,#d8d8e8); color: #222; font-size: 30px; box-shadow: 0 0 20px rgba(255,255,255,.16); }
.account-avatar.big { width: 82px; height: 82px; font-size: 42px; flex: 0 0 auto; }
.account-user-head strong { display: block; color: #fff; font-size: 18px; }
.account-user-head span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; direction: ltr; text-align: right; }
.account-menu-btn { width: 100%; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: #fff; padding: 14px 12px; border-radius: 15px; font: inherit; font-weight: 900; cursor: pointer; text-align: right; transition: .2s; }
.account-menu-btn span { width: 28px; text-align: center; font-size: 22px; color: #fff; }
.account-menu-btn:hover, .account-menu-btn.active { background: rgba(255,255,255,.09); transform: translateX(-3px); }
.account-menu-btn.active { box-shadow: inset 4px 0 0 #ffd400; }
.logout-menu-btn { color: #ff6868; }
.logout-menu-btn span { color: #ff514d; }
.account-content-panel { min-height: 580px; background: rgba(12,2,22,.55); border: 1px solid rgba(255,255,255,.12); border-radius: 28px; padding: 26px; box-shadow: 0 0 35px rgba(168,55,255,.12); }
.account-welcome-banner { width: min(760px,100%); display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto 26px; padding: 16px 22px; border-radius: 22px; background: rgba(160,184,170,.32); color: #fff; font-weight: 900; text-align: center; }
.account-welcome-banner p { margin: 0; color: #fff; }
.account-welcome-banner span { font-size: 24px; }
.account-panel { display: none; animation: fadeAccount .22s ease; }
.account-panel.active { display: block; }

@keyframes fadeAccount {
  from { opacity: .3; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.account-dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.account-dashboard-head h2, .account-panel h2 { margin: 0 0 8px; color: #fff; font-size: 34px; text-shadow: 0 0 20px rgba(249,102,236,.35); }
.account-dashboard-head p, .panel-muted { color: var(--muted); margin: 0 0 18px; line-height: 1.8; }
.account-quick-grid { display: grid; gap: 14px; margin-top: 22px; }
.quick-card { position: relative; display: grid; gap: 5px; width: 100%; padding: 20px 68px 20px 50px; border: 1px solid rgba(255,255,255,.13); border-radius: 22px; background: rgba(255,255,255,.045); color: #fff; text-align: right; cursor: pointer; font: inherit; }
.quick-card:before { content: '◎'; position: absolute; right: 20px; top: 22px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(87,153,255,.2); color: #9dd5ff; }
.quick-card b { font-size: 20px; }
.quick-card span { color: var(--muted); }
.quick-card i { position: absolute; left: 20px; top: 26px; font-size: 34px; font-style: normal; }
.quick-card em { position: absolute; left: 16px; top: 18px; background: rgba(255,255,255,.18); border-radius: 999px; padding: 8px 12px; font-style: normal; color: #fff; }
.quick-card.disabled { opacity: .55; cursor: not-allowed; background: rgba(120,130,130,.12); }
.account-empty-state { display: grid; place-items: center; text-align: center; gap: 8px; min-height: 260px; color: #ddd; font-size: 62px; }
.account-empty-state h3 { font-size: 22px; color: #fff; margin: 0; }
.account-empty-state p { font-size: 15px; color: #ff7575; margin: 0; }
.account-empty-state.small { min-height: 150px; font-size: 46px; border: 1px dashed rgba(255,255,255,.16); border-radius: 20px; background: rgba(255,255,255,.04); padding: 20px; }

/* المحفظة */
.wallet-card { padding: 26px; border-radius: 24px; background: linear-gradient(135deg,rgba(255,212,0,.16),rgba(182,89,255,.16)); border: 1px solid rgba(255,212,0,.28); margin: 16px 0 22px; }
.wallet-card span { color: var(--muted); display: block; }
.wallet-card strong { display: block; font-size: 42px; color: #ffd400; margin: 8px 0; }
.wallet-card p { margin: 0; color: #fff; }

/* فورم تعديل البيانات */
.panel-head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.panel-head-row span { color: var(--muted); }
.profile-edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; max-width: 760px; }
.profile-edit-form label { font-weight: 900; color: #fff; align-self: end; }
.profile-edit-form input { grid-column: 1 / -1; width: 100%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 14px 18px; color: #fff; font: inherit; outline: none; }
.profile-edit-form input:focus { border-color: #ffd400; box-shadow: 0 0 0 3px rgba(255,212,0,.12); }
.gender-row { grid-column: 1 / -1; display: flex; gap: 12px; }
.gender-btn { min-width: 90px; padding: 13px; border-radius: 16px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.gender-btn.active { border-color: #ffd400; background: rgba(255,212,0,.16); }
.save-profile-btn { grid-column: 1 / -1; margin-top: 12px; border: 0; border-radius: 18px; padding: 15px; background: linear-gradient(135deg,#05a88d,#006e68); color: #fff; font: inherit; font-weight: 900; cursor: pointer; }

/* الإعدادات */
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.settings-row h3 { margin: 0 0 6px; color: #ffd400; }
.settings-row p { margin: 0; color: #fff; }
.settings-row.danger h3 { color: #ff6b87; }
.settings-row.danger button { border: 1px solid #ff6b87; background: transparent; color: #ff8ca1; border-radius: 12px; padding: 12px 18px; font: inherit; font-weight: 900; cursor: pointer; }
.switch input { display: none; }
.switch span { display: block; width: 58px; height: 32px; border-radius: 999px; background: #ddd; position: relative; cursor: pointer; }
.switch span:before { content: ''; position: absolute; width: 26px; height: 26px; border-radius: 50%; background: #fff; top: 3px; right: 3px; transition: .2s; }
.switch input:checked + span { background: #0aa889; }
.switch input:checked + span:before { right: 29px; }

/* ===== RESPONSIVE ===== */
@media(max-width:900px){
  .account-layout { grid-template-columns: 1fr; }
  .account-shell { grid-template-columns: 1fr; }
  .account-side-panel { position: static; }
  .account-content-panel { padding: 18px; }
  .account-dashboard-head { align-items: flex-start; }
  .profile-edit-form { grid-template-columns: 1fr; }
  .account-stats { grid-template-columns: 1fr; }
  .account-welcome-banner { align-items: flex-start; }
  .settings-row { align-items: flex-start; flex-direction: column; }
}
@media(max-width:700px){
  .account-stats { grid-template-columns: 1fr; }
  .account-hero { align-items: flex-start; }
  .profile-product { align-items: flex-start; }
  .profile-product b { margin-right: auto; }
  .profile-section-head { align-items: flex-start; flex-direction: column; }
}
.loyalty-stats {
    background: #ffd400;
    color: #000;
    padding: 5px 15px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(255, 212, 0, 0.3);
}
.g2a-order-card{
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.14);
  border-radius:24px;
  padding:18px;
  margin-bottom:16px;
  box-shadow:0 12px 35px rgba(0,0,0,.18);
}

.g2a-order-head,
.g2a-order-footer{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:center;
}

.g2a-order-head{
  padding-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.1);
}

.g2a-order-head strong{color:#fff;font-size:18px}
.g2a-order-head span,
.g2a-order-footer span{display:block;color:var(--muted);font-size:13px;margin-top:4px}

.g2a-order-head b{
  padding:7px 13px;
  border-radius:999px;
  font-size:13px;
}

.g2a-order-head b.done{
  background:rgba(46,125,50,.18);
  color:#7dff9b;
}

.g2a-order-head b.pending{
  background:rgba(255,171,0,.16);
  color:#ffd36b;
}

.g2a-order-product{
  display:grid;
  grid-template-columns:88px 1fr auto;
  gap:16px;
  align-items:center;
  padding:16px 0;
}

.g2a-order-product img{
  width:88px;
  height:88px;
  border-radius:18px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.14);
}

.g2a-order-info h3{
  margin:0 0 8px;
  color:#fff;
  font-size:18px;
}

.g2a-order-info p{
  margin:3px 0;
  color:var(--muted);
  font-size:14px;
}

.g2a-order-price{
  text-align:left;
  white-space:nowrap;
}

.g2a-order-price span{
  display:block;
  color:var(--muted);
  font-size:13px;
}

.g2a-order-price strong,
.g2a-order-footer strong{
  color:var(--cyan);
  font-size:18px;
}

.g2a-order-footer{
  border-top:1px solid rgba(255,255,255,.1);
  padding-top:14px;
}

.g2a-code-box{
  margin-top:14px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  background:rgba(0,0,0,.22);
  border:1px dashed rgba(255,255,255,.2);
  border-radius:16px;
  padding:12px;
}

.g2a-code-box span{color:#fff;font-weight:900}
.g2a-code-box input{
  direction:ltr;
  background:#fff;
  color:#222;
  border:0;
  border-radius:10px;
  padding:10px;
}

.g2a-code-box button{
  border:0;
  border-radius:10px;
  padding:10px 14px;
  background:#6d55ff;
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

@media(max-width:700px){
  .g2a-order-product{
    grid-template-columns:70px 1fr;
  }
  .g2a-order-price{
    grid-column:1 / -1;
    text-align:right;
  }
  .g2a-code-box{
    grid-template-columns:1fr;
  }
}
#profile-card.hidden-account {
  display: none !important;
}

#login-card.hidden-account {
  display: none !important;
}