/* ========================================
   Joodiq - CSS الرئيسي
   ألوان سومرية وعراقية
   ======================================== */

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

/* ========================================
   متغيرات الألوان
   ======================================== */
:root {
    --primary: #1E3A8A;
    --primary-dark: #1a3270;
    --primary-light: #2d4ea8;
    --teal: #14B8A6;
    --teal-dark: #0d9d8c;
    --teal-light: #2dd4bf;
    --gold: #F4B400;
    --gold-dark: #d4980a;
    --gold-light: #f7c733;
    --white: #F8FAFC;
    --dark: #0F172A;
    --dark-card: #1e2d4a;
    --gray: #64748B;
    --gray-light: #CBD5E1;
    --border: rgba(255,255,255,0.1);
    --shadow: 0 4px 24px rgba(14, 30, 60, 0.15);
    --shadow-lg: 0 8px 48px rgba(14, 30, 60, 0.25);
    --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #0d2a6b 100%);
    --gradient-card: linear-gradient(135deg, rgba(30,58,138,0.12) 0%, rgba(20,184,166,0.08) 100%);
    --gradient-gold: linear-gradient(135deg, #F4B400, #f7c733);
    --gradient: linear-gradient(135deg, #1E3A8A, #14B8A6);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 999px;

    /* ── متغيرات نظام الثيم الداكن (تُستخدم في صفحات المحفظة والـ Alert) ── */
    --bg-page:      #0F172A;
    --card-bg:      #1a2744;
    --card-border:  rgba(255,255,255,0.08);
    --text-primary: #F1F5F9;
    --text-muted:   #94A3B8;
    --input-bg:     rgba(255,255,255,0.05);
    --input-border: rgba(255,255,255,0.12);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--white);
    color: var(--dark);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    min-height: 100vh;
}

body.dark-bg {
    background: var(--dark);
    color: #e2e8f0;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }

/* ========================================
   زخارف سومرية - Sumerian Patterns
   ======================================== */
.sumerian-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}
.sumerian-divider::before,
.sumerian-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.sumerian-divider::before { right: 0; }
.sumerian-divider::after { left: 0; }
.sumerian-divider span {
    display: inline-block;
    background: var(--white);
    padding: 0 12px;
    color: var(--gold);
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

/* زخرفة سومرية كـ background pattern */
.sumerian-bg {
    position: relative;
    overflow: hidden;
}
.sumerian-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(244,180,0,0.03) 8px, rgba(244,180,0,0.03) 9px),
        repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(20,184,166,0.03) 8px, rgba(20,184,166,0.03) 9px);
    pointer-events: none;
    z-index: 0;
}

/* نمط شبكي عراقي */
.iraq-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(30,58,138,0.08) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(20,184,166,0.06) 0%, transparent 50%);
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    transition: all 0.4s ease;
    background: rgba(15, 23, 42, 0.0);
    backdrop-filter: blur(0px);
}
.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(244,180,0,0.15);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
}
.nav-logo .logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(244,180,0,0.4);
}
.nav-logo span { 
    background: linear-gradient(135deg, #fff, var(--teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}
.nav-links a {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s;
}
.nav-links a:hover { color: white; background: rgba(255,255,255,0.1); }
.nav-cta {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    border-radius: var(--radius-full);
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.3s;
}
.btn:hover::before { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px rgba(30,58,138,0.4);
}
.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 6px 25px rgba(30,58,138,0.5);
    transform: translateY(-2px);
}

.btn-gold {
    background: var(--gradient-gold);
    color: var(--dark);
    box-shadow: 0 4px 20px rgba(244,180,0,0.35);
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(244,180,0,0.5);
}

.btn-teal {
    background: var(--teal);
    color: white;
    box-shadow: 0 4px 20px rgba(20,184,166,0.35);
}
.btn-teal:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(20,184,166,0.4);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.35);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.88rem; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn-xl { padding: 1.2rem 2.8rem; font-size: 1.15rem; }

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

