/* ========== GOOGLE FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', 'Segoe UI', 'Traditional Arabic', sans-serif;
  background: #FFFFFF;
  color: #3A2A3A;
  line-height: 1.7;
  overflow-x: hidden;
  direction: rtl;
}

/* ========== COLORS ========== */
:root {
  --primary: #F75C8E;
  --primary-light: #FDE8EF;
  --primary-dark: #D6336C;
  --accent: #8B67D9;
  --accent-light: #F0EBFB;
  --accent-dark: #6B46B6;
  --gold: #F4A261;
  --gold-light: #FFF4EB;
  --gold-dark: #E07C2E;
  --cream: #FFFFFF;
  --brown: #6B5B6B;
  --brown-dark: #3A2A3A;
  --white: #FFFFFF;
  --shadow: 0 2px 20px rgba(247,92,142,0.08);
  --shadow-lg: 0 8px 40px rgba(247,92,142,0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.nav-inner {
  max-width: 1300px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.logo-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  transition: transform 0.3s;
}
.logo-icon:hover { transform: scale(1.05); }
.logo-icon svg { display: block; }
.logo-text { font-size: 24px; font-weight: 700; color: var(--primary); }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  text-decoration: none; color: var(--brown); font-size: 14px;
  font-weight: 500; padding: 8px 16px; border-radius: 8px;
  transition: all 0.3s; position: relative;
}
.nav-links a:hover { background: var(--primary-light); color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; background: var(--primary-light); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 3px; border-radius: 2px; background: var(--primary);
}
.nav-actions { display: flex; gap: 8px; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--primary); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all 0.3s; text-decoration: none; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 4px 15px rgba(247,92,142,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(247,92,142,0.4); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: white; box-shadow: 0 4px 15px rgba(244,162,97,0.3); }
.btn-gold:hover { transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 40px; font-size: 17px; }
.btn-icon { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }

/* ========== MAIN CONTENT ========== */
.main-content { margin-top: 70px; min-height: calc(100vh - 70px); }
.page-loading { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 999; }
.spinner {
  width: 50px; height: 50px; border: 5px solid var(--primary-light);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== SECTION COMMON ========== */
.section { padding: 60px 24px; max-width: 1300px; margin: 0 auto; }
.section-title {
  text-align: center; font-size: 32px; font-weight: 700;
  color: var(--primary); margin-bottom: 8px; position: relative;
}
.section-title::after {
  content: ''; display: block; width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  margin: 12px auto 0; border-radius: 2px;
}
.section-title::after {
  content: ''; display: block; width: 80px; height: 3px;
  background: var(--gold); margin: 12px auto 0; border-radius: 2px;
}
.section-subtitle { text-align: center; color: var(--brown); font-size: 16px; margin-bottom: 40px; opacity: 0.8; }
.card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px;
  transition: all 0.3s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-gold { border-right: 4px solid var(--gold); }


/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, #F75C8E 0%, #D6336C 50%, #B82A5A 100%);
  color: white; padding: 100px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23ffffff' fill-opacity='0.03' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") center bottom / cover no-repeat;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-icon { margin-bottom: 16px; display: flex; justify-content: center; }
.hero-icon svg { filter: drop-shadow(0 4px 15px rgba(247,92,142,0.4)); }
.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; line-height: 1.8; }
.hero-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.hero-badge {
  background: rgba(255,255,255,0.12); backdrop-filter: blur(8px);
  padding: 8px 20px; border-radius: 50px; font-size: 14px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s; cursor: default;
}
.hero-badge:hover {
  background: rgba(255,255,255,0.2); transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255,255,255,0.15);
}

