/* style.css - FULL REVISED VERSION */

/* -----------------------------------------------------------------------------
   1. Global Body & Page Layout Helpers
   ----------------------------------------------------------------------------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5; /* Default page background */
    margin: 0; /* Reset default browser margin */
    padding-top: 0; /* Base body has no top padding by default */
    
    /* Default background image settings - can be overridden by more specific body classes */
    background-image: url('images/backg.jpg'); /* Ensure this path is correct */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Class for pages that need full viewport flex centering (e.g., index.php clock-in page) */
body.flex-center-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Fill the viewport height */
}

/* Specific styles for your dashboard pages (admin and employee) */
body.dashboard-page {
    display: block !important; /* Override any generic body flex settings */
    padding-top: 100px !important; /* Creates the 100px space at the top of the viewport */
    min-height: auto; /* Let content define height beyond the initial offset */
    justify-content: initial; /* Reset flex property */
    align-items: initial;   /* Reset flex property */
}

/* -----------------------------------------------------------------------------
   2. Container Styles (Clock-in, Forms, Dashboards)
   ----------------------------------------------------------------------------- */
.clock-container, 
.form-container { /* For standalone forms like employee_portal.php, edit_my_request.php */
    background-color: #fff;
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    text-align: center;
}

.clock-container { /* Specific to index.php */
    max-width: 380px; /* Slightly wider to accommodate better PIN input */
    margin: 20px auto; /* Centered if body isn't flex-centering it */
}
.form-container { /* For other forms */
     max-width: 500px; /* Example for signup/login forms */
     margin: 20px auto;
}


.dashboard-container { /* For your admin and employee dashboards */
    display: block;
    max-width: 1200px; /* Max width of the dashboard content area */
    background-color: #fff;
    padding: 0; /* Inner padding handled by .header, .tab-content-wrapper */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 90%; /* Responsive width */
    margin-left: auto;
    margin-right: auto;
    margin-top: 0; /* Sits at the top of the body.dashboard-page's padding area */
    margin-bottom: 30px; /* Space at the bottom of the dashboard */
    text-align: left; /* Default text alignment for dashboard content */
}

/* -----------------------------------------------------------------------------
   3. General Typography & Links
   ----------------------------------------------------------------------------- */
