﻿/* Base Styles */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
}

/* Focus styles */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh; /* Ensures full viewport height */
}

@media (max-width: 767px) {
    .app-container {
        flex-direction: column;
    }
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #f8f9fa;
    border-right: 2px solid #dee2e6;
    padding: 1rem 0;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

    .sidebar-brand a {
        color: #212529;
        text-decoration: none;
    }

        .sidebar-brand a:hover {
            color: #0d6efd;
        }

/* User Profile Section */
.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-initials {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    user-select: none;
}

.profile-name {
    color: #212529;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    word-break: break-word;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .sidebar-nav .nav {
        padding: 0;
    }

    .sidebar-nav .nav-item {
        width: 100%;
    }

    .sidebar-nav .nav-link {
        color: #495057;
        padding: 0.75rem 1.5rem;
        transition: background-color 0.2s, color 0.2s;
    }

        .sidebar-nav .nav-link:hover {
            background-color: #e9ecef;
            color: #0d6efd;
        }

        .sidebar-nav .nav-link.active {
            background-color: #0d6efd;
            color: white;
        }

/* Main Content Area */
.main-content {
    flex: 1 1 auto; /* Grow to fill remaining space */
    display: flex;
    flex-direction: column; /* Critical: column so children stack vertically */
    min-height: 0; /* Helps prevent overflow weirdness in nested flex */
}

    .main-content .container {
        flex: 1 1 auto; /* This container grows to push footer down */
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 1400px; /* Optional — prevents content from becoming too wide */
        margin: 0 auto;
    }

/* Make sure the inner <main> doesn't fight the layout */
main[role="main"] {
    height: 100%;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #dee2e6;
    }

    .profile-avatar {
        width: 60px;
        height: 60px;
    }

    .profile-initials {
        font-size: 1.5rem;
    }

    .main-content .container {
        padding: 1rem 0.75rem;
    }
}

footer {
    flex-shrink: 0;
    padding: 0.4rem 1.25rem; /* was probably 1.5–2rem → now ~4× smaller vertically */
    margin-top: 1rem; /* keeps separation from content above */
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.82rem; /* slightly smaller text prevents cramped feeling */
    line-height: 1.3;
    text-align: center;
}

    footer .container {
        padding: 0;
        margin: 0;
    }

/* Utility Classes */
.text-muted {
    color: #6c757d !important;
}

.border-top {
    border-top: 1px solid #dee2e6 !important;
}
