/* LCA Brand Variables */
:root {
    --brand-brown: #7C592E;
    --brand-hover: #5a4021;
    --brand-light: #f9f6f2;
    --brand-active: #fcf9f5;
    --accent-gold: #c9ad60;
}

/* --- Global Styles & Sticky Footer Logic --- */
html {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #fff;
    color: #333;
    margin: 0;
    
    /* Forces body to be at least the height of the screen */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* This expands to fill all empty space, pushing the footer down */
.main-content-wrapper {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
    margin-top: auto; /* Insurance for the sticky behavior */
}

.bg-brand { background-color: var(--brand-brown) !important; }
.text-brand { color: var(--brand-brown) !important; }
.text-accent { color: var(--accent-gold) !important; }
.transition { transition: all 0.3s ease; }

/* Navigation Bar */
.navbar {
    background-color: white;
    padding: 0.8rem 0;
}

.nav-link {
    font-weight: 500;
    color: #444 !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--brand-brown) !important;
}

/* --- Mobile Drawer Design --- */
@media (max-width: 991px) {
    .offcanvas-start {
        width: 300px !important; 
        border-right: 3px solid var(--accent-gold) !important;
    }
}

.offcanvas {
    background-color: #f4f4f4 !important; /* Light background to make white menu items pop */
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
}

.offcanvas-header {
    background-color: var(--brand-brown) !important;
    padding: 1.25rem;
    border: none;
}

.offcanvas-title {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* White Close Button Logic */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 1 !important;
    background-size: 12px;
}

/* White Background Menu Items (Card Style) */
.offcanvas-body .nav-link {
    background-color: #ffffff !important;
    color: #333333 !important;
    margin: 8px 15px;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: 0.2s ease;
    border: none !important;
}

.offcanvas-body .nav-link i {
    font-size: 1.2rem;
    margin-right: 12px;
    color: var(--brand-brown);
}

.offcanvas-body .nav-link:hover {
    background-color: #ffffff !important;
    color: var(--brand-brown) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* --- Content Components --- */
.page-header {
    background: linear-gradient(135deg, var(--brand-brown) 0%, var(--brand-hover) 100%) !important;
    color: white;
    padding: 2.5rem 1.5rem;
    border-radius: 15px;
}

.btn-brand { 
    background-color: var(--brand-brown) !important; 
    color: white !important; 
    border: none;
}

.btn-brand:hover { 
    background-color: var(--brand-hover) !important; 
    transform: translateY(-2px);
}

.btn-outline-brand { 
    color: var(--brand-brown); 
    border: 2px solid var(--brand-brown);
}

.btn-outline-brand:hover { 
    background-color: var(--brand-brown); 
    color: white !important; 
}

/* Custom Pagination */
.custom-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.custom-pagination .active {
    background-color: var(--brand-brown);
    color: white !important;
    padding: 5px 12px;
    border-radius: 4px;
}

/* Mobile Logout Button (Added for Header Integration) */
.mobile-logout-btn {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 12px;
    margin-right: 10px;
    text-decoration: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.mobile-logout-btn:hover {
    background-color: #dc3545;
    color: #fff;
}

/* --- Mobile readability ---
   Use a slightly larger root scale for phone screens so rem-based text across
   the site remains comfortable for older readers. Keep helper text and form
   controls from falling below an accessible reading size. */
@media (max-width: 767.98px) {
    html {
        font-size: 18px;
    }

    body {
        line-height: 1.6;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    small,
    .small {
        font-size: 0.875rem !important;
        line-height: 1.5;
    }

    input,
    select,
    textarea,
    button,
    .btn {
        font-size: 1rem !important;
    }
}