h1, h2, h3 {
    color: #333;
    margin-top: 0; /* Consistent top margin removal for headings */
}
h1 { font-size: 2rem; margin-bottom: 1rem; } /* For main clock page */
.dashboard-container h2 { font-size: 1.5rem; margin: 0; color: white; } /* For dashboard headers */
.card h3 { border-bottom: 1px solid #eee; padding-bottom: 0.75rem; margin-bottom: 1rem; font-size: 1.2rem;}

a { color: #007bff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* -----------------------------------------------------------------------------
   4. Clock-In Page Specifics (index.php)
   ----------------------------------------------------------------------------- */
.logo-container { text-align: center; margin-bottom: 20px; }
#company-logo { max-width: 100%; height: auto; max-width: 360px; /* As per your request */ }

.current-date-time { margin: 1rem 0; text-align: center; }
#current-date { font-size: 1.1rem; color: #555; margin-bottom: 0.25rem; display: block; }
#current-time { font-size: 2.2rem; font-weight: 600; color: #1c1e21; display: block; }

#pin-input {
    width: 100%; 
    padding: 15px; font-size: 2rem; height: 72px; text-align: center;
    letter-spacing: 0.3em; border: 1px solid #ccc; border-radius: 6px;
    margin-bottom: 1.5rem; box-sizing: border-box; 
}
#pin-input::placeholder { color: #aaa; letter-spacing: 0.3em; }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key {
    padding: 10px; height: 36px; font-size: 1rem; border: 1px solid #ccc;
    border-radius: 6px; background-color: #f8f9fa; cursor: pointer;
    transition: background-color 0.2s; box-sizing: border-box;
}
.key:hover { background-color: #e9ecef; }
.key.clear { background-color: #ffc107; color: #fff; }
.key.enter { background-color: #28a745; color: #fff; }
.key.enter:hover { background-color: #218838; }

.links-section { margin-top: 1.5rem; text-align: center; }
.links-section a { display: block; margin-bottom: 0.5rem; }


/* -----------------------------------------------------------------------------
   5. Shared Form Elements & Buttons
   ----------------------------------------------------------------------------- */
.form-group { margin: 1rem; text-align: left; } /* Your original default */
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="number"], /* Added number for consistency */
.form-group select,
.form-group textarea {
    width: 100%; padding: 10px; border: 1px solid #ccc;
    border-radius: 4px; box-sizing: border-box; font-size: 0.95rem;
}

.btn {
    padding: 10px 15px; border: none; border-radius: 4px;
    background-color: #007bff; color: white; font-size: 1rem;
    cursor: pointer; width: auto; /* Changed from 90% to auto for more natural sizing */
    display: inline-block; /* Allows auto width and margin if needed */
    text-align: center;
    /* margin-left: auto; margin-right: auto; -- Remove global centering for buttons */
}
.btn:hover { background-color: #0056b3; }

.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #c82333; }
.btn-success { background-color: #28a745; }
.btn-success:hover { background-color: #218838; }
.btn-info { background-color: #17a2b8; }
.btn-info:hover { background-color: #138496; }
.btn-warning { background-color: #ffc107; color: #212529; }
.btn-warning:hover { background-color: #e0a800; }
.btn-secondary { background-color: #6c757d; color:white;}
.btn-secondary:hover { background-color: #5a6268;}

.btn-sm {
    padding: 5px 10px !important; /* Ensure this overrides .btn padding */
    font-size: 0.85rem !important; /* Ensure this overrides .btn font-size */
    width: auto;
    display: inline-block;
    margin-left: 0; margin-right: 5px;
}
.btn-sm:last-child { margin-right: 0; }

/* Styling for Filter Forms within cards */
.card .form-row {
    display: flex; flex-wrap: wrap; align-items: flex-end; 
    gap: 10px; margin-bottom: 15px;
}
.card .form-row .form-group { margin-bottom: 0; flex-grow: 1; }
.card .form-row .form-group label { white-space: nowrap; }
.card .form-row button.btn { width: auto; padding-left: 20px; padding-right: 20px; }


/* -----------------------------------------------------------------------------
   6. Dashboard Specific Layout (Header, Tabs, Cards)
   ----------------------------------------------------------------------------- */
.dashboard-container > .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem; /* Slightly reduced padding */
    background-color: black; 
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid #333;
}
.dashboard-container > .header a h2 { /* More specific for the linked H2 */
    margin: 0;
    font-size: 1.4rem; /* Adjusted size */
    color: white;
    text-decoration: none;
}
.dashboard-container > .header .logout-button { /* Specific class for logout button */
    padding: 6px 12px; /* Smaller button */
    font-size: 0.85rem; 
    width: auto;               
    text-align: center;        
    margin-left: 1rem; /* Ensures some space if title is short */        
    background-color: #c9302c; 
    border: 1px solid #ac2925;
    color: white !important;      
    text-decoration: none !important; 
    line-height: normal; 
    white-space: nowrap; 
    flex-shrink: 0; /* Prevent shrinking */
}
.dashboard-container > .header .logout-button:hover { background-color: #ac2925; color: white !important; }

.tab-container {
    display: flex; 
    border-bottom: 1px solid #ccc;
    background-color: #f8f9fa; /* Light background for tab bar */
}
.tab-button {
    flex-grow: 1; 
    background-color: transparent; /* Make inactive tabs blend with tab-container */
    border: none; outline: none; cursor: pointer;
    padding: 12px 16px; /* Adjusted padding */
    transition: background-color 0.2s, color 0.2s, border-bottom-color 0.2s;
    font-size: 0.95rem; 
    text-align: center; 
    color: #495057; /* Darker grey for text */
    border-bottom: 3px solid transparent; /* For active state indicator */
    margin-right: 1px; /* Small separator */
}
.tab-button:last-child { border-right: none; margin-right: 0; }
.tab-button:hover { background-color: #e9ecef; color: #0056b3; }
.tab-button.active { 
    background-color: #fff; /* Active tab background */
    color: #007bff; 
    font-weight: bold;
    border-bottom: 3px solid #007bff; 
}

.tab-content-wrapper {
    padding: 20px 15px; 
}
.tab-content {
    display: none; 
    animation: fadeEffect 0.3s ease-in-out;
}
.tab-content.active { /* JS adds/removes this class */
    display: block; 
}
@keyframes fadeEffect { from {opacity: 0.5;} to {opacity: 1;} }

.card {
    background-color: #fff; /* Changed from #f8f9fa to white for cards */
    border: 1px solid #ddd; /* Slightly more defined border */
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 20px; /* Increased space between cards */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Softer shadow */
}
.card:last-child { margin-bottom: 0; }

.card table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.card th, .card td {
    padding: 0.75rem; text-align: left;
    border-bottom: 1px solid #dee2e6;
    word-break: break-word; 
    font-size: 0.9rem; /* Consistent font size for table content */
}    
.card th { background-color: #f1f1f1; font-weight: 600; }


/* -----------------------------------------------------------------------------
   7. Specific Sections (Requests Table, Calendars, Scheduler)
   ----------------------------------------------------------------------------- */

/* Feedback Message Area (used by JS) */
#feedback-message-area { margin: 0 0 15px 0; /* Positioned before tab content */ }
#feedback-message-area .message-display { margin-bottom: 0; } /* Remove extra bottom margin if it's the only child */


/* Admin Dashboard - Requests Table Styling */
#admin-requests-section .card table { table-layout: fixed; }
#admin-requests-section .card th,
#admin-requests-section .card td { padding: 8px 6px; font-size: 0.88em; vertical-align: middle; } /* smaller font, middle align */
#admin-requests-section .card th { white-space: nowrap; font-size: 0.9em; }

#admin-requests-section .card th:nth-child(1), /* Submitted */
#admin-requests-section .card td:nth-child(1) { width: 12%; }
#admin-requests-section .card th:nth-child(2), /* Employee */
#admin-requests-section .card td:nth-child(2) { width: 14%; }
#admin-requests-section .card th:nth-child(3), /* Type */
#admin-requests-section .card td:nth-child(3) { width: 10%; }
#admin-requests-section .card th:nth-child(4), /* Date(s) */
#admin-requests-section .card td:nth-child(4) { width: 14%; line-height: 1.3; } /* Ensure spans display:block in JS for dates */
#admin-requests-section .card th:nth-child(5), /* Explanation */
#admin-requests-section .card td:nth-child(5) { width: 20%; font-size: 0.8em; }
#admin-requests-section .card th:nth-child(6), /* Status */
#admin-requests-section .card td:nth-child(6) { width: 8%; font-weight: bold; }
#admin-requests-section .card th:nth-child(7), /* Admin Note */
#admin-requests-section .card td.admin-note-cell { width: 10%; font-size: 0.8em; }
#admin-requests-section .card th:nth-child(8), /* Action */
#admin-requests-section .card td.action-cell { width: 12%; }

#admin-requests-section .card td.action-cell .request-action-form { display: flex; flex-direction: column; gap: 5px; }
#admin-requests-section .card td.action-cell .action-buttons-container { display: flex; gap: 5px; }
#admin-requests-section .card td.action-cell .action-buttons-container .btn-sm { flex-grow: 1; padding: 5px; font-size: 0.8em;}
#admin-requests-section .card td.action-cell .admin-note-textarea { width: 100%; box-sizing: border-box; font-size:0.85em; }
#admin-requests-section .card td.action-cell .revise-button { width: 100%; margin-top: 5px; }


/* Event Calendar (Admin Overview Tab) */
#admin-event-calendar-card .calendar-navigation { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
#admin-event-calendar-card .calendar-month-year { font-size: 1.4em; font-weight: bold; }
#admin-event-calendar-card table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
#admin-event-calendar-card table.calendar th { text-align: center; padding: 8px 5px; background-color: #f8f9fa; font-weight: normal; font-size: 0.85em;}
#admin-event-calendar-card table.calendar td.day-cell { border: 1px solid #ddd; height: 90px; vertical-align: top; padding: 4px; position: relative; overflow: hidden; cursor: pointer; }
#admin-event-calendar-card table.calendar td.day-cell:hover { background-color: #f0f0f0; }
#admin-event-calendar-card table.calendar td.empty-day-cell { border: 1px solid #f5f5f5; background-color: #fdfdfd; }
#admin-event-calendar-card table.calendar td .day-number { font-weight: bold; font-size: 0.75em; margin-bottom: 3px; text-align: right; color: #777; }
#admin-event-calendar-card td.event-non-lumicision-ip { background-color: #e6e0f8 !important; } 
#admin-event-calendar-card td.event-time-adjustment { background-color: #f8d7da !important; } 
#admin-event-calendar-card td.event-time-off { background-color: #fff3cd !important; } 
#admin-event-calendar-card .event-dots-container { margin-top: 3px; line-height: 1; text-align: right; }
#admin-event-calendar-card .event-dot { height: 7px; width: 7px; border-radius: 50%; display: inline-block; margin-left: 2px; }
#admin-event-calendar-card .purple-dot { background-color: #9b59b6; } 
#admin-event-calendar-card .red-dot { background-color: #e74c3c; } 
#admin-event-calendar-card .orange-dot { background-color: #f39c12; } 
#admin-event-calendar-card .green-dot { background-color: #28a745; } /* Green for scheduled employees */

.calendar-legend { margin-top: 15px; padding-top: 10px; border-top: 1px solid #eee; font-size: 0.9em; text-align: center; }
.calendar-legend h4 { margin-top: 0; margin-bottom: 8px; font-size: 1em; text-align: left; }
.calendar-legend span { display: inline-block; margin-right: 15px; }
.calendar-legend .event-dot { margin-right: 5px; }
.calendar-legend span:last-child { margin-right: 0; }
#admin-event-calendar-details { /* Target specific details area */
    margin-top: 15px; padding: 15px; border: 1px solid #e0e0e0;
    background-color: #f9f9f9; min-height: 60px; font-size: 0.9em;
    line-height: 1.6; border-radius: 4px;
}
#admin-event-calendar-details p:first-child { margin-top: 0; }
#admin-event-calendar-details p:last-child { margin-bottom: 0; }
#admin-event-calendar-details br { margin-bottom: 5px; display: block; content: "";}


/* Employee Scheduler Specifics (Admin Dashboard - Employees Tab) */
#manage-employee-schedule-card .form-control-sm { padding: .25rem .5rem; font-size: .875rem; line-height: 1.5; border-radius: .2rem; height: auto; }
#manage-employee-schedule-card .day-schedule-row strong { display: block; margin-bottom: 8px; }
#manage-employee-schedule-card .time-slot-entry input[type="time"] { max-width: 110px; }
#manage-employee-schedule-card .scheduler-week-navigation { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
#manage-employee-schedule-card .scheduler-week-navigation h4 { margin-top: 0; margin-bottom: 0; font-size: 1.1em; }
#weekly_schedule_editor .text-muted { text-align: center; padding: 20px; font-style: italic; }
#schedule_feedback p { padding: 10px; border-radius: 4px; text-align: center; font-size: 0.9em; }
#schedule_feedback .text-success { background-color: #d4edda; color: #155724; }
#schedule_feedback .text-danger { background-color: #f8d7da; color: #721c24; }
#schedule_feedback .text-info { background-color: #d1ecf1; color: #0c5460; }

/* Employee Schedule Monthly Calendar (Admin Dashboard - Employees Tab) */
#admin_monthly_schedule_view_area { background-color: #f9f9f9; padding: 15px; border-radius: 5px; }
#admin_monthly_schedule_view_area .calendar-navigation { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#admin_monthly_schedule_view_area .calendar-month-year { font-size: 1.3em; font-weight: bold; }
#admin_monthly_schedule_view_area table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
#admin_monthly_schedule_view_area table.calendar th { text-align: center; padding: 8px 5px; background-color: #e9ecef; font-size: 0.85em; }
#admin_monthly_schedule_view_area table.calendar td.day-cell { border: 1px solid #ccc; height: 70px; vertical-align: top; padding: 4px; font-size: 0.8em;}
#admin_monthly_schedule_view_area table.calendar td.empty-day-cell { border: 1px solid #f0f0f0; background-color: #fafafa; }
#admin_monthly_schedule_view_area table.calendar td .day-number { text-align: right; font-size: 0.9em; margin-bottom: 3px; color: #666; }
#admin_monthly_schedule_view_area table.calendar td.scheduled { background-color: #d1e7dd; /* Light green for scheduled */ }
#admin_monthly_schedule_view_area .time-slots.scheduled-times span {
    display: block; font-size: 0.75em; padding: 2px; margin-bottom: 1px;
    background-color: #198754; /* Green for time slots */ color: white;
    border-radius: 2px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* Employee Dashboard Specifics (if any beyond shared .dashboard-container) */
/* Styles for Employee Weekly Schedule Display */
#tab-emp-schedule .week-navigation { /* Target within employee dash */
    /* ... styles are similar to admin scheduler-week-navigation ... */
    margin-bottom: 15px; padding: 10px; background-color: #f8f9fa; border-radius: 4px;
}
#tab-emp-schedule .week-schedule-display {
    display: flex; justify-content: space-between; flex-wrap: nowrap; 
    gap: 0.7%; overflow-x: auto; padding-bottom:10px;
}
#tab-emp-schedule .day-schedule-box {
    border: 1px solid #e0e0e0; border-radius: 6px; padding: 8px; 
    flex: 0 0 calc(100%/7 - 8px); box-sizing: border-box; 
    margin-bottom: 10px; background-color: #fdfdfd; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; flex-direction: column; 
    min-height: 110px; min-width: 110px;
}
#tab-emp-schedule .day-schedule-box h4 { margin-top: 0; margin-bottom: 3px; font-size: 0.85em; }
#tab-emp-schedule .day-schedule-box h5 { margin-top: 0; margin-bottom: 6px; font-size: 0.75em; color: #777; }
#tab-emp-schedule .day-schedule-box.scheduled { background-color: #e0f0ff; border-left: 3px solid #0069d9; }
#tab-emp-schedule .day-schedule-box.scheduled h4 { color: #0056b3; }
#tab-emp-schedule .day-schedule-box .time-slots { font-size: 0.8em; line-height: 1.3; margin-top: auto; }
#tab-emp-schedule .day-schedule-box .time-slots span { display: block; margin-bottom: 2px; padding: 2px 3px; background-color: #f0f8ff; border: 1px solid #d1e7fd; border-radius: 2px; font-size:0.85em; }

/* Employee Dashboard - Monthly Schedule Calendar */
#emp_monthly_schedule_view_area .calendar-navigation { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#emp_monthly_schedule_view_area .calendar-month-year { font-size: 1.3em; font-weight: bold; }
#emp_monthly_schedule_view_area table.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
#emp_monthly_schedule_view_area table.calendar th { text-align: center; padding: 8px 5px; background-color: #e9ecef; font-size: 0.85em; }
#emp_monthly_schedule_view_area table.calendar td.day-cell { border: 1px solid #ccc; height: 70px; vertical-align: top; padding: 4px; font-size: 0.8em;}
#emp_monthly_schedule_view_area table.calendar td.empty-day-cell { border: 1px solid #f0f0f0; background-color: #fafafa; }
#emp_monthly_schedule_view_area table.calendar td .day-number { text-align: right; font-size: 0.9em; margin-bottom: 3px; color: #666; }
#emp_monthly_schedule_view_area table.calendar td.scheduled { background-color: #d1e7dd; }
#emp_monthly_schedule_view_area .time-slots.scheduled-times span {
    display: block; font-size: 0.75em; padding: 2px; margin-bottom: 1px;
    background-color: #198754; color: white;
    border-radius: 2px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Employee Dashboard - Requests Table column width fix (if different from admin) */
#tab-emp-requests .card table { table-layout: fixed; }
#tab-emp-requests .card th:nth-child(1), /* Submitted */
#tab-emp-requests .card td:nth-child(1) { width: 15%; }
#tab-emp-requests .card th:nth-child(2), /* Type */
#tab-emp-requests .card td:nth-child(2) { width: 13%; white-space: nowrap; }
#tab-emp-requests .card th:nth-child(3), /* Date(s) */
#tab-emp-requests .card td:nth-child(3) { width: 17%; }
#tab-emp-requests .card td.request-dates span { display: block; } /* For employee dashboard date wrapping */
#tab-emp-requests .card th:nth-child(4), /* Explanation */
#tab-emp-requests .card td:nth-child(4) { width: 25%; font-size: 0.85em; word-wrap: break-word; }
#tab-emp-requests .card th:nth-child(5), /* Status */
#tab-emp-requests .card td:nth-child(5) { width: 10%; white-space: nowrap; }
#tab-emp-requests .card th:nth-child(6), /* Admin Notes */
#tab_emp-requests .card td:nth-child(6) { width: 10%; font-size: 0.85em; word-wrap: break-word; }
#tab-emp-requests .card th:nth-child(7), /* Action */
#tab-emp-requests .card td:nth-child(7) { width: 10%; text-align: center; }
#tab-emp-requests .card td .btn.btn-secondary { padding: 5px 8px; font-size: 0.85em; white-space: nowrap; width: auto; display: inline-block;}


/* Portal Container for employee login/signup page */
.portal-container {
    background-color: #fff; padding: 2rem 3rem; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 100%; max-width: 500px; 
    margin: 100px auto 20px auto; /* If body.flex-center-page is used, this margin auto centers.
                                     If body.dashboard-page (with padding-top) is used, margin-top should be 0 */
}
body.flex-center-page .portal-container {
    margin-top: 0; /* Let flexbox handle centering */
    margin-bottom: 0;
}

.portal-divider { border: 0; height: 1px; background-color: #eee; margin: 2rem 0; }

/* Sr-only for accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* Request form dates specific for employee dashboard (submit new) */
#employeeRequestForm .request-form-dates div { margin-bottom: 10px; }
#employeeRequestForm #timeOffDates { display: none; } 
#employeeRequestForm #timeAdjustmentDate { display: block; }

/* Edit request form specific for employee dashboard (edit_my_request.php) */
#employeeEditRequestForm .request-form-dates div { margin-bottom: 10px; }
/* Initial display set by inline style in edit_my_request.php based on request_type */

/* Admin Dashboard - Pending Requests Table Specific Styles */
#admin-requests-section table td .status-pending { 
    color: #ffc107 !important; /* Amber/Yellow */
    font-weight: bold !important; 
    /* background-color: transparent !important; /* Ensure no other background is interfering */
    /* display: inline !important; /* Ensure it's not being hidden by display properties */
} 

#admin-requests-section table td .status-approved { 
    color: #28a745 !important; /* Green */
    font-weight: bold !important; 
    /* background-color: transparent !important; */
    /* display: inline !important; */
} 

#admin-requests-section table td .status-denied { 
    color: #dc3545 !important; /* Red */
    font-weight: bold !important; 
    /* background-color: transparent !important; */
    /* display: inline !important; */
    /* text-decoration: line-through; /* Optional */
}  

/* In style.css */

/* Employee Dashboard Weekly Schedule - Time Off Highlight */
#tab-emp-schedule .day-schedule-box.time-off-day-highlight {
    background-color: #fff3cd; /* Light Orange */
    border-left: 4px solid #f39c12; /* Orange accent */
}
#tab-emp-schedule .day-schedule-box.time-off-day-highlight h4 {
    color: #b77c00; 
}
#tab-emp-schedule .day-schedule-box .time-slots .time-off-entry {
    display: block;
    margin-top: 3px; /* If both work and time off listed, add space */
    padding: 2px 4px;
    background-color: #ffe0b2; /* Lighter orange for the slot itself */
    border: 1px solid #ffd08a;
    border-radius: 3px;
    font-size: 0.85em;
    color: #721c24; /* Darker text for readability */
    font-style: italic;
}

/* Employee Dashboard Monthly Calendar - Time Off Highlight */
/* (reusing .scheduled class for general work, new class for time-off override) */
#emp_monthly_schedule_view_area .calendar td.day-cell.time-off-day-highlight { 
    background-color: #fff3cd !important; /* Orange for time off day, ensure it overrides .scheduled green */
}
#emp_monthly_schedule_view_area .time-slots.time-off-slots span.time-off-entry {
    display: block;
    font-size: 0.8em;
    padding: 2px;
    margin-bottom: 1px;
    background-color: #ffc107; /* Orange for time off slot */
    color: #383d41;
    border-radius: 2px;
    text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* General scheduled work slot for employee monthly calendar */
#emp_monthly_schedule_view_area .calendar td.day-cell.scheduled:not(.time-off-day-highlight) { 
    background-color: #d1e7dd; /* Light green only if not a time-off day */
}
#emp_monthly_schedule_view_area .time-slots.scheduled-times span {
    /* This style is for actual work slots, ensure it doesn't conflict with time-off-entry */
    background-color: #198754; /* Green for actual work time slots */
}

/* For the admin's view of an employee's schedule (in Employees Tab) */
#admin_monthly_schedule_view_area .calendar td.day-cell.time-off-day-highlight { 
    background-color: #fff3cd !important; /* Light Orange */
    /* border-left: 4px solid #f39c12; /* Optional: Orange accent border */
}
#admin_monthly_schedule_view_area .calendar td.day-cell.time-off-day-highlight .day-number {
    /* color: #b77c00; /* Optional: Darker text for day number */
}

/* For the employee's own monthly schedule view (in Schedule & Hours Tab) */
#emp_monthly_schedule_view_area .calendar td.day-cell.time-off-day-highlight {
    background-color: #fff3cd !important; /* Light Orange */
    /* border-left: 4px solid #f39c12; /* Optional: Orange accent border */
}
#emp_monthly_schedule_view_area .calendar td.day-cell.time-off-day-highlight .day-number {
    /* color: #b77c00; /* Optional: Darker text for day number */
}