/* ========== JOURNEY STAGES ========== */
.journey { background: var(--cream); }
.journey-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: 40px; }
.journey-card {
  background: white; border-radius: var(--radius); padding: 28px 20px;
  text-align: center; box-shadow: var(--shadow);
  position: relative; transition: all 0.3s;
}
.journey-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.journey-card .step-num {
  position: absolute; top: -12px; right: 20px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.journey-card .icon { font-size: 40px; margin-bottom: 12px; }
.journey-card h3 { color: var(--primary); margin-bottom: 8px; font-size: 17px; }
.journey-card p { font-size: 13px; color: var(--brown); opacity: 0.8; line-height: 1.6; }
.journey-card.completed { border-bottom: 4px solid var(--primary); }
.journey-card.active-stage { border-bottom: 4px solid var(--gold); }

/* ========== FEATURES GRID ========== */
.features { background: white; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 40px; }
.feature-card {
  background: var(--cream); border-radius: var(--radius); padding: 28px 24px;
  transition: all 0.3s; cursor: default; border: 1px solid transparent;
}
.feature-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card .icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h3 { color: var(--primary); margin-bottom: 6px; font-size: 16px; }
.feature-card p { font-size: 13px; color: var(--brown); opacity: 0.8; line-height: 1.6; }
.feature-card .badge {
  display: inline-block; margin-top: 12px; padding: 4px 12px;
  background: var(--gold-light); color: var(--gold-dark);
  border-radius: 50px; font-size: 11px; font-weight: 600;
}

/* ========== FORM STYLES ========== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--brown); font-size: 14px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 16px; border: 2px solid #E0D5C7;
  border-radius: var(--radius-sm); font-size: 15px;
  background: white; transition: all 0.3s; font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(247,92,142,0.15);
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: #C62828; font-size: 12px; margin-top: 4px; display: none; }
.form-hint { color: var(--brown); opacity: 0.6; font-size: 12px; margin-top: 4px; }
.form-checkbox { display: flex; align-items: center; gap: 10px; }
.form-checkbox input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); }

/* ========== AUTH PAGES ========== */
.auth-container {
  max-width: 520px; margin: 60px auto; padding: 40px;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid rgba(247,92,142,0.2);
}
.auth-container h2 { text-align: center; color: var(--primary); margin-bottom: 8px; font-size: 26px; }
.auth-container .subtitle { text-align: center; color: var(--brown); opacity: 0.7; margin-bottom: 32px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 28px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--primary); }
.auth-tab { flex: 1; padding: 12px; text-align: center; cursor: pointer; font-weight: 600; background: white; color: var(--primary); transition: all 0.3s; }
.auth-tab.active { background: var(--primary); color: white; }
.auth-tab:hover:not(.active) { background: var(--primary-light); }

/* ========== DASHBOARD ========== */
.dashboard {
  max-width: 1300px; margin: 30px auto; padding: 0 24px;
}
.dashboard-header { margin-bottom: 32px; }
.dashboard-header h1 { font-size: 28px; color: var(--primary); margin-bottom: 8px; }
.dashboard-grid { display: grid; gap: 24px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
  background: white; border-radius: var(--radius); padding: 24px;
  text-align: center; box-shadow: var(--shadow);
}
.stat-card .value { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--brown); opacity: 0.7; margin-top: 4px; }
.stat-card .trend { font-size: 12px; margin-top: 4px; }
.trend-up { color: var(--primary); }
.trend-down { color: #C62828; }

/* Profile setup progress */
.progress-steps { display: flex; gap: 0; margin: 32px 0; position: relative; }
.progress-steps::before {
  content: ''; position: absolute; top: 24px; left: 10%; right: 10%;
  height: 3px; background: #E0D5C7; z-index: 0;
}
.progress-step {
  flex: 1; text-align: center; position: relative; z-index: 1;
}
.progress-step .circle {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  background: #E0D5C7; color: white; transition: all 0.3s;
}
.progress-step.done .circle { background: var(--primary); }
.progress-step.active .circle { background: var(--gold); box-shadow: 0 0 0 4px rgba(247,92,142,0.3); }
.progress-step .label { font-size: 12px; color: var(--brown); opacity: 0.6; }
.progress-step.done .label, .progress-step.active .label { opacity: 1; font-weight: 600; color: var(--primary); }

/* ========== COMPASS ========== */
.compass-container {
  max-width: 800px; margin: 40px auto; padding: 0 24px;
}
.compass-intro { text-align: center; margin-bottom: 40px; }
.compass-intro .icon { font-size: 64px; margin-bottom: 16px; }
.compass-intro h2 { color: var(--primary); font-size: 28px; margin-bottom: 8px; }
.compass-pulse {
  width: 200px; height: 200px; margin: 30px auto;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0%, var(--gold) 50%, var(--primary) 100%);
  display: flex; align-items: center; justify-content: center;
  animation: pulse 2s ease-in-out infinite;
  position: relative;
}
.compass-pulse-inner {
  width: 140px; height: 140px; border-radius: 50%;
  background: white; display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* Questions */
.question-card {
  background: white; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.question-card .q-num {
  display: inline-block; padding: 4px 12px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 50px; font-size: 12px; font-weight: 600; margin-bottom: 8px;
}
.question-card h3 { margin-bottom: 4px; font-size: 16px; color: var(--brown-dark); }
.question-card .q-desc { font-size: 13px; color: var(--brown); opacity: 0.7; margin-bottom: 16px; }
.slider-container { display: flex; align-items: center; gap: 16px; }
.slider-container input[type="range"] {
  flex: 1; height: 6px; -webkit-appearance: none;
  background: linear-gradient(to right, var(--primary-light), var(--primary));
  border-radius: 3px; outline: none;
}
.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px;
  border-radius: 50%; background: var(--primary); cursor: pointer;
  box-shadow: 0 2px 8px rgba(247,92,142,0.3);
}
.slider-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--brown); opacity: 0.6; }
.slider-value { font-weight: 700; color: var(--gold); font-size: 16px; min-width: 40px; text-align: center; }

