/* C:\PROGRAM FILES\AMPPS\WWW\EHERP\public\css\style.css */

/* Import Google Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Base & General Styling --- */
body {
    font-family: 'Inter', sans-serif; /* Using Inter as requested, with a fallback */
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Light background */
    color: #333;
    line-height: 1.6;
    font-size: 0.875rem; /* Reduced base font size */
    display: flex; /* For sticky footer if needed */
    flex-direction: column; /* For sticky footer if needed */
    min-height: 100vh; /* For sticky footer if needed */
    overflow-x: hidden; /* Prevent horizontal scrolling on the body */
    padding-bottom: 80px; /* Space for fixed footer */
}

main {
    flex: 1;
    /* padding-bottom: 80px; /* Add padding to account for fixed footer height - adjust if you have a fixed footer */ */
}

/* Main Content Area */
.main-content {
    padding: 20px; /* Consistent padding */
    max-width: 1300px; /* Ensure it takes full width available */
	min-width:80%;
    margin: 20px auto;
    box-sizing: border-box; /* Include padding in width */
    text-align: left; /* Default text alignment */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}


/* Container for content */
.container {
    max-width: 1200px;
    width: 95%; /* Make it fluid, with some padding on larger screens */
	min-width:80%;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    box-sizing: border-box; /* Ensure padding is included in width */
}

/* Header Styling (from original style.css, some rules moved to header.php for layout) */
.header {
    background-color: #007bff;
    color: #ffffff;
    padding: 5px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.header h1 {
    margin: 0;
    font-size: 1.8em;
}

.header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.header nav ul li {
    margin-left: 20px;
}

.header nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.header nav ul li a:hover {
    color: #e2e6ea;
}

/* Footer Styling */
.footer {
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    background-color: #f0f2f5;
    color: #666;
    border-radius: 0 0 8px 8px;
    font-size: 0.85em; /* Slightly reduced */
}

/* Forms Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
    font-size: 0.9em; /* Reduced */
}

