table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
th {
    background-color: #f2f2f2;
}
.homework-container {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
}

.homework-container.alert-agenda {
    background-color: #e3ffc5 ;
}

.homework-container.alert-agenda-today {
    background-color: #ffcbcb;
}

.homework-container.old-agenda {
    background-color: rgb(255, 224, 168);
}

.action-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.homework-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.homework-label {
    font-weight: 600;
    color: #495057;
}

.homework-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #e9ecef;
}

.homework-label span {
    margin-right: 5px;
    width: 16px;
    display: inline-block;
}

.homework-value {
    color: #212529;
    font-weight: 600;
}

.due-date {
    color: #1e7e34;
    font-weight: 600;
}

.file-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s;
}

.file-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* .homework-value.homework-text {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-left: 4px solid #007bff;
    padding: 8px 12px;
    margin: -4px 0;
    border-radius: 0 4px 4px 0;
    font-weight: 500;
    word-break: break-word;
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .homework-text {
        width: 100%;
        display: inline-block;
    }

    .homework-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .homework-label {
        align-self: flex-start;
    }
} */

.form-check {
    margin: 5px;
    padding: 5px;
    display: flex;
    align-items: center;
}

.form-check-input {
    margin: 0;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.btn-remove {
    margin-left: 10px;
    margin-right: 10px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1;
    border-radius: 50%;
    background-color: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.btn-remove:hover {
    background-color: #c82333;
}

.btn-remove.visible {
    opacity: 1;
    display: block;
}

.completed-task {
    position: relative;
    background-color: rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s ease;
}

.completed-task::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 5px;
    background-color: rgba(0, 0, 0, 0.5) !important;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.completed-task.strike::after {
    transform: scaleX(1);
}

.row.nomarge {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.card.pad5 {
    width: 100%;
}

.softwhite {
    background-color: #fff;
    margin-bottom: 15px;
}

.roundplus {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

@media (max-width: 767px) {
    .col-md-6.softwhite {
        margin-bottom: 15px;
    }
}

@media (min-width: 576px) {
    #uploadpicform {
        display: flex !important;
    }

    #uploadpicform button[type="submit"] {
        pointer-events: auto !important;
        opacity: 1 !important;
    }
}

/*  */

.ai-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    display: flex;
    margin-bottom: 20px;
    gap: 12px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
}

.ai-message .message-avatar {
    background: #ebe6ff;
}

.user-message {
    flex-direction: row-reverse;
}

.message-content {
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 15px;
    background: #f0f2f5;
}

.ai-message .message-content {
    background: #f5f0ff;
}

.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.quick-actions button {
    padding: 8px 16px;
    border: 1px solid #6b47ed;
    border-radius: 20px;
    background: transparent;
    color: #6b47ed;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-actions button:hover {
    background: #6b47ed;
    color: white;
}

.chat-input-container {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    max-height: 120px;
}

#sendButton {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #6b47ed;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

#sendButton:hover {
    background: #5636c9;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f5f0ff;
    border-radius: 15px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #6b47ed;
    border-radius: 50%;
    animation: typing 1s infinite;
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}



.new-chat-btn {
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.new-chat-btn:hover {
    background-color: #0056b3;
}

.chat-group-select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    max-width: calc(100% - 20px); /* Prevent overflow by accounting for padding */
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for long text */
    white-space: nowrap;
}

.chat-group-controls {
    display: flex;
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}


/*  */
.questionnaires-container {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.questionnaires-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    /* background and color now controlled by dynamic color system */
}

.questionnaires-header h3,
.questionnaires-header h4 {
    margin: 0;
    /* color removed - now controlled by dynamic color system */
    font-weight: 600;
}

.questionnaires-tabs {
    border-bottom: 2px solid #f8f9fa;
    margin-bottom: 20px;
}

.questionnaires-tabs .nav-link {
    border: none;
    border-radius: 0;
    padding: 12px 20px;
    font-weight: 500;
    color: #6c757d;
    background: transparent;
    position: relative;
}

.questionnaires-tabs .nav-link.active {
    color: #007bff;
    background: transparent;
    border-bottom: 2px solid #007bff;
}

.questionnaires-tabs .nav-link:hover {
    color: #007bff;
    background: #f8f9fa;
}

.questionnaires-tabs .badge {
    margin-left: 8px;
    font-size: 0.75em;
}

.questionnaires-list {
    display: grid;
    gap: 15px;
}

.questionnaire-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.questionnaire-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.unresolved-card:hover {
    border-color: #ffc107;
}

.resolved-card:hover {
    border-color: #28a745;
}
/* Questionnaire card styling moved to dynamic color system
   Card-header, card-title, and icon colors are now controlled by JavaScript
   to ensure proper color adaptation across all themes */

.card-meta {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.questionnaire-card .card-body {
    padding: 15px 20px;
}

.questionnaire-card .card-text {
    color: #666;
    margin-bottom: 15px;
}

.progress-info {
    margin-top: 10px;
}

.progress {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    margin-bottom: 5px;
}

.progress-bar {
    border-radius: 3px;
}

.score-details {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.score-item .label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.score-item .value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.score-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.score-badge.excellent {
    background-color: #28a745;
}

.score-badge.good {
    background-color: #ffc107;
    color: #333;
}

.score-badge.needs-improvement {
    background-color: #dc3545;
}

.questionnaire-card .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 12px 20px;
    text-align: right;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.empty-state h5 {
    margin: 0 0 10px 0;
    color: #495057;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .questionnaires-container {
        padding: 15px;
    }

    .card-meta {
        flex-direction: column;
        gap: 5px;
    }

    .score-details {
        flex-direction: column;
        gap: 10px;
    }
}

/* vacation */
.vacation-display-container {
    padding: 20px;
}

.vacation-display-header {
    margin-bottom: 20px;
    text-align: center;
}

.vacation-display-header h3 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.vacation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #dee2e6;
    transition: all 0.3s ease;
}

.vacation-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.vacation-item.current {
    border-left-color: #28a745;
    background: #d4edda;
}

.vacation-item.upcoming {
    border-left-color: #007bff;
    background: #d1ecf1;
}

.vacation-item.recent {
    border-left-color: #6c757d;
    background: #e2e3e5;
}

.vacation-info {
    flex: 1;
}

.vacation-name {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #333;
}

.vacation-dates {
    margin-bottom: 5px;
}

.vacation-duration {
    margin-bottom: 5px;
}

.vacation-countdown {
    font-weight: 500;
}

.vacation-status {
    margin-left: 15px;
}

.card-header h5 {
    margin: 0;
}

@media (max-width: 768px) {
    .vacation-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .vacation-status {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Loading Indicator Styles */
.loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.loading-spinner {
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    color: white !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    color: white !important;
    font-size: 48px !important;
}

.loading-spinner p {
    color: white !important;
    margin-top: 15px;
    font-size: 16px;
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Custom spinner animation */
.custom-spinner {
    display: block;
    width: 3rem;
    height: 3rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    box-sizing: border-box;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    margin-top: 15px;
    color: #666;
    font-weight: 500;
}

/* Content section loading state */
.content-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error message styling */
.alert-danger {
    margin: 20px;
    padding: 15px;
    border-radius: 5px;
}