/* دوائر متحركة خلفية */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(20,184,166,0.25), transparent 70%);
    top: -100px; left: -100px;
    animation-delay: 0s;
}
.hero-orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(244,180,0,0.15), transparent 70%);
    bottom: -150px; right: -150px;
    animation-delay: 3s;
}
.hero-orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(30,58,138,0.4), transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 1.5s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* نمط شبكي هندسي سومري */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(244,180,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(244,180,0,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(244,180,0,0.15);
    border: 1px solid rgba(244,180,0,0.3);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease forwards;
}

.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin-bottom: 1rem;
    animation: fadeInDown 0.7s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}
.hero-title .highlight {
    background: linear-gradient(135deg, var(--gold), var(--teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 2rem;
    animation: fadeInDown 0.7s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInDown 0.7s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    animation: fadeInDown 0.7s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}
.hero-stat { text-align: center; }
.hero-stat .num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
    display: block;
}
.hero-stat .label {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}

/* Hero Visual (Right Side) */
.hero-visual {
    position: relative;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}
.hero-phone-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}
.hero-phone {
    width: 260px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 36px;
    padding: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: phoneFloat 4s ease-in-out infinite;
}
@keyframes phoneFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.phone-inner {
    background: var(--dark);
    border-radius: 28px;
    overflow: hidden;
    min-height: 460px;
}
.phone-header {
    background: var(--primary);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.phone-notch {
    width: 80px; height: 6px;
    background: rgba(0,0,0,0.5);
    border-radius: 3px;
    margin: 0 auto 0.8rem;
}
.phone-balance {
    background: var(--primary);
    padding: 1rem 1rem 1.5rem;
    text-align: center;
    color: white;
}
.phone-balance .amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
}

/* Floating Cards Around Phone */
.floating-card {
    position: absolute;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    backdrop-filter: blur(12px);
    color: white;
    font-size: 0.8rem;
    white-space: nowrap;
    animation: floatCard 5s ease-in-out infinite;
}
.floating-card.card-1 {
    top: 10%;
    right: -20px;
    animation-delay: 0.5s;
    border-color: rgba(244,180,0,0.3);
}
.floating-card.card-2 {
    bottom: 20%;
    left: -20px;
    animation-delay: 1.5s;
    border-color: rgba(20,184,166,0.3);
}
.floating-card .card-icon {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}
.floating-card .card-amount {
    font-weight: 700;
    color: var(--gold);
}
@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 5rem 0;
}
.section-dark {
    background: var(--dark);
    color: white;
}
.section-light {
    background: #f1f5f9;
}
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.05rem;
    margin-bottom: 3rem;
}
.dark .section-subtitle { color: rgba(255,255,255,0.6); }

/* ========================================
   Feature Cards
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(30,58,138,0.06);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: right;
}
.feature-card:hover::before { transform: scaleX(1); transform-origin: left; }
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.feature-icon.blue { background: rgba(30,58,138,0.1); }
.feature-icon.teal { background: rgba(20,184,166,0.12); }
.feature-icon.gold { background: rgba(244,180,0,0.12); }
.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--dark);
}
.feature-card p {
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.6;
}

/* ========================================
   Creator Cards
   ======================================== */
.creators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.creator-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(30,58,138,0.06);
}
.creator-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.creator-card-cover {
    height: 90px;
    background: var(--gradient-hero);
    position: relative;
}
.creator-card-cover.teal { background: linear-gradient(135deg, #0d9d8c, #14B8A6); }
.creator-card-cover.gold { background: linear-gradient(135deg, #d4980a, #F4B400); }
.creator-card-avatar {
    width: 70px; height: 70px;
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    bottom: -35px;
    right: 50%;
    transform: translateX(50%);
    object-fit: cover;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    overflow: hidden;
}
.creator-card-body {
    padding: 2.5rem 1rem 1.2rem;
    text-align: center;
}
.creator-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.2rem;
}
.creator-card-cat {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.8rem;
}
.creator-card-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--gray);
    margin-bottom: 1rem;
}
.creator-card-stats span { display: flex; align-items: center; gap: 3px; }

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 1.2rem;
}
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 0.4rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    color: var(--dark);
    background: white;
    transition: all 0.3s;
    outline: none;
    direction: rtl;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}
