.scenario-section {
    margin-bottom: 60px;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.1);
}

.scenario-section h2 {
    font-size: 2em;
    color: #007bff;
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.settings-container h2 {
    color: #007bff;
    margin-bottom: 40px;
}

.scenario-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    gap: 30px;
    justify-content: center;
}

.scenario-grid li button {
    width: 100%;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: 600;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80px;
    /* Minimum height for consistency */
}

.scenario-grid li button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
    border-color: #007bff;
}

/* New Card Styles */
.settings-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
    animation: fadeInUp 0.5s ease-out;
}

.settings-card:hover {
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

.settings-card h3 {
    color: #0056b3;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.settings-card h4 {
    color: #007bff;
    margin: 20px 0 10px;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 15px;
}

label {
    font-weight: 500;
    font-size: 1.1em;
    /* Bolder for hierarchy */
    color: #0056b3;
    /* Darker blue for contrast */
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1em;
}

input:focus,
select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Display Only Styles */
.display-group {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
}

.display-only {
    color: #666;
    margin: 0;
    font-style: italic;
}

/* Info Box for Coming Soon */
.info-box {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    padding: 15px;
    border-radius: 8px;
    color: #333;
    font-style: italic;
}

/* Message Styles */
#message {
    color: #28a745;
    /* Green for success */
    background: #d4edda;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#error {
    color: #dc3545;
    /* Red for error */
    background: #f8d7da;
    padding: 10px;
    padding-bottom: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
}

#message:empty,
#error:empty {
    display: none;
}

.modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: fadeInScale 0.3s ease-out;
}

/* Redesigned Resume Modal Styles */
#add-resume-modal.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    /* Darker overlay for enhanced focus and professionalism */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.resume-modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 40px;
    /* Increased padding for a more spacious, professional feel */
    border-radius: 12px;
    /* Softer radius for modern elegance */
    width: 90%;
    max-width: 700px;
    /* Balanced width for better readability */
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    /* Deeper shadow for depth */
    position: relative;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.4s ease-out;
    /* Corrected animation name and duration for smoother entry */
}

#add-resume-modal .resume-modal-content,
#add-template-modal .resume-modal-content {
    max-width: 850px;
    max-height: 80vh;
    padding: 35px;
    border-radius: 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    /* Consistent scrollbar styling */
    scrollbar-color: #007bff #f1f1f1;
}

#add-resume-modal .resume-modal-content::-webkit-scrollbar {
    width: 6px;
}

#add-resume-modal .resume-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#add-resume-modal .resume-modal-content::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    /* Added scale for a subtle zoom-in effect */
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#add-resume-modal h2 {
    color: #0056b3;
    /* Darker blue for a more professional tone */
    font-size: 1.9em;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    /* Lighter border for subtlety */
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    /* Bolder font for emphasis */
}

#add-resume-modal h2::before {
    content: '\f15c';
    /* Retained Font Awesome file icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.3em;
    color: #007bff;
    /* Matching accent color */
}

#add-resume-modal .form-group {
    margin-bottom: 25px;
}

#add-resume-modal label {
    font-weight: 600;
    color: #212529;
    /* Darker gray for better contrast */
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05em;
    /* Slightly larger for clarity */
}

#add-resume-modal input,
#add-resume-modal textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ced4da;
    /* Softer border color */
    border-radius: 6px;
    /* Gentler corners */
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8f9fa;
    /* Light background for inputs */
}

#add-resume-modal input:focus,
#add-resume-modal textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
    /* Softer glow */
    outline: none;
}

#add-resume-modal input::placeholder,
#add-resume-modal textarea::placeholder {
    color: #6c757d;
    /* Subtle placeholder text */
}

#add-resume-modal textarea {
    min-height: 120px;
    resize: vertical;
}

#experience-rows {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Tighter gap for compact layout */
    max-height: 35vh;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    /* Lighter background */
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 25px;
    scrollbar-width: thin;
}

#experience-rows::-webkit-scrollbar {
    width: 6px;
}

#experience-rows::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#experience-rows::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

.experience-row {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.experience-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.1);
}

.experience-row .form-group {
    margin-bottom: 10px;
    /* Reduced for density */
}

.remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s ease, transform 0.2s ease;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.08);
}

.helper-text {
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

#add-new-row-btn {
    background: linear-gradient(to right, #28a745, #20c997);
    /* Vibrant green gradient */
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.05em;
    /* Slightly larger text */
}

#add-new-row-btn::before {
    content: '\f067';
    /* Retained plus icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

#add-new-row-btn:hover {
    background: linear-gradient(to right, #218838, #007bff);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(40, 167, 69, 0.25);
}

#save-resume-btn {
    background: linear-gradient(to right, #007bff, #6610f2);
    /* Blue to purple gradient for premium feel */
    color: white;
    width: 100%;
    padding: 14px;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    /* More rounded for modern button style */
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1.05em;
}

