html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 10px;
}

.employee-table-scroll {
    max-height: 320px; 
    overflow: auto; 
}

    /* Sticky header */
    .employee-table-scroll thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #fff;
    }

    /* Sticky first column */
    .employee-table-scroll th:first-child,
    .employee-table-scroll td:first-child {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 3;
    }

    /* Special case: top-left corner cell */
    .employee-table-scroll thead th:first-child {
        z-index: 4; /* highest layer */
        background: #f9f9f9;
    }

.separator-cell {
    border-top: 1px solid black;
    padding: 0;
}

.separator-row {
    border-top: 2px solid grey !important;
    border-spacing: 0;
}

/* Tooltip styling */
.task-tooltip-trigger {
    cursor: pointer;
    text-decoration: none;
    position: relative;
    color: #0d6efd;
}

.week1-bg {
    background: linear-gradient(90deg, #ffcccc 0%, #ff0000 100%);
}

.week2-bg {
    background: linear-gradient(90deg, #f5f5f5 0%, #bdbdbd 100%);
}

.task-tooltip-balloon {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 1.2rem;
    z-index: 1000;
    font-size: 0.95em;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-width: 220px;
    word-break: break-word;
    white-space: pre-line;
    min-width: 120px;
    text-align: center;
    animation: fadeIn 0.2s;
}

.task-tooltip-arrow {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #222;
}

.tooltip-black {
    color: #000 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cell-edit-btn {
    border: none;
    background: transparent;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: none;
}

    .cell-edit-btn:hover {
        color: #007bff;
        background: #f0f0f0;
    }

    /* Form styling improvements for better responsive design */
    .form-container {
        max-width: 800px;
        margin: 0 auto;
    }

    .form-container-narrow {
        max-width: 600px;
        margin: 0 auto;
    }

    /* Form groups with better spacing */
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-weight: 500;
        margin-bottom: 0.5rem;
        display: block;
    }

    /* Button improvements */
    .btn {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        white-space: nowrap;
    }

    .btn:last-child {
        margin-right: 0;
    }

    .btn i,
    .btn .bi {
        font-size: 1.1em;
    }

    /* Form button container */
    .form-buttons {
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
    }

    /* Action buttons container for consistent spacing */
    .action-buttons-container {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .action-buttons-container.sticky {
        position: sticky;
        top: 0;
        z-index: 10;
        background-color: #fff;
        padding: 0.75rem 0;
        border-bottom: 1px solid #e0e0e0;
    }

    /* Responsive form improvements for desktop */
    @media (min-width: 768px) {
        .form-group .form-control {
            max-width: 400px;
        }
        
        .form-group .form-control.form-control-color {
            max-width: 100px;
        }
        
        /* Keep grid-based forms full width within their columns */
        .row .col-md-6 .form-control,
        .row .col-md-4 .form-control,
        .row .col-md-12 .form-control {
            max-width: none;
        }
    }

    /* Button group styling */
    .btn-group-custom {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-top: 1rem;
    }

    .btn-group-custom .btn {
        margin-right: 0;
        margin-bottom: 0;
    }

    .modal-footer .btn {
        min-width: 100px;
    }

    /* Modal form specific styles */
    .modal-body .form-group .form-control {
        max-width: none;
    }

    /* Table button improvements */
    .table .btn {
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }

    @media (max-width: 767px) {
        .btn-group-custom {
            flex-direction: column;
        }
        
        .btn-group-custom .btn {
            width: 100%;
        }
        
        .table .btn {
            font-size: 0.875rem;
            padding: 0.25rem 0.5rem;
        }

        .action-buttons-container {
            flex-direction: column;
        }

        .action-buttons-container .btn {
            width: 100%;
            justify-content: center;
        }

        .modal-footer {
            flex-direction: column;
        }

        .modal-footer .btn {
            width: 100%;
        }
    }

    /* Landing Page Styles */
    .landing-page {
        background: #ffffff;
    }

    .hero-section {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        min-height: 400px;
        display: flex;
        align-items: center;
    }

    .hero-section h1 {
        font-weight: 700;
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.25rem;
        max-width: 700px;
        margin: 0 auto 2rem;
    }

    .cta-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .features-section {
        padding: 4rem 0;
    }

    .features-section .card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .features-section .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    }

    .feature-icon {
        padding: 1rem;
    }

    .how-it-works-section {
        padding: 4rem 0;
    }

    .step-number {
        display: inline-block;
    }

    .step-number .badge {
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .key-features-section {
        padding: 4rem 0;
    }

    .key-features-section ul li {
        font-size: 1.1rem;
        padding: 0.5rem 0;
    }

    .cta-section {
        background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
        color: white;
        padding: 4rem 0;
    }

    .cta-section h2,
    .cta-section .lead {
        color: white;
    }

    .cta-section .btn-outline-primary {
        border-color: white;
        color: white;
    }

    .cta-section .btn-outline-primary:hover {
        background-color: white;
        color: #0d6efd;
    }

    .cta-section .btn-primary {
        background-color: white;
        border-color: white;
        color: #0d6efd;
    }

    .cta-section .btn-primary:hover {
        background-color: #f8f9fa;
        border-color: #f8f9fa;
        color: #0d6efd;
    }

    /* Responsive adjustments for landing page */
    @media (max-width: 767px) {
        .hero-section h1 {
            font-size: 2rem;
        }
        
        .hero-section .lead {
            font-size: 1rem;
        }
        
        .cta-buttons {
            flex-direction: column;
            align-items: stretch;
        }
        
        .cta-buttons .btn {
            width: 100%;
            margin: 0.5rem 0;
        }
        
        .features-section,
        .how-it-works-section,
        .key-features-section,
        .cta-section {
            padding: 2rem 0;
        }
    }

    @media (max-width: 576px) {
        .refresh-btn-mobile {
            padding: 0.75rem 1.25rem;
            font-size: 1.25rem;
        }
        .refresh-btn-mobile .bi {
            font-size: 1.5em;
        }
    }

    @media (min-width: 992px) {
        .refresh-btn-desktop {
            margin-left: 2rem;
            align-self: center;
            margin-top: 2px;
        }
    }

@media (max-width: 991.98px) {
    /* Make the navbar items left-aligned in mobile */
    .navbar-nav {
        align-items: flex-start !important;
        text-align: left !important;
    }
    /* Make the dropdown toggle and its menu left-aligned */
    .navbar-nav .nav-item.dropdown {
        width: 100%;
    }
    .navbar-nav .dropdown-toggle {
        justify-content: flex-start !important;
        text-align: left !important;
        width: 100%;
        display: flex;
    }
    .navbar-nav .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        width: 100vw;
        border-radius: 0;
        margin-top: 0.5rem;
    }
}

/* Validation error styling */
.validation-errors {
    color: red;
}

.validation-summary-errors ul {
    color: red;
}

.validation-message {
    color: red;
}

/* Policy Acceptance Styles */
.policy-summary {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #0d6efd;
}

.policy-summary h5 {
    color: #0d6efd;
    margin-bottom: 0.75rem;
}

.policy-summary ul {
    margin-bottom: 1rem;
}

.policy-acceptance-checkbox .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.25rem;
}

.policy-acceptance-checkbox .form-check-label {
    font-size: 1.1rem;
    cursor: pointer;
}

/* iOS PWA Install Modal */
.ios-install-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ios-install-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 9999;
}

.ios-install-modal h3 {
    color: #0d6efd;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.ios-install-modal p {
    margin-bottom: 20px;
    color: #6c757d;
}

.ios-install-modal ol {
    margin-left: 20px;
    margin-bottom: 20px;
    color: #495057;
}

.ios-install-modal li {
    margin-bottom: 12px;
}

.ios-install-modal .small-text {
    font-size: 0.9rem;
}

.ios-install-modal button {
    background: #0d6efd;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}