.form-control::placeholder { color: #94a3b8; }

.form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    padding-left: 2.5rem;
}

.input-icon {
    position: relative;
}
.input-icon .icon {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.1rem;
    pointer-events: none;
}
.input-icon .form-control {
    padding-right: 2.8rem;
}

/* ========================================
   Auth Pages
   ======================================== */
.auth-page {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}
.auth-card {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4);
    animation: authSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes authSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-logo {
    text-align: center;
    margin-bottom: 1.8rem;
}
.auth-logo .logo-big {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
}
.auth-logo .logo-big span { color: var(--gold); }
.auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
    margin-bottom: 0.3rem;
}
.auth-sub {
    font-size: 0.88rem;
    color: var(--gray);
    text-align: center;
    margin-bottom: 1.8rem;
}
.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.2rem 0;
    color: var(--gray);
    font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #e2e8f0;
}
.auth-divider::before { right: 0; }
.auth-divider::after { left: 0; }
.auth-footer {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.88rem;
    color: var(--gray);
}
.auth-footer a { color: var(--primary); font-weight: 700; }
.auth-footer a:hover { color: var(--teal); }

/* ========================================
   Dashboard
   ======================================== */
.dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background: var(--bg-page);
}

/* هيدر الموبايل (يظهر فقط على الشاشات الصغيرة) */
.mobile-dash-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 400;
    height: 58px;
    background: var(--dark);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0 1.25rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hamburger-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
    line-height: 1;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.1); }
.mobile-logo { font-size: 1.3rem; font-weight: 900; color: white; }
.mobile-logo span { color: var(--gold); }

/* Overlay للـ sidebar على الموبايل */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 350;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }
.sidebar {
    background: var(--dark);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}
.sidebar-logo {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 1rem;
}
.sidebar-logo .logo-text {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
}
.sidebar-logo .logo-text span { color: var(--gold); }
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-right: 3px solid transparent;
    text-decoration: none;
}
.sidebar-nav a:hover {
    color: white;
    background: rgba(255,255,255,0.07);
}
.sidebar-nav a.active {
    color: var(--gold);
    background: rgba(244,180,0,0.1);
    border-right-color: var(--gold);
    font-weight: 700;
}
.sidebar-nav a .icon { font-size: 1.05rem; min-width: 22px; }
/* رصيد المحفظة في الـ sidebar */
.sidebar-balance {
    margin: 1rem 1.25rem 1.5rem;
    background: rgba(244,180,0,0.08);
    border: 1px solid rgba(244,180,0,0.18);
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
}
.sb-label { font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-bottom: 0.3rem; }
.sb-amount { font-size: 1.5rem; font-weight: 900; color: var(--gold); line-height: 1.1; }
.sb-currency { font-size: 0.7rem; color: rgba(255,255,255,0.35); margin-bottom: 0.1rem; }

.dashboard-content {
    padding: 2rem;
    overflow-y: auto;
    background: var(--bg-page);
    color: var(--text-primary);
}
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}
.dash-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.stat-card-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.stat-card-icon.primary { background: rgba(30,58,138,0.2); color: #6b8ee8; }
.stat-card-icon.teal { background: rgba(20,184,166,0.15); color: var(--teal); }
.stat-card-icon.gold { background: rgba(244,180,0,0.15); color: var(--gold); }
.stat-card-icon.green { background: rgba(34,197,94,0.15); color: #4ade80; }
.stat-card-value {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}
.stat-card-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ========================================
   Donation Page
   ======================================== */
.donation-page {
    min-height: 100vh;
    background: #f1f5f9;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.donation-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
.donation-header {
    background: var(--gradient-hero);
    padding: 2rem;
    text-align: center;
    position: relative;
}
.donation-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    margin: 0 auto 1rem;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    overflow: hidden;
}
.donation-creator-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
}
.donation-creator-cat {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.2rem;
}
.donation-body { padding: 1.8rem; }
.amount-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.amount-btn {
    padding: 0.7rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s;
    color: var(--dark);
    text-align: center;
}
.amount-btn:hover, .amount-btn.active {
    border-color: var(--gold);
    background: rgba(244,180,0,0.1);
    color: var(--gold-dark);
}
.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}
.pay-method {
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: var(--dark);
}
.pay-method:hover, .pay-method.active {
    border-color: var(--primary);
    background: rgba(30,58,138,0.05);
}
.pay-method .method-icon { font-size: 1.2rem; }