#save-resume-btn:hover {
    background: linear-gradient(to right, #0056b3, #5609c7);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.25);
}

#add-resume-modal .close {
    color: #6c757d;
    /* Softer gray */
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    font-weight: bold;
    transition: color 0.3s ease, transform 0.2s ease;
}

#add-resume-modal .close:hover {
    color: #212529;
    transform: rotate(180deg);
    /* More engaging animation */
}

@media (max-width: 768px) {
    #add-resume-modal .resume-modal-content {
        max-width: 95%;
        padding: 25px;
    }

    .experience-row {
        grid-template-columns: 1fr;
        /* Stack for mobile */
    }
}

.small-btn {
    background: linear-gradient(to right, #f0f9ff, #e0f2fe);
    color: #007BFF;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.small-btn i {
    font-size: 1.4em;
    /* Larger icons for visual pop */
}

.small-btn:hover {
    background: linear-gradient(to right, #dbeafe, #bfdbfe);
    transform: translateY(-2px) scale(1.05);
    /* Lift and slight zoom for appeal */
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    /* Stronger shadow on hover */
}

.small-btn-IconOnly {
    background: none;
    color: #007BFF;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.small-btn-IconOnly:hover {
    background: linear-gradient(to right, #dbeafe, #bfdbfe);
    transform: translateY(-2px) scale(1.05);
    /* Lift and slight zoom for appeal */
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    /* Stronger shadow on hover */
}

.small-btn-IconOnly i {
    font-size: 1.7em;
    /* Larger icons for visual pop */
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
    float: right;
}

#saved-resumes li {
    display: flex;
    justify-content: space-between;
    /* Pushes text left and button group right */
    align-items: center;
    /* Vertically centers content */
    padding: 10px;
    /* Optional: Add some padding for better spacing */
    border-bottom: 1px solid #e0e0e0;
    /* Optional: For visual separation */
}

.resume-title {
    flex: 1;
    /* Allows the title to take up available space on the left */
    margin-right: 10px;
    /* Optional: Space between title and buttons */
}

.button-group {
    display: flex;
    gap: 10px;
    /* Space between delete and select buttons */
}

/* Template Modal Styles (Similar to Resume Modal) */
#add-template-modal.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#add-template-modal h2 {
    color: #007bff;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#add-template-modal h2::before {
    content: '\f075';
    /* Font Awesome comments icon for feedback theme */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2em;
}

#add-template-modal .form-group {
    margin-bottom: 25px;
}

#add-template-modal label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#add-template-modal input,
#add-template-modal textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#add-template-modal input:focus,
#add-template-modal textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

#add-template-modal textarea {
    min-height: 100px;
    /* Larger for template format */
    resize: vertical;
}

.form-group:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
    /* Subtle separator */
    padding-bottom: 15px;
}

#add-template-modal .form-group>div {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

#add-template-modal input[type="radio"] {
    width: auto;
}

#save-template-btn {
    background: linear-gradient(to right, #007bff, #4dabff);
    color: white;
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

#save-template-btn:hover {
    background: linear-gradient(to right, #0056b3, #00aaff);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

#error .close {
    position: absolute;
    top: -10px;
    right: 10px;
    color: #666;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

#add-template-modal .close {
    color: #aaa;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 35px;
    font-weight: bold;
    transition: color 0.3s, transform 0.2s;
}

#add-template-modal .close:hover {
    color: #333;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    #add-template-modal .resume-modal-content {
        padding: 30px 20px;
        max-height: 90vh;
    }
}

/* New Styles for Student List Section */
.student-list-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.1);
    margin-top: 30px;
}

.student-list-section h3 {
    font-size: 1.8em;
    color: #007bff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s;
}

.toggle-group:hover {
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

.toggle-group label {
    font-weight: 600;
    color: #333;
}

.toggle-group input[type="checkbox"] {
    width: auto;
    height: 20px;
    width: 40px;
    appearance: none;
    background: #ccc;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-group input[type="checkbox"]:checked {
    background: #007bff;
}

.toggle-group input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-group input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.search-group {
    margin-bottom: 20px;
}

.search-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1em;
}

