/* === Design System & Variables === */
:root {
    /* Color Palette - Light Mode - Luxury Real Estate */
    --primary: #0A192F; /* Deep Navy */
    --primary-light: #172A45;
    --primary-gradient: linear-gradient(135deg, #0A192F 0%, #1c3b6b 100%);
    
    --secondary: #D4AF37; /* Royal Gold */
    --secondary-light: #F3E5AB;
 
    --bg-base: #f4f6f9;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-surface-solid: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: rgba(255, 255, 255, 0.6); /* Lighter border for true glass effect */
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
 
    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px -1px rgba(10, 25, 47, 0.05), 0 2px 4px -2px rgba(10, 25, 47, 0.05);
    --shadow-md: 0 10px 30px -3px rgba(10, 25, 47, 0.08), 0 4px 6px -4px rgba(10, 25, 47, 0.04);
    --shadow-hover: 0 20px 40px -5px rgba(212, 175, 55, 0.15), 0 8px 10px -6px rgba(212, 175, 55, 0.1);
    
    --glass-blur: blur(24px); /* Increased blur for premium glassmorphism */
    
    /* Typography */
    --font-family: 'Cairo', 'Tajawal', sans-serif;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
 
/* Dark Mode Theme */
[data-theme="dark"] {
    --primary: #D4AF37;
    --primary-light: #F3E5AB;
    --primary-gradient: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    
    --secondary: #E5E7EB;
    --secondary-light: #ffffff;
 
    --bg-base: #0B0C10;
    --bg-surface: rgba(17, 24, 39, 0.65);
    --bg-surface-solid: #111827;
    
    --text-main: #f8fafc;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 30px -3px rgba(0, 0, 0, 0.6);
    --shadow-hover: 0 20px 40px -5px rgba(212, 175, 55, 0.2);
}
 
/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
 
html {
    scroll-behavior: smooth;
}
 
body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}
 
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
 
/* === Typography & Utilities === */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 20%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 40%; height: 100%;
    background: linear-gradient(to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.03) 50%, 
        rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 15s infinite;
}
@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}
 
/* === Skeleton Loading === */
.skeleton {
    background-color: rgba(3, 45, 92, 0.05);
    background-image: linear-gradient(
        90deg, 
        rgba(255, 255, 255, 0) 0, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
}
[data-theme="dark"] .skeleton { background-color: rgba(255,255,255,0.05); }

@keyframes skeleton-loading {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.skeleton-card { min-height: 280px; border-radius: 20px; }

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
}
.logo i { color: var(--primary); font-size: 2rem; }
.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }
 
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}
.icon-btn:hover { background: var(--border-color); }
 
/* === Hero Section === */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}
.hero-bg-shapes {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
}
.shape {
    position: absolute;
    filter: blur(100px);
    opacity: 0.4;
    border-radius: 50%;
    z-index: -1;
}
.shape-1 { left: -10%; top: -10%; width: 500px; height: 500px; background: #032d5c; }
.shape-2 { right: -5%; bottom: 20%; width: 400px; height: 400px; background: #0066cc; }
 
[data-theme="dark"] .shape-1 { background: #1e3a8a; }
[data-theme="dark"] .shape-2 { background: #3b82f6; }
 
.hero-content {
    max-width: 800px;
    text-align: right;
}
.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(244, 167, 9, 0.15);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: #cc8400; /* Darker orange for better light mode contrast */
    border: 1px solid rgba(244, 167, 9, 0.3);
}
[data-theme="dark"] .badge {
    color: var(--secondary-light);
}
.hero h1 { font-size: 4.5rem; margin-bottom: 24px; letter-spacing: -1px; }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; align-items: center; }
 
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(3, 45, 92, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 45, 92, 0.5);
}
.btn-secondary {
    background: var(--bg-surface-solid);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover { background: var(--border-color); }
 
/* === Layout Sections === */
.section { padding: 80px 0; }
.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-title { font-size: 2.5rem; margin-bottom: 12px; }
.section-subtitle { font-size: 1.2rem; color: var(--text-muted); }
 
/* === Charts Grid === */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}
.chart-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.chart-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.chart-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--primary-gradient);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.chart-header h3 { font-size: 1.25rem; }
.chart-header p { font-size: 0.9rem; color: var(--text-muted); }
.chart-container {
    flex: 1;
    position: relative;
    min-height: 250px;
    width: 100%;
}
 
