/* File: assets/css/style.css */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #f7f9fc; /* Lighter, cleaner background */
    color: #495057; /* Softer default text color */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 14px; /* Base font size for admin area (approx 0.875rem if root is 16px) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Modern Shaded Sidebar - Refined --- */
#sidebar {
    width: 250px; 
    min-width: 250px;
    background-color: #1e293b; /* Dark Slate Blue */
    color: #cbd5e1; /* Lighter text (Cool Gray 300) */
    transition: margin-left 0.25s ease-out; /* Smoother transition */
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Refined shadow */
}

#sidebar.toggled {
    margin-left: -250px; 
}

#sidebar .sidebar-header {
    padding: 1.1rem 1.25rem; 
    background-color: rgba(0,0,0,0.1); /* Subtle overlay */
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.08); 
}
#sidebar .sidebar-header .app-brand-link:hover {
    opacity: 0.9;
}
#sidebar .sidebar-header .app-name-sidebar {
    color: #fff;
    margin-bottom: 0;
    font-size: 1.05rem; /* Slightly smaller */
    font-weight: 600; /* Medium-bold */
    letter-spacing: 0.2px;
}
#sidebar .sidebar-header .app-brand-icon {
    color: #64b5f6; /* Light Blue accent */
    font-size: 1.3rem; 
    opacity: 0.9;
}


#sidebar ul.components {
    padding: 0.5rem 0; 
    flex-grow: 1; 
    overflow-y: auto; 
}
#sidebar ul.components::-webkit-scrollbar {
    width: 5px; 
}
#sidebar ul.components::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05); 
}
#sidebar ul.components::-webkit-scrollbar-thumb {
    background: #475569; /* Slate 600 */
    border-radius: 3px;
}
#sidebar ul.components::-webkit-scrollbar-thumb:hover {
    background: #64748b; /* Slate 500 */
}


#sidebar .sidebar-section-title {
    padding: 0.75rem 1.25rem 0.3rem; 
    font-size: 0.625rem; /* 10px */
    color: #94a3b8; /* Cool Gray 400 */
    text-transform: uppercase;
    font-weight: 700; 
    letter-spacing: 1px; 
    margin-top: 0.5rem;
}
#sidebar .sidebar-section-title:first-of-type {
    margin-top: 0.25rem;
}


#sidebar ul li a {
    padding: 0.6rem 1.25rem; /* ~9.6px vertical padding */
    font-size: 0.8125rem; /* 13px */
    display: flex; 
    align-items: center; 
    color: #cbd5e1; /* Cool Gray 300 */
    text-decoration: none;
    transition: background-color 0.2s ease-out, color 0.2s ease-out, border-left-color 0.2s ease-out;
    border-left: 4px solid transparent; 
    font-weight: 500; /* Medium weight for links */
    border-radius: 0 4px 4px 0; /* Slight rounding on right for hover effect */
    margin: 0.1rem 0; /* Small vertical margin between items */
}

#sidebar ul li a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.08); 
    border-left-color: #64b5f6; 
}

#sidebar ul li.active > a,
#sidebar ul li.active > a:hover {
    color: #ffffff;
    background: rgba(0,0,0,0.2); 
    border-left-color: #42a5f5; /* Brighter blue for active */
    font-weight: 600; 
}

#sidebar ul li a i.fa-fw { 
    width: 1.2em; 
    text-align: center; 
}
#sidebar ul li a i {
    margin-right: 0.75rem; 
    font-size: 0.9rem; 
    opacity: 0.8; 
    transition: opacity 0.2s ease-out;
}
#sidebar ul li a:hover i,
#sidebar ul li.active a i {
    opacity: 1;
}


/* Submenu styling */
#sidebar ul ul { 
    padding-left: 0; 
    background-color: rgba(0,0,0,0.15); 
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin: 0.25rem 0;
}
#sidebar ul ul a {
    padding: 0.5rem 1.25rem 0.5rem 2.5rem; /* More indent for submenu */
    font-size: 0.78rem; /* ~12.5px */
    color: #94a3b8; /* Cool Gray 400 */
}
#sidebar ul ul a:hover {
    background-color: rgba(255,255,255,0.1);
    color: #e2e8f0; /* Cool Gray 200 */
}
#sidebar ul ul li.active > a {
    color: #fff;
    font-weight: 500;
}


