.program-tasks-container,
.program-tasks-header,
.program-tasks-header h3,
.add-task-form,
.add-task-form h4,
.form-row,
.form-row label,
.form-row input,
.form-actions,
.form-actions button,
.tasks-table-container,
.program-tasks-table,
.program-tasks-table th,
.program-tasks-table td,
.task-row.completed,
.task-row.in-progress,
.task-row.not-started,
.status-badge,
.status-completed,
.status-in-progress,
.status-not-started,
.global-badge,
.global-task-label,
.task-loading,
.loading-spinner,
.delete-task-btn {
    font-family: 'Poppins', sans-serif !important;
}

.program-tasks-container {
    max-width: 1200px;
}

.program-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.program-tasks-dashboard-container .program-tasks-header {
    justify-content: end !important;
}

.program-tasks-header h3 {
    margin: 0;
}

.add-task-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.add-task-form h4 {
    margin-top: 0;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: inline-block;
    width: 120px;
    font-weight: bold;
}

.form-row input {
    width: 300px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.form-actions {
    margin-top: 20px;
}

.form-actions button {
    margin-right: 10px;
}

.program-tasks-dashboard-container .tasks-table-container {
    overflow-x: auto;
    /* max-height: calc(5 * 60px);  */
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

.program-tasks-table {
    width: 100%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.program-tasks-table th,
.program-tasks-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.program-tasks-table td {
   font-weight: 400;
}

.program-tasks-table td.program-task-name {
   font-weight: 700 !important;
}

.program-tasks-table th {
    background: #f8f9fa;
    font-size: 14px;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 700;
}

.task-row.completed {
    background-color: #f8fff8;
}

.task-row.in-progress {
    background-color: #fff8e1;
}

.task-row.not-started {
    background-color: #fff;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px;
    line-height: 18px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    min-width: 120px;
    text-align: center;
    cursor: pointer;
}

.status-completed {
    background: #d7fae3;
    color: #73bca1;
}

.status-in-progress {
    background: #faffca;
    color: #ffbd59;
}

.status-not-started {
    background: #f4f4f4;
    color: #666666;
}

.global-badge {
    background: #007cba;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 5px;
}

.global-task-label {
    color: #666;
    font-style: italic;
    font-size: 12px;
}

.task-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.delete-task-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.delete-task-btn:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .program-tasks-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .program-tasks-header h3 {
        margin-bottom: 10px;
    }
    
    .form-row label {
        display: block;
        width: auto;
        margin-bottom: 5px;
    }
    
    .form-row input {
        width: 100%;
    }
    
    .program-tasks-table {
        font-size: 14px;
    }
    
    .program-tasks-table th,
    .program-tasks-table td {
        padding: 8px;
    }
}
.user-add-task-form {
    margin: 10px 0 20px;
}
.user-add-task-form input[type="text"] {
    width: 320px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
}
.user-add-task-form input[type="date"] {
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-right: 8px;
}
.button-link {
    background: none;
    border: none;
    color: #c4c4c4;
    cursor: pointer;
    padding: 0;
}
.button-link:hover {
    text-decoration: underline;
}
.inline-due-input {
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}
#task-modal-overlay {
    position: fixed; z-index: 99999; left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center;
}
.task-modal {
    background: #fff; border-radius: 8px; box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    padding: 24px 24px 12px 24px; min-width: 320px; max-width: 95vw; position: relative;
    border: 1px solid #000;
}
.task-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.task-modal-close { background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; padding: 2px 6px; margin-left: 20px;}
.task-modal .form-row { margin-bottom: 14px; }
.task-modal .form-row label { display: block; font-weight: bold; margin-bottom: 4px; }
.task-modal .form-row input, .task-modal .form-row select { width: 100%; padding: 6px 8px; border: 1px solid #ddd; border-radius: 3px; }
.task-modal .form-actions { text-align: right; }

/* Rounded checkbox styling */
.task-status-checkbox {
    border-radius: 50% !important; /* Make it perfectly circular */
    border: 2px solid #333 !important; /* Black outline */
    background-color: white !important; /* White background */
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-status-checkbox:checked {
    background-color: #333 !important; /* Black background when checked */
    border-color: #333 !important;
    position: relative;
}

.task-status-checkbox:checked::after {
    content: '✓'; /* Checkmark symbol */
    color: white !important; /* White checkmark */
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

/* Limit program names to one row */
.program-tasks-table td:nth-child(3) {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.program-tasks-footer {
    text-align: end;
}

/* View/Hide completed toggle styling */
.view-completed-toggle {
    display: flex;
    gap: 10px;
}

 .view-completed-btn {
    font-size: 12px !important;
    padding: 5px 12px !important;
}

/* .view-completed-btn:hover {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
} */

.hide-completed-btn {
    background-color: #6c757d !important;
    color: #fff !important;
    border: 1px solid #6c757d !important;
    padding: 5px 12px !important;
    border-radius: 26px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    font-size: 12px !important;
}

.hide-completed-btn:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
}

/* Program name cell styling */
.program-name-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.program-name-cell:hover::after {
    content: attr(title);
    position: absolute;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    top: 100%;
    left: 0;
    margin-top: 5px;
}

/* Dashboard completed tasks visibility control */
.program-tasks-dashboard-container .task-row.completed {
    display: none;
}

.program-tasks-dashboard-container.show-completed .task-row.completed {
    display: table-row;
}

.program-tasks-dashboard-container.show-completed .task-row:not(.completed) {
    display: none;
}

/* Target school completed tasks visibility control */
.program-tasks-container .task-row.completed {
    display: none;
}

.program-tasks-container.show-completed .task-row.completed {
    display: table-row;
}

.program-tasks-container.show-completed .task-row:not(.completed) {
    display: none;
}

#modal-cancel-btn {
    background: #666666;
    color: #fff;
}

#task-modal-title {
    font-weight: 600;
    font-size: 24px;
}

#task-modal-description {
    max-width: 300px;
}
#task-modal-description-text{
    font-size: 12px;
    line-height: 18px;
}

.program-tasks-table th[data-sort] {
    cursor: pointer;
    user-select: none;
    /* position: relative; */
}

.program-tasks-table th[data-sort]:hover {
    background-color: rgba(0,0,0,0.05);
}

.sorting-indicators {
    display: inline-flex;
    flex-direction: column;
    vertical-align: super;
    margin-left: 5px;
    line-height: 1;
}

.sorting-indicator {
    opacity: 0.3;
    font-size: 8px !important;
    height: 6px !important;
    transition: opacity 0.2s;
}

.sorting-indicator.asc:before {
    content: "▲";
}

.sorting-indicator.desc:before {
    content: "▼";
}

/* Active states */
.sort-asc .sorting-indicator.asc,
.sort-desc .sorting-indicator.desc {
    opacity: 1;
    color: #0073aa;
}

.sorting-indicators span.desc {
    margin: 0 !important;
    line-height: 10px !important;
}

/* Hide completed tasks by default in dashboard/target views */
.program-tasks-dashboard-container:not(.show-completed) .task-row.completed,
.program-tasks-container:not(.show-completed) .task-row.completed {
    display: none;
}

img.custom-icon {
    width:18px;
    height:18px;
    vertical-align:middle;
    filter:brightness(0.5);
}