/* === Services Grid === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.service-card {
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: center;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: var(--shadow-hover);
}

/* === Featured Service Card === */
.service-card.featured-card {
    border: 1.5px solid rgba(244, 167, 9, 0.45);
    box-shadow: 0 0 0 1px rgba(244, 167, 9, 0.1), var(--shadow-md);
    background: linear-gradient(160deg,
        rgba(244, 167, 9, 0.05) 0%,
        var(--bg-surface) 60%) !important;
}
.service-card.featured-card:hover {
    border-color: rgba(244, 167, 9, 0.7);
    box-shadow: 0 0 22px rgba(244, 167, 9, 0.15), var(--shadow-hover);
    transform: translateY(-6px);
}
/* Corner star badge */
.featured-crown {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f4a709 0%, #fcd34d 100%);
    color: #1c1917;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(244, 167, 9, 0.35);
    animation: crownPulse 3.5s ease-in-out infinite;
}
@keyframes crownPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(244, 167, 9, 0.35); }
    50%       { box-shadow: 0 2px 14px rgba(244, 167, 9, 0.6); }
}
.service-icon {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: var(--bg-base);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
    transition: var(--transition);
}
.service-card:hover .service-icon {
    background: var(--primary-gradient);
    color: white;
}
.service-card h3 { font-size: 1.5rem; margin-bottom: 12px; }
.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.service-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--secondary);
    font-weight: 800;
    transition: var(--transition);
    margin-top: auto;
}
.service-card:hover .service-action {
    transform: translateX(-5px);
}
 
/* === Modal === */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    padding: 20px;
}
.modal.active { opacity: 1; pointer-events: all; }
.modal-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: var(--bg-surface-solid); /* Solid for form clarity */
    border-radius: var(--radius-lg);
    z-index: 101;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal.active .modal-content { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--bg-base);
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    z-index: 10;
}
.modal-close:hover { background: var(--danger); color: white; }
.modal-body { padding: 40px; overflow-y: auto;}
 
/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
 
/* === Form Styles === */
.form-group { margin-bottom: 24px; text-align: right; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}
.form-control {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(3, 45, 92, 0.1); }
[data-theme="dark"] .form-control:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
 
.modal-header h2 { font-size: 1.8rem; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; color: var(--primary); }
.modal-header p { color: var(--text-muted); margin-bottom: 32px; font-size: 1rem; }
 
.result-box {
    margin-top: 32px;
    padding: 24px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    color: white;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(3, 45, 92, 0.3);
}
.result-box h4 { font-size: 1rem; font-weight: 500; opacity: 0.9; margin-bottom: 8px; }
.result-value { font-size: 2.5rem; font-weight: 800; }
 
/* === Coming Soon Card === */
.coming-soon-card {
    background: linear-gradient(135deg,
        rgba(245, 158, 11, 0.08) 0%,
        rgba(251, 194, 74, 0.05) 50%,
        rgba(3, 45, 92, 0.07) 100%) !important;
    border: 1.5px dashed rgba(245, 158, 11, 0.5) !important;
    cursor: default;
    animation: csShimmer 4s ease-in-out infinite;
    text-align: right;
}
.coming-soon-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.75) !important;
    box-shadow: 0 12px 30px -5px rgba(245, 158, 11, 0.15) !important;
}
@keyframes csShimmer {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50%       { box-shadow: 0 0 20px 3px rgba(245, 158, 11, 0.12); }
}
 