/* Call to Action Buttons (Profile, Logout) */
#sidebar .CTAs {
    padding: 1rem 1.25rem; 
    border-top: 1px solid rgba(255,255,255,0.08);
    background-color: rgba(0,0,0,0.1); /* Slight background for CTA area */
}
#sidebar .CTAs .btn.btn-sidebar-cta { 
    font-size: 0.785rem; /* ~12.5px */
    padding: 0.45rem 0.75rem; 
    font-weight: 500;
    border-radius: 0.3rem; /* Softer radius */
    text-align: left; /* Align text left for full width buttons */
}
#sidebar .CTAs .btn-sidebar-cta i {
    margin-right: 0.5rem;
}
#sidebar .CTAs .btn-sidebar-profile {
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #cbd5e1;
}
#sidebar .CTAs .btn-sidebar-profile:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
#sidebar .CTAs .btn-sidebar-logout {
    background-color: #ef5350; /* Material Red */
    border-color: #ef5350;
    color: #fff;
}
#sidebar .CTAs .btn-sidebar-logout:hover {
    background-color: #e53935;
    border-color: #d32f2f;
}


/* Content Area Styling */
.content-wrapper {
    margin-left: 250px; 
    padding: 0; 
    width: calc(100% - 250px); 
    transition: margin-left 0.25s ease-out;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #f7f9fc; /* Match body background */
}

.content-wrapper.sidebar-toggled {
    margin-left: 0;
    width: 100%;
}

.top-navbar {
    background-color: #ffffff; 
    border-bottom: 1px solid #e0e7ef; /* Lighter border (Cool Gray 200) */
    padding: 0.6rem 1.5rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.03); /* Subtle shadow */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; 
    top: 0;
    z-index: 999; 
}

.top-navbar .sidebar-toggler {
    background: none;
    border: none;
    font-size: 1.25rem; 
    color: #64748b; /* Slate 500 */
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.top-navbar .sidebar-toggler:hover {
    color: #1e293b; /* Dark Slate Blue */
}
.top-navbar .dropdown-toggle {
    font-size: 0.875rem; 
    color: #475569; /* Slate 600 */
}
.top-navbar .dropdown-menu {
    font-size: 0.875rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.1); /* Softer shadow */
    border-radius: 0.375rem;
    border: 1px solid #e0e7ef;
}
.top-navbar .dropdown-item {
    padding: 0.5rem 1rem;
}
.top-navbar .dropdown-item i {
    margin-right: 0.5rem;
    opacity: 0.7;
}


.main-content {
    padding: 1.75rem; /* Increased padding */
    flex-grow: 1; 
}

.footer {
    background-color: #fff; /* Lighter footer */
    color: #64748b; /* Slate 500 */
    padding: 1rem 0; 
    text-align: center;
    font-size: 0.8rem; 
    margin-top: auto; 
    width: 100%; 
    border-top: 1px solid #e0e7ef; /* Lighter border */
}

.content-wrapper .footer {
     width: calc(100%); 
}

/* Login Page Specific Styling (Can be moved to a separate file if it grows) */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; 
    padding: 20px;
    background-color: #eef2f7; /* Consistent with body background */
}
.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 0.75rem !important; 
    box-shadow: 0 0.75rem 2rem rgba(18,38,63,0.1) !important; /* Softer, larger shadow */
    border: none;
}
.login-card .card-header {
    background-image: linear-gradient(to right, #0d6efd, #0558c7);
    color: white;
    text-align: center;
    padding: 1.75rem; /* More padding */
    border-bottom: 0;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}
.login-card .card-header h3 {
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 1.5rem;
}
.login-card .card-body {
    padding: 2.5rem; /* More padding */
}
.login-card .form-floating label {
    color: #6c757d;
}
.login-card .btn-primary {
    padding: 0.875rem; /* Taller button */
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    body { font-size: 13.5px; } 
    #sidebar {
        margin-left: -250px; 
    }
    #sidebar.toggled {
        margin-left: 0; 
    }
    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    .main-content {
        padding: 1.25rem; 
    }
    .top-navbar {
        padding: 0.75rem 1rem; 
    }
     #sidebar ul li a { padding: 0.55rem 1rem; font-size: 0.8rem; } 
     #sidebar .sidebar-section-title { padding: 0.5rem 1rem 0.25rem; font-size: 0.6rem; }
     #sidebar .CTAs .btn.btn-sidebar-cta { font-size: 0.75rem; }
}

