:root {
    --primary: #4f46e5;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-w: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

/* ------------------ Background Blur Layer ------------------ */
body { 
    color: var(--text-main); 
    display: flex; 
    min-height: 100vh; 
    /* Base background for body - will be hidden by the blur layer when applied */
    background: var(--bg-body); 
}

.background-blur::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Update image path if needed */
    background: url('office.png') no-repeat center center fixed; 
    background-size: cover;
    filter: blur(10px) brightness(90%); /* 10% Blur + slight dim for readability */
    z-index: -2; /* Behind the content */
}

/* Ensure body content is on top of the blur layer */
.background-blur {
    background-color: rgba(241, 245, 249, 0.7); /* Original body color with transparency (70%) */
}

/* Sidebar & Main Content (Adjusted to blend with new body background) */
.sidebar { 
    width: var(--sidebar-w); 
    background: var(--bg-card); /* Keep sidebar solid white */
    height: 100vh; 
    position: fixed; 
    border-right: 1px solid #e2e8f0; 
    padding: 25px; 
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.brand { font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-bottom: 40px; display: flex; align-items: center; gap: 10px; }
.nav-links { list-style: none; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; border-radius: 10px; color: var(--text-muted); text-decoration: none; font-weight: 500; transition: 0.3s; }
.nav-link:hover, .nav-link.active { background: #eef2ff; color: var(--primary); }

.main-wrapper { 
    margin-left: var(--sidebar-w); 
    width: calc(100% - var(--sidebar-w)); 
    padding: 30px; 
    transition: margin-left 0.3s ease-in-out;
}

/* Toggle button for small screens */
.sidebar-toggle {
    display: none; 
    position: fixed; 
    top: 15px; 
    left: 15px; 
    z-index: 1001;
    background: var(--primary);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

/* ------------------ Tables & Common Elements ------------------ */

.page-header { margin-bottom: 30px; }
.page-header h2 { font-family: 'Poppins', sans-serif; font-size: 1.6rem; }

.table-card { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; /* Minimum width for table content */ }
th { text-align: left; padding: 15px; color: var(--text-muted); font-size: 0.85rem; border-bottom: 2px solid #f1f5f9; }
td { padding: 15px; border-bottom: 1px solid #f1f5f9; font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }

/* Badges & Progress Bars */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.progress-bg { background: #e2e8f0; height: 8px; border-radius: 4px; overflow: hidden; width: 100%; margin-top: 5px; }
.progress-fill { height: 100%; border-radius: 4px; }

/* Cards Grid */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.info-card { background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; }

/* ------------------ Responsive Design ------------------ */

/* Tablet & Mobile Layout */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
        width: 100%;
        padding-top: 60px; /* Space for the toggle button */
    }
    .sidebar-toggle {
        display: block;
    }

    /* Cards adjustments for smaller screens */
    .grid-3 {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Very Small Screens (Mobile) */
@media (max-width: 600px) {
    .main-wrapper {
        padding: 15px;
        padding-top: 60px;
    }
    .page-header h2 {
        font-size: 1.4rem;
    }
}