.form-control {
    width: 100%;
    padding: 8px 10px; /* Reduced padding */
    border: 1px solid #ced4da;
    border-radius: 5px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    font-size: 0.9em; /* Reduced */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* Buttons Styling */
.btn {
    display: inline-block;
    padding: 8px 15px; /* Reduced padding */
    font-size: 0.9em; /* Reduced */
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.btn-success {
    background-color: #28a745;
    color: #ffffff;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-info {
    background-color: #17a2b8;
    color: #ffffff;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-sm {
    padding: 4px 6px; /* Further reduced padding for smaller buttons */
    font-size: 0.7em; /* Even smaller font size for sm buttons */
}

/* Table Styling */
.table-responsive {
    overflow-x: auto; /* Allows horizontal scrolling for tables if content overflows */
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners apply to content */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table th,
.table td {
    padding: 6px 8px; /* Reduced padding for table cells */
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.7rem; /* Further reduced font size for table cells */
}

.table th {
    background-color: #e9ecef;
    font-weight: bold;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.75rem; /* Further reduced font size for table headers */
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Action buttons in table cells */
.table td.actions, .table td.action-buttons-cell { /* Added .action-buttons-cell for specificity */
    white-space: nowrap; /* Prevent buttons from wrapping */
    display: flex; /* Use flexbox to align buttons horizontally */
    gap: 3px; /* Smaller gap between buttons */
    justify-content: center; /* Center buttons in the cell */
    align-items: center;
}

/* Message Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-weight: bold;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Login Page Specific Styling */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #e9ecef;
}

.login-box {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 30px;
    color: #007bff;
    font-size: 2em;
}

/* --- Consolidated Navbar and Mobile Menu Styles (from header.php and previous style.css) --- */

/* Navbar Container */
.navbar {
    background-color: #2c3e50; /* Dark blue-gray from previous style.css */
    color: #ffffff;
    padding: 15px 25px; /* More padding from previous style.css */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* Stronger shadow */
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom-left-radius: 12px; /* Rounded bottom corners */
    border-bottom-right-radius: 12px;
    display: flex;
    justify-content: space-between; /* Align brand and menu/user info */
    align-items: center;
    max-width: 1400px; /* Max width for content inside navbar */
    margin: 0 auto; /* Center the navbar itself */
}

/* Navbar Brand */
.navbar-brand {
    color: #ffffff; /* White color for brand */
    font-size: 1.8em; /* Larger brand text */
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #f39c12; /* Orange hover */
}

/* Desktop Navigation Links */
.nav-links.desktop-nav { /* Explicitly target desktop nav */
    display: flex; /* Default to flex for desktop */
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links.desktop-nav > li { /* Target direct children of desktop nav */
    position: relative;
    margin-left: 25px; /* Spacing between desktop items */
}

.nav-links.desktop-nav > li > a { /* Target top-level desktop links */
    color: #ffffff; /* White color for desktop links */
    text-decoration: none;
    padding: 10px 0;
    display: block;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex; /* Ensure flex for consistent padding/alignment */
    align-items: center;
    font-size: 0.9rem; /* Smaller font size for desktop links */
}

.nav-links.desktop-nav > li > a:hover,
.nav-links.desktop-nav > li > a.active {
    color: #f39c12; /* Orange hover/active */
}

/* Desktop Dropdown Menu */
.nav-links.desktop-nav .dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: #34495e; /* Slightly lighter dark blue-gray for dropdown */
    min-width: 200px; /* Wider dropdown */
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    list-style: none;
    padding: 10px 0;
    border-radius: 8px; /* Rounded corners for dropdown */
    margin-top: 5px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-links.desktop-nav li.dropdown:hover .dropdown-menu {
    display: block; /* Show on hover for desktop */
}

.nav-links.desktop-nav .dropdown-menu li {
    padding: 0;
}

.nav-links.desktop-nav .dropdown-menu a {
    color: #ffffff;
    padding: 10px 20px; /* Padding for dropdown items */
    white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 0.85em; /* Adjusted font size for dropdown items */
}

.nav-links.desktop-nav .dropdown-menu a:hover {
    background-color: #4f6075; /* Darker hover for dropdown items */
    color: #f39c12;
}

/* User Info in Navbar (Desktop) */
.desktop-user-info { /* Added a specific class for desktop user info */
    display: flex; /* Default to flex for desktop */
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 0.85em; /* Reduced */
}

.desktop-user-info i {
    font-size: 1.1em; /* Slightly reduced */
    color: #f39c12;
}

.desktop-user-info .username {
    font-weight: 600;
}

.desktop-user-info .role {
    font-size: 0.75em; /* Reduced */
    opacity: 0.8;
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none; /* Hidden by default on desktop */
    font-size: 1.7em; /* Slightly reduced */
    cursor: pointer;
    color: #ffffff; /* White color for hamburger */
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    height: 100%;
    width: 0; /* Initially collapsed */
    position: fixed;
    z-index: 1001; /* Above navbar */
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-x: hidden;
    transition: width 0.5s ease, opacity 0.5s ease; /* Transition width and opacity */
    opacity: 0; /* Initially transparent */
    visibility: hidden; /* Initially hidden from screen readers and clicks */
    justify-content: flex-end; /* Push menu to right */
}

.mobile-nav-overlay.active {
    width: 100%;
    opacity: 1; /* Fade in */
    visibility: visible; /* Make visible */
    display: flex; /* IMPORTANT: Only display flex when active */
}

.mobile-nav {
    height: 100%;
    width: 280px; /* Width of the mobile menu */
    background-color: #2c3e50;
    padding-top: 60px;
    position: relative;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-nav .close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.3em; /* Slightly reduced */
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.mobile-nav .nav-links {
    flex-direction: column; /* Stack links vertically */
    align-items: flex-start;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav .nav-item {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%; /* Full width for mobile items */
}

.mobile-nav .nav-item:last-child {
    border-bottom: none;
}

.mobile-nav .nav-link {
    padding: 12px 20px; /* Reduced */
    font-size: 1em; /* Reduced */
    color: #ffffff;
    display: block;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
    justify-content: flex-start; /* Align text to left */
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
    background-color: #34495e;
    color: #f39c12;
}

.mobile-nav .dropdown-menu {
    position: static; /* Allow dropdown to expand naturally */
    display: none;
    background-color: #3f546a; /* Slightly different background for sub-menu */
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding-left: 20px; /* Indent sub-items */
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0;
}

.mobile-nav .dropdown-menu .nav-link {
    padding: 8px 30px; /* Reduced */
    font-size: 0.9em; /* Reduced */
}

.mobile-nav .nav-item.dropdown.active .dropdown-menu {
    display: block; /* Show mobile dropdown when active */
}

/* Mobile specific user info */
.mobile-user-info {
    display: none; /* Hidden by default */
    padding: 15px 20px; /* Reduced */
    background-color: #1a2a3a; /* Darker background for user info */
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    border-radius: 8px;
    text-align: center;
}

.mobile-user-info .username {
    font-weight: 600;
    margin-bottom: 5px;
}

.mobile-user-info .role {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Reduced */
.mobile-user-info .logout-btn {
    display: block;
    margin-top: 15px;
    padding: 7px 12px; /* Reduced */
    background-color: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.mobile-user-info .logout-btn:hover {
    background-color: #c0392b;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    /* Hide desktop-specific elements on mobile */
    .nav-links.desktop-nav, .desktop-user-info {
        display: none;
    }
    /* Show mobile-specific elements on mobile */
    .hamburger {
        display: block;
    }
    /* The mobile-nav-overlay's display is controlled by JS adding/removing 'active' class */
    /* .mobile-nav-overlay will be flex when active, none when not active */
    .mobile-user-info {
        display: block;
    }
    .navbar {
        padding: 8px 12px; /* Reduced */
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
    }
    .navbar-brand {
        font-size: 1.4em; /* Reduced */
    }
    .hamburger {
        font-size: 1.4em; /* Reduced */
    }
    .mobile-nav {
        width: 250px; /* Slightly narrower mobile menu */
    }
    .mobile-nav .close-btn {
        font-size: 1.8em; /* Reduced */
        top: 8px; /* Adjusted */
        right: 12px; /* Adjusted */
    }
    .mobile-nav .nav-link {
        padding: 10px 15px; /* Reduced */
        font-size: 0.9em; /* Reduced */
    }
    .btn {
        padding: 8px 12px; /* Reduced */
        font-size: 0.8em; /* Reduced */
        border-radius: 5px; /* Reduced */
    }
    .btn-sm {
        padding: 3px 5px; /* Further reduced */
        font-size: 0.65em; /* Further reduced */
    }
    .form-group label {
        font-size: 0.85em; /* Reduced */
        margin-bottom: 4px; /* Reduced */
    }
    .form-control {
        padding: 8px 10px; /* Reduced */
        font-size: 0.85em; /* Reduced */
        border-radius: 5px; /* Reduced */
    }
    /* Mobile table styling (stacking rows) */
    .table, .item-table, .data-table, .report-table {
        border: 0;
    }
    .table thead, .item-table thead, .data-table thead, .report-table thead {
        display: none; /* Hide table headers on small screens */
    }
    .table tr, .item-table tr, .data-table tr, .report-table tr {
        margin-bottom: 10px; /* Reduced */
        border: 1px solid #e9ecef;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        display: block; /* Make rows behave like blocks */
    }
    .table td, .item-table td, .data-table td, .report-table td {
        text-align: right;
        padding-left: 50%; /* Make space for data-label */
        position: relative;
        border: none;
        display: block; /* Make cells behave like blocks */
        white-space: normal; /* Allow text to wrap */
        font-size: 0.7em; /* Further reduced for mobile table cells */
    }
    .table td::before, .item-table td::before, .data-table td::before, .report-table td::before {
        content: attr(data-label); /* Use data-label for pseudo-element */
        position: absolute;
        left: 8px; /* Adjusted */
        width: calc(50% - 16px); /* Adjusted width */
        padding-right: 8px; /* Adjusted */
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: #555;
        font-size: 0.75em; /* Adjusted for mobile data-labels */
    }
    /* Specific data-label content for common columns */
    .data-table td:nth-of-type(1)::before { content: "ID"; }
    .data-table td:nth-of-type(2)::before { content: "Name"; }
    .data-table td:nth-of-type(3)::before { content: "Department"; }
    .data-table td:nth-of-type(4)::before { content: "Actions"; }
}