/* ========================================
   Alert Box (OBS Widget)
   ======================================== */
.alert-widget {
    position: fixed;
    top: 50px;
    right: 50%;
    transform: translateX(50%);
    z-index: 9999;
    pointer-events: none;
    width: 500px;
}
.alert-box {
    background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,58,138,0.95));
    border: 2px solid var(--gold);
    border-radius: 20px;
    padding: 1.2rem 1.8rem;
    text-align: center;
    color: white;
    box-shadow: 0 0 40px rgba(244,180,0,0.4), 0 20px 60px rgba(0,0,0,0.5);
    animation: alertSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    display: none;
}
.alert-box.show { display: block; }
.alert-confetti { font-size: 2rem; margin-bottom: 0.5rem; animation: spin 1s ease-in-out; }
.alert-name { font-size: 1.4rem; font-weight: 900; color: var(--gold); }
.alert-amount { font-size: 1.1rem; color: var(--teal-light); font-weight: 700; margin: 0.3rem 0; }
.alert-msg { font-size: 0.95rem; color: rgba(255,255,255,0.85); }
@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-40px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes spin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.3); }
    100% { transform: rotate(360deg) scale(1); }
}

/* ========================================
   Flash Messages
   ======================================== */
.flash {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: fadeInDown 0.4s ease;
}
.flash-success { background: rgba(20,184,166,0.1); color: #0d7a6e; border: 1px solid rgba(20,184,166,0.3); }
.flash-error { background: rgba(239,68,68,0.1); color: #c53030; border: 1px solid rgba(239,68,68,0.3); }
.flash-info { background: rgba(30,58,138,0.08); color: var(--primary); border: 1px solid rgba(30,58,138,0.2); }

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--teal), var(--gold), var(--teal), var(--primary));
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer-logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.8rem;
}
.footer-logo span { color: var(--gold); }
.footer-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
}
.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    color: var(--gold-light);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--teal-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.35);
}

/* ========================================
   Badges & Tags
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-primary { background: rgba(30,58,138,0.1); color: var(--primary); }
.badge-teal { background: rgba(20,184,166,0.1); color: var(--teal-dark); }
.badge-gold { background: rgba(244,180,0,0.15); color: var(--gold-dark); }
.badge-success { background: rgba(34,197,94,0.1); color: #15803d; }
.badge-verified { background: var(--teal); color: white; }

/* ========================================
   Progress Bar
   ======================================== */