/* General highlight for normally scheduled work days (light green) */
/* This should apply if it's scheduled AND NOT a time-off day taking precedence */
#admin_monthly_schedule_view_area .calendar td.day-cell.scheduled:not(.time-off-day-highlight),
#emp_monthly_schedule_view_area .calendar td.day-cell.scheduled:not(.time-off-day-highlight) { 
    background-color: #d1e7dd !important; /* Light green for scheduled work */
}

/* Styling for the time slot text within the calendar cells */
.time-slots.scheduled-times span { /* For actual work slots */
    display: block;
    font-size: 0.75em; /* Make it small to fit multiple */
    padding: 1px 3px;
    margin-bottom: 1px;
    background-color: #198754; /* Green for actual work time slots */
    color: white;
    border-radius: 2px;
    text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.time-slots.time-off-slots span.time-off-entry { /* For time off entries */
    display: block;
    font-size: 0.75em;
    padding: 1px 3px;
    margin-bottom: 1px;
    background-color: #ffc107; /* Orange for time off slot */
    color: #383d41; /* Darker text */
    border-radius: 2px;
    text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-style: italic;
}


/* In style.css */

/* Admin Employee Scheduler - Weekly Editor Box Layout REFINED for NO HORIZONTAL SCROLL */
#weekly_schedule_editor_admin.week-schedule-display-admin {
    display: flex;
    justify-content: space-between; /* Distributes space, or use space-around */
    flex-wrap: nowrap; /* This is desired to keep them in one row */
    gap: 0.5%; /* Keep a small gap */
    /* overflow-x: auto; <<<< REMOVE THIS or set to hidden if shrinking is preferred */
    overflow-x: hidden; /* If boxes must shrink and never scroll the container */
    padding: 10px 5px; 
    background-color: #f8f9fa; 
    border: 1px solid #e0e0e0;     
    border-radius: 4px;
    margin-bottom: 15px; 
}