/* Result */
.compass-result {
  display: none; background: white; border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow-lg); text-align: center;
  border: 2px solid var(--gold);
}
.result-circle {
  width: 180px; height: 180px; border-radius: 50%; margin: 20px auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--primary) 0deg, var(--gold) 0deg);
}
.result-percent { font-size: 48px; font-weight: 800; color: var(--primary); }
.result-label { font-size: 14px; color: var(--brown); }
.result-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.result-item { padding: 16px; background: var(--primary-light); border-radius: var(--radius-sm); }
.result-item h4 { color: var(--primary); font-size: 14px; margin-bottom: 4px; }
.result-bar { height: 8px; background: #E0D5C7; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.result-bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 1s ease; }

/* ========== PRIORITIES ========== */
.priorities-container { max-width: 800px; margin: 40px auto; padding: 0 24px; }
.priority-item {
  background: white; border-radius: var(--radius-sm); padding: 16px 20px;
  margin-bottom: 12px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px; cursor: grab;
  transition: all 0.3s;
}
.priority-item:hover { box-shadow: var(--shadow-lg); }
.priority-item .drag-handle { font-size: 20px; color: #CCC; cursor: grab; }
.priority-item .p-icon { font-size: 24px; }
.priority-item .p-info { flex: 1; }
.priority-item .p-name { font-weight: 600; color: var(--brown-dark); }
.priority-item .p-desc { font-size: 12px; color: var(--brown); opacity: 0.7; }
.priority-item .p-weight {
  width: 60px; text-align: center; font-weight: 700; color: var(--gold); font-size: 18px;
}
.priority-item input[type="range"] { width: 120px; }
.priority-item .p-remove {
  background: none; border: none; color: #CCC; cursor: pointer; font-size: 18px; padding: 4px;
}
.priority-item .p-remove:hover { color: #C62828; }

.priority-chart {
  margin-top: 32px; padding: 24px; background: white;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.chart-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chart-bar-label { min-width: 100px; font-size: 13px; color: var(--brown); font-weight: 500; }
.chart-bar-track { flex: 1; height: 28px; background: var(--primary-light); border-radius: 14px; overflow: hidden; }
.chart-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold));
  border-radius: 14px; transition: width 0.8s ease;
  display: flex; align-items: center; padding: 0 12px;
  color: white; font-size: 12px; font-weight: 600;
}
.chart-bar-value { min-width: 40px; text-align: center; font-weight: 700; color: var(--primary); }

/* ========== SEARCH ========== */
.search-container { max-width: 1000px; margin: 40px auto; padding: 0 24px; }
.search-filters {
  background: white; border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); margin-bottom: 24px;
}
.search-filters .filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.filter-group { }
.filter-group label { display: block; font-size: 13px; font-weight: 600; color: var(--brown); margin-bottom: 6px; }
.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.profile-card {
  background: white; border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); text-align: center; transition: all 0.3s;
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.profile-card .avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--primary-light), #F8CEDE);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.profile-card .name { font-weight: 700; font-size: 17px; color: var(--brown-dark); }
.profile-card .meta { font-size: 13px; color: var(--brown); opacity: 0.7; margin-bottom: 8px; }
.profile-card .badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.profile-card .badge {
  padding: 3px 10px; border-radius: 50px; font-size: 11px;
  background: var(--primary-light); color: var(--primary);
}
.profile-card .compat { margin: 12px 0; padding: 8px; background: var(--gold-light); border-radius: var(--radius-sm); }
.profile-card .compat strong { color: var(--gold-dark); font-size: 20px; }

