/*================================================================================== CSS Variables ==*/
:root {
    --header-height: 60px; /* Adjusted for better visual balance */
    --footer-height: 50px; /* Adjusted for better visual balance */
    --sidebar-width-desktop: 285px;
    --sidebar-width-mobile: 250px;

    /* Theme Colors */
    --blue-primary: #00c6ff; /* Main accent blue */
    --blue-dark: #0072ff; /* Darker blue for hover */
    --dark-bg-gradient-start: #141e30; /* Body background start */
    --dark-bg-gradient-end: #243b55; /* Body background end */
    --dark-header-footer-bg: #1a2a3a; /* Header/footer background */
    --text-light: #f0f0f0; /* Lighter white for main text */
    --text-dark: #333; /* Dark text for light backgrounds */
    --warning-yellow: #ffeb3b; /* Message div yellow */
    --success-green: #28a745;
    --danger-red: #dc3545;
}

/*================================================================================== Base & Global Styles ==*/
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Crucial for consistent sizing */
    font-family: 'Inter', sans-serif; /* Consolidated font-family */
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

body {
    background: linear-gradient(to right, var(--dark-bg-gradient-start), var(--dark-bg-gradient-end));
    color: var(--text-light); /* Default text color for the entire body */
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Stack children (header, main-wrapper, footer) vertically */
}

