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

:root {
    --bg-main: #0b0f19;
    --bg-card: #151d2a;
    --bg-input: #1e293b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: #3b82f6;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    direction: rtl;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px 10px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* 🌐 الهيدر والبانر */
.header-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.brand-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-slogan {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 🌐 تنسيق زر تغيير اللغة */
.lang-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    outline: none;
}

.lang-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-blue);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* 📌 تبويبات التنقل */
.nav-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    overflow-x: auto;
}

.nav-btn {
    flex: 1;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-admin-tab {
    background: rgba(245, 158, 11, 0.15) !important;
    color: var(--accent-yellow) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

/* 🚀 البانر الرئيسي (Hero) */
.hero-banner {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
}

.hero-slogan {
    font-size: 18px;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-desc {
    max-width: 700px;
    margin: 0 auto 24px;
    color: var(--text-secondary);
    font-size: 15px;
}

/* 📦 البطاقات والصناديق العامة */
.box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

/* 📊 شبكة الإحصائيات (Stats Grid) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 25px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
}

.card .title {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.card .value {
    font-size: 26px;
    font-weight: 800;
}

/* 💳 باقات والأسعار */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px 20px;
    padding-top: 15px;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 28px 20px 24px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.plan-featured {
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
}

.plan-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-blue);
    color: #ffffff !important;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-title {
    font-size: 18px;
    font-weight: 700;
    margin-top: 10px;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 15px;
}

.plan-price span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-features {
    list-style: none;
    text-align: right;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

.plan-features li {
    margin-bottom: 8px;
}

/* ✍️ شبكة النماذج ومربعات الإدخال الموحدة */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 20px;
    align-items: end;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.4;
    min-height: 36px;
    display: flex;
    align-items: flex-end;
}

.input-field {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    height: 46px;
}

.input-field:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea.input-field {
    height: auto;
    min-height: 90px;
}

.flex-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-inline {
    width: auto;
    padding: 10px 18px;
    font-size: 13px;
}

.btn-primary {
    background: var(--accent-blue);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: #ffffff;
}

.btn-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-yellow);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    background: var(--accent-yellow);
    color: #ffffff;
}

/* 💬 آراء العملاء والسلايدر */
.testimonials-slider {
    position: relative;
    margin-bottom: 25px;
}

.testimonial-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    font-size: 14px;
    color: var(--text-secondary);
}

.testimonial-author {
    margin-top: 10px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 13px;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.slider-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
}

/* 🔒 شاشات الاشتراك والأدمن */
.subscription-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background: var(--bg-input);
    border-radius: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.actions {
    display: flex;
    gap: 6px;
}

/* 🔐 النافذة المنبثقة (Auth Modal) */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 15px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.close-modal-wrapper {
    position: absolute;
    top: 16px;
    left: 16px;
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.tab-switcher {
    display: flex;
    gap: 6px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--accent-blue);
    color: #fff;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
}

.toggle-pass {
    position: absolute;
    left: 12px;
    cursor: pointer;
    user-select: none;
}

.landing-section, .page-content {
    display: none;
}

.active-landing, .active-page {
    display: block;
}

.text-primary-color { color: var(--accent-blue); }
.text-accent-blue { color: #60a5fa; }
.text-accent-green { color: var(--accent-green); }
.text-accent-yellow { color: var(--accent-yellow); }
.text-accent-red { color: var(--accent-red); }
.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mb-10 { margin-bottom: 10px; }
.text-no-underline { text-decoration: none; }