.admin-schedule-day-box { 
    border: 1px solid #c5c5c5;
    border-radius: 5px;
    padding: 6px; /* Slightly reduced padding */
    
    /* Let flexbox manage the width primarily. 
       Each box will try to take an equal share of the space. */
    flex-grow: 1;   /* Allow boxes to grow to fill space */
    flex-shrink: 1; /* Allow boxes to shrink if needed */
    flex-basis: 0;  /* Start with no intrinsic width, let flex-grow do the work */
    /* This combination makes them truly flexible. */

    min-width: 100px; /* A smaller min-width to allow more shrinkage before content breaks. Adjust based on content. */
                      /* Content like buttons and time inputs will also dictate practical min-width */
    
    box-sizing: border-box; 
    background-color: #fff; 
    display: flex;
    flex-direction: column;
    min-height: 210px; /* Adjust if content needs more or less space */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.admin-schedule-day-box h4 { /* Day Name */
    margin-top: 0; margin-bottom: 3px; font-size: 0.85em; /* Slightly smaller */
    font-weight: bold; color: #333; text-align: center;
    white-space: nowrap; /* Try to keep day name on one line */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis if day name is too long for the shrunk box */
}
.admin-schedule-day-box h5 { /* Date */
    margin-top: 0; margin-bottom: 8px; font-size: 0.75em; /* Smaller */
    color: #777; text-align: center;
    border-bottom: 1px solid #eee; padding-bottom: 4px;      
}

.admin-schedule-day-box .time-slots-editor {
    font-size: 0.8em; /* Smaller font for slot entries */
    line-height: 1.3;
    flex-grow: 1; 
    margin-bottom: 5px;
    overflow-y: auto; /* Allow vertical scroll if many slots */
    max-height: 90px; /* Adjust if needed */
}

/* Individual time slot entry within the admin editor */
.admin-schedule-day-box .time-slot-entry.form-row {
    display: flex; 
    align-items: center; 
    margin-bottom: 3px !important;
    gap: 2px !important;
}
.admin-schedule-day-box .time-slot-entry input[type="time"].form-control-sm {
    padding: .2rem .2rem; /* Further reduce padding */
    font-size: 0.75rem; 
    border: 1px solid #ccc; 
    border-radius: 3px;
    flex: 1; 
    min-width: 60px; /* Absolute minimum for time inputs */
}
.admin-schedule-day-box .time-slot-entry span { /* "to" text */
    padding: 0 1px; 
    font-size: 0.75rem;
}
.admin-schedule-day-box .time-slot-entry .remove-slot-admin-btn {
    padding: 2px 4px !important; 
    font-size: 0.7em !important;
    line-height: 1 !important; 
}

/* Buttons at the bottom of each day box (+Slot, 9-5) */
.admin-schedule-day-box .day-controls { 
    margin-top: auto; 
    padding-top: 5px;
    text-align: center; 
    border-top: 1px solid #f0f0f0; 
}
.admin-schedule-day-box .day-controls .btn-sm {
    margin: 2px 1px; /* Tighter margins */
    font-size: 0.7em; /* Smaller buttons */
    padding: 2px 4px;
}

/* In style.css */

/* Styling for the "Remove Slot" button in the Admin's Weekly Schedule Editor */
#weekly_schedule_editor_admin .time-slot-entry .remove-slot-admin-btn {
    background-color: #dc3545; /* Red background color (Bootstrap's danger color) */
    color: white;              /* White text/icon color */
    border: 1px solid #c82333; /* Slightly darker red border */
    padding: 4px 8px !important;   /* Increased padding to make it slightly larger */
    font-size: 0.9em !important;   /* Slightly larger font size for the '×' */
    line-height: 1 !important;   /* Ensure icon is centered */
    flex-shrink: 0;
    border-radius: 4px; /* Optional: rounded corners */
    cursor: pointer;
    font-weight: bold; /* Make the 'x' a bit bolder */
}

