/* Custom styles for Online Timesheet System */
:root {
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-200: #bae6fd;
  --brand-300: #7dd3fc;
  --brand-400: #38bdf8;
  --brand-500: #5BC2E7;
  --brand-600: #0ea5e9;
  --brand-700: #0284c7;
  --brand-800: #0369a1;
  --brand-900: #075985;
  --brand-primary: #5BC2E7;
  --brand-secondary: #2C2A29;
  --brand-accent: #F2A900;
}

body {
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.card {
    border: none;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.28);
}

.btn {
    border-radius: 14px;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 28px -18px rgba(15, 23, 42, 0.25);
}

.table thead th {
    background: #f8fafc;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

/* HR overdue calls blocker */
body.hr-blocked {
    overflow: hidden;
}

.hr-blocker {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255, 77, 79, 0.25), rgba(12, 12, 14, 0.85) 45%, rgba(6, 6, 8, 0.95) 100%);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: clamp(16px, 4vw, 32px);
}

.hr-blocker-modal {
    width: min(760px, 92vw);
    max-height: min(82vh, 720px);
    position: relative;
    background: #120606;
    color: #fff;
    border-radius: 20px;
    border: 1px solid rgba(255, 77, 79, 0.45);
    box-shadow: 0 30px 80px rgba(255, 77, 79, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: hrAlertIn 0.25s ease-out;
}

.hr-blocker-accent {
    position: absolute;
    inset: 0 0 0 auto;
    width: 8px;
    background: linear-gradient(180deg, #ff4d4f, #ff8a8c 40%, #ff4d4f 100%);
}

.hr-blocker-content {
    padding: 30px 32px 28px;
    width: 100%;
    overflow: auto;
}

.hr-blocker-badge {
    display: inline-block;
    background: #ff4d4f;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.hr-blocker-title {
    font-size: 30px;
    margin: 0 0 10px;
}

.hr-blocker-text {
    font-size: 16px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
}

.hr-blocker-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.hr-blocker-item {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 77, 79, 0.25);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hr-blocker-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 77, 79, 0.6);
}

.hr-blocker-item-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.hr-blocker-item-meta {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.hr-blocker-actions .btn {
    font-weight: 700;
}

.hr-blocker-close {
    position: absolute;
    top: 18px;
    right: 22px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hr-blocker-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.02);
}

