/* ===== متجر الحسابات — تنسيقات بسيطة RTL ===== */

:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --accent: #ec4899;
  --bg: #faf9fc;
  --card: #ffffff;
  --text: #1f2333;
  --muted: #6b7280;
  --border: #e9e6f0;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(31, 35, 51, .07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ===== الأزرار ===== */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124, 58, 237, .35); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }

/* ===== الشريط العلوي ===== */
.logo img { vertical-align: middle; margin-inline-end: 9px; border-radius: 9px; }
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { font-size: 1.3rem; font-weight: 900; color: var(--text); text-decoration: none; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 22px; margin-inline-start: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; transition: .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { padding: 9px 22px; }
.menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }

/* ===== الواجهة الرئيسية ===== */
.hero { padding: 70px 0 50px; background: radial-gradient(ellipse at top left, #f3e8ff 0%, transparent 55%), radial-gradient(ellipse at bottom right, #fce7f3 0%, transparent 55%); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.badge { display: inline-block; background: #fff; border: 1px solid var(--border); padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: .9rem; margin-bottom: 18px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 900; line-height: 1.35; }
.highlight { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 18px 0 26px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 34px; }
.hero-stats strong { display: block; font-size: 1.5rem; color: var(--primary); }
.hero-stats span { color: var(--muted); font-size: .9rem; }

/* بطاقة الهاتف الزخرفية */
.hero-art { display: flex; justify-content: center; }
.phone-card {
  background: #fff; border-radius: 26px; padding: 26px; width: 300px;
  box-shadow: 0 20px 50px rgba(124,58,237,.18); text-align: center;
  border: 1px solid var(--border);
}
.phone-top { font-weight: 900; color: var(--accent); font-size: 1.1rem; margin-bottom: 16px; }
.phone-avatar { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 12px; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.phone-name { font-weight: 700; direction: ltr; }
.phone-nums { display: flex; justify-content: space-around; margin: 18px 0; }
.phone-nums b { display: block; font-size: 1.05rem; }
.phone-nums span { font-size: .75rem; color: var(--muted); }
.phone-btn { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; padding: 11px; border-radius: 12px; font-weight: 700; }

/* ===== المميزات ===== */
.features { padding: 40px 0; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--card); padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); text-align: center; transition: .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature span { font-size: 2rem; }
.feature h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.feature p { color: var(--muted); font-size: .9rem; }

/* ===== عناوين الأقسام ===== */
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; }
.section-head p { color: var(--muted); }

/* ===== الفلاتر ===== */
.accounts { padding: 60px 0; }
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 30px; }
#searchInput {
  flex: 1; min-width: 220px; padding: 13px 18px; border: 1px solid var(--border);
  border-radius: 999px; font-family: inherit; font-size: 1rem; background: #fff; outline: none;
}
#searchInput:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-family: inherit; font-weight: 600; cursor: pointer; transition: .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
#sortSelect { padding: 12px 16px; border-radius: 999px; border: 1px solid var(--border); font-family: inherit; background: #fff; cursor: pointer; outline: none; }

/* ===== شبكة الحسابات ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: .2s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-cover { height: 110px; position: relative; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2.4rem; }
.card-cat { position: absolute; top: 10px; inset-inline-start: 10px; background: rgba(255,255,255,.9); color: var(--text); font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.card-user { font-weight: 900; direction: ltr; text-align: right; font-size: 1.05rem; }
.card-desc { color: var(--muted); font-size: .88rem; margin: 6px 0 14px; flex: 1; }
.card-meta { display: flex; gap: 12px; margin-bottom: 14px; }
.card-meta div { background: var(--bg); padding: 7px 10px; border-radius: 10px; text-align: center; flex: 1; }
.card-meta b { display: block; font-size: .95rem; color: var(--primary); }
.card-meta span { font-size: .7rem; color: var(--muted); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 900; font-size: 1.15rem; }
.price small { font-weight: 600; color: var(--muted); font-size: .75rem; }
.card .btn { padding: 10px 20px; font-size: .9rem; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 1.1rem; }
.owner-note { margin-top: 34px; background: #fff7ed; border: 1px dashed #fdba74; padding: 16px 20px; border-radius: 12px; font-size: .92rem; color: #9a3412; }
.owner-note code { background: #ffedd5; padding: 2px 8px; border-radius: 6px; direction: ltr; display: inline-block; }

/* ===== كيف نعمل ===== */
.how { padding: 60px 0; background: #fff; border-block: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { text-align: center; padding: 24px 16px; border-radius: var(--radius); background: var(--bg); }
.step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 900; font-size: 1.3rem; margin-bottom: 12px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .88rem; }