#weekly_schedule_editor_admin .time-slot-entry .remove-slot-admin-btn:hover {
    background-color: #c82333; /* Darker red on hover */
    border-color: #b02a37;
}

/* Optional: Add to style.css if needed for better alignment */
.week-navigation > div[style*="flex-grow:1"] { /* Targets the new div wrapper */
    display: flex;
    align-items: center; /* Vertically align label, input, and span */
    justify-content: center; /* Center these items within their flex space */
    gap: 10px; /* Space between items */
}
#emp_schedule_week_selector_input.form-control-sm {
    padding: .25rem .5rem; /* From bootstrap, or define your own */
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .2rem;
    height: auto;
     margin-right: 10px;
    /* width: auto; /* Already set in HTML, but good to note */
}

/* style (2).css - Additions for Admin Dashboard Tab 4 Monthly Calendar Styling */

/* Center the title for Admin's view of Employee Monthly Schedule */
#admin_employee_monthly_schedule_view_area > h4 {
    text-align: center;
    margin-bottom: 15px; /* Adds a bit of space below the title */
}

/* Adjust navigation for Admin's view of Employee Monthly Schedule */
#admin_employee_monthly_schedule_view_area .calendar-navigation {
    display: flex;
    justify-content: center; /* This will center the group of navigation items */
    align-items: center;
    margin-bottom: 10px; /* Existing margin */
}