/* Common button styling */
.btn,
.btn-green,
.btn-red,
.time-in,
.time-out,
.btn-create-user,
.save-button,
.filter-button,
.excel-button,
.view-more-btn {
    border-radius: 8px; /* Consistent rounded corners */
    cursor: pointer;
    transition: all 0.3s ease; /* Unified transition */
    min-width: 120px;
    text-align: center;
    padding: 12px 25px; /* Adjusted padding for consistency */
    font-size: 1rem; /* Adjusted font size for consistency */
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Specific button colors */
.btn-green, .time-in { background-color: var(--success-green); }
.btn-green:hover, .time-in:hover { background-color: #218838; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); }
.btn-red, .time-out { background-color: var(--danger-red); }
.btn-red:hover, .time-out:hover { background-color: #c82333; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); }
.btn { background-color: #2596be; } /* Default blue button */
.btn:hover { background-color: #1b7fa4; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); }

/* Common input/select/textarea styling */
input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
select,
textarea {
    width: 100%; /* Default to 100% width for responsiveness */
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #4a5a6a; /* Darker border for dark theme */
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #3a4a5a; /* Darker background for inputs */
    color: var(--text-light); /* Light text for inputs */
}

/* Placeholder color for dark inputs */
input::placeholder, textarea::placeholder {
    color: rgba(240, 240, 240, 0.6);
}

/* Focus state for all inputs and selects */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.4); /* Blue glow on focus */
}

/* Common label styling */
label {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-light); /* Labels on dark backgrounds */
    display: block;
}

/* General form sections or containers */
.filter-section,
.form-section {
    gap: 15px; /* Consistent gap */
    margin-bottom: 20px;
    align-items: flex-end; /* Align items to the bottom */
}

.filter-group,
.form-group {
    flex: 1;
    min-width: 250px;
}

/*================================================================================== Header Design ==*/
header {
    width: 100%;
    height: var(--header-height);
    background-color: var(--dark-header-footer-bg);
    color: white;
    padding: 0 20px; /* Adjusted padding */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0; /* Ensure it spans full width */
    box-sizing: border-box; /* Include padding in width */
}

.header-left {
    display: flex;
    align-items: center;
}

.header-logo {
    max-width: 40px;
    height: auto;
    margin-right: 15px;
    border-radius: 5px;
}

.header-company {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--blue-primary);
}

.header-greeting {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-right: 45px; /* Space for potential fixed elements */
}

/* Mobile Header Adjustments */
@media (max-width: 768px) {
    header {
        height: auto; /* Allow height to adjust to content */
        padding: 10px 15px; /* Reduced padding */
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align items to the start */
        gap: 5px; /* Small gap between stacked items */
    }

    .header-left {
        width: 100%; /* Take full width */
        justify-content: center; /* Center logo and company name */
        margin-bottom: 5px; /* Space below logo/company name */
    }

    .header-logo {
        max-width: 35px; /* Slightly smaller logo */
        margin-right: 10px;
    }

    .header-company {
        font-size: 1.3rem; /* Smaller font size for company name */
    }

    .header-greeting {
        font-size: 0.9rem; /* Smaller font size for greeting */
        margin-right: 0; /* Remove right margin */
        text-align: center; /* Center the greeting */
        width: 100%; /* Take full width */
    }
}


/*================================================================================== Footer Design ==*/
footer {
    width: 100%;
    height: var(--footer-height);
    background-color: var(--dark-header-footer-bg);
    color: white;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9em;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box; /* Include padding in width */
}
footer p1 {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    margin: 0;
    padding: 0;
}

/*================================================================================== Main Layout Wrapper ==*/
.main-wrapper {
    display: flex;
    flex-grow: 1;
    width: 100%;
    position: relative;
    margin-top: var(--header-height); /* Push content down below fixed header */
    margin-bottom: var(--footer-height); /* Ensure space for fixed footer */
}

/* Mobile main-wrapper adjustment for dynamic header height */
@media (max-width: 768px) {
    .main-wrapper {
        /* Adjust margin-top dynamically based on actual header height if needed,
           or use a larger fixed value that accommodates the stacked header. */
        margin-top: 100px; /* A safe estimate for stacked header height */
    }
}


/*================================================================================== Sidebar Design ==*/
.sidebar {
    background: linear-gradient(to bottom, var(--dark-bg-gradient-start), var(--dark-bg-gradient-end));
    color: white;
    width: var(--sidebar-width-desktop);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
    box-sizing: border-box;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 900;
    overflow-y: auto; /* Enable scrolling for long menus */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Sidebar Toggle Button (Desktop) */
.sidebar-toggle-btn.desktop-only {
    position: fixed;
    top: calc(var(--header-height) + 20px); /* Adjusted position */
    left: calc(var(--sidebar-width-desktop) - 20px); /* Adjusted position */
    background: var(--blue-primary);
    color: white;
    border: none;
    padding: 10px; /* Uniform padding for circular shape */
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease, background 0.3s ease, transform 0.2s ease;
    z-index: 1001;
    display: block; /* Shown on desktop */
}

.sidebar-toggle-btn.desktop-only:hover {
    background: var(--blue-dark);
    transform: scale(1.05);
}

/* Adjust toggle button position when sidebar is collapsed */
body.sidebar-collapsed .sidebar-toggle-btn.desktop-only {
    left: 10px;
}

/* Sidebar Menu */
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 20px; /* Adjusted margin */
}
.sidebar li {
    margin-bottom: 5px;
}
.sidebar a,
.sidebar .menu-title {
    text-decoration: none;
    color: white;
    padding: 12px 15px; /* Adjusted padding */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 5px 10px; /* Adjusted margin */
    font-size: 1.1rem; /* Adjusted font size */
    line-height: 1.5;
}
.sidebar .icon {
    margin-right: 10px;
    width: 20px;
    color: var(--blue-primary);
}
.sidebar a:hover,
.sidebar .menu-title:hover {
    background-color: rgba(0, 198, 255, 0.2); /* Lighter hover background */
    transform: translateX(5px); /* Subtle slide */
}
/* Submenu */
.sidebar .submenu {
    display: none;
    margin-top: 5px;
    margin-left: 20px;
    margin-right: 10px;
    padding-left: 20px; /* Adjusted padding */
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease-in-out;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    color: white;
}
.sidebar .submenu.open {
    display: block;
    padding-top: 10px;
}
.sidebar .submenu li a {
    font-size: 1rem; /* Adjusted font size */
    padding: 10px;
    color: #e0e0e0;
    transition: background-color 0.3s ease;
    margin: 0; /* Reset margin */
}
.sidebar .submenu li a:hover {
    background-color: rgba(0, 198, 255, 0.3); /* Darker hover for submenu */
    color: white;
    transform: translateX(3px); /* Subtle slide for submenu */
}
.sidebar .menu-title .arrow {
    font-size: 0.8em; /* Relative font size */
    transition: transform 0.3s ease;
    margin-left: auto; /* Push arrow to the right */
}
.sidebar .menu-title.open .arrow {
    transform: rotate(180deg);
}
.sidebar .logout a {
    color: #ff4040;
    font-weight: bold;
    background-color: rgba(255, 64, 64, 0.2); /* Lighter background for logout */
    padding: 12px 15px; /* Adjusted padding */
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 20px 10px; /* Adjusted margin */
    justify-content: center; /* Center content */
}
.sidebar .logout a:hover {
    background-color: #ff4040;
    color: white;
    transform: translateX(0); /* No slide on hover for logout */
}
.sidebar a.active {
    background-color: var(--blue-dark); /* Active item uses darker blue */
    color: white;
    transform: translateX(5px);
    box-shadow: inset 3px 0 0 var(--blue-primary); /* Left border highlight */
}
.sidebar .submenu.nested-submenu {
    background-color: rgba(0, 0, 0, 0.3);
    margin-left: 10px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
}
.sidebar .submenu.nested-submenu li a {
    color: #e0e0e0;
    padding: 8px 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.sidebar .submenu.nested-submenu li a:hover {
    background-color: rgba(0, 198, 255, 0.25);
    color: white;
    transform: translateX(5px);
}

/* Hide mobile-only buttons on desktop */
@media (min-width: 769px) {
    .sidebar-toggle-btn.mobile-only,
    .sidebar .close-btn, /* Hide the close button on desktop */
    .sidebar-backdrop {
        display: none !important;
    }
}

/* Show mobile-only button on mobile */
@media (max-width: 768px) {
    .sidebar-toggle-btn.desktop-only {
        display: none !important; /* Hide desktop button on mobile */
    }

    .sidebar-toggle-btn.mobile-only {
        display: block !important; /* Ensure mobile button is shown */
        position: fixed; /* Keep it fixed on screen */
        top: 75px; /* Position from top, adjust as needed */
        left: 5px; /* Position from right */
        background: var(--blue-primary);
        color: white;
        border: none;
        padding: 10px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.2rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
        z-index: 1050; /* Higher than sidebar */
        transition: background 0.3s ease, transform 0.2s ease;
    }

    .sidebar-toggle-btn.mobile-only:hover {
        background: var(--blue-dark);
        transform: scale(1.05);
    }

    /* Adjust sidebar position for mobile */
    .sidebar {
        width: var(--sidebar-width-mobile);
        transform: translateX(-100%); /* Start hidden */
        left: 0;
        top: 75px;
        height: 100vh;
        padding-top: 15px; /* No padding for header space on mobile sidebar */
        padding-bottom: 0; /* No padding for footer space on mobile sidebar */
    }

    .sidebar.open { /* When sidebar is explicitly open */
        transform: translateX(0); /* Slide in */
    }

    /* Backdrop for mobile sidebar */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 899; /* Below sidebar, above content */
        display: none; /* Hidden by default */
    }

    body.sidebar-open .sidebar-backdrop {
        display: block; /* Show when sidebar is open */
    }

    /* Content area adjustment for mobile */
    .content-area {
        margin-left: 0; /* No margin from sidebar on mobile */
    }
}


/*================================================================================== Content Area Styling ==*/
.content-area {
    flex-grow: 1;
    padding: 20px;
    margin-left: var(--sidebar-width-desktop);
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    background: linear-gradient(to right, #1a2a3a, #243b55);
    color: var(--text-light);
}

/* Adjust content area when sidebar is collapsed (desktop) */
body.sidebar-collapsed .content-area {
    margin-left: 0 !important;
}

/* Container for content within content-area */
.container {
    width: 100%;
    max-width: 1600px;
    padding: 20px;
    box-sizing: border-box;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Rule to expand container max-width when sidebar is collapsed */
body.sidebar-collapsed .content-area .container {
    max-width: 100%;
}


/*================================================================================== Form & Table Design (General) ==*/

/* Page Title Styling */
.page-title {
    font-size: 2.2rem;
    color: var(--blue-primary);
    text-align: center;
    margin-bottom: 20px; /* Increased margin */
    text-shadow: 0 0 10px rgba(0, 198, 255, 0.5);
}

/* Responsive Table Container */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Enable horizontal scrolling for desktop, handled differently on mobile */
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    margin-top: 20px;
}

/* Main Data Table Styling */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 700px; /* Ensure a minimum width for desktop */
    color: var(--text-light);
    font-size: 1rem;
}

/* Table Header and Data Cells */
.data-table th,
.data-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    word-wrap: break-word;
    white-space: normal;
    background-color: rgba(0, 0, 0, 0.1);
}