/* ===== الضمان ===== */
.guarantee { padding: 60px 0; }
.guarantee-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center; }
.guarantee h2 { font-size: 1.7rem; font-weight: 900; margin-bottom: 18px; }
.guarantee ul { list-style: none; }
.guarantee li { background: var(--card); border: 1px solid var(--border); padding: 14px 18px; border-radius: 12px; margin-bottom: 12px; }
.guarantee-card {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; text-align: center; padding: 36px 24px; border-radius: var(--radius);
  box-shadow: 0 15px 40px rgba(124,58,237,.3);
}
.guarantee-card .shield { font-size: 3rem; }
.guarantee-card h3 { font-size: 1.4rem; margin: 8px 0 4px; }
.stars { font-size: 1.4rem; letter-spacing: 4px; margin-top: 10px; }

/* ===== أسئلة شائعة ===== */
.faq { padding: 60px 0; background: #fff; border-top: 1px solid var(--border); }
.faq-item {
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  padding: 17px 20px; font-weight: 700; cursor: pointer; list-style: none;
  position: relative; transition: .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; inset-inline-end: 20px;
  font-size: 1.4rem; color: var(--primary); transition: .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--primary); }
.faq-item p { padding: 0 20px 18px; color: var(--muted); }

/* ===== تواصل ===== */
.contact { padding: 60px 0; background: #fff; border-top: 1px solid var(--border); }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card {
  text-align: center; text-decoration: none; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); padding: 30px 18px;
  border-radius: var(--radius); transition: .2s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.contact-card span { font-size: 2.2rem; }
.contact-card h3 { margin: 10px 0 4px; }
.contact-card p { color: var(--muted); font-size: .9rem; }