.hr-overdue-bar {
    position: sticky;
    top: 0;
    z-index: 2500;
    background: #1a0a0a;
    color: #fff;
    border-bottom: 1px solid rgba(255, 77, 79, 0.45);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hr-overdue-bar--hidden {
    display: none;
}

.hr-overdue-bar__content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.hr-overdue-bar__label {
    background: #ff4d4f;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

@keyframes hrAlertIn {
    from {
        transform: translateY(10px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.table tbody tr:hover {
    background: rgba(91, 194, 231, 0.05);
}

.badge {
    border-radius: 9999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-pills .nav-link {
    color: #0ea5e9;
    font-weight: 600;
    border-radius: 999px;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: #0ea5e9;
}

.form-control,
.form-select {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.65rem 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(91, 194, 231, 0.55);
    box-shadow: 0 0 0 3px rgba(91, 194, 231, 0.18);
}

.modal-content {
    border-radius: 26px;
    border: none;
    box-shadow: 0 28px 60px -25px rgba(15, 23, 42, 0.35);
}

.modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.alert {
    border-radius: 18px;
}

.stats-card {
    border-radius: 24px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(91, 194, 231, 0.92), rgba(0, 165, 233, 0.88));
    color: #ffffff;
    box-shadow: 0 28px 56px -30px rgba(91, 194, 231, 0.55);
}

.stats-card .card-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.stats-card .card-text {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Form styles */
.form-control:focus {
    border-color: #5BC2E7;
    box-shadow: 0 0 0 0.2rem rgba(91, 194, 231, 0.25);
}

.form-select:focus {
    border-color: #5BC2E7;
    box-shadow: 0 0 0 0.2rem rgba(91, 194, 231, 0.25);
}

/* Alert styles */
.alert {
    border-radius: 8px;
    border: none;
}

/* Table styles */
.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: rgba(91, 194, 231, 0.05);
}

/* Badge styles */
.badge {
    font-size: 0.75em;
}

/* Modal styles */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;

.navbar-collapse.collapse.show {
    display: block;
}

.navbar-collapse.collapsing {
    display: block;
}
    border-radius: 10px 10px 0 0;
}

/* Button group styles */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-group .btn:last-child {
    border-radius: 0 6px 6px 0;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Schedule Management Styles */
.schedule-form-modal .modal-dialog {
    max-width: 800px;
}

.schedule-calendar .fc-daygrid-day {
    cursor: pointer;
}

.schedule-calendar .fc-daygrid-day:hover {
    background-color: rgba(91, 194, 231, 0.1);
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #5BC2E7;
    outline-offset: 2px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }

    .table {
        border: 2px solid #000;
    }

    .table th,
    .table td {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .btn,
    .form-control,
    .modal,
    .calendar-cell {
        transition: none !important;
        animation: none !important;
    }
}

/* Focus management for modals */
.modal:focus-within {
    outline: 2px solid #5BC2E7;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .stats-card .card-title {
        font-size: 1.5rem;
    }

    .calendar-cell {
        min-height: 60px;
        padding: 5px;
    }

    .calendar-date {
        font-size: 11px;
    }

    .calendar-event {
        font-size: 9px;
    }

    .btn-group {
        display: flex;
        flex-direction: column;
    }

    .btn-group .btn {
        border-radius: 6px !important;
        margin-bottom: 2px;
    }

    /* Mobile navigation improvements */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    /* Modal adjustments for mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: none;
    }

    .schedule-form-modal .modal-dialog {
        max-width: none;
    }

    /* Table responsiveness */
    .table-responsive {
        font-size: 0.875rem;
    }

    .table-responsive .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Stack filter controls vertically on small screens */
    .d-flex.gap-2 {
        flex-direction: column;
    }

    .d-flex.gap-2 .btn {
        width: 100%;
    }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175) !important;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Employee status table uniform column widths */
.employee-status-table th,
.employee-status-table td {
    width: 25%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-status-table th:nth-child(1),
.employee-status-table td:nth-child(1) {
    width: 30%;
}

.employee-status-table th:nth-child(2),
.employee-status-table td:nth-child(2) {
    width: 25%;
}

.employee-status-table th:nth-child(3),
.employee-status-table td:nth-child(3) {
    width: 20%;
}

.employee-status-table th:nth-child(4),
.employee-status-table td:nth-child(4) {
    width: 25%;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    body {
        background: white;
    }
}

/* Start Method Configuration Styles */
.start-method-config {
    transition: all 0.3s ease;
}

.start-method-config.d-none {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Template Preview Styles */
#templatePreview, #edit_templatePreview {
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
}

#templatePreview h6, #edit_templatePreview h6 {
    color: #007bff;
    margin-bottom: 0.5rem;
}

/* Badge Styles for Start Methods */
.badge.bg-info {
    background-color: #0dcaf0 !important;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.calendar-grid-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 0.75rem;
}

.calendar-grid-wrapper::-webkit-scrollbar {
    height: 6px;
}

.calendar-grid-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 9999px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

.calendar-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    padding-bottom: 0.25rem;
}

@media (max-width: 640px) {
    .calendar-grid-wrapper {
        overflow-x: auto;
        padding-bottom: 0.75rem;
    }

    .calendar-grid {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(7, minmax(0, 1fr));
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.75rem;
        width: max-content;
    }

    .calendar-header {
        text-align: left;
        padding-left: 0.75rem;
        font-size: 0.68rem;
    }

    .calendar-cell {
        min-width: 160px;
        width: 160px;
        height: 140px;
    }
}
#timesheetSidebar .select2-container {
    width: 100% !important;
}

#timesheetSidebar .select2-container--default .select2-selection--single {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.45rem 2.5rem 0.45rem 1rem;
    display: flex;
    align-items: center;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#timesheetSidebar .select2-container--default .select2-selection--single:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#timesheetSidebar .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    color: #0f172a;
    font-weight: 500;
}

#timesheetSidebar .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 1rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    outline: none;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgba(37, 99, 235, 0.08);
    color: #1e293b;
}

.select2-dropdown {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}