/* Table Header Specific Styling */
.data-table th {
    background: rgba(0, 198, 255, 0.3);
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Rounded corners for the top of the table header */
.data-table thead tr:first-child th:first-child {
    border-top-left-radius: 8px;
}
.data-table thead tr:first-child th:last-child {
    border-top-right-radius: 8px;
}

/* Rounded corners for the bottom of the table body */
.data-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}
.data-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}

/* Hover effect for table rows */
.data-table tbody tr:hover {
    background: rgba(0, 198, 255, 0.15);
    cursor: pointer;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 198, 255, 0.2);
    transition: all 0.2s ease-in-out;
}

/* Remove bottom border from the last row for cleaner look */
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Specific styling for the description column to handle content */
.data-table td.description-cell { /* Targeted by class now */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4;
}

/* Styling for the "MONICA SERRAO" header area if it's within the main content */
.user-info-header {
    background: rgba(0, 198, 255, 0.1);
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 198, 255, 0.1);
    color: white;
}

.user-info-header h2 {
    font-size: 1.8rem;
    color: var(--blue-primary);
    margin: 0;
}

.user-info-header .action-button {
    background: var(--blue-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.user-info-header .action-button:hover {
    background: var(--blue-dark);
    transform: scale(1.1);
}

/* --- Form Specific Styles (from your original index.php theme) --- */
body > .container { /* Target the container directly under body for the form page */
    width: 100%;
    max-width: 500px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* Use min-height to allow content to push it */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

form {
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 50px;
    width: 100%;
}

.step {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    padding: 0 10px;
    box-sizing: border-box;
}

.step.active {
    opacity: 1;
    transform: translateX(0);
    position: relative;
    display: flex;
}

/* Slide animations for steps */
.step.slide-in-right { transform: translateX(100%); }
.step.slide-in-left { transform: translateX(-100%); }
.step.slide-out-left { transform: translateX(-100%); }
.step.slide-out-right { transform: translateX(100%); }

.step.active.slide-in-right,
.step.active.slide-in-left { transform: translateX(0); }

.question {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

/* Input Fields (Form specific overrides) */
form input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
form textarea,
form select {
    padding: 12px 15px; /* Adjusted padding */
    border: 1px solid #4a5a6a;
    border-radius: 10px; /* More rounded */
    font-size: 1rem;
    background: #3a4a5a;
    color: var(--text-light);
    outline: none;
    width: auto; /* Account for padding */
    max-width: 380px; /* Slightly increased max-width */
    text-align: center;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    margin-bottom: 15px;
}

form input:focus, form textarea:focus, form select:focus {
    box-shadow: 0 0 0 3px var(--blue-primary), 0 0 0 6px rgba(0, 198, 255, 0.4);
    border-color: var(--blue-primary);
}

form textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 100px; /* Sensible min-height */
}

/* Buttons (Form specific overrides) */
form button {
    padding: 12px 25px; /* Adjusted padding */
    border: none;
    background: linear-gradient(to right, var(--blue-primary), var(--blue-dark)); /* Gradient buttons */
    color: #fff;
    font-size: 1.1rem; /* Adjusted font size */
    border-radius: 8px; /* Consistent rounded corners */
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px; /* Adjusted margin */
    min-width: 120px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

form button:hover {
    background: linear-gradient(to left, var(--blue-primary), var(--blue-dark));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.next-button { background: linear-gradient(to right, var(--blue-primary), var(--blue-dark)); }
.next-button:hover { background: linear-gradient(to left, var(--blue-primary), var(--blue-dark)); }
.back-button { background: #5a6a7a; } /* Consistent back button color */
.back-button:hover { background: #4a5a6a; }


/* Message Divs (Form specific) */
.form-message, .message-div {
    margin-top: 15px;
    font-size: 0.95em;
    color: var(--warning-yellow);
    min-height: 20px;
    text-align: center;
    width: 100%;
}

/* Custom Alert Box for non-modal messages */
.custom-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: fadeInOut 4s forwards;
}

.custom-alert.success { background-color: var(--success-green); }
.custom-alert.error { background-color: var(--danger-red); }
.custom-alert.info { background-color: var(--blue-primary); }

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* Logo specific styling (for index.php form) */
.topLeftLogo {
    display: block;
    margin: 0 auto 30px auto;
    max-width: 100px;
    height: auto;
}

.forgot-link {
    margin-top: 12px;
    text-align: center;
}

.forgot-link a {
    display: inline-block;
    font-size: 0.9rem; /* Adjusted font size */
    color: var(--blue-primary);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    font-weight: 500;
}

.forgot-link a:hover {
    color: var(--blue-dark);
    transform: scale(1.05);
    text-decoration: underline;
}

/* Form step button alignment */
.step .button-group { /* Target the button group within a step */
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between buttons */
    width: 100%;
    margin-top: 20px; /* Space from input field */
    flex-wrap: wrap; /* Allow buttons to wrap */
}
.step .button-group button {
    flex-grow: 1; /* Allow buttons to grow */
    max-width: 180px; /* Max width for individual buttons */
    margin: 0; /* Reset margin from general form button rule */
}


/*================================================================================== Other Page Specific Styles ==*/

/* Attendance Page styling */
table { /* General table styles, overridden by .data-table where applicable */
  width: 90%;
  margin: 20px auto 0 auto;
  border-collapse: collapse;
  table-layout: fixed;
  overflow-x: auto;
  word-wrap: break-word;
  color: var(--text-light); /* Ensure text color is light for dark tables */
}
table th,
table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
table th {
  background-color: var(--blue-primary);
  color: white;
}
table td {
  font-size: 1rem;
}
table tr:hover {
  background-color: rgba(0, 198, 255, 0.1);
}

/* Removed .attendance-table and its children */

/* Status Colors (consolidated) */
.green { background-color: var(--success-green); color: white; }
.yellow { background-color: var(--warning-yellow); color: black; }
.red { background-color: var(--danger-red); color: white; }
/* Attendance Button Group */
.attendance-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}
#camera_section {
  text-align: center;
  margin-top: 40px;
}
.table-container {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

/* Removed Consolidated Attendance & Leave Report */


/* Removed .create_users and its children */


/* Manage Employee Page (manage_employee.php) */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Adjusted gap */
  padding: 20px;
  box-sizing: border-box;
  justify-content: center; /* Center cards */
  margin-bottom: 40px;
}
.employee-card {
  background-color: rgba(255, 255, 255, 0.1); /* Lighter background for cards */
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  width: calc(25% - 20px); /* Adjusted width for gap */
  min-width: 220px; /* Adjusted min-width */
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-sizing;
  color: var(--text-light); /* Light text for cards */
}
.employee-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.employee-card img {
  width: 100px;
  height: 100px; /* Made square */
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue-primary); /* Themed border */
  margin-bottom: 15px;
}
.employee-card h3 {
  margin: 15px 0 5px; /* Adjusted margin */
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue-primary);
}
.employee-card p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--text-light);
  text-align: center;
}
.view-more-btn {
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
  background: linear-gradient(to right, var(--blue-primary), var(--blue-dark));
    color: white;
    border-radius: 8px;
    text-decoration: none;
    padding: 10px 20px; /* Adjusted padding */
    font-size: 0.9rem;
}
.view-more-btn:hover {
  background: linear-gradient(to left, var(--blue-primary), var(--blue-dark));
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
}
.badge.green { background-color: var(--success-green); }
.badge.yellow { background-color: var(--warning-yellow); color: black; }
.badge.red { background-color: var(--danger-red); }