.progress-wrap { background: #e2e8f0; border-radius: 999px; overflow: hidden; height: 8px; }
.progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(to left, var(--gold), var(--teal));
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite linear;
    background-size: 200% 100%;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }

    /* Dashboard mobile - sidebar منزلقة */
    .dashboard {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }
    .sidebar {
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        z-index: 500;
        transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        overflow-y: auto;
    }
    .sidebar.open {
        right: 0;
        box-shadow: -4px 0 30px rgba(0,0,0,0.5);
    }
    .mobile-dash-header { display: flex; }
    .dashboard-content { padding-top: 4.5rem; }

    /* صفحات التحكم الفرعية */
    .alert-layout { grid-template-columns: 1fr !important; }
    .goals-layout { grid-template-columns: 1fr !important; }
    .withdraw-layout { grid-template-columns: 1fr !important; }
    .settings-layout { grid-template-columns: 1fr !important; }
    .form-row { grid-template-columns: 1fr !important; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .section { padding: 3rem 0; }
    .hero-title { font-size: 1.8rem; }
    .hero-stats { gap: 1.2rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .creators-grid { grid-template-columns: repeat(2, 1fr); }
    .payment-methods { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .auth-card { padding: 1.5rem; }
    .creators-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ========================================
   نظام الثيم الداكن - صفحات لوحة التحكم الفرعية
   (wallet, alert-settings, settings, withdraw, etc.)
   ======================================== */

/* خلفية الصفحات الداكنة */
body:has(.wallet-wrap),
body:has(.alert-layout),
body:has(.settings-wrap),
body:has(.withdraw-wrap),
body:has(.goals-wrap),
body:has(.followers-wrap),
body:has(.donations-wrap) {
    background: var(--bg-page);
    color: var(--text-primary);
}

/* fallback للمتصفحات التي لا تدعم :has() */
.dark-page {
    background: var(--bg-page) !important;
    color: var(--text-primary) !important;
}

/* الـ Navbar في الصفحات الداكنة */
.navbar {
    background: rgba(15,23,42,0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.navbar .nav-logo { color: white; }
.navbar .nav-links a { color: rgba(255,255,255,0.7); }
.navbar .nav-links a:hover { color: white; background: rgba(255,255,255,0.08); }
.navbar .btn-outline {
    color: rgba(255,255,255,0.8);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    padding: 0.45rem 1.1rem;
    font-size: 0.88rem;
    transition: all 0.2s;
}
.navbar .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.4);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}
.logo-j {
    color: var(--gold);
    font-weight: 900;
}

/* ── بطاقات الثيم الداكن ── */
.w-stat,
.alert-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.w-stat:hover,
.alert-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ── العناوين داخل البطاقات ── */
.alert-card h3 {
    color: var(--text-primary) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 0.75rem;
    margin-bottom: 1.2rem !important;
}

/* ── الحقول داخل الثيم الداكن ── */
.alert-card input:not([type=color]):not([type=range]):not([type=checkbox]),
.alert-card select,
.alert-card textarea {
    background: var(--input-bg) !important;
    border: 1.5px solid var(--input-border) !important;
    border-radius: 0.75rem !important;
    color: var(--text-primary) !important;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s;
}
.alert-card input:focus,
.alert-card select:focus,
.alert-card textarea:focus {
    border-color: var(--teal) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}

/* ── labels ── */
.alert-card .form-group label,
.alert-card label {
    color: var(--text-muted) !important;
}

/* ── theme-option ── */
.theme-option {
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.03);
}
.theme-option:hover { border-color: var(--teal); background: rgba(20,184,166,0.07); }
.theme-option.selected { border-color: var(--gold) !important; background: rgba(244,180,0,0.1) !important; }
.theme-option .theme-name { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.3rem; }

/* ── anim-option ── */
.anim-option {
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all 0.2s;
    background: rgba(255,255,255,0.02);
}
.anim-option:hover { border-color: var(--teal); color: var(--teal); background: rgba(20,184,166,0.07); }
.anim-option.selected { border-color: var(--gold) !important; color: var(--gold) !important; background: rgba(244,180,0,0.08) !important; }

/* ── أزرار الحفظ والمعاينة ── */
.btn-save {
    background: var(--gradient) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    padding: 0.85rem 2rem !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: opacity 0.2s, transform 0.2s !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-save:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-preview {
    background: rgba(244,180,0,0.12) !important;
    border: 1.5px solid var(--gold) !important;
    color: var(--gold) !important;
    border-radius: 0.75rem !important;
    padding: 0.85rem 2rem !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-preview:hover { background: rgba(244,180,0,0.22) !important; }

/* ── copy button ── */
.copy-btn {
    background: var(--gradient) !important;
    border: none !important;
    border-radius: 0.5rem !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.85rem !important;
    cursor: pointer !important;
    margin-top: 0.75rem !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.2s;
}
.copy-btn:hover { opacity: 0.88; }

/* ── OBS URL box ── */
.obs-url-box {
    background: rgba(0,0,0,0.35) !important;
    border: 1.5px solid rgba(255,255,255,0.1) !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    font-family: monospace !important;
    font-size: 0.8rem !important;
    color: var(--teal) !important;
    word-break: break-all !important;
}

/* ── step badge ── */
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── obs steps ── */
.obs-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}
.obs-step:last-child { border-bottom: none; margin-bottom: 0; }

/* ── preview frame ── */
.preview-frame {
    width: 100%;
    aspect-ratio: 8/3;
    border-radius: 1rem;
    border: 2px solid rgba(255,255,255,0.1);
    overflow: hidden;
    background: #0a0f1e;
}
.preview-frame-wrap { position: sticky; top: 5rem; }

/* ── range slider ── */
.volume-track {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
    outline: none;
}
.volume-track::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(244,180,0,0.4);
}

/* ── color row ── */
.color-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.color-row input[type=color] {
    width: 48px; height: 48px;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    background: none;
    padding: 0;
}

/* ── wallet values ── */
.w-val { color: var(--text-primary) !important; }
.w-label { color: var(--text-muted) !important; }
.tx-title { color: var(--text-primary) !important; }
.tx-date  { color: var(--text-muted)  !important; }

/* ── filter tabs داكن ── */
.filter-tab {
    background: rgba(255,255,255,0.06) !important;
    border: none !important;
    border-radius: 0.5rem !important;
    color: var(--text-muted) !important;
    padding: 0.5rem 1.25rem !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
}
.filter-tab.active,
.filter-tab:hover {
    background: var(--gradient) !important;
    color: white !important;
}

/* ── pagination داكن ── */
.pagination a, .pagination span {
    background: rgba(255,255,255,0.06) !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.85rem !important;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
}
.pagination a:hover { background: rgba(20,184,166,0.2) !important; color: var(--teal) !important; }
.pagination .current { background: var(--gradient) !important; color: white !important; }

/* ── tx items ── */
.tx-item {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
    border-radius: 0.75rem !important;
}

/* ── الصفحات الداكنة ستلون الـ body تلقائياً ── */
@media (min-width: 1px) {
    .wallet-wrap ~ body,
    body:not(.dashboard *) .wallet-wrap {
        background: var(--bg-page);
    }
}

/* ========================================
   صفحة الإعدادات (settings.php)
   ======================================== */
.settings-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 1.25rem;
    transition: box-shadow 0.2s;
}
.settings-sidebar {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
}
.settings-card h3,
.settings-sidebar .settings-nav a { color: var(--text-muted); }
.settings-sidebar .settings-nav a:hover,
.settings-sidebar .settings-nav a.active {
    background: rgba(20,184,166,0.12) !important;
    color: var(--teal) !important;
}
.settings-card h3 { color: var(--text-primary) !important; }
.settings-card input,
.settings-card select,
.settings-card textarea {
    background: var(--input-bg) !important;
    border: 1.5px solid var(--input-border) !important;
    color: var(--text-primary) !important;
    border-radius: 0.75rem !important;
    font-family: 'Cairo', sans-serif;
}
.settings-card input:focus,
.settings-card select:focus,
.settings-card textarea:focus {
    border-color: var(--teal) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(20,184,166,0.15);
}
.settings-card label { color: var(--text-muted) !important; }
.settings-avatar-wrap div[style] { color: var(--text-primary) !important; }

/* avatar & cover upload areas */
.avatar-upload-area,
.cover-upload-area {
    border-color: rgba(255,255,255,0.15) !important;
    color: var(--text-muted);
}
.avatar-upload-area:hover,
.cover-upload-area:hover {
    border-color: var(--teal) !important;
    background: rgba(20,184,166,0.05) !important;
}

/* ========================================
   صفحة الأهداف (goals.php)
   ======================================== */
.goal-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 1rem;
    transition: transform 0.2s;
}
.goal-card:hover { transform: translateY(-2px); }
.goal-title { color: var(--text-primary) !important; }
.goal-desc, .goal-stats { color: var(--text-muted) !important; }
.action-btn {
    background: rgba(255,255,255,0.06) !important;
    border: none !important;
    color: var(--text-muted) !important;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}
