/* ==========================================================================
   SaaS Platform - Light Modern Theme Design System
   Fast, Lightweight, Responsive, Accessible, and Production-Ready
   ========================================================================== */

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-alt: #f8fafc;
    
    --card-bg: #ffffff;
    --card-hover: #ffffff;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-highlight: #3b82f6;
    
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --accent: #7c3aed;
    --accent-light: #f5f3ff;
    
    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --gold: #d97706;
    --gold-light: #fef3c7;

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;
    --text-light: #94a3b8;
    
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --radius-full: 9999px;
    
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 1px 3px 0 rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 20px 30px -8px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 10px 25px -5px rgba(37, 99, 235, 0.25);
    --shadow-glow-gold: 0 10px 25px -5px rgba(217, 119, 6, 0.25);
}

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

body, button, input, select, textarea, optgroup {
    font-family: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Explicitly preserve Font Awesome icon typography and pseudo-elements */
.fa, .fas, .far, .fal, .fad, .fab, .fa-solid, .fa-regular, .fa-brands, [class^="fa-"], [class*=" fa-"] {
    font-family: 'Font Awesome 6 Free', 'FontAwesome' !important;
}
.fa-brands, [class^="fa-brands-"], [class*=" fa-brands-"] {
    font-family: 'Font Awesome 6 Brands', 'FontAwesome' !important;
}
.fa::before, .fas::before, .far::before, .fa-solid::before, .fa-regular::before, .fa-brands::before,
[class^="fa-"]::before, [class*=" fa-"]::before {
    font-family: inherit !important;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
    background-image: 
        radial-gradient(at 15% 15%, rgba(37, 99, 235, 0.04) 0px, transparent 40%),
        radial-gradient(at 85% 85%, rgba(124, 58, 237, 0.04) 0px, transparent 40%),
        radial-gradient(at 50% 50%, rgba(241, 245, 249, 0.6) 0px, transparent 80%);
    background-attachment: fixed;
}

/* Clean Light Scrollbar */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout Containers */
.container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.logo-text {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo-text span {
    color: var(--primary);
}

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

.nav-links li {
    white-space: nowrap !important;
}

.nav-links a {
    white-space: nowrap !important;
    color: #475569;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 13px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

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

.nav-links a.active {
    color: var(--primary);
    background: #eff6ff;
    font-weight: 800;
    border: 1px solid #bfdbfe;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.nav-actions .btn {
    white-space: nowrap !important;
    padding: 8px 16px;
    font-size: 13.5px;
    border-radius: var(--radius-full);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 1080px) {
    .mobile-nav-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        flex-direction: column;
        gap: 10px;
        box-shadow: var(--shadow-card);
        align-items: stretch;
    }
    .nav-links a {
        padding: 10px 16px;
        border-radius: var(--radius-sm);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links.active .mobile-only-action {
        display: block !important;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    outline: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: #cbd5e1;
    color: var(--text-main);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.35);
}

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

.btn-outline-primary:hover {
    background: var(--primary-light);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: var(--radius-xs);
}

.btn-lg {
    padding: 14px 30px;
    font-size: 17px;
    border-radius: var(--radius-md);
    font-weight: 800;
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-trial {
    background: var(--warning-light);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-active {
    background: var(--success-light);
    color: #047857;
    border: 1px solid rgba(5, 150, 105, 0.3);
}

.badge-suspended {
    background: var(--danger-light);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-vip {
    background: linear-gradient(90deg, #fef3c7, #fce7f3);
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #cbd5e1;
}

/* Section Common Styling */
.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 50px auto;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 16px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.section-title {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 28px;
    }
    .section-desc {
        font-size: 15px;
    }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.feature-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.feature-title {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.7;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

.plan-card {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plan-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.plan-card.popular {
    border-color: #f59e0b;
    box-shadow: var(--shadow-glow-gold);
    background: #ffffff;
}

.plan-ribbon {
    position: absolute;
    top: -14px;
    right: 28px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    padding: 5px 16px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
}

.plan-title {
    font-size: 23px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.plan-tagline {
    color: var(--text-muted);
    font-size: 14px;
    min-height: 42px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.plan-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}

.plan-price {
    font-size: 46px;
    font-weight: 900;
    color: var(--text-main);
}

.plan-currency {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.plan-period {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
}

.plan-trial-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--success-light);
    border: 1px solid rgba(5, 150, 105, 0.25);
    color: #047857;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 24px;
}

.plan-features {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-main);
    font-size: 14.5px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.plan-features li i {
    color: var(--success);
    margin-top: 4px;
    font-size: 14px;
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #ffffff;
}

.form-control::placeholder {
    color: var(--text-light);
    font-weight: 500;
}

.input-domain-wrap {
    display: flex;
    direction: ltr;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.input-domain-wrap input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: none;
    flex: 1;
}

.domain-suffix {
    background: #f1f5f9;
    border: 1.5px solid var(--border-color);
    border-left: none;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    white-space: nowrap;
}

/* Clean Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    transform: translateY(20px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-xs);
    transition: all 0.2s;
}

.modal-close-btn:hover {
    color: var(--danger);
    background: var(--danger-light);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.custom-table th {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: 800;
    font-size: 13.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.custom-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
}

.custom-table tbody tr:hover {
    background: rgba(241, 245, 249, 0.7);
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

/* Clean Footer */
.footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px 0;
    margin-top: 80px;
    color: var(--text-muted);
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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