/* Removed View Leave Page and its children */


/* Removed View Employee Page and its children */


/* Role Management (role_management.php) */
.main-content { /* This seems to be a container for role management, adjust if it conflicts */
    display: flex;
    flex-direction: row; /* Default to row */
    flex-wrap: wrap; /* Allow wrapping */
    gap: 20px; /* Space between sections */
}
.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: auto;
    background-color: rgba(0, 0, 0, 0.2); /* Darker background for table */
    border-radius: 8px;
    overflow: hidden; /* For rounded corners */
}
.permissions-table th,
.permissions-table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    color: var(--text-light); /* Light text for this table */
}
.permissions-table th {
    background-color: rgba(0, 198, 255, 0.2);
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
}
.permissions-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--blue-primary);
    margin: 0 auto;
    display: block;
}
.save-button { /* General save button, overridden by form-specific if needed */
    background: linear-gradient(to right, var(--blue-primary), var(--blue-dark));
    color: white;
    font-size: 1.1rem;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 30px auto;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.3);
}
.save-button:hover {
    background: linear-gradient(to left, var(--blue-primary), var(--blue-dark));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 198, 255, 0.5);
}
.popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    display: block;
    z-index: 10000;
    opacity: 0;
    animation: fadeOut 4s forwards;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.popup.success { background-color: var(--success-green); }
