/* client/style.css - Modernized for Bootstrap 5 & Glassmorphism */
:root {
    /* Brand Colors */
    --primary: #0a8754;
    /* Signature Green */
    --primary-gradient: linear-gradient(135deg, #0a8754 0%, #065f3a 100%);
    --secondary: #2c3e50;
    /* Deep Navy */
    --secondary-gradient: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    --accent: #f39c12;
    /* Orange Alert */

    /* Functional Colors */
    --light: #f8f9fa;
    --dark: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.2);

    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(10, 135, 84, 0.2);
}

body {
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    background-color: #f0f2f5;
    color: var(--secondary);
    direction: rtl;
    line-height: 1.7;
    overflow-x: hidden;
    padding-bottom: 80px;
    /* Ensure content isn't hidden behind nav */
}

/* --- Typography Overrides --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* --- Glassmorphism Utilities --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: var(--shadow-md);
    border-radius: 16px;
}

@media (max-width: 768px) {
    .glass-card {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }

    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

.glass-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- Button Modernization --- */
.btn {
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(10, 135, 84, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 135, 84, 0.4);
    background: var(--primary);
}

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

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

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
}

/* --- Card Modernization --- */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* --- Form Elements --- */
.form-control {
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #eee;
    background-color: #fcfcfc;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(10, 135, 84, 0.1);
    background-color: white;
}

/* --- Hero Section --- */
.hero-wrapper {
    position: relative;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(10, 135, 84, 0.8)), url('https://images.unsplash.com/photo-1616400619175-5beda3a17896?auto=format&fit=crop&w=1500&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0 80px;
    min-height: 85vh;
    display: flex;
    align-items: center;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

@media (max-width: 768px) {
    .hero-wrapper {
        clip-path: none;
        padding: 80px 0 60px;
        min-height: auto;
    }
}

/* --- Feature Cards --- */
.feature-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(10, 135, 84, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.card-hover:hover .feature-icon-box {
    transform: scale(1.1) rotate(5deg);
    background: var(--primary);
    color: white;
}

/* --- Dashboard / App Specifics --- */
.app-header {
    background: var(--secondary-gradient);
    color: white;
    border-radius: 0 0 30px 30px;
    padding-bottom: 40px;
    margin-bottom: -30px;
    box-shadow: var(--shadow-md);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    position: relative;
    z-index: 10;
    padding: 0 15px;
}

/* --- Mobile Bottom Nav (FIXED) --- */
.mobile-nav-glass {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    display: -webkit-flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0;
    margin: 0;
    max-width: 100%;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item-link {
    color: gray;
    font-size: 1.5rem;
    padding: 5px;
    text-decoration: none !important;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item-link i {
    display: block;
    line-height: 1;
}

.nav-item-link:hover {
    color: var(--primary);
    background: transparent;
    transform: none;
}

.nav-item-link.active {
    color: var(--primary);
    /* Green */
    background: transparent;
    transform: none;
}

.nav-item-link.active::after {
    display: none;
    /* Remove dot */
}

/* --- Loading Skeleton Animation --- */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #eff1f3 4%, #e2e2e2 25%, #eff1f3 36%);
    background-size: 1000px 100%;
}