:root {
    --primary: #1a3c34;        /* Deep Forest Green from Logo */
    --accent: #c5a059;         /* Brand Gold */
    --dark: #0b1a17;           /* Deep Dark Shadow */
    --light-bg: #f8faf9;       /* Soft White */
    --white: #ffffff;
    --sidebar-w: 260px;
    --sidebar-collapsed-w: 70px;
    --transition: 0.3s;
    --border-color: rgba(26, 60, 52, 0.1);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--light-bg);
    color: var(--dark);
    margin: 0;
    overflow-x: hidden;
}

h1, h2, h3, .brand-font {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
}

/* --- LUXURY LOGIN PAGE STYLES --- */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 6px;
    background: var(--accent);
}

.brand-logo {
    max-width: 180px;
    margin-bottom: 25px;
}

/* --- MOBILE TOP BAR --- */
.mobile-top-bar {
    display: none;
    background: var(--primary);
    padding: 15px 20px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1100;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* --- SIDEBAR --- */
#sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--primary);
    color: var(--white);
    z-index: 1200;
    transition: width var(--transition) ease, left var(--transition) ease;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Changed to visible for tooltips */
}

/* Zero-Flicker Toggle Logic for Desktop */
html.sidebar-collapsed #sidebar {
    width: var(--sidebar-collapsed-w);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
    padding: 20px;
    transition: padding var(--transition);
}

html.sidebar-collapsed .sidebar-header {
    justify-content: center;
    padding: 20px 0;
}

.brand-title-wrap {
    transition: opacity var(--transition);
    white-space: nowrap;
}

html.sidebar-collapsed .brand-title-wrap {
    display: none;
}

.toggle-btn-desktop {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

/* Sidebar Nav Links */
#sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 15px 25px;
    border-left: 5px solid transparent;
    transition: 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    position: relative;
    white-space: nowrap;
}

#sidebar .nav-link i {
    min-width: 25px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-text {
    margin-left: 15px;
    transition: opacity var(--transition);
}

html.sidebar-collapsed .nav-text {
    opacity: 0;
    pointer-events: none;
}

#sidebar .nav-link:hover, #sidebar .nav-link.active {
    background: rgba(255,255,255,0.05);
    color: var(--accent);
    border-left-color: var(--accent);
}

/* Tooltips for Collapsed State */
.sidebar-tooltip {
    position: absolute;
    left: 75px;
    background: var(--accent);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    opacity: 0;
    transform: translateX(10px);
    transition: 0.2s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2000;
}

html.sidebar-collapsed .nav-link:hover .sidebar-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* --- CONTENT AREA --- */
.admin-content {
    margin-left: var(--sidebar-w);
    padding: 40px;
    min-height: 100vh;
    transition: margin-left var(--transition) ease;
}

html.sidebar-collapsed .admin-content {
    margin-left: var(--sidebar-collapsed-w);
}

/* --- FORM & UI ELEMENTS --- */
.btn-brand {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.btn-brand:hover {
    background: #b08d4b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.3);
}

.form-control {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #f9fbfb;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem rgba(197, 160, 89, 0.1);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 992px) {
    .mobile-top-bar {
        display: flex;
    }

    #sidebar {
        left: -100%;
        width: var(--sidebar-w) !important;
    }

    #sidebar.active {
        left: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.3);
    }

    .admin-content {
        margin-left: 0 !important;
        padding: 25px 20px;
    }

    .toggle-btn-desktop, .sidebar-tooltip {
        display: none !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1150;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}