/* ========== PROPOSAL ROOM ========== */
.proposal-room {
  max-width: 900px; margin: 40px auto; padding: 0 24px;
}
.proposal-stage {
  background: white; border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow-lg); text-align: center;
  border: 2px solid var(--gold);
}
.proposal-stage .stage-icon { font-size: 64px; margin-bottom: 16px; }
.proposal-stage h2 { color: var(--primary); margin-bottom: 8px; }
.proposal-timeline { display: flex; gap: 16px; justify-content: center; margin: 32px 0; flex-wrap: wrap; }
.timeline-step {
  width: 140px; padding: 16px; background: var(--cream);
  border-radius: var(--radius-sm); text-align: center;
  border: 2px solid transparent; transition: all 0.3s;
}
.timeline-step.active { border-color: var(--gold); background: var(--gold-light); }
.timeline-step.done { border-color: var(--primary); background: var(--primary-light); }
.timeline-step .num {
  width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: #E0D5C7; color: white;
}
.timeline-step.active .num { background: var(--gold); }
.timeline-step.done .num { background: var(--primary); }
.timeline-step .label { font-size: 12px; font-weight: 600; color: var(--brown); }

.participants { display: flex; gap: 24px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.participant {
  text-align: center; padding: 16px 24px;
  background: var(--cream); border-radius: var(--radius-sm);
}
.participant .p-avatar { font-size: 36px; margin-bottom: 4px; }
.participant .p-role { font-size: 12px; color: var(--brown); opacity: 0.6; }
.participant .p-name { font-weight: 600; color: var(--brown-dark); }

/* ========== TABLES ========== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: right; border-bottom: 1px solid #E0D5C7; font-size: 14px; }
th { font-weight: 600; color: var(--primary); background: var(--primary-light); position: sticky; top: 0; }
tr:hover td { background: #FDF2F6; }
.table-container { border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: white; padding: 16px; box-shadow: var(--shadow-lg); border-bottom: 2px solid var(--gold); }
  .nav-links.open a { padding: 12px 16px; }
  .nav-actions.open { display: flex; padding: 0 16px 16px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .journey-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .search-filters .filter-row { grid-template-columns: 1fr 1fr; }
  .result-details { grid-template-columns: 1fr; }
  .proposal-timeline { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  .section { padding: 40px 16px; }
  .dashboard-stats { grid-template-columns: 1fr; }
  .journey-grid { grid-template-columns: 1fr; }
  .search-filters .filter-row { grid-template-columns: 1fr; }
}

/* ========== ANIMATIONS ========== */
.fade-in { animation: fadeIn 0.5s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.slide-up { animation: slideUp 0.4s ease forwards; }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.stagger > * { animation: fadeIn 0.5s ease forwards; opacity: 0; }
.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.2s; }
.stagger > *:nth-child(3) { animation-delay: 0.3s; }
.stagger > *:nth-child(4) { animation-delay: 0.4s; }
.stagger > *:nth-child(5) { animation-delay: 0.5s; }
.stagger > *:nth-child(6) { animation-delay: 0.6s; }
.stagger > *:nth-child(7) { animation-delay: 0.7s; }
.stagger > *:nth-child(8) { animation-delay: 0.8s; }

/* ========== FOOTER ========== */
.footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; text-align: center; padding: 32px 24px; margin-top: 60px;
}
.footer p { opacity: 0.8; font-size: 14px; }