.cs-badge {
    position: absolute;
    top: 0; left: 0;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1c1917;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 0 0 12px 0;
    letter-spacing: 1px;
    animation: csPulse 2s ease-in-out infinite;
}
@keyframes csPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}
 
.cs-rocket-icon {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    color: white !important;
    margin-right: 0 !important;
    margin-bottom: 16px !important;
}
.coming-soon-card .service-icon { margin: 0 0 16px 0; }
 
.cs-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cs-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.cs-list li i {
    color: #f59e0b;
    font-size: 0.95rem;
    flex-shrink: 0;
}
 
.cs-footer {
    background: linear-gradient(90deg, rgba(245,158,11,0.12), rgba(251,194,74,0.06));
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 10px;
    padding: 10px 16px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #92400e;
}
[data-theme="dark"] .cs-footer { color: #fbbf24; }
 
/* === Footer === */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-content { display: flex; align-items: center; gap: 8px; }
 
/* ================================================
   RESPONSIVE
   ================================================ */
 
@media (max-width: 1024px) {
    .charts-grid   { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
 
@media (max-width: 640px) {
 
    /* NAV */
    .nav-content { height: 50px; padding: 0 14px; }
    .nav-links { display: none; }
    .logo { gap: 8px; }
    .logo span { font-size: 1.1rem; }
    .logo img { height: 30px !important; }
 
    /* HERO — نص في المنتصف */
    .hero { min-height: auto; padding: 70px 0 52px; text-align: center; }
    .hero-content {
        max-width: 100%; text-align: center;
        padding: 0 16px;
        display: flex; flex-direction: column; align-items: center;
    }
    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
        line-height: 1.3; margin-bottom: 12px;
        text-align: center;
    }
    .hero p {
        font-size: 1rem !important;
        margin-bottom: 28px; line-height: 1.7;
        max-width: 320px; text-align: center;
    }
    .badge { font-size: 0.8rem; padding: 5px 13px; margin-bottom: 18px; }
    .hero-actions {
        flex-direction: row; align-items: center;
        justify-content: center; gap: 10px;
        flex-wrap: wrap; width: 100%;
    }
    .hero-actions .btn {
        flex: 1; min-width: 120px; max-width: 180px;
        justify-content: center; padding: 12px 14px;
        font-size: 0.9rem; gap: 6px;
    }
 
    /* SECTIONS */
    .section { padding: 48px 0; }
    #market-data { padding-top: 56px; padding-bottom: 56px; }
    #services    { padding-top: 56px; }
    .section-header { margin-bottom: 26px; }
    .section-title { font-size: 1.45rem; }
    .section-subtitle { font-size: 0.87rem; }
    .container { padding: 0 14px; }
 
    /* SERVICES — 2 عمود متوازن */
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .service-card {
        padding: 20px 14px 16px;
        border-radius: 20px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        border-top: 2px solid transparent;
    }
    .service-card:hover { transform: translateY(-3px); border-top-color: var(--secondary); }
 
    /* أيقونة — مسافة تحتها واضحة */
    .service-icon {
        width: 48px; height: 48px;
        font-size: 1.35rem;
        border-radius: 14px;
        margin: 0 0 14px 0;
        flex-shrink: 0;
    }
 
    /* عنوان — مسافة تحته */
    .service-card h3 {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 8px;
        width: 100%;
    }
 
    /* وصف — مسافة تحته */
    .service-card p {
        font-size: 0.76rem;
        line-height: 1.55;
        margin-bottom: 14px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        flex: 1;
        width: 100%;
    }
 
    /* زر استخدام الأداة — دائماً في الأسفل */
    .service-action {
        font-size: 0.78rem;
        gap: 4px;
        margin-top: auto;
        padding-top: 4px;
        border-top: 1px solid var(--border-color);
        width: 100%;
        justify-content: center;
        padding-top: 10px;
    }
 
    /* Coming Soon */
    .coming-soon-card {
        grid-column: 1 / -1;
        padding: 20px;
        border-radius: 20px;
        align-items: flex-start;
        text-align: right;
    }
    .coming-soon-card h3 { font-size: 1rem !important; margin-bottom: 8px !important; }
    .coming-soon-card p  { font-size: 0.82rem !important; margin-bottom: 14px !important; -webkit-line-clamp: 4; }
 
    /* CHARTS */
    .charts-grid { grid-template-columns: 1fr; gap: 12px; }
    .chart-card { padding: 16px; border-radius: 18px; }
    .chart-header { gap: 10px; margin-bottom: 14px; }
    .chart-icon { width: 38px; height: 38px; font-size: 1.1rem; border-radius: 10px; }
    .chart-header h3 { font-size: 0.95rem; }
    .chart-header p  { font-size: 0.76rem; }
    .chart-container { min-height: 180px; }
 
    /* MODAL — Bottom Sheet */
    .modal { padding: 0; align-items: flex-end; }
    .modal-content {
        max-width: 100%; border-radius: 22px 22px 0 0;
        max-height: 92vh; transform: translateY(100%);
    }
    .modal.active .modal-content { transform: translateY(0); }
    .modal-content::before {
        content: ''; display: block;
        width: 40px; height: 4px;
        background: var(--border-color);
        border-radius: 2px; margin: 12px auto 0;
    }
    .modal-body { padding: 16px 16px 32px; }
    .modal-header h2 { font-size: 1.2rem; }
    .modal-header p  { font-size: 0.84rem; margin-bottom: 18px; }
    .modal-close { top: 14px; left: 14px; }
 
    /* FORMS */
    .form-group { margin-bottom: 16px; }
    .form-group label { font-size: 0.87rem; margin-bottom: 6px; }
    .form-control { padding: 13px 14px; font-size: 16px; border-radius: 11px; }
    .result-box { padding: 18px; border-radius: 16px; margin-top: 20px; }
    .result-box h4 { font-size: 0.85rem; }
    .result-value { font-size: 1.9rem; }
 
    /* FOOTER */
    .footer { padding: 18px 0; }
    .footer-content { flex-direction: column; text-align: center; font-size: 0.8rem; gap: 4px; }
}

/* ================================================
   SIDEBAR & STICKY HEADER
   ================================================ */
.sticky-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: background 0.3s;
}
body { padding-top: 80px; }

.mobile-menu-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar-panel {
    position: fixed;
    top: 0; right: -320px;
    width: 320px; max-width: 85vw;
    height: 100vh;
    background: var(--bg-surface);
    z-index: 1002;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
}
.sidebar-panel.active { transform: translateX(-320px); }

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px; border-bottom: 1px solid var(--border-color);
}
.sidebar-header h3 { font-size: 1.3rem; display: flex; align-items:center; gap: 8px; }
.sidebar-links {
    padding: 24px; display: flex; flex-direction: column; gap: 16px;
    overflow-y: auto;
}
.sidebar-links a {
    color: var(--text-main); text-decoration: none;
    font-size: 1.1rem; font-weight: 500;
    display: flex; align-items: center; gap: 12px;
    padding: 10px; border-radius: 12px;
    transition: background 0.2s, color 0.2s;
}
.sidebar-links a:hover { background: var(--bg-base); color: var(--primary); }
.sidebar-links hr { border: none; border-bottom: 1px solid var(--border-color); margin: 10px 0; }

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
}

/* === Sidebar Squared Buttons === */
.squared-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(3, 45, 92, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}
.squared-btn:hover {
    background: rgba(3, 45, 92, 0.1);
    transform: translateY(-2px);
}
.primary-squared {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(3, 45, 92, 0.2);
}
.primary-squared:hover {
    background: var(--primary-gradient);
    box-shadow: 0 6px 20px rgba(3, 45, 92, 0.3);
    color: white;
}
[data-theme="dark"] .squared-btn:not(.primary-squared) {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}
[data-theme="dark"] .squared-btn:hover:not(.primary-squared) {
    background: rgba(255,255,255,0.1);
}