/* style.css */
:root {
    --sidebar-bg: #243b53; 
    --main-bg: #f0f4f8;
    --sidebar-width: 240px;
    --topbar-height: 70px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--main-bg);
    overflow-x: hidden;
    /* Remove flex from body to allow the .main-wrapper to handle centering */
}

/* Logo link style */
.logo-link {
    margin: 0;
    color: #243b53;
    text-decoration: none; /* removes underline */
    font-size: 1.5rem;     /* adjust size if needed */
    font-weight: bold;     /* optional */
}

.logo-link:hover {
    color: #6bb7ff;        /* optional hover color */
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 0; /* Hidden by default */
    background: var(--sidebar-bg);
    transition: all 0.3s ease;
    z-index: 2000;
    overflow: hidden;
}

/* TOPBAR: Adjusts size (left position) when sidebar opens */
.topbar {
    position: fixed;
    top: 0;
    left: 0; 
    right: 0;
    height: var(--topbar-height);
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    z-index: 1000;
    transition: all 0.3s ease; /* Smoothly shrinks */
}

/* MAIN WRAPPER: This handles the vertical and horizontal centering */
.main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Subtract topbar height from the viewport height */
    min-height: calc(100vh - var(--topbar-height)); 
    margin-top: var(--topbar-height);
    
    padding: 20px;
    transition: all 0.3s ease;
}

/* --- THE ADJUSTMENT LOGIC --- */

/* 1. Open Sidebar */
body.sidebar-open .sidebar {
    width: var(--sidebar-width);
}

/* 2. Shrink Topbar from the left */
body.sidebar-open .topbar {
    left: var(--sidebar-width);
}

/* 3. Shift Main Content area to keep card centered in the remaining space */
body.sidebar-open .main {
    margin-left: var(--sidebar-width);
}

/* Landing Card Styling */
.landing-card {
    max-width: 600px;
    width: 100%;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
}

/* Dashboard & Entry Styles */
.entry {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

input, select, textarea {
    border: 2px solid #dbe3ec;
    border-radius: 8px;
    padding: 10px;
    background: white;
}

/* UPDATED FOOTER STYLING */
.site-footer {
    display: block;       /* Force it to act like a block, not a flex item */
    clear: both;         /* Ensure nothing can sit beside it */
    width: 100%;
    box-sizing: border-box; /* Ensures padding doesn't make it wider than 100% */
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid #dbe3ec;
    padding: 30px 20px 10px 20px; 
    margin-top: 40px;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    color: #243b53;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #627d98;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #5a92ca;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    /* Reduced margin and padding around the copyright */
    margin-top: 15px; 
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
    color: #9fb3c8;
    font-size: 0.85rem;
}

.footer-bottom p {
    /* Removes any default browser margins on the paragraph tag */
    margin: 0; 
}