/* =====================================================
   متجر أوج خدمات | AWJ Digital Services
   ملف الأنماط المخصصة + دعم RTL والخطوط العربية
   ===================================================== */

:root {
  --color-primary: #1e3a8a;
  --color-primary-dark: #172554;
  --color-primary-light: #3b82f6;
  --color-success: #22c55e;
  --color-success-dark: #16a34a;
  --color-gray-900: #0f172a;
  --color-gray-50: #f8fafc;
  --font-arabic: 'Tajawal', 'Cairo', sans-serif;
}

* {
  font-family: var(--font-arabic);
}

html {
  scroll-behavior: smooth;
}

body {
  direction: rtl;
  text-align: right;
  background-color: var(--color-gray-50);
  color: var(--color-gray-900);
  font-family: var(--font-arabic);
}

/* ---------- الحاوية ---------- */
.container-awj {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ---------- شريط التنقل ---------- */
.navbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: 1.25rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #334155;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff !important;
  padding: 0.55rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.35);
}

/* زر القائمة للجوال */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-gray-900);
}

/* ---------- صفحة البطل (Hero) ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 4.5rem 0 6rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(34,197,94,0.25) 0%, transparent 50%);
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 1rem;
}

.hero h1 .highlight {
  background: linear-gradient(90deg, #4ade80, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.9);
  max-width: 620px;
  margin: 0 auto 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-success {
  background: linear-gradient(135deg, var(--color-success), var(--color-success-dark));
  color: #fff;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.4);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
}

.btn-dark {
  background: var(--color-primary);
  color: #fff;
}

.btn-dark:hover {
  background: var(--color-primary-dark);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.1rem;
}

/* مؤشرات الثقة */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  font-size: 1.75rem;
  font-weight: 800;
  color: #4ade80;
}

.hero-stat .label {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

/* ---------- الأقسام العامة ---------- */
.section {
  padding: 4rem 0;
}

.section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin: 0 0 0.5rem;
}

.section-head p {
  color: #64748b;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- بطاقات الخدمات ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(30, 58, 138, 0.12);
  border-color: #c7d2fe;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-cat {
  font-size: 0.8rem;
  color: var(--color-success-dark);
  font-weight: 700;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-gray-900);
}

.card-desc {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.7;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.card-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.card-price small {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.card-order {
  background: var(--color-success);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 9px;
  font-weight: 700;
  transition: background 0.2s;
}

.service-card:hover .card-order {
  background: var(--color-success-dark);
}

/* ---------- المزايا ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-box {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
  border: 1px solid #e2e8f0;
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(34,197,94,0.12);
  color: var(--color-success-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.feature-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--color-gray-900);
}

.feature-box p {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------- تذييل ---------- */
.footer {
  background: var(--color-gray-900);
  color: #cbd5e1;
  padding: 3.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer h4 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.footer a {
  color: #cbd5e1;
  text-decoration: none;
  display: block;
  margin-bottom: 0.6rem;
  transition: color 0.2s;
}

.footer a:hover {
  color: #4ade80;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ---------- نموذج الطلب (Checkout) ---------- */
.checkout-wrap {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-gray-900);
  margin-bottom: 0.45rem;
}

.form-group label .req {
  color: #ef4444;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8fafc;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
  background: #fff;
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1rem;
}

/* ---------- وسائل الدفع ---------- */
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-option {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.payment-option:hover {
  border-color: #c7d2fe;
}

.payment-option.selected {
  border-color: var(--color-success);
  background: rgba(34,197,94,0.06);
}

.payment-option .p-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.payment-option .p-title {
  font-weight: 700;
  color: var(--color-gray-900);
}

.payment-option .p-sub {
  font-size: 0.8rem;
  color: #64748b;
}

.payment-details {
  display: none;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.payment-details.active {
  display: block;
}

.bank-info {
  background: var(--color-gray-900);
  color: #fff;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ---------- التنبيهات ---------- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background: rgba(34,197,94,0.15);
  color: var(--color-success-dark);
  border: 1px solid var(--color-success);
}

.alert-error {
  background: rgba(239,68,68,0.12);
  color: #dc2626;
  border: 1px solid #ef4444;
}

/* ---------- لوحة التحكم ---------- */
.admin-body {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}

.sidebar {
  width: 260px;
  background: var(--color-gray-900);
  color: #cbd5e1;
  padding: 1.5rem 0;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
}

.sidebar .sb-brand {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}

.sb-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.sb-link.active {
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
}

.sb-logout {
  margin-top: auto;
  border-top: 1px solid #1e293b;
  padding-top: 1rem;
}

.admin-main {
  flex: 1;
  margin-right: 260px;
  padding: 2rem;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--color-gray-900);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card .s-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-card .s-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-gray-900);
}

.stat-card .s-label {
  font-size: 0.85rem;
  color: #64748b;
}

/* ---------- الجداول ---------- */
.admin-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  margin-bottom: 2rem;
}

.panel-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-head h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--color-gray-900);
}

.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
}

table.data-table th,
table.data-table td {
  padding: 0.9rem 1.5rem;
  text-align: right;
  font-size: 0.9rem;
}

table.data-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

table.data-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
}

table.data-table tbody tr:hover {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-processing { background: #fef3c7; color: #b45309; }
.badge-completed { background: #dcfce7; color: #15803d; }
.badge-cancelled { background: #fee2e2; color: #b91c1c; }
.badge-pending { background: #fef3c7; color: #b45309; }
.badge-paid { background: #dcfce7; color: #15803d; }
.badge-failed { background: #fee2e2; color: #b91c1c; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

/* ---------- الأزرار الصغيرة ---------- */
.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-outline-danger {
  background: transparent;
  color: #dc2626;
  border: 1.5px solid #ef4444;
}

.btn-outline-danger:hover {
  background: #fee2e2;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid #c7d2fe;
}

.btn-outline:hover {
  background: #eef2ff;
}

/* ---------- النافذة المنبثقة ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 18px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1rem;
}

.modal h2 {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
  color: var(--color-gray-900);
}

.modal-backdrop {
  direction: rtl;
}

/* ---------- بطاقة تفاصيل الخدمة ---------- */
.service-detail {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
}

.detail-head {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  padding: 3rem 2.5rem;
  text-align: center;
}

.detail-head .d-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.detail-head h1 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}

.detail-body {
  padding: 2.5rem;
}

.detail-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.detail-price-box .price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.detail-price-box .price small {
  font-size: 0.9rem;
  color: #94a3b8;
}

.detail-price-box .sku {
  font-size: 0.85rem;
  color: #64748b;
}

/* ---------- صفحة الدخول ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary), var(--color-primary-light));
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .brand-logo {
  margin: 0 auto 1rem;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
}

.login-card h1 {
  font-size: 1.4rem;
  color: var(--color-gray-900);
  margin: 0 0 0.25rem;
}

.login-card p {
  color: #64748b;
  margin: 0 0 1.75rem;
  font-size: 0.92rem;
}

/* ---------- العناصر المتحركة ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- حالة التحميل ---------- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- التجاوب ---------- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    gap: 0.5rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem;
    width: 100%;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 100;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-right: 0;
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .payment-methods {
    grid-template-columns: 1fr;
  }

  .checkout-wrap {
    padding: 1.5rem;
  }
}
