/* ============================================================
   الصندوق العائلي — CSS الرئيسي
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-dark: #8B6914;
  --deep: #0D1B2A;
  --deep2: #1A2E42;
  --deep3: #243B55;
  --cream: #F5EDD6;
  --cream-light: #FDF8EE;
  --text-light: #E8DCC8;
  --text-muted: #9BA8B0;
  --success: #2ECC71;
  --danger: #E74C3C;
  --warning: #F39C12;
  --info: #3498DB;
  --sidebar-w: 260px;
}

/* Light Mode */
body.light-mode {
  --deep: #F0F4F8;
  --deep2: #FFFFFF;
  --deep3: #E8EDF2;
  --cream: #2D3748;
  --cream-light: #1A202C;
  --text-light: #4A5568;
  --text-muted: #718096;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Tajawal', sans-serif;
  background: var(--deep);
  color: var(--cream);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--deep);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: opacity .5s;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-logo {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 2rem; color: var(--deep);
  box-shadow: 0 0 40px rgba(201,168,76,.5);
  animation: loadingPulse 1.5s ease-in-out infinite;
}
@keyframes loadingPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 40px rgba(201,168,76,.5); }
  50% { transform: scale(1.1); box-shadow: 0 0 70px rgba(201,168,76,.8); }
}
.loading-bar {
  width: 200px; height: 3px;
  background: rgba(201,168,76,.2); border-radius: 2px; overflow: hidden;
}
.loading-progress {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  animation: loadingBar 1.5s ease-in-out infinite;
}
@keyframes loadingBar {
  0% { width: 0%; } 100% { width: 100%; }
}

/* ===== BACKGROUND ===== */
.bg-canvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.bg-gradient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(201,168,76,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(201,168,76,.06) 0%, transparent 50%);
}

/* تنسيق شعار الصورة */
.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 5px rgba(201,168,76,0.5));
}
/* ===== NAVBAR ===== */
.navbar-main {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background: rgba(13,27,42,.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,168,76,.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  box-sizing: border-box;
}
.navbar-brand {
  display: flex; align-items: center; gap: .75rem;
  text-decoration: none; flex-shrink: 0;
}
.navbar-logo {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 1.2rem; color: var(--deep);
  box-shadow: 0 0 20px rgba(201,168,76,.3);
  transition: transform .3s;
}
.navbar-logo:hover { transform: rotate(15deg) scale(1.1); }
.navbar-title {
  font-family: 'Amiri', serif; font-size: 1rem; color: var(--gold-light); line-height: 1.3;
}
.navbar-title small { display: block; font-family: 'Tajawal', sans-serif; font-size: .7rem; color: var(--text-muted); }
.navbar-nav {
  display: flex;
   flex-direction: row;
    align-items: center;
     gap: 1rem;
       flex-wrap: nowrap;
}
.navbar-nav a {
  color: var(--text-light); text-decoration: none; padding: .45rem .85rem;
  border-radius: 6px; font-size: .875rem; font-weight: 500;
  transition: all .2s; position: relative;
}
.navbar-nav a:hover, .navbar-nav a.active { color: var(--gold); background: rgba(201,168,76,.1); }
.navbar-nav a::after {
  content: ''; position: absolute; bottom: 2px; right: 50%; left: 50%;
  height: 1.5px; background: var(--gold); transition: all .3s;
}
.navbar-nav a:hover::after, .navbar-nav a.active::after { right: 8px; left: 8px; }
.navbar-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.btn-icon {
  width: 38px; height: 38px; border-radius: 8px; border: none;
  background: rgba(201,168,76,.08); color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: all .2s; position: relative;
}
.btn-icon:hover { background: rgba(201,168,76,.18); }
.badge-count {
  position: absolute; top: -4px; left: -4px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: .65rem;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 5rem 1.5rem 3rem; position: relative;
}
.hero-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 600px; height: 600px; border-radius: 50%;
  border: 1px solid rgba(201,168,76,.07); pointer-events: none;
  animation: rotate 30s linear infinite;
}
.hero-ring::before {
  content: ''; position: absolute; inset: 50px; border-radius: 50%;
  border: 1px solid rgba(201,168,76,.05);
  animation: rotate 20s linear infinite reverse;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.hero-content { position: relative; max-width: 700px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(201,168,76,.1); border: 1px solid rgba(201,168,76,.3);
  color: var(--gold-light); padding: .35rem 1rem; border-radius: 50px;
  font-size: .82rem; margin-bottom: 1.25rem;
}
.hero-title {
  font-family: 'Amiri', serif; font-size: clamp(2.5rem,6vw,4rem);
  color: var(--cream-light); line-height: 1.3; margin-bottom: .5rem;
}
.hero-subtitle {
  font-family: 'Amiri', serif; font-size: clamp(1.5rem,4vw,2.2rem);
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold), var(--gold-dark));
  background-size: 300% auto; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  animation: shimmer 4s linear infinite; margin-bottom: 1.5rem;
}
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
.hero-desc { color: var(--text-muted); font-size: 1rem; line-height: 1.8; margin-bottom: 2rem; }
.hero-stats { display: flex; justify-content: center; gap: 2.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.hero-stat-num { font-family: 'Amiri', serif; font-size: 2rem; color: var(--gold); display: block; }
.hero-stat-lbl { font-size: .78rem; color: var(--text-muted); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.75rem; border-radius: 10px; border: none;
  font-family: 'Tajawal', sans-serif; font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: all .25s; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--deep); box-shadow: 0 4px 20px rgba(201,168,76,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,168,76,.5); }