/* Add spacing around the month/year display in the navigation */
#admin_employee_monthly_schedule_view_area .calendar-navigation .calendar-month-year {
    /* font-size and font-weight are likely already set by existing rules,
       but can be specified here if needed:
       font-size: 1.3em;
       font-weight: bold;
    */
    margin-left: 20px;  /* Space between "Prev" button and "Month Year" */
    margin-right: 20px; /* Space between "Month Year" and "Next" button */
}

/* Styles for the feedback messages within the Admin Employee Scheduler */
#schedule_feedback_admin p { /* Base style for any paragraph in this feedback area */
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    margin-top: 0; /* Adjust if needed, to prevent extra space if div has margin */
    margin-bottom: 0; /* Good practice if the <p> is the only child */
}

/* Success messages (e.g., "Schedule loaded", "Schedule saved") */
#schedule_feedback_admin p.text-success {
    background-color: #d4edda; /* Light green background */
    color: #155724;            /* Dark green text */
    border: 1px solid #c3e6cb; /* Optional: slightly darker green border */
}

/* Error messages */
#schedule_feedback_admin p.text-danger {
    background-color: #f8d7da; /* Light red background */
    color: #721c24;            /* Dark red text */
    border: 1px solid #f5c6cb; /* Optional: slightly darker red border */
}

/* Informational messages (e.g., "Saving...") */
#schedule_feedback_admin p.text-info {
    background-color: #d1ecf1; /* Light blue background */
    color: #0c5460;            /* Dark blue text */
    border: 1px solid #bee5eb; /* Optional: slightly darker blue border */
}

#feedback-message-area .message-display {
    padding: 12px 20px;       /* Padding inside the banner */
    margin-bottom: 15px;      /* Space below the banner */
    border: 1px solid transparent; /* Base border, color will be overridden */
    border-radius: 5px;       /* Rounded corners for the banner */
    font-size: 0.95em;        /* Text size */
    text-align: center;       /* Center the message text */
    /* Ensure it takes up available width or is reasonably sized */
}

/* Styling for SUCCESS messages (e.g., "Info Updated") */
#feedback-message-area .message-display.success {
    color: #155724;             /* Dark green text for readability */
    background-color: #d4edda;  /* Light green background */
    border-color: #c3e6cb;      /* Green border */
}

/* Styling for ERROR messages */
#feedback-message-area .message-display.error {
    color: #721c24;             /* Dark red text */
    background-color: #f8d7da;  /* Light red background */
    border-color: #f5c6cb;      /* Red border */
}