.action-btn:hover { background: rgba(255,255,255,0.12) !important; color: var(--text-primary) !important; }
.action-btn.danger:hover { background: rgba(239,68,68,0.15) !important; color: #ef4444 !important; }
.pct-badge { background: rgba(20,184,166,0.15) !important; color: var(--teal) !important; }
.progress-fill { background: var(--gradient) !important; }
.btn-create {
    background: var(--gradient) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    width: 100% !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 0.8rem 2rem !important;
    transition: opacity 0.2s !important;
}
.btn-create:hover { opacity: 0.9; }

/* ========================================
   صفحة السحب (withdraw.php)
   ======================================== */
.balance-hero {
    background: var(--gradient) !important;
    border-radius: 1.25rem !important;
}
.method-card {
    border: 2px solid rgba(255,255,255,0.1) !important;
    border-radius: 0.75rem !important;
    transition: all 0.2s !important;
    color: var(--text-primary) !important;
    background: rgba(255,255,255,0.02);
}
.method-card:hover { border-color: var(--teal) !important; background: rgba(20,184,166,0.05) !important; }
.method-card.selected { border-color: var(--gold) !important; background: rgba(244,180,0,0.08) !important; }
.method-card .m-name { color: var(--text-muted) !important; }
.preset-btn {
    background: rgba(255,255,255,0.06) !important;
    border: 1.5px solid rgba(255,255,255,0.12) !important;
    color: var(--text-muted) !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-family: 'Cairo', sans-serif !important;
}
.preset-btn:hover,
.preset-btn.active { border-color: var(--gold) !important; color: var(--gold) !important; background: rgba(244,180,0,0.08) !important; }
.btn-submit {
    background: var(--gradient) !important;
    color: white !important;
    border: none !important;
    border-radius: 0.75rem !important;
    width: 100% !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 0.9rem 2rem !important;
}
.info-box {
    background: rgba(30,58,138,0.2) !important;
    border: 1px solid rgba(30,58,138,0.4) !important;
    border-radius: 0.75rem !important;
    color: var(--text-muted) !important;
}
.withdraw-layout table th { color: var(--text-muted) !important; }
.withdraw-layout table td { color: var(--text-primary) !important; }

/* ========================================
   عناصر عامة - خلفية الصفحة الداكنة
   ======================================== */
.dark-page {
    background: var(--bg-page) !important;
    color: var(--text-primary) !important;
    min-height: 100vh;
}
/* العناوين الرئيسية في الصفحات الداكنة */
.dark-page h2,
.dark-page h3 { color: var(--text-primary); }

/* البحث العام */
.btn-search {
    background: var(--gradient) !important;
    border: none !important;
    border-radius: 0.75rem !important;
    color: white !important;
    padding: 0.6rem 1.25rem !important;
    font-family: 'Cairo', sans-serif !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
}
.btn-search:hover { opacity: 0.9; }
.search-input {
    background: rgba(255,255,255,0.04) !important;
    border: 1.5px solid rgba(255,255,255,0.1) !important;
    border-radius: 0.75rem !important;
    color: var(--text-primary) !important;
    font-family: 'Cairo', sans-serif !important;
}
.search-input::placeholder { color: var(--text-muted) !important; }
.search-input:focus { border-color: var(--teal) !important; outline: none !important; }

/* card عامة في الثيم الداكن */
.dark-page .card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
}
.dark-page .card h3 { color: var(--text-primary) !important; }