.btn-outline { background: transparent; color: var(--gold); border: 1.5px solid rgba(201,168,76,.4); }
.btn-outline:hover { background: rgba(201,168,76,.08); border-color: var(--gold); }
.btn-success { background: rgba(46,204,113,.15); color: #2ECC71; border: 1px solid rgba(46,204,113,.3); }
.btn-danger { background: rgba(231,76,60,.15); color: #E74C3C; border: 1px solid rgba(231,76,60,.3); }
.btn-warning { background: rgba(243,156,18,.15); color: #F39C12; border: 1px solid rgba(243,156,18,.3); }
.btn-sm { padding: .45rem 1.1rem; font-size: .82rem; border-radius: 8px; }
.btn-xs { padding: .3rem .75rem; font-size: .75rem; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ===== CARDS ===== */
.card {
  background: rgba(26,46,66,.6); border: 1px solid rgba(201,168,76,.12);
  border-radius: 16px; padding: 1.5rem; backdrop-filter: blur(10px);
  transition: all .3s; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; right: 0; left: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.4), transparent);
  transform: translateX(-100%); transition: transform .4s;
}
.card:hover::before { transform: translateX(0); }
.card:hover { border-color: rgba(201,168,76,.28); transform: translateY(-3px); box-shadow: 0 12px 35px rgba(0,0,0,.3); }
.card-title { font-family: 'Amiri', serif; font-size: 1.2rem; color: var(--cream-light); margin-bottom: .5rem; }
.card-body { padding: 1.25rem; }
.card-header {
  padding: .9rem 1.25rem; border-bottom: 1px solid rgba(201,168,76,.1);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, rgba(201,168,76,.05), transparent);
}
.card-header h5 { font-weight: 700; color: var(--cream-light); font-size: .95rem; }
/* ===== جعل الجداول قابلة للتمرير العمودي ===== */
.card .table-responsive {
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
}

.card .table-responsive thead th {
    position: sticky !important;
    top: 0 !important;
    background: #1A2E42 !important;
    z-index: 10 !important;
}

/* تحسين شريط التمرير */
.card .table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.card .table-responsive::-webkit-scrollbar-track {
    background: #0D1B2A;
    border-radius: 3px;
}

.card .table-responsive::-webkit-scrollbar-thumb {
    background: #C9A84C;
    border-radius: 3px;
}

/* جعل الجداول قابلة للتمرير العمودي بارتفاع محدد */
.scrollable-table {
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

.scrollable-table table {
    width: 100%;
    display: table;
}

.scrollable-table thead th {
    position: sticky;
    top: 0;
    background: #1A2E42;
    z-index: 10;
}

/* تثبيت رأس الجدول أثناء التمرير */
.scrollable-table thead th {
    position: sticky;
    top: 0;
    background: #1A2E42;
    z-index: 10;
}
/* ===== STATS CARDS ===== */
.stat-card {
  background: rgba(26,46,66,.55); border: 1px solid rgba(201,168,76,.1);
  border-radius: 14px; padding: 1.1rem; display: flex; align-items: center;
  gap: .9rem; transition: all .25s;
}
.stat-card:hover { border-color: rgba(201,168,76,.3); transform: translateX(-3px); }
.stat-icon {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0; transition: transform .3s;
}
.stat-card:hover .stat-icon { transform: scale(1.15) rotate(5deg); }
.si-gold { background: rgba(201,168,76,.15); }
.si-green { background: rgba(46,204,113,.15); }
.si-red { background: rgba(231,76,60,.15); }
.si-blue { background: rgba(52,152,219,.15); }
.si-purple { background: rgba(155,89,182,.15); }
.stat-num { font-family: 'Amiri', serif; font-size: 1.7rem; color: var(--cream-light); display: block; line-height: 1; }
.stat-lbl { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

/* ===== ADMIN SIDEBAR ===== */
.admin-wrapper { display: flex; min-height: 100vh; padding-top: 65px; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: rgba(13,27,42,.98); backdrop-filter: blur(20px);
  border-left: 1px solid rgba(201,168,76,.15);
  position: fixed; top: 65px; right: 0; bottom: 0;
  overflow-y: auto; z-index: 50;
  transition: transform .3s;
}
.sidebar-header {
  padding: 1.25rem 1rem; border-bottom: 1px solid rgba(201,168,76,.1);
  text-align: center;
}
.sidebar-avatar {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto .75rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 1.5rem; color: var(--deep);
  box-shadow: 0 0 20px rgba(201,168,76,.3);
}
.sidebar-name { font-weight: 700; color: var(--cream-light); font-size: .9rem; }
.sidebar-role { font-size: .75rem; color: var(--text-muted); }
.sidebar-nav { padding: .75rem 0; }
.sidebar-section {
  font-size: .68rem; color: var(--text-muted); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .5rem 1rem; margin-top: .5rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem; color: var(--text-light);
  text-decoration: none; font-size: .875rem; font-weight: 500;
  transition: all .2s; border-right: 3px solid transparent;
  position: relative;
}
.sidebar-link:hover { color: var(--gold); background: rgba(201,168,76,.07); border-right-color: rgba(201,168,76,.3); }
.sidebar-link.active { color: var(--gold); background: rgba(201,168,76,.1); border-right-color: var(--gold); }
.sidebar-link .icon { font-size: 1rem; flex-shrink: 0; }
.sidebar-badge {
  margin-right: auto; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: .65rem;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.admin-content {
  flex: 1; margin-right: var(--sidebar-w);
  padding: 2rem 1.5rem; min-width: 0;
}

/* ===== TABLES ===== */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
}
.table th {
  text-align: right; padding: .65rem .85rem; color: var(--text-muted);
  font-weight: 600; border-bottom: 1px solid rgba(201,168,76,.12);
  background: rgba(13,27,42,.4); white-space: nowrap;
}
.table td {
  padding: .7rem .85rem; border-bottom: 1px solid rgba(255,255,255,.04);
  color: var(--text-light); vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover td { background: rgba(201, 168, 76, 0.08); }

/* ===== تحسين إضافي للجداول ===== */
.table thead th {
    background: linear-gradient(0deg, #1A2E42, #0D1B2A) !important;
    color: #E8C97A !important;
}

.table tbody td {
    background: #0D1B2A !important;
    color: #F5EDD6 !important;
}

/* تناوب الألوان للصفوف */
.table tbody tr:nth-child(even) td {
    background: #15273b !important;
}

/* التمرير */
.table tbody tr:hover td {
    background: rgba(201, 168, 76, 0.12) !important;
}

/* النصوص الذهبية */
.table td .gold-text,
.table td div div:first-child {
    color: #C9A84C !important;
}
/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; padding: .2rem .65rem;
  border-radius: 50px; font-size: .74rem; font-weight: 600;
}
.badge-success { background: rgba(46,204,113,.15); color: #2ECC71; }
.badge-danger { background: rgba(231,76,60,.15); color: #E74C3C; }
.badge-warning { background: rgba(243,156,18,.15); color: #F39C12; }
.badge-info { background: rgba(52,152,219,.15); color: #5DADE2; }
.badge-gold { background: rgba(201,168,76,.15); color: var(--gold); }
.badge-purple { background: rgba(155,89,182,.15); color: #A569BD; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .875rem; color: var(--text-light); margin-bottom: .45rem; font-weight: 500; }
.form-control {
  width: 100%; background: rgba(13,27,42,.6);
  border: 1.5px solid rgba(201,168,76,.15); border-radius: 10px;
  padding: .7rem 1rem; color: var(--cream); font-family: 'Tajawal', sans-serif;
  font-size: .9rem; outline: none; transition: all .2s; direction: rtl;
}
.form-control:focus { border-color: rgba(201,168,76,.5); box-shadow: 0 0 0 3px rgba(201,168,76,.08); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--deep2); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* تحسين ألوان القوائم المنسدلة */
select.form-control option {
    background: #1A2E42 !important;
    color: #E8DCC8 !important;
    padding: 8px !important;
}

select.form-control option:hover {
    background: rgba(201,168,76,0.2) !important;
    color: var(--gold) !important;
}
/* ===== ALERTS ===== */
.alert {
  padding: .85rem 1.1rem; border-radius: 10px; margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .75rem; border: 1px solid;
}
.alert-success { background: rgba(46,204,113,.08); border-color: rgba(46,204,113,.25); color: #2ECC71; }
.alert-danger { background: rgba(231,76,60,.08); border-color: rgba(231,76,60,.25); color: #E74C3C; }
.alert-warning { background: rgba(243,156,18,.08); border-color: rgba(243,156,18,.25); color: #F39C12; }
.alert-info { background: rgba(52,152,219,.08); border-color: rgba(52,152,219,.25); color: #5DADE2; }

/* ===== TOAST ===== */
#toast-container {
  position: fixed; bottom: 1.5rem; left: 1.5rem;
  z-index: 9998; display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  background: var(--deep2); border: 1px solid rgba(201,168,76,.25);
  border-radius: 12px; padding: .8rem 1.25rem; min-width: 280px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4); font-size: .88rem;
  display: flex; align-items: center; gap: .75rem;
  animation: toastIn .3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.toast.hiding { animation: toastOut .3s ease forwards; }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); } }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--deep2); border: 1px solid rgba(201,168,76,.22);
  border-radius: 18px; padding: 2rem; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .3s cubic-bezier(.23,1,.32,1);
}
@keyframes modalIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-family: 'Amiri', serif; font-size: 1.3rem; color: var(--cream-light); }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.06); color: var(--text-muted);
  cursor: pointer; font-size: 1.1rem; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(231,76,60,.15); color: #E74C3C; }

/* ===== PROGRESS ===== */
.progress { height: 6px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.progress-bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width 1s ease; position: relative; overflow: hidden;
}
.progress-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 2s linear infinite;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--deep); border: none; cursor: pointer;
  font-size: 1.1rem; display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 15px rgba(201,168,76,.35); transition: all .25s;
}
#back-to-top.show { display: flex; }
#back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(201,168,76,.5); }

/* ===== SECTION ===== */
.section { padding: 5rem 1.5rem; max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-label { font-size: .78rem; color: var(--gold); letter-spacing: .2em; text-transform: uppercase; display: block; margin-bottom: .5rem; }
.section-title { font-family: 'Amiri', serif; font-size: clamp(1.8rem,4vw,2.5rem); color: var(--cream-light); margin-bottom: .75rem; }
.section-line { width: 60px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 0 auto; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; }
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1rem; }

/* ===== FOOTER ===== */
footer {
  text-align: center; padding: 2rem; margin-top: 3rem;
  border-top: 1px solid rgba(201,168,76,.1); color: var(--text-muted); font-size: .82rem;
  position: relative; z-index: 1;
}
footer::before {
  content: ''; position: absolute; top: 0; right: 0; left: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  background-size: 200%; animation: shimmer 4s linear infinite;
}
footer span { color: var(--gold-light); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--deep); }
::-webkit-scrollbar-thumb { background: rgba(201,168,76,.3); border-radius: 3px; }

/* ===== LOGIN PAGE ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth-card {
  background: rgba(26,46,66,.75); border: 1px solid rgba(201,168,76,.2);
  border-radius: 20px; padding: 2.5rem; width: 100%; max-width: 420px;
  backdrop-filter: blur(20px); box-shadow: 0 25px 60px rgba(0,0,0,.4);
}
.auth-logo {
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Amiri', serif; font-size: 1.8rem; color: var(--deep);
  margin: 0 auto 1.25rem; box-shadow: 0 0 30px rgba(201,168,76,.35);
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 1.75rem; display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.page-title { font-family: 'Amiri', serif; font-size: 1.7rem; color: var(--cream-light); }
.page-subtitle { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }
.breadcrumb { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.breadcrumb a { color: var(--text-muted); font-size: .82rem; text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--text-muted); font-size: .75rem; }
.breadcrumb span { color: var(--gold); font-size: .82rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar-nav {
        display: none !important;
        flex-direction: column !important;
        position: absolute;
        top: 65px;
        right: 0;
        left: 0;
        background: var(--deep2);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(201,168,76,.2);
        border-bottom: 1px solid rgba(201,168,76,.2);
        padding: 1rem;
        gap: 0.5rem !important;
        z-index: 200;
    }
    .navbar-nav.show {
        display: flex !important;
    }
    .navbar-nav a {
        width: 100% !important;
        text-align: center !important;
        padding: 0.6rem 0 !important;
    }
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}
/* تأكيد إخفاء القائمة في جميع صفحات الجوال */
@media (max-width: 768px) {
    .sidebar {
        transition: right 0.3s ease-in-out !important;
    }
    
    .sidebar.open {
        right: 0 !important;
    }
    
    /* منع أي CSS آخر من إظهار القائمة */
    body:not(.sidebar-open) .sidebar {
        right: -100% !important;
    }
}
/* ===== تحسين عرض الجوال للوحة تحكم العضو ===== */
@media (max-width: 768px) {
    /* جعل المحتوى يأخذ العرض الكامل */
    .admin-content > div > div {
        padding: 1rem !important;
    }
    
    /* جعل البطاقات الإحصائية تأخذ عرض كامل */
    .grid-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
    
    /* جعل شبكة المنتجات عمود واحد */
    .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    /* تصغير حجم الخط في الجداول */
    .table th, .table td {
        font-size: 0.75rem !important;
        padding: 0.5rem !important;
    }
    
    /* جعل الأزرار تأخذ العرض المناسب */
    .admin-content .btn {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    /* تصغير حجم الترحيب */
    h1 {
        font-size: 1.3rem !important;
    }
    
    /* جعل البطاقات الإحصائية أصغر */
    .stat-card {
        padding: 0.75rem !important;
    }
    
    .stat-num {
        font-size: 1.1rem !important;
    }
    
    .stat-lbl {
        font-size: 0.65rem !important;
    }
    
    .stat-icon {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
    }
}
/* ===== تحسينات إضافية للمودال ===== */
.modal-box {
    animation: modalIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* تحسين عرض المعلومات داخل المودال */
.modal-box .card {
    background: rgba(13, 27, 42, 0.6) !important;
    border: 1px solid rgba(201, 168, 76, 0.15) !important;
}

.modal-box .card:hover {
    border-color: rgba(201, 168, 76, 0.3) !important;
    transform: none !important;
}

/* تنسيق النص المساعد */
.text-muted {
    color: var(--text-muted) !important;
}

/* تحسين أزرار المودال على الجوال */
@media (max-width: 768px) {
    .modal-box {
        padding: 1.25rem !important;
        max-width: 95% !important;
    }
    
    .modal-box .btn {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
}
.hero-tagline {
    display: inline-block;
    font-size: 0.5em !important;
    color: #C9A84C !important;
    font-style: italic !important;
    font-weight: normal !important;
    margin-right: 0.5rem;
}
/* ===== تنسيق عنوان الصندوق الرئيسي ===== */
.hero-title {
    font-family: 'Amiri', serif;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

/* الجزء الرئيسي من الاسم */
.hero-main-name {
    display: inline-block;
    background: linear-gradient(135deg, var(--cream-light) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

/* الجزء المقتبس "عطاء وإخاء" */
.hero-tagline {
    display: inline-block;
    font-size: 0.45em;
    color: var(--gold);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 2px;
    position: relative;
    margin-right: 0.5rem;
    animation: gentleGlow 3s ease-in-out infinite;
    text-shadow: 0 0 5px rgba(201,168,76,0.3);
}

/* تأثير توهج خفيف للجزء المقتبس */
@keyframes gentleGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(201,168,76,0.3);
        opacity: 0.9;
    }
    50% {
        text-shadow: 0 0 12px rgba(201,168,76,0.6);
        opacity: 1;
    }
}

/* إضافة خط زخرفي أسفل العنوان */
.hero-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
    border-radius: 2px;
}

/* تأثير ظهور عند تحميل الصفحة */
.hero-title {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تأثير hover على الجزء المقتبس */
.hero-tagline:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
    cursor: default;
}
/* تنسيق بسيط لا يتعارض مع أي شيء */
.hero-title {
    text-align: center;
    margin-bottom: 20px;
}

.hero-title span {
    transition: all 0.3s ease;
}

.hero-title span:hover {
    text-shadow: 0 0 8px rgba(232,201,122,0.5);
}
.hero-main-name {
    overflow: hidden;
    border-left: 2px solid var(--gold);
    white-space: nowrap;
    animation: typing 2s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--gold); }
}
.hero-main-name {
    background: linear-gradient(135deg, #F5EDD6 0%, #C9A84C 25%, #F5EDD6 50%, #C9A84C 75%, #F5EDD6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
/* ===== تأثيرات احترافية لاسم الصندوق ===== */

/* تنسيق العنوان الرئيسي */
.hero-title {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.5;
    padding: 5px 0;
}

/* الجزء الرئيسي من الاسم */
.hero-title .main-name {
    background: linear-gradient(135deg, #F5EDD6 0%, #C9A84C 40%, #E8C97A 70%, #F5EDD6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s linear infinite;
    display: inline-block;
}

/* الجزء المقتبس "عطاء وإخاء" */
.hero-title .tagline {
    font-size: 0.45em;
    color: #E8C97A;
    font-style: italic;
    display: inline-block;
    position: relative;
    animation: gentleGlow 2s ease-in-out infinite;
    text-shadow: 0 0 5px rgba(232,201,122,0.3);
    transition: all 0.3s ease;
}

.hero-title .tagline:hover {
    text-shadow: 0 0 15px rgba(232,201,122,0.8);
    transform: scale(1.05);
}

/* خط زخرفي أسفل العنوان */
.hero-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C9A84C, #E8C97A, #C9A84C, transparent);
    border-radius: 2px;
}

/* حركات الظهور */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* حركة التوهج */
@keyframes gentleGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(232,201,122,0.3);
        opacity: 0.9;
    }
    50% {
        text-shadow: 0 0 15px rgba(232,201,122,0.6);
        opacity: 1;
    }
}

/* حركة اللمعان المتدرج */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}
/* ===== تحسين إحصائيات الهيرو ===== */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-stats > div {
    text-align: center;
    padding: 0.5rem 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.hero-stats > div:hover {
    transform: translateY(-5px);
}

/* الرقم / النص الرئيسي */
.hero-stat-num {
    font-family: 'Amiri', serif;
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, #C9A84C, #E8C97A);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    margin-bottom: 0.35rem;
    letter-spacing: 1px;
}

/* النص الثانوي */
.hero-stat-lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

/* إضافة نقطة ذهبية تحت النص الثانوي */
.hero-stat-lbl::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C9A84C, transparent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.hero-stats > div:hover .hero-stat-lbl::after {
    width: 10px;
}

.hero-divider {
    width: 2px !important;
    height: 35px !important;
    margin: 0 15px !important;
    background: #C9A84C !important;
    opacity: 0.3 !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.hero-stats {
    display: flex;
    align-items: center;
}

/* تأثير ظهور متدرج */
.hero-stats > div {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.hero-stats > div:nth-child(1) { animation-delay: 0.2s; }
.hero-stats > div:nth-child(2) { animation-delay: 0.4s; }
.hero-stats > div:nth-child(3) { animation-delay: 0.6s; }
.hero-stats > div:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1rem;
    }
    
    .hero-stat-num {
        font-size: 1rem;
    }
    
    .hero-stat-lbl {
        font-size: 0.65rem;
    }
    
}
/* للشاشات الصغيرة (جوال) */
@media (max-width: 768px) {
    .hero-stats {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .hero-stats > div {
        padding: 0.5rem 0.25rem;
    }
    
    .hero-divider {
        width: 1px !important;
        height: 30px !important;
        margin: 0 5px !important;
        opacity: 0.3 !important;
    }
}