/* ===== التذييل ===== */
.footer { background: #171426; color: #cfc9e0; padding: 34px 0; text-align: center; }
.footer .logo { color: #fff; }
.footer p { margin-top: 8px; font-size: .9rem; }
.disclaimer { font-size: .78rem !important; color: #8b85a3; }

/* ===== نافذة الطلب ===== */
.modal {
  position: fixed; inset: 0; background: rgba(15,12,26,.6);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: 20px; padding: 34px; width: 100%; max-width: 440px;
  position: relative; animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; background: var(--bg); border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.modal-box h3 { font-size: 1.3rem; margin-bottom: 6px; }
.modal-box .m-user { color: var(--primary); font-weight: 900; direction: ltr; text-align: right; }
.modal-box .m-price { font-size: 1.6rem; font-weight: 900; margin: 14px 0; color: var(--accent); }
.modal-box .m-info { background: var(--bg); border-radius: 12px; padding: 14px; font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.pay-options { display: grid; gap: 8px; margin-bottom: 18px; }
.pay-options label { display: flex; align-items: center; gap: 10px; background: var(--bg); padding: 11px 14px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.pay-options label:hover { border-color: var(--primary); }
.modal-box .btn { width: 100%; text-align: center; }
.thanks { text-align: center; }
.thanks .big { font-size: 3rem; }

/* ===== أزرار الاختيار (لوحة التحكم) ===== */
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.color-dot.active { border-color: var(--text); }
.icons { display: flex; gap: 6px; flex-wrap: wrap; }
.icon-opt { font-size: 1.3rem; padding: 6px 9px; border-radius: 8px; border: 2px solid transparent; background: var(--bg); cursor: pointer; }
.icon-opt.active { border-color: var(--primary); background: #f3e8ff; }

/* ===== بوابة كلمة المرور ===== */
.gate { position: fixed; inset: 0; background: linear-gradient(135deg,#171426,#312e81); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 300; }
.gate[hidden] { display: none; }
.gate-box { background: #fff; padding: 38px 32px; border-radius: 22px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 25px 60px rgba(0,0,0,.4); }
.gate-box h2 { font-size: 1.3rem; margin: 14px 0 4px; }
.gate-box p { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }
.gate-box input { width: 100%; padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px; font-family: inherit; font-size: 1rem; text-align: center; outline: none; margin-bottom: 12px; }
.gate-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.gate-box button { width: 100%; padding: 13px; border: none; border-radius: 12px; background: linear-gradient(135deg,#7c3aed,#ec4899); color: #fff; font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.gate-box button:hover { opacity: .92; }
.gate-err { color: #dc2626 !important; margin-top: 12px !important; margin-bottom: 0 !important; }

/* ===== نافذة لوحة التحكم ===== */
.panel-modal { position: fixed; inset: 0; background: rgba(15,12,26,.75); backdrop-filter: blur(4px); overflow-y: auto; z-index: 200; padding: 24px 16px; }
.panel-modal[hidden] { display: none; }
.panel-inner { max-width: 860px; margin: 0 auto; background: var(--bg); border-radius: 20px; padding: 26px; animation: pop .25s ease; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-head h1 { font-size: 1.35rem; font-weight: 900; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 22px; }
.form-card h2 { font-size: 1.1rem; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field select, .field textarea {
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 1rem; outline: none; background: var(--bg);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.field textarea { resize: vertical; min-height: 70px; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.list-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.list-card h2 { font-size: 1.1rem; margin-bottom: 16px; }
.acc-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.acc-row .acc-icon { font-size: 1.5rem; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; flex-shrink: 0; }
.acc-row .acc-info { flex: 1; min-width: 160px; }
.acc-row .acc-info b { display: block; direction: ltr; text-align: right; }
.acc-row .acc-info span { font-size: .82rem; color: var(--muted); }
.acc-row .del, .acc-row .edit { border: none; padding: 8px 16px; border-radius: 999px; font-family: inherit; font-weight: 700; cursor: pointer; }
.acc-row .del { background: #fee2e2; color: #dc2626; }
.acc-row .del:hover { background: #dc2626; color: #fff; }
.acc-row .edit { background: #ede9fe; color: var(--primary); }
.acc-row .edit:hover { background: var(--primary); color: #fff; }
.danger-zone { margin-top: 14px; font-size: .88rem; color: var(--muted); }
.danger-zone button { background: none; border: 1px solid var(--border); color: #dc2626; padding: 7px 16px; border-radius: 999px; font-family: inherit; cursor: pointer; margin-inline-start: 8px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== رسالة نجاح ===== */
.toast { position: fixed; bottom: 24px; inset-inline: 0; margin: 0 auto; width: fit-content; background: #16a34a; color: #fff; padding: 13px 28px; border-radius: 999px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.2); opacity: 0; transform: translateY(20px); transition: .3s; pointer-events: none; z-index: 400; }
.toast.show { opacity: 1; transform: translateY(0); }

/* ===== التجاوب مع الموبايل ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-art { display: none; }
  .features-grid, .steps, .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .guarantee-inner { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: 68px; inset-inline: 0;
    background: #fff; flex-direction: column; padding: 18px 20px;
    border-bottom: 1px solid var(--border); gap: 14px;
  }
  .nav-links.open { display: flex; }
  .menu-btn { display: block; margin-inline-start: auto; }
  .nav-cta { display: none; }
}

@media (max-width: 560px) {
  .features-grid, .steps, .contact-cards { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .hero-stats { gap: 20px; }
}