.popup.error { background-color: var(--danger-red); }

@keyframes fadeOut {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; display: none; }
}


/* Modal Styles (General) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* Darker overlay */
    padding-top: 60px;
}

.modal-content {
    background-color: #2a3a4a; /* Darker background for modal content */
    margin: 5% auto;
    padding: 30px; /* Increased padding */
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 600px;
    border-radius: 12px; /* More rounded */
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    animation-name: animatetop;
    animation-duration: 0.4s;
    color: var(--text-light); /* Light text */
}

@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-button {
    color: #fff; /* White close button */
    float: right;
    font-size: 32px; /* Larger */
    font-weight: bold;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--blue-primary); /* Highlight on hover */
    text-decoration: none;
    cursor: pointer;
}

/* Responsive adjustments for modal */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

/* Dashboard Specific Styles */
.dashboard-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    margin-top: 40px;
}

.dashboard-card {
    background: linear-gradient(145deg, #2a3a4a, #1f2d3b);
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: 30px;
    text-align: center;
    flex: 1 1 calc(33.333% - 50px);
    min-width: 300px;
    max-width: 380px;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(0, 198, 255, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--blue-primary);
    z-index: 1;
}

.card-icon {
    font-size: 4rem;
    color: var(--blue-primary);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0, 198, 255, 0.7);
    transition: transform 0.3s ease-out;
}

