:root {
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fa;
    --dark-color: #5a5c69;
    --sidebar-bg: #4e73df;
    --sidebar-text: rgba(255, 255, 255, 0.8);
    --sidebar-hover: #ffffff;
    --sidebar-active-bg: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fc;
    color: #5a5c69;
}

/* Sidebar Styling */
.sidebar {
    width: 250px;
    height: 100vh;
    background-image: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    overflow-y: auto; 
}

/* Mobile Sidebar Toggle Class */
.sidebar.mobile-hidden {
    left: -250px;
}

.sidebar .brand {
    font-size: 1.2rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    text-align: center;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
}

.sidebar hr {
    margin: 0 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 1rem;
    display: block;
    margin: 0 1rem;
    border-radius: 0.35rem;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sidebar a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar a.active {
    color: #4e73df;
    background-color: white;
}

.sidebar .user-info {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    padding: 0 1rem;
}

#content-wrapper {
    margin-left: 250px;
    padding: 1.5rem;
    min-height: 100vh;
    transition: margin-left 0.3s;
    width: auto; /* Let block layout handle width */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        left: -250px; /* Hide sidebar on mobile by default */
    }
    .sidebar.active {
        left: 0; /* Show when active */
    }
    #content-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
}

/* Base Card Styling */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease-in-out;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: #4e73df;
}

/* Auth Page Styling */
.auth-bg {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 900px;
}

.auth-image {
    background: url('https://source.unsplash.com/random/800x600/?technology,ai') center center no-repeat;
    background-size: cover;
    min-height: 400px;
}

.auth-form-container {
    padding: 3rem;
    background: white;
}

/* Miscellaneous */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.loading-text {
    margin-top: 1rem;
    font-weight: 600;
    color: #4e73df;
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.35rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