/* ========================================
   إزالة margin-top الزائد في الصفحات داخل dashboard
   ======================================== */
.dashboard-content .wallet-wrap,
.dashboard-content .alert-layout,
.dashboard-content .goals-layout,
.dashboard-content .withdraw-layout,
.dashboard-content .settings-layout,
.dashboard-content .page-inner {
    margin-top: 0 !important;
}

/* إصلاح المسافة العلوية في الـ layout wrappers */
.wallet-wrap { max-width: 960px; margin: 0 auto 2rem; padding: 0; }
.alert-layout { max-width: 1100px; margin: 0 auto 2rem; }
.goals-layout { max-width: 960px; margin: 0 auto 2rem; }
.withdraw-layout { max-width: 860px; margin: 0 auto 2rem; }
.settings-layout { max-width: 1080px; margin: 0 auto 2rem; }

/* Mobile small screens (480px) */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
    .dashboard-content { padding: 4.5rem 0.75rem 1rem; }
    .wallet-hero { grid-template-columns: 1fr !important; }
    .method-grid { grid-template-columns: 1fr 1fr !important; }
    .sidebar { width: 240px; }
}

/* Dash content heading */
.dashboard-content h2 { color: var(--text-primary); }
.dashboard-content p  { color: var(--text-muted); }