/* ========== TOAST ========== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; padding: 14px 28px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  z-index: 2000; display: none; font-weight: 600;
}
.toast.show { display: block; animation: fadeIn 0.3s ease; }

/* ========== EMPTY STATE ========== */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state .icon { font-size: 64px; margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { color: var(--brown); margin-bottom: 8px; }
.empty-state p { color: var(--brown); opacity: 0.6; }

/* ========== TABS ========== */
.tabs { display: flex; gap: 0; margin-bottom: 24px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--primary); }
.tab { flex: 1; padding: 12px 20px; text-align: center; cursor: pointer; font-weight: 600; background: white; color: var(--primary); transition: all 0.3s; font-size: 14px; }
.tab.active { background: var(--primary); color: white; }
.tab:hover:not(.active) { background: var(--primary-light); }
.tab.tab-highlight { position: relative; }
.tab.tab-highlight:not(.active) { background: var(--gold-light); color: var(--gold-dark); }
.tab.tab-highlight:not(.active)::after { content: '•'; position: absolute; top: 4px; left: 4px; color: #C62828; font-size: 20px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ========== MODAL ========== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 3000; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }
.modal { background: white; border-radius: var(--radius); padding: 32px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h3 { color: var(--primary); margin-bottom: 16px; }
.modal-close { float: left; cursor: pointer; font-size: 24px; color: var(--brown); opacity: 0.5; transition: all 0.2s; }
.modal-close:hover { opacity: 1; color: #C62828; }

/* ========== VERIFICATION BADGES ========== */
.verification-tier { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 600; }
.tier-silver { background: #F5F5F5; color: #757575; border: 1px solid #BDBDBD; }
.tier-gold { background: var(--gold-light); color: var(--gold-dark); border: 1px solid var(--gold); }
.tier-platinum { background: var(--primary-light); color: var(--primary-dark); border: 1px solid var(--primary); }

/* ========== ACADEMY ========== */
.course-card {
  background: white; border-radius: var(--radius-sm); padding: 20px;
  box-shadow: var(--shadow); display: flex; gap: 16px; align-items: center;
  margin-bottom: 12px; transition: all 0.3s;
}
.course-card:hover { transform: translateX(-4px); box-shadow: var(--shadow-lg); }
.course-card .c-icon { font-size: 36px; }
.course-card .c-info { flex: 1; }
.course-card .c-title { font-weight: 600; color: var(--brown-dark); }
.course-card .c-desc { font-size: 13px; color: var(--brown); opacity: 0.7; }
.course-card .c-progress { font-size: 12px; font-weight: 600; color: var(--primary); }
.course-card .c-status { padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 600; }
.c-status.required { background: #FFEBEE; color: #C62828; }
.c-status.completed-status { background: var(--primary-light); color: var(--primary); }

/* ========== Responsive nav for new links ========== */
@media (max-width: 1100px) {
  .nav-links {
    flex-wrap: wrap; justify-content: center;
    gap: 4px; padding: 8px 0;
  }
  .nav-links a { font-size: 12px; padding: 4px 8px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; width: 100%; }
  .nav-links.open { display: flex; }
  .nav-actions.open { display: flex; }
  .nav-links a { padding: 10px 16px; border-bottom: 1px solid #F0E8D8; }
  .mobile-menu-btn { display: block; }
}

/* ========== Deposit, Warnings, Guardian, Flexibility ========== */
.auth-container .card { transition: all 0.3s; }
.auth-container .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ========== UI ENHANCEMENTS ========== */

/* Alternating section bg */
.section-alt { background: #FDF2F6; }
.section-white { background: white; }

/* Enhanced card variants */
.card-primary { border-top: 4px solid var(--primary); }
.card-accent { border-top: 4px solid var(--accent); }
.card-gold { border-top: 4px solid var(--gold); }
.card-soft { background: var(--primary-light); border: 1px solid rgba(247,92,142,0.1); }

/* Better stat cards */
.stat-card-modern {
  background: white; border-radius: var(--radius); padding: 24px;
  text-align: center; box-shadow: var(--shadow);
  border-top: 3px solid var(--primary); transition: all 0.3s;
}
.stat-card-modern:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card-modern .stat-icon { font-size: 32px; margin-bottom: 8px; }
.stat-card-modern .stat-value { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card-modern .stat-label { font-size: 13px; color: var(--brown); opacity: 0.7; }

/* Badge tags */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 50px; font-size: 11px; font-weight: 600;
}
.tag-primary { background: var(--primary-light); color: var(--primary-dark); }
.tag-accent { background: var(--accent-light); color: var(--accent-dark); }
.tag-gold { background: var(--gold-light); color: var(--gold-dark); }

/* Button variants */
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; box-shadow: 0 4px 15px rgba(139,103,217,0.3); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139,103,217,0.4); }
.btn-ghost { background: transparent; color: var(--brown); border: 1px solid #E0D5C7; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Glass card */
.card-glass {
  background: rgba(255,255,255,0.8); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.3); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Divider */
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--primary), transparent); margin: 32px 0; opacity: 0.2; }
.divider-light { height: 1px; background: #F0E8E8; margin: 24px 0; }

/* Step indicator */
.step-indicator { display: flex; align-items: center; gap: 8px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: #E0D5C7; }
.step-dot.active { background: var(--primary); box-shadow: 0 0 0 3px rgba(247,92,142,0.2); }
.step-dot.done { background: var(--primary-dark); }

/* Notification badge (count) */
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--primary); color: white; font-size: 11px; font-weight: 700;
  border-radius: 50px;
}

/* Profile avatar shared */
.avatar-circle {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #F8CEDE);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; flex-shrink: 0;
}

/* Online indicator */
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: #4CAF50; display: inline-block; border: 2px solid white; }
.offline-dot { width: 10px; height: 10px; border-radius: 50%; background: #BDBDBD; display: inline-block; border: 2px solid white; }
.away-dot { width: 10px; height: 10px; border-radius: 50%; background: #FFA726; display: inline-block; border: 2px solid white; }

/* Smooth page transition */
.page-enter { animation: pageEnter 0.35s ease forwards; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* Hover lift (generic) */
.hover-lift { transition: all 0.3s; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Status badges */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.status-active { background: #E8F5E9; color: #2E7D32; }
.status-pending { background: #FFF3E0; color: #E65100; }
.status-blocked { background: #FFEBEE; color: #C62828; }
.status-verified { background: var(--primary-light); color: var(--primary-dark); }

/* Pricing card highlight */
.pricing-popular {
  position: relative; border: 2px solid var(--gold);
  transform: scale(1.02); z-index: 1;
}
.pricing-popular::before {
  content: 'الأكثر طلباً'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: white; padding: 4px 20px; border-radius: 50px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .pricing-popular { transform: scale(1); }
}

/* ========== ADMIN THEME (AdminLTE 4 Inspired) ========== */
:root {
  --admin-sidebar-bg: linear-gradient(180deg, #1a1a2e, #16213e);
  --admin-sidebar-hover: rgba(255,255,255,0.06);
  --admin-sidebar-active: linear-gradient(135deg, var(--primary), #D6336C);
  --admin-header-bg: #ffffff;
  --admin-card-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --admin-card-hover-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.admin-wrapper {
  display: flex; min-height: calc(100vh - 70px); margin-top: 70px;
}

/* ===== SIDEBAR ===== */
.admin-sidebar {
  width: 250px; background: var(--admin-sidebar-bg);
  display: flex; flex-direction: column; position: fixed;
  top: 70px; right: 0; bottom: 0; z-index: 900;
  box-shadow: 2px 0 15px rgba(0,0,0,0.1);
  transition: all 0.3s;
}
.admin-sidebar-header {
  padding: 20px 20px 12px; text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-sidebar-header .logo-text {
  font-size: 18px; color: white; font-weight: 700;
}
.admin-sidebar-header .logo-sub {
  font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 4px;
}

.admin-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.admin-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; margin: 2px 10px; border-radius: 8px;
  color: rgba(255,255,255,0.65); text-decoration: none;
  font-size: 13px; cursor: pointer; transition: all 0.25s;
  border: none; background: none; width: calc(100% - 20px); text-align: right;
  font-family: inherit;
}
.admin-nav-item:hover { background: var(--admin-sidebar-hover); color: white; }
.admin-nav-item.active {
  background: var(--admin-sidebar-active); color: white;
  box-shadow: 0 4px 15px rgba(247,92,142,0.3);
}
.admin-nav-item .nav-icon { font-size: 16px; width: 24px; text-align: center; }
.admin-nav-item .nav-badge {
  margin-right: auto; font-size: 10px; padding: 2px 8px;
  border-radius: 50px; background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8);
}

.admin-sidebar-footer {
  padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 12px;
}
.admin-sidebar-footer .admin-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: white; flex-shrink: 0;
}
.admin-sidebar-footer .admin-info { flex: 1; overflow: hidden; }
.admin-sidebar-footer .admin-name { font-size: 13px; font-weight: 600; color: white; }
.admin-sidebar-footer .admin-role { font-size: 10px; color: rgba(255,255,255,0.45); }

/* ===== MAIN CONTENT ===== */
.admin-content {
  flex: 1; margin-right: 250px; background: #f4f6f9;
  min-height: calc(100vh - 70px);
}

/* ===== HEADER ===== */
.admin-header {
  background: var(--admin-header-bg); padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: sticky; top: 70px; z-index: 800;
  flex-wrap: wrap; gap: 8px;
}
.admin-header-title h1 {
  font-size: 20px; font-weight: 700; color: var(--brown-dark); margin: 0;
}
.admin-header-title .breadcrumb {
  font-size: 12px; color: var(--brown); opacity: 0.6; margin-top: 2px;
}
.admin-header-title .breadcrumb span { color: var(--primary); }
.admin-header-actions { display: flex; gap: 8px; align-items: center; }

/* ===== PAGE CONTENT ===== */
.admin-page { padding: 24px 28px; }

/* Admin stat cards */
.admin-stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.admin-stat-card {
  background: white; border-radius: 10px; padding: 20px;
  box-shadow: var(--admin-card-shadow); transition: all 0.3s;
  display: flex; align-items: center; gap: 16px;
  border-right: 3px solid var(--primary);
}
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--admin-card-hover-shadow); }
.admin-stat-card .stat-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.admin-stat-card .stat-body { flex: 1; }
.admin-stat-card .stat-value { font-size: 24px; font-weight: 800; color: var(--brown-dark); line-height: 1.2; }
.admin-stat-card .stat-label { font-size: 12px; color: var(--brown); opacity: 0.6; }

/* Admin card (content box) */
.admin-box {
  background: white; border-radius: 10px; box-shadow: var(--admin-card-shadow);
  margin-bottom: 20px; overflow: hidden;
}
.admin-box-header {
  padding: 16px 20px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.admin-box-header h3 { font-size: 15px; font-weight: 700; color: var(--brown-dark); margin: 0; }
.admin-box-body { padding: 20px; }

/* Admin tables */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--brown); opacity: 0.7;
  border-bottom: 2px solid #f0f0f0; text-align: right; white-space: nowrap;
  background: #fafafa;
}
.admin-table td {
  padding: 10px 14px; font-size: 13px; color: var(--brown-dark);
  border-bottom: 1px solid #f5f5f5;
}
.admin-table tr:hover td { background: #fdf2f6; }
.admin-table .actions-cell { display: flex; gap: 4px; flex-wrap: wrap; }

/* Admin small badge */
.admin-badge {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 600;
}

/* Admin toggle switch */
.admin-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.admin-switch input { opacity: 0; width: 0; height: 0; }
.admin-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #ddd; border-radius: 22px; transition: 0.3s;
}
.admin-slider::before {
  content: ''; position: absolute; height: 16px; width: 16px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s;
}
.admin-switch input:checked + .admin-slider { background: var(--primary); }
.admin-switch input:checked + .admin-slider::before { transform: translateX(18px); }

/* Admin filter bar */
.admin-filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 16px 20px; background: #fafafa; border-radius: 8px; margin-bottom: 16px;
}
.admin-filters input, .admin-filters select {
  padding: 8px 14px; border: 1px solid #e0e0e0; border-radius: 6px;
  font-size: 13px; background: white; font-family: inherit;
  outline: none; transition: 0.2s;
}
.admin-filters input:focus, .admin-filters select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(247,92,142,0.1); }

/* Responsive */
@media (max-width: 900px) {
  .admin-sidebar { width: 60px; overflow: hidden; }
  .admin-sidebar .admin-nav-item span:not(.nav-icon) { display: none; }
  .admin-sidebar .admin-nav-item { justify-content: center; padding: 11px 0; margin: 2px 6px; }
  .admin-sidebar-header .logo-text, .admin-sidebar-header .logo-sub { display: none; }
  .admin-sidebar-footer .admin-info { display: none; }
  .admin-content { margin-right: 60px; }
  .admin-page { padding: 16px; }
  .admin-header { padding: 12px 16px; }
}
@media (max-width: 600px) {
  .admin-sidebar { width: 0; display: none; }
  .admin-content { margin-right: 0; }
  .admin-stat-row { grid-template-columns: 1fr 1fr; }
}