.dashboard-card:hover .card-icon {
    transform: rotateY(15deg) scale(1.1);
}

.card-title {
    font-size: 1.6rem;
    color: var(--text-light);
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 3rem;
    color: #f0f0f0;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.dashboard-card:hover .card-value {
    color: var(--blue-primary);
    text-shadow: 0 0 20px var(--blue-primary);
}

/* Referral Link Box - Enhanced */
.referral-link-box {
    background: linear-gradient(145deg, #2a3a4a, #1f2d3b);
    padding: 20px 25px; /* Increased padding */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.referral-link-box p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 600;
}

.link-and-copy {
    display: flex;
    width: 100%;
    max-width: 500px;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

#referralLink {
    flex-grow: 1;
    padding: 12px 18px;
    border: 1px solid #4a5a6a;
    border-radius: 10px;
    background-color: #3a4a5a;
    color: var(--text-light);
    font-size: 1rem;
    box-sizing: border-box;
    cursor: text;
    text-align: center;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#referralLink:focus {
    border-color: var(--blue-primary);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(0, 198, 255, 0.3);
}

.copy-button {
    background: linear-gradient(to right, var(--blue-primary), var(--blue-dark));
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-button:hover {
    background: linear-gradient(to left, var(--blue-primary), var(--blue-dark));
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments for dashboard */
@media (max-width: 992px) {
    .dashboard-card {
        flex: 1 1 calc(50% - 25px);
        padding: 25px;
    }
    .card-icon {
        font-size: 3.5rem;
    }
    .card-title {
        font-size: 1.4rem;
    }
    .card-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .dashboard-card {
        flex: 1 1 100%;
        min-width: -webkit-fill-available;
        max-width: 320px;
        padding: 20px;
    }
    .card-icon {
        font-size: 3rem;
    }
    .card-title {
        font-size: 1.2rem;
    }
    .card-value {
        font-size: 2rem;
    }
    .referral-link-box {
        padding: 15px;
        margin-bottom: 25px;
    }
    .link-and-copy {
        flex-direction: column;
        gap: 10px;
    }
    #referralLink {
        font-size: 0.9rem;
        padding: 10px 15px;
        width: 100%;
    }
    .copy-button {
        padding: 10px 15px;
        font-size: 1rem;
        width: 100%;
    }
}

/* Removed AT&T Policy Page styles */


/* Removed Performance Filter Form styles */


/* Highlight classes for tables */
.highlight-loss { background-color: rgba(220, 53, 69, 0.3) !important; color: var(--text-light) !important; } /* Themed red */
.highlight-unconfirmed { background-color: rgba(255, 193, 7, 0.3) !important; color: var(--text-light) !important; } /* Themed yellow */
.highlight-zero-sale-purchase { background-color: rgba(255, 193, 7, 0.3) !important; color: var(--text-light) !important; }
.highlight-balance { background-color: rgba(255, 193, 7, 0.3) !important; color: var(--text-light) !important; }
.highlight-warning { background-color: rgba(255, 193, 7, 0.3); color: var(--text-light); }

/* Setting Page */
.settings-form-section { /* Renamed class to avoid conflict with generic .form-section */
    background-color: rgba(0, 0, 0, 0.3);
    padding: 20px;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    width: 90%;
    margin-right: auto;
    overflow-x: hidden;
    max-width: 100%;
    flex: 1;
    margin-left: 5%;
    flex-grow: 1;
    overflow-y: auto;
    min-height: auto; /* Allow height to adjust */
    box-sizing: border-box;
    color: var(--text-light);
}
.settings-form-section h2 {
    margin-top: 30px;
    color: var(--blue-primary);
    font-size: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}
.settings-form-row { /* Renamed class */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.settings-form-group { /* Renamed class */
    flex: 1;
    min-width: 280px; /* Adjusted min-width */
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}
.settings-form-group.full { flex: 1 1 100%; }
.settings-form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-light);
}
.submit-row {
    text-align: center;
    margin-top: 30px;
}

/* Common Layout and Elements */
.category-header {
    background-color: var(--blue-primary);
    color: white;
    padding: 12px 20px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.category-header .icon {
    font-size: 1.2rem;
    font-weight: bold;
}
.expanded {
    max-height: 1000px; /* Sufficiently large */
    opacity: 1;
    transition: max-height 0.5s ease, opacity 0.4s ease;
    overflow: hidden;
}
.collapsed {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
    overflow: hidden;
}
.search-bar {
    width: 300px;
    padding: 10px;
    border: 1px solid #4a5a6a;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
    background-color: #3a4a5a;
    color: var(--text-light);
}
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px; /* Adjusted gap */
    flex-wrap: wrap;
}
.hidden { display: none !important; }

/* Dashboard Layout (already optimized above) */

/* Removed Leave Management styles */

/* Pagination */
.pagination { margin-top: 20px; text-align: center; display: flex; justify-content: center; flex-wrap: wrap; gap: 5px; }
.pagination a {
    display: inline-flex; /* Use flex for icon alignment */
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin: 0 2px;
    background: linear-gradient(to right, var(--blue-primary), var(--blue-dark));
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 35px; /* Ensure consistent button size */
}
.pagination a.active {
    background: var(--blue-dark);
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0, 198, 255, 0.4);
}
.pagination a:hover {
    background: linear-gradient(to left, var(--blue-primary), var(--blue-dark));
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 198, 255, 0.3);
}

