/* style.css */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --text-color: #333;
    --error-color: #dc3545;
    --success-color: #28a745;
    --border-radius: 8px;
    /* New Variables for Layout */
    --sidebar-width: 220px;
    --header-height: 60px;
}

/* ——— DEFAULT BODY (Keeps Login Page Working) ——— */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    /* Centers the Login/Register Pages */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container { width: 100%; max-width: 500px; }

/* ——— FORM STYLES (Login/Register) ——— */
.form-container { background: var(--card-bg); padding: 40px; border-radius: var(--border-radius); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
h1 { text-align: center; margin-bottom: 30px; font-weight: 600; }
.form-group { margin-bottom: 20px; position: relative; }
label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }
input[type="text"], input[type="email"], input[type="password"], select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: var(--border-radius); box-sizing: border-box; font-size: 16px; transition: border-color 0.3s ease; }
input:focus, select:focus { border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1); }
.password-wrapper { position: relative; }
.eye-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 18px; color: #888; }
.button-group { display: flex; gap: 10px; margin-top: 30px; }
button { flex: 1; padding: 12px; border: none; border-radius: var(--border-radius); font-size: 16px; cursor: pointer; font-weight: 600; transition: background 0.3s; }
button[type="submit"] { background-color: var(--primary-color); color: white; }
button[type="button"] { background-color: #6c757d; color: white; }
.error-message { background-color: #f8d7da; color: #721c24; padding: 15px; border-radius: var(--border-radius); margin-bottom: 20px; border: 1px solid #f5c6cb; text-align: center; }

/* ——————————————————————————————————————————————
   DASHBOARD OVERRIDES 
   (These fix the layout for Schools/Inventory)
   —————————————————————————————————————————————— */

/* 1. RESET BODY LAYOUT */
body.dashboard-page {
    display: block !important; /* Kills the centering */
    padding: 0 !important;
    height: auto !important;
    max-width: none !important;
}

/* 2. TOP HEADER */
.navbar {
    background-color: #2c3e50;
    color: #ecf0f1;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: fixed; /* Stick to top */
    top: 0; left: 0; width: 100%;
    z-index: 2000;
    box-sizing: border-box;
}
.navbar h1 { margin: 0; font-size: 20px; color: #fff; text-align: left; }
.navbar a { color: #ecf0f1; text-decoration: none; margin-left: 15px; }

/* 3. SIDEBAR */
.sidebar {
    position: fixed; /* Stick to left */
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background-color: #34495e;
    border-right: 1px solid #2c3e50;
    overflow-y: auto;
    z-index: 1000;
    padding-top: 10px;
}

/* Sidebar Links */
.menu-items, .sub-menu { list-style: none; padding: 0; margin: 0; }
.menu-items li { width: 100%; }
.menu-link { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; color: #bdc3c7; text-decoration: none; font-size: 14px; transition: all 0.2s; border-left: 4px solid transparent; }
.menu-link:hover, .menu-link.active { background-color: #2c3e50; color: #fff; border-left: 4px solid #3498db; }
.submenu-arrow { font-size: 10px; color: #95a5a6; }

/* Flyouts */
.sub-menu { display: none; position: fixed; width: var(--sidebar-width); background-color: #2c3e50; border: 1px solid #34495e; box-shadow: 4px 4px 10px rgba(0,0,0,0.2); z-index: 3000; }
.sub-menu .menu-link { padding-left: 15px; }

/* 4. MAIN CONTENT AREA */
.main-content {
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width); /* Pushes content to right of sidebar */
    padding: 30px;
}
/* Dashboard Container Override */
.dashboard-page .container { max-width: 1200px; margin: 0 auto; }

/* ——— GLOBAL HEADER FIX (Added to fix asset_upload.php and all others) ——— */

/* This targets the div inside header.php directly */
.navbar-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Removes the default margin that pushes the text down */
.navbar-content h1 {
    margin: 0;
    font-size: 20px; /* Matches daily_audits size */
}

/* Ensures the login info stays aligned */
.navbar-content .user-info {
    display: flex;
    align-items: center;
    gap: 15px; /* Adds space between text and logout link */
}