/* General Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background-color: #2c3e50; /* Dark blue/grey */
    color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 15px; /* Space between header items */
}

.header h1 {
    margin: 0;
    font-size: 28px;
    flex-shrink: 0;
}

.search-container {
    display: flex;
    align-items: center;
    flex-grow: 1; /* Allows search bar to take available space */
    max-width: 350px; /* Limit max width for desktop */
}

#searchInput {
    padding: 12px 18px;
    border: none;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    width: 100%; /* Fill container */
    box-sizing: border-box; /* Include padding in width */
}

#searchButton {
    background-color: #3498db; /* Blue */
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 18px;
    transition: background-color 0.2s ease;
}

#searchButton:hover {
    background-color: #2980b9;
}

/* Main Container Layout */
.container {
    display: flex;
    flex: 1; /* Allows content to take up remaining vertical space */
    padding: 25px;
    gap: 25px;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px; /* Slightly wider sidebar */
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* More prominent shadow */
    flex-shrink: 0;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.module-btn {
    background-color: #f0f4f7; /* Lighter background for inactive */
    border: none;
    text-align: left;
    padding: 16px 22px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.1s ease;
    font-weight: 500;
}

.module-btn .fas {
    font-size: 1.1em;
    color: #666; /* Default icon color */
}

.module-btn:hover {
    background-color: #e2e8ec;
    color: #222;
    transform: translateY(-2px); /* Slight lift on hover */
}

.module-btn.active {
    background-color: #3498db; /* Blue for active */
    color: #fff;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transform: none; /* No lift when active */
}

.module-btn.active .fas {
    color: #fff; /* White icon for active button */
}

.module-btn.active:hover {
    background-color: #2980b9;
}

/* Content Area */
.content-area {
    flex: 1; /* Takes up remaining horizontal space */
    background-color: #fff;
    padding: 35px 40px; /* More padding */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* More prominent shadow */
}

.module-content {
    display: none; /* Hidden by default */
}

.module-content.active {
    display: block; /* Show active content */
}

.content-area h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 32px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-area h2 .fas {
    font-size: 1.2em; /* Larger icon for module title */
    color: #3498db;
}

.module-intro {
    font-size: 1.15em;
    color: #555;
    margin-bottom: 35px;
    line-height: 1.7;
    background-color: #eaf7f9;
    padding: 25px;
    border-left: 6px solid #3498db;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
}

/* Accordion Styles */
.accordion {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.accordion-item {
    border-bottom: 1px solid #eef2f5; /* Lighter separator */
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background-color: #fcfdfe; /* Very light background */
    color: #333;
    padding: 20px 30px;
    width: 100%;
    text-align: left;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 19px;
    font-weight: 600;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.accordion-header:hover {
    background-color: #f5f8fa;
}

.accordion-header.active {
    background-color: #e6f2fa; /* Light blue when active */
    color: #2c3e50;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 0.9em;
    color: #666;
}

.accordion-header.active .dropdown-arrow {
    transform: rotate(180deg);
    color: #3498db;
}

.accordion-header .help-icon {
    font-size: 1.1em;
    margin-right: 12px;
    color: #3498db; /* Consistent blue for help icons */
}

.accordion-body {
    padding: 0 30px;
    background-color: #fff;
    max-height: 0; /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out; /* Slower transition */
    box-sizing: border-box; /* Include padding in height calc */
}

.accordion-body.show {
    max-height: 1000px; /* Increased max-height, adjust if content is super long */
    padding: 20px 30px 25px; /* More padding at bottom */
}

.accordion-body p {
    margin-bottom: 12px;
    line-height: 1.65;
    color: #444;
}

.accordion-body h3 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.4em;
    border-bottom: 1px dashed #e0e0e0;
    padding-bottom: 8px;
}

.accordion-body ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.accordion-body ul li {
    margin-bottom: 8px;
    padding-left: 30px; /* Space for custom bullet */
    position: relative;
    line-height: 1.5;
    color: #555;
}

.accordion-body ul li::before {
    content: "\f00c"; /* Font Awesome checkmark icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #27ae60; /* Green checkmark */
    position: absolute;
    left: 0;
    top: 3px;
    font-size: 0.9em;
}

/* Numbered List (Steps) */
.accordion-body ol {
    list-style-type: decimal;
    padding-left: 30px;
    margin-bottom: 20px;
    counter-reset: step-counter; /* Reset counter for each list */
}

.accordion-body ol li {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #444;
    position: relative;
    padding-left: 10px; /* Space between number and text */
}

.accordion-body ol li::marker {
    font-weight: bold;
    color: #3498db; /* Blue numbers */
}

.accordion-body ol li p {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 0.95em;
    color: #555;
}

/* Specific styling for filterable details grid */
.filterable-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Responsive grid, slightly wider min */
    gap: 12px; /* Increased gap */
    background-color: #f7f9fb;
    border: 1px solid #e0e6eb;
    border-radius: 8px; /* Slightly more rounded */
    padding: 20px; /* More padding */
    margin-bottom: 25px;
}

.filterable-details-grid span {
    background-color: #eef5fc;
    border: 1px solid #d0e0ed;
    padding: 10px 15px; /* More padding */
    border-radius: 5px;
    font-size: 0.95em; /* Slightly larger font */
    color: #444;
    text-align: center;
    font-weight: 500;
}

/* Inline buttons for step-by-step instructions */
.inline-btn {
    background-color: #5cb85c; /* Success green */
    color: white;
    padding: 6px 12px; /* Slightly larger padding */
    border: none;
    border-radius: 5px; /* More rounded */
    cursor: pointer;
    font-size: 0.95em; /* Slightly larger font */
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Space between icon and text */
    transition: background-color 0.2s ease, transform 0.1s ease;
    vertical-align: middle;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.inline-btn:hover {
    background-color: #4CAF50;
    transform: translateY(-1px);
}

.inline-btn .fas {
    font-size: 0.85em; /* Smaller icon within inline button */
}

/* Variations for inline buttons */
.inline-btn.primary { background-color: #3498db; }
.inline-btn.primary:hover { background-color: #2980b9; }
.inline-btn.secondary { background-color: #6c757d; }
.inline-btn.secondary:hover { background-color: #5a6268; }
.inline-btn.danger { background-color: #dc3545; }
.inline-btn.danger:hover { background-color: #c82333; }
.inline-btn.info { background-color: #17a2b8; }
.inline-btn.info:hover { background-color: #138496; }
.inline-btn.success { background-color: #28a745; }
.inline-btn.success:hover { background-color: #218838; }


.inline-icon {
    color: #3498db; /* Icon color for icons mentioned in text */
    font-size: 1.15em; /* Slightly larger */
    margin: 0 6px;
    vertical-align: middle;
}

/* Example box for clarity */
.example {
    background-color: #f0f8ff; /* Light blue background */
    border-left: 5px solid #3498db; /* Blue border on left */
    padding: 18px 25px; /* More padding */
    margin: 20px 0; /* More margin */
    border-radius: 8px; /* More rounded */
    font-style: italic;
    color: #333;
    line-height: 1.6;
}

.example strong {
    color: #2c3e50;
}

.example ol {
    margin-top: 12px;
    margin-bottom: 0;
}

.example ol li {
    margin-bottom: 8px;
}

/* Status Tags (for Timesheet and Capacity) */
.status-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 5px;
    white-space: nowrap; /* Prevent tag from wrapping */
}

.status-tag.approved, .status-tag.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-tag.pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-tag.overtime {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-tag.danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* Responsive Design */
@media (max-width: 992px) { /* Adjust breakpoint for larger tablets */
    .container {
        flex-direction: column;
        padding: 20px;
    }
    .sidebar {
        width: 100%;
        padding: 15px;
    }
    .sidebar nav {
        flex-direction: row; /* Horizontal navigation for smaller screens */
        flex-wrap: wrap;
        justify-content: center;
    }
    .module-btn {
        flex: 1 1 auto; /* Allow buttons to wrap */
        margin: 5px;
        text-align: center;
        justify-content: center;
        font-size: 15px;
        padding: 12px 15px;
    }
    .content-area {
        padding: 25px;
    }
    .header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
    }
    .header h1 {
        margin-bottom: 15px;
        font-size: 26px;
    }
    .search-container {
        width: 80%; /* Adjusted for better appearance on tablet */
        max-width: none;
    }
    #searchInput {
        width: calc(100% - 70px);
    }
    .content-area h2 {
        font-size: 28px;
    }
    .accordion-header {
        font-size: 17px;
        padding: 18px 25px;
    }
    .accordion-body {
        padding: 15px 25px;
    }
    .accordion-body ol, .accordion-body ul {
        padding-left: 20px;
    }
    .accordion-body ul li {
        padding-left: 25px;
    }
}

@media (max-width: 768px) { /* Mobile specific adjustments */
    .header h1 {
        font-size: 22px;
    }
    .search-container {
        width: 95%; /* Almost full width for mobile */
    }
    .module-btn {
        font-size: 14px;
        padding: 10px 12px;
        gap: 8px;
    }
    .content-area h2 {
        font-size: 24px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding-bottom: 10px;
    }
    .content-area h2 .fas {
        margin-right: 0;
    }
    .accordion-header {
        font-size: 15px;
        padding: 15px 20px;
    }
    .accordion-body {
        padding: 10px 20px;
    }
    .accordion-body h3 {
        font-size: 1.2em;
    }
    .filterable-details-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        padding: 10px;
        gap: 8px;
    }
    .filterable-details-grid span {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    .inline-btn {
        padding: 4px 8px;
        font-size: 0.85em;
        gap: 4px;
    }
    .inline-icon {
        font-size: 1em;
        margin: 0 4px;
    }
    .example {
        padding: 12px 15px;
        margin: 15px 0;
    }
}