/* Create User Button in Manage User */
.manage-users-header {
    display: flex;
    justify-content: space-between; /* Space between title and button */
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px; /* Space below header */
    position: relative;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}
.manage-users-header .page-title { /* Target title within this header */
    margin-bottom: 0; /* Remove extra margin */
    text-align: left; /* Align title to left */
    flex-grow: 1; /* Allow title to take space */
}
.manage-users-header .btn-create-user {
    position: static; /* Remove absolute positioning */
    padding: 10px 20px;
    background: linear-gradient(to right, var(--blue-primary), var(--blue-dark));
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.btn-create-user:hover { background: linear-gradient(to left, var(--blue-primary), var(--blue-dark)); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.btn-create-user:focus, .btn-create-user:active { outline: none; }

.filter-section { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.export-buttons { display: flex; justify-content: center; gap: 20px; margin: 20px 0; flex-wrap: wrap; }
.export-buttons form button {
    padding: 10px 20px;
    background: linear-gradient(to right, var(--blue-primary), var(--blue-dark));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.export-buttons form button:hover { background: linear-gradient(to left, var(--blue-primary), var(--blue-dark)); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.table-container table { width: 100%; border-collapse: collapse; }
.table-container th, .table-container td { padding: 10px; border: 1px solid rgba(255, 255, 255, 0.1); text-align: center; color: var(--text-light); }
.no-records { text-align: center; font-weight: bold; padding: 20px; color: rgba(240, 240, 240, 0.7); }
.ui-datepicker-trigger { margin-left: 5px; vertical-align: middle; cursor: pointer; }

/* Attendance Report Design */
.filter-form {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 20px; /* Adjusted margin */
    margin-top: 20px; /* Adjusted margin */
    width: 100%; /* Full width */
    margin-left: 0; /* Reset margin */
    margin-right: 0; /* Reset margin */
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center; /* Center for all views */
}
.filter-form label { font-weight: bold; }
.filter-form .form-row {display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; width: 100%; justify-content: center;}
.filter-form .form-group { flex: 1; min-width: 250px; display: flex; flex-direction: column; gap:10px; }
.filter-button { background: linear-gradient(to right, var(--blue-primary), var(--blue-dark)); color: white; border: none; }
.excel-button { background-color: var(--success-green); color: white; text-decoration: none; }

/* Removed Leave Balance & Buttons */

/* Accordion Section */
.accordion-section {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.2);
}

/* Accordion Header */
.accordion-header {
    background-color: var(--blue-primary);
    color: white;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.accordion-header:hover {
    background-color: var(--blue-dark);
}

.accordion-header.active {
    background-color: var(--blue-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 8px 0 0;
}

/* Accordion Content */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    padding: 0 15px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

.accordion-content.active {
    max-height: 1000px;
    padding: 15px;
    transition: max-height 0.7s ease-in, padding 0.7s ease-in;
}

/* Permissions Table within Accordion */
.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    color: var(--text-light);
}

.permissions-table th,
.permissions-table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    background-color: rgba(0, 0, 0, 0.1);
}

.permissions-table th {
    background-color: rgba(0, 198, 255, 0.2);
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
}

.permissions-table input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--blue-primary);
    margin: 0 auto;
    display: block;
}

/* Role Management specific mobile adjustments */
@media (max-width: 768px) {
    .accordion-header {
        font-size: 1rem;
        padding: 10px 15px;
    }
    .accordion-content {
        padding: 10px;
    }
    .permissions-table th, .permissions-table td {
        font-size: 0.8em;
        padding: 8px;
    }
    .permissions-table input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    .save-button {
        font-size: 1rem;
        padding: 10px 20px;
        margin-top: 20px;
    }

    /* General mobile adjustments for forms/tables */
    .filter-form, .performance-filter-form, .create_users .form-row, .settings-form-row {
        flex-direction: column;
        gap: 15px;
    }
    .filter-form .form-group, .performance-filter-form .form-group, .create_users .form-group, .settings-form-group {
        min-width: unset;
        width: 100%;
    }
    .top-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .manage-users-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .manage-users-header .btn-create-user {
        width: 100%;
        text-align: center;
    }
    .employee-card {
        width: 100%;
        min-width: unset;
    }
    /* Removed employee-profile-card mobile adjustments */
    /* Removed btn-edit mobile adjustments */
    /* Removed toggle-btn mobile adjustments */

    /* Mobile table specific adjustments for view_leads.php */
    .data-table {
        border: none; /* Remove table borders */
        width: 100%; /* Ensure it takes full width */
        min-width: unset; /* Remove min-width to allow stacking */
        table-layout: fixed; /* Fix table layout for consistent column sizing */
    }

    .data-table thead {
        display: none; /* Hide table headers on mobile */
    }

    .data-table tbody, .data-table tr {
        display: block; /* Make tbody and tr behave as block elements */
        width: 100%; /* Take full width */
    }

    .data-table tr {
        margin-bottom: 15px; /* Space between "cards" */
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        background-color: rgba(0, 0, 0, 0.1);
        padding: 10px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        cursor: pointer; /* Indicate clickable rows */
    }

    .data-table td {
        display: block; /* Make cells behave as block elements */
        text-align: right; /* Align content to the right */
        padding: 8px 10px; /* Adjust padding */
        border: none; /* Remove cell borders */
        position: relative; /* For pseudo-element positioning */
        padding-left: 50%; /* Make space for the pseudo-element label */
        white-space: normal; /* Allow content to wrap */
        word-wrap: break-word; /* Break long words */
    }

    .data-table td::before {
        content: attr(data-label); /* Use data-label for the pseudo-element */
        position: absolute;
        left: 10px; /* Position the label to the left */
        width: calc(50% - 20px); /* Allocate width for the label */
        text-align: left; /* Align label text to the left */
        font-weight: bold;
        color: var(--blue-primary); /* Style the label */
        white-space: nowrap; /* Prevent label from wrapping */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Initially hide all columns except CRM NO. and Status on mobile */
    .data-table .mobile-hidden-column {
        display: none;
    }

    /* Ensure description cell still wraps */
    .data-table td.description-cell {
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: unset;
    }

    /* Styles for the new details modal */
    .details-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .details-modal-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .details-modal-content {
        background-color: #2a3a4a; /* Darker background for modal content */
        margin: 5% auto;
        padding: 20px; /* Adjusted padding for mobile */
        border: 1px solid rgba(255, 255, 255, 0.1);
        width: 95%; /* Max width for mobile */
        max-width: 500px; /* Max width for larger mobiles/tablets */
        border-radius: 12px;
        position: relative;
        box-shadow: 0 8px 25px rgba(0,0,0,0.5);
        animation-name: animatetop;
        animation-duration: 0.4s;
        color: var(--text-light);
        display: flex; /* Use flex for internal layout */
        flex-direction: column;
        gap: 15px; /* Space between elements in modal */
    }

    .details-modal-content h2 {
        color: var(--blue-primary);
        margin-bottom: 10px;
        font-size: 1.5rem; /* Adjusted font size */
        text-align: center;
    }

    .details-modal-content .close-button {
        position: absolute;
        top: 10px;
        right: 15px;
        color: #fff;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .details-modal-content .close-button:hover,
    .details-modal-content .close-button:focus {
        color: var(--blue-primary);
    }

    .details-modal-body {
        display: flex;
        flex-direction: column;
        gap: 10px; /* Space between detail items */
    }

    .detail-item {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    }

    .detail-item:last-child {
        border-bottom: none;
    }

    .detail-label {
        font-weight: bold;
        color: rgba(255, 255, 255, 0.8);
        flex-basis: 40%; /* Adjust as needed */
        text-align: left;
    }

    .detail-value {
        flex-basis: 60%; /* Adjust as needed */
        text-align: right;
        word-wrap: break-word;
        white-space: normal;
    }
}