/* ========================================
   Joodiq Logo SVG - ستايل موحد
   ======================================== */

/* اللوكو SVG في كل مكان */
svg[aria-label="جودك Joodiq"] {
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(20, 184, 166, 0.12));
}
.sidebar-logo a:hover svg[aria-label="جودك Joodiq"],
.nav-logo:hover      svg[aria-label="جودك Joodiq"],
.mobile-logo-link:hover svg[aria-label="جودك Joodiq"] {
    transform: rotate(-4deg) scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(244, 180, 0, 0.35));
}

/* اللوكو في الـ sidebar */
.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    padding: 0.2rem;
    border-radius: 10px;
    transition: background 0.2s;
}
.sidebar-logo a:hover {
    background: rgba(255, 255, 255, 0.06);
}
.sidebar-logo .logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: white;
    line-height: 1;
}
.sidebar-logo .logo-text span { color: var(--gold); }

/* اللوكو في هيدر الموبايل */
.mobile-logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.mobile-logo {
    font-size: 1.15rem;
    font-weight: 900;
    color: white;
    line-height: 1;
}

/* اللوكو في navbar الصفحة الرئيسية */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.nav-logo:hover { opacity: 0.9; }

/* ========================================
   Donations Page - Missing CSS Classes
   ======================================== */

/* صفحة التبرعات */
.donor-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--teal));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}
.donor-info   { flex: 1; min-width: 0; }
.donor-name   { font-weight: 700; color: var(--text-primary); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor-msg    { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donation-amount { font-size: 1rem; font-weight: 800; color: var(--teal); text-align: left; }
.donation-meta   { font-size: .72rem; color: var(--text-muted); margin-top: .2rem; display: flex; gap: .4rem; align-items: center; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-muted);
}
.empty-state p { margin: .4rem 0; }

/* Pagination */
.pagination {
    display: flex;
    gap: .4rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: .85rem;
    text-decoration: none;
    transition: all .2s;
}
.pagination a:hover       { background: var(--primary); color: white; border-color: var(--primary); }
.pagination span.current  { background: var(--gradient); color: white; border: none; font-weight: 700; }

/* Page inner layout */
.page-inner { max-width: 960px; margin: 0 auto; padding: 0 0 2rem; }

/* Stats cards row */
.stats-row   { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.s-card      { background: var(--card-bg); border-radius: 1rem; padding: 1.25rem; border: 1px solid var(--card-border); text-align: center; }
.s-card .s-val   { font-size: 1.4rem; font-weight: 900; margin-bottom: .25rem; }
.s-card .s-label { font-size: .78rem; color: var(--text-muted); }

/* Generic card */
.card { background: var(--card-bg); border-radius: 1.25rem; padding: 1.75rem; border: 1px solid var(--card-border); }

/* Toolbar */
.toolbar        { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; align-items: center; }
.search-input   { flex: 1; min-width: 160px; background: var(--input-bg); border: 1.5px solid var(--input-border); border-radius: .75rem; padding: .65rem 1rem; color: var(--text-primary); font-family: Cairo,sans-serif; font-size: .9rem; }
.search-input:focus { outline: none; border-color: var(--teal); }
.filter-tab     { background: rgba(255,255,255,.06); border: none; border-radius: .5rem; color: var(--text-muted); padding: .5rem 1rem; font-family: Cairo,sans-serif; font-size: .85rem; cursor: pointer; text-decoration: none; transition: all .2s; }
.filter-tab.active, .filter-tab:hover { background: var(--gradient); color: white; }
.donation-row   { display: flex; align-items: center; gap: 1rem; padding: .9rem; border-bottom: 1px solid rgba(255,255,255,.04); transition: background .15s; border-radius: .5rem; }
.donation-row:last-child { border-bottom: none; }
.donation-row:hover { background: rgba(255,255,255,.03); }

@media (max-width: 640px) {
    .stats-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr 1fr; }
    .donor-name, .donor-msg { font-size: .8rem; }
    .donation-amount { font-size: .9rem; }
}
