/* --- Global Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Header --- */
/* --- Header --- */
.header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 20px 30px;
    /* Added horizontal padding to match footer/container alignment */
    /* max-width: 1200px; */
    /* Limit width for large screens */
    margin: 0 auto;
    /* Center the header */
}

.header__nav {
    list-style: none;
    display: flex;
    gap: 40px;
    font-size: 1.2em;
    align-items: center;
}

.header__nav li {
    display: inline-block;
}

.header__nav a {
    text-decoration: none;
    color: var(--color-text-secondary);
    /* Use variable for consistency */
    font-weight: 500;
    transition: color 0.3s ease;
}

.header__nav a:hover {
    color: var(--color-primary-hover);
    /* Or a primary color variable if available, existing looked like this */
}

.logo a {
    font-size: 2.4em;
    font-family: initial;
    vertical-align: middle;
    text-decoration: none;
    color: inherit;
    /* Inherit color to avoid blue link */
    display: flex;
    align-items: center;
}

.logo img {
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 100px;
}

.logo span {
    vertical-align: middle;
    font-weight: bold;
    color: var(--color-text-primary);
    /* Ensure logo text is dark */
}

.project-selector-wrapper {
    display: flex;
}

.header-project-select {
    padding: 8px 12px;
    border-radius: 8px;
    /* High border radius */
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-secondary);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    max-width: 200px;
}

.header-project-select:hover {
    background-color: #e5e5e5;
    border-color: #ccc;
}

.header-project-select:focus {
    border-color: #aaa;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* --- Footer --- */
.footer {
    margin: 50px auto 30px;
    /* Centered with auto margins */
    border-radius: var(--radius-lg);
    width: 100%;
    /* Full width within max-width context usually, but matching container style */
    max-width: 1200px;
    padding: 50px;
    background: var(--color-bg-secondary);
    /* Slight background difference or align with design */
    border: 1px solid var(--color-border);
    /* Subtle border */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 0 auto;
    gap: 30px;
    /* Add gap for wrapping */
}

.footer-section {
    flex: 1;
    min-width: 200px;
    /* Ensure columns don't get too squeezed */
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--color-text-primary);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin: 12px 0;
}

.footer-section ul li a {
    text-decoration: none;
    transition: color 0.3s;
    color: var(--color-text-secondary);
    font-size: 0.95em;
}

.footer-section ul li a:hover {
    color: var(--color-primary-hover);
}

.footer-section p {
    font-size: 14px;
    margin-top: 10px;
    color: var(--color-text-secondary);
}

.footer-section .social-icons {
    display: flex;
    gap: 15px;
    /* Better than margins on children */
}

.footer-section .social-icons a {
    font-size: 22px;
    color: var(--color-text-secondary);
    transition: color 0.3s;
    margin: 0;
    /* Let gap handle spacing */
}

.footer-section .social-icons a:hover {
    color: var(--color-primary-hover);
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-muted);
}

@media screen and (max-width: 768px) {

    .header {
        /* flex-direction: column; */
        gap: 20px;
        padding: 20px;
    }

    .header__nav {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer {
        padding: 30px;
        width: 90%;
        /* Responsive width */
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }

    .footer-bottom {
        font-size: 1em;
    }
}

/* --- Containers --- */
.container {
    max-width: 1200px;
    /* Consistent max-width */
    margin: 0 auto 30px;
    /* Centered */
    width: 95%;
    /* Responsive default */
    background: white;
    padding: 50px;
    border: 3px solid var(--color-bg-secondary);
    border-radius: var(--radius-lg);
}

/* Override existing container style if it was specifically set with margin-left */
/* The previous CSS had explicit margin-left: 30px which looked like a workaround. 
   I replaced it with margin: 0 auto for centering. */

.container h1 {
    margin-bottom: 20px;
}

.container h2,
.container h3,
.container h4 {
    margin-bottom: 10px;
}

.container p {
    margin: 10px 0;
}

.container li {
    margin-left: 20px;
}

.items-per-page {
    display: flex;
}

/* --- Dashboard Specific Layout Containers --- */
/* Moved to dashboard.css */