.search-group input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.student-list-box {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.student-list-box::-webkit-scrollbar {
    width: 6px;
}

.student-list-box::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.student-list-box::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

.student-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.student-list li {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.student-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.student-list li:last-child {
    margin-bottom: 0;
}

.student-name {
    font-weight: 600;
    color: #333;
}

.student-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.student-status.active {
    background: #d4edda;
    color: #28a745;
}

.student-status.inactive {
    background: #f8d7da;
    color: #dc3545;
}

.no-students {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 8px;
}

/* Audio Settings Styles */
.audio-settings {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.audio-settings:hover {
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

.audio-settings h3 {
    color: #0056b3;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

.audio-settings .form-group {
    margin-bottom: 20px;
}

.audio-settings label {
    font-weight: 500;
    font-size: 1.1em;
    color: #0056b3;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.audio-settings select,
.audio-settings input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1em;
}

.audio-settings select:focus,
.audio-settings input[type="number"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.audio-settings .form-group:last-child label {
    margin-bottom: 10px;
}

.audio-settings .form-group:last-child div {
    display: flex;
    align-items: center;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.radio-option input[type="radio"]:checked {
    border-color: #007bff;
    background-color: #007bff;
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-option label {
    cursor: pointer;
    transition: color 0.2s;
}

.radio-option input[type="radio"]:hover,
.radio-option input[type="radio"]:focus {
    border-color: #0056b3;
}

.radio-option input[type="radio"]:checked+label {
    color: #007bff;
}

/* Standardize header sizes across settings */
.settings-card h3,
.collapsible-header {
    font-size: 1.6em;
    /* Uniform size for top-level collapsibles (h3) */
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 15px;
    /* Reduced for tighter but clean spacing */
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s, background-color 0.3s;
}

.settings-card h3:hover,
.collapsible-header:hover {
    color: #007bff;
    background-color: #f0f9ff;
    /* Subtle hover background for interactivity */
}

.settings-card h4 {
    font-size: 1.3em;
    /* Smaller than h3 for hierarchy */
    font-weight: 500;
    color: #007bff;
    margin: 15px 0 10px;
    /* Consistent spacing */
    padding-bottom: 5px;
    border-bottom: 1px dashed #e0e0e0;
    /* Dashed for distinction from h3 */
}

/* Collapsible enhancements for less messiness */
.collapsible-header::after {
    content: '\f078';
    /* Font Awesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1em;
    /* Sized to match header */
    transition: transform 0.3s ease;
    color: #666;
    /* Subtle color */
}

.collapsible-header.expanded::after {
    transform: rotate(180deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    padding: 0 20px 20px;
    /* Added padding for breathing room inside collapsed sections */
    opacity: 1;
    /* Fade in/out for smoothness */
}

.collapsible-content[style*="display: none"] {
    opacity: 0;
    max-height: 0;
}

/* Form groups and other elements inside for cleanliness */
.form-group,
.display-group {
    margin-bottom: 20px;
    /* Increased spacing between fields */
    padding: 10px;
    /* Light padding for separation */
    background: #f9fcff;
    /* Very subtle background */
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    /* Soft shadow for depth */
}

.info-box {
    margin: 15px 0;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    border-radius: 8px;
    font-style: italic;
    font-size: 0.95em;
    /* Slightly smaller for subtlety */
}

.resume-list li,
.template-list li {
    /* Your existing styles */
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Changed from space-between */
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;

    /* New: Push the last two items right */
    > :nth-child(2) {
        margin-left: auto;
    }
}

.remove-criteria-btn {
    padding: 7px 15px;
    border: none;
    border-radius: 50px;
    font-size: 0.9em; 
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #007bff;
    color: white;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
    margin-top: auto;
    float: right;
}

/* Button consistency */
.btn.save-btn,
.add-btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    font-size: 1.1em;
    border-radius: 30px;
}

.criteria-save-btn {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    font-size: 1.1em;
    border-radius: 30px;
}

.edit-btn {
    position: relative;
    float: right;
}

/* Add these styles to your CSS file or <style> tag */
.settings-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.settings-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.settings-card h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.card-description {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

.cohort-selector {
    margin-bottom: 20px;
}

.cohort-selector label {
    font-weight: bold;
    margin-right: 10px;
}

.cohort-selector select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 200px;
}

.assignments-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.assignments-container h4 {
    margin: 0 0 10px;
    color: #444;
}

.assignments-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 15px;
}

.assignments-container ul li {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    transition: background 0.2s;
    position: relative;
    /* Ensure relative positioning for containment */
}

.assignments-container ul li:hover {
    background: #f0f0f0;
}

.assignments-container ul li .assignment-text {
    flex-grow: 1;
}

.assignment-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.assignment-form select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1;
}

.assignment-form button {
    padding: 8px 16px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.assignment-form button:hover {
    background: #0056b3;
}

.no-assignments {
    color: #888;
    font-style: italic;
}

.remove-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
    /* Push to the right in flex container */
    position: static;
    /* Ensure no absolute/fixed positioning */
}

.remove-btn:hover {
    background: #c82333;
}

#student_csv {
    margin-bottom: 10px;
}

/* Responsive tweaks to avoid mess on small screens */
@media (max-width: 600px) {

    .settings-card h3,
    .collapsible-header {
        font-size: 1.4em;
    }

    .settings-card h4 {
        font-size: 1.2em;
    }

    .form-group {
        padding: 8px;
    }
}


.sidebar {
    width: 30%;
    padding-right: 20px;
    border-right: 1px solid #dee2e6;
}

.main-content {
    width: 70%;
    padding-left: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 15px;
    /* Increased padding for better touch */
    cursor: pointer;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.3s, box-shadow 0.3s;
    /* Smooth hover */
    border-radius: 4px;
    /* Rounded corners */
    margin-bottom: 10px;
    /* Spacing between items */
    display: flex;
    align-items: center;
    background-color: #fff;
    /* Card-like background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* Subtle shadow */
}

.sidebar li:hover {
    background-color: #f8f9fa;
    /* Light hover background */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* Elevated shadow on hover */
}

.sidebar li.active {
    background-color: #e9ecef;
    font-weight: bold;
    border-left: 4px solid #007bff;
    /* Accent border for active */
}

.sidebar li i {
    margin-right: 10px;
    color: #007bff;
    /* Icon color matching theme */
    font-size: 20px;
}

form {
    background-color: #fff;
    padding: 25px;
    /* Increased padding */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

input[type="text"],
input[type="number"],
select {
    padding: 10px;
    margin: 10px 0;
    width: calc(100% - 22px);
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 18px;
    /* Increased font size */
    box-sizing: border-box;
}

input.invalid {
    border: 1px solid #dc3545;
    /* Red border for validation errors */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

th {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.accordion {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
    /* Increased spacing */
    transition: border-color 0.3s;
    /* Added for feedback */
}

.accordion.active {
    border-color: #007bff;
    /* Highlight active */
}

.accordion-header {
    padding: 15px;
    cursor: pointer;
    background-color: #e9ecef;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-content {
    padding: 25px;
    /* Increased padding */
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    /* Animation */
}

.accordion.active .accordion-content {
    display: block;
    max-height: 1000px;
    /* Arbitrary large value for animation */
}

.case-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.inline-form {
    display: inline-block;
}

.inline-form input {
    width: auto;
}

.patientmon-modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.patientmon-modal-content {
    background-color: #fefefe;
    margin: 9% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745;
    color: white;
    padding: 15px;
    border-radius: 5px;
    display: none;
    z-index: 1000;
}

.toast.error {
    background-color: #dc3545;
}

.toast.undo {
    background-color: #ffc107;
    /* Yellow for undo */
    color: #333;
}

.edit-icon {
    cursor: pointer;
    margin-left: 10px;
    color: #007bff;
    /* Teal */
    font-size: 20px;
    /* Larger icons */
}

.save-btn {
    /*display: none;*/
    margin-left: 10px;
}

.scenes-accordion {
    margin-top: 20px;
}

.delete-icon {
    cursor: pointer;
    color: #e74c3c;
    margin-right: 10px;
    font-size: 20px;
}

.delete-icon:hover {
    color: #c0392b;
}

.duplicate-icon {
    cursor: pointer;
    color: #007bff;
    margin-right: 10px;
    font-size: 20px;
}

.duplicate-icon:hover {
    color: #138496;
}

.header-icons {
    display: flex;
    align-items: center;
}

.grip-icon {
    cursor: move;
    color: #6c757d;
    margin-right: 10px;
    font-size: 20px;
}

.icon-label {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    z-index: 10;
}

.header-icons i:hover+.icon-label {
    display: block;
}

.vitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.vitals-dl {
    display: grid;
    grid-template-columns: max-content auto;
    gap: 10px 20px;
    margin-bottom: 20px;
}

.vitals-dl dt {
    font-weight: bold;
    text-align: right;
    color: #2c3e50;
}

.vitals-dl dd {
    margin: 0;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: -5px;
    display: none;
}

.loading-spinner {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
}
#transcript-content {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    height: 400px;
    overflow-y: auto;
    background-color: #F8F9FA;
    /* Light gray for chat area */
    margin-bottom: 20px;
    display: flex;
    flex-direction: column-reverse;
}

#transcript-content div {
    margin: 10px 0;
    padding: 10px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}
#transcript-content div.user {
    background-color: #007BFF;
    /* Blue for user */
    color: white;
    margin-left: auto;
    text-align: right;
}

#transcript-content div.assistant {
    background-color: #28A745;
    /* Green for AI/pet owner */
    color: white;
    margin-right: auto;
    text-align: left;
}
/* Responsiveness */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        margin-bottom: 20px;
    }

    .main-content {
        width: 100%;
        padding-left: 0;
    }

    input[type="text"],
    input[type="number"],
    select {
        font-size: 16px;
    }

    button {
        font-size: 16px;
    }

    .vitals-dl {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .vitals-dl dt {
        text-align: left;
    }

    .sidebar li {
        margin-bottom: 5px;
    }
}