/* ui/style.css */

/* ================= */
/* == Base Styles == */
/* ================= */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
}

/* ============================================ */
/* == Styles for Login Page (index.html) == */
/* ============================================ */
body.login-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f7f6;
}

.login-container {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.login-container h1 {
    text-align: center;
    color: #0056b3;
    margin: 0 0 25px 0;
    font-size: 1.8em;
    border-bottom: none;
    padding-bottom: 0;
}

#login-form div {
    margin-bottom: 15px;
}

#login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

#login-form input[type="email"],
#login-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

#login-form input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

#login-form button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

#login-form button:hover {
    background-color: #0056b3;
}

#login-message {
    margin-top: 20px;
    text-align: center;
    color: #dc3545;
    font-weight: bold;
    min-height: 1.2em;
}

#login-message.success {
    color: #28a745;
}


/* ================================================ */
/* == Styles for Learner Dashboard (dashboard.html) == */
/* ================================================ */
.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: auto;
}

h1, h2, h3 {
    color: #0056b3;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}
h3 { margin-bottom: 15px; padding-bottom: 5px; }
.container h1 { margin-bottom: 10px; }

a { color: #0056b3; text-decoration: none; }
a:hover { text-decoration: underline; }

#user-info { font-style: italic; color: #555; margin-bottom: 15px; }
.container p { margin-bottom: 25px; }

#logout-button {
    padding: 8px 15px; background-color: #dc3545; color: white;
    border: none; border-radius: 4px; cursor: pointer;
    float: right; margin-top: 0; position: relative;
}
#logout-button:hover { background-color: #c82333; }

#course-list { margin-top: 10px; }

.course-item {
    background-color: #fdfdfd;
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    overflow: auto;
}
.course-item h3 {
    margin: 0 0 10px 0; color: #0056b3; border-bottom: none;
    padding-bottom: 0; font-size: 1.2em;
}
.course-item p { margin: 5px 0; font-size: 0.95em; color: #555; line-height: 1.5; }
.course-item .view-details-btn {
    background-color: #0056b3; color: white; border: none; border-radius: 4px;
    padding: 8px 16px; font-size: 0.9em; font-weight: bold; cursor: pointer;
    float: right; margin-top: -10px; transition: background-color 0.2s ease;
}
.course-item .view-details-btn:hover { background-color: #004494; }


/* ===================================================== */
/* == Styles for Course Detail Page (coursedetail.html) == */
/* ===================================================== */
.course-detail-page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.course-detail-header {
    flex-shrink: 0; padding: 15px 20px; background-color: #ffffff;
    border-bottom: 2px solid #eee; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.course-detail-header h1 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
    display: inline-block;
    vertical-align: middle;
}
.course-detail-header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}
.course-detail-header button {
    padding: 8px 15px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.course-detail-header button:hover { background-color: #5a6268; }
.course-detail-header #logout-button {
    background-color: #dc3545;
    padding: 8px 15px;
    float: none;
    position: static;
    margin-top: 0;
}
.course-detail-header #logout-button:hover { background-color: #c82333; }

.action-plan-columns-container {
    display: flex; flex-direction: row; flex-grow: 1;
    width: 100%; overflow: hidden; background-color: #f8f9fa;
}
.personal-actions-column,
.operational-actions-column {
    flex-basis: 50%; height: 100%; overflow-y: auto;
    padding: 20px; box-sizing: border-box; background-color: #ffffff;
}
.personal-actions-column { border-right: 1px solid #ccc; }
.personal-actions-column h2,
.operational-actions-column h2 {
    margin-top: 0; color: #0056b3; border-bottom: 1px solid #eee;
    padding-bottom: 10px; margin-bottom: 20px;
}
#add-personal-plan-form {
    background-color: #f0f0f0; border-radius: 5px; padding: 15px; margin-bottom: 25px;
}
#add-personal-plan-form h3 { margin-top: 0; margin-bottom: 15px; border-bottom: none; padding-bottom: 0; color: #333; font-size: 1.1em; }
#add-personal-plan-form label { display: block; margin-bottom: 5px; font-weight: bold; }
#add-personal-plan-form input[type="text"],
#add-personal-plan-form textarea { width: calc(100% - 16px); padding: 8px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; }
#add-personal-plan-form button[type="submit"] { padding: 10px 18px; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 10px; }
#add-personal-plan-form button[type="submit"]:hover { background-color: #218838; }

#add-plan-message {
    margin-top: 10px;
    font-weight: bold;
    color: green;
}
#add-plan-message.error { color: red; }

.action-plan-item {
    background-color: #ffffff; border: 1px solid #e0e0e0; padding: 15px 20px;
    margin-bottom: 15px; border-radius: 6px; cursor: default;
}
.action-plan-item h4 { margin: 0 0 8px 0; color: #0056b3; border: none; padding: 0; }
.action-plan-item p { margin: 4px 0; font-size: 0.95em; color: #555; }
.action-plan-item button {
    padding: 5px 10px; margin-right: 5px; margin-top: 10px; border: 1px solid #ccc;
    background-color: #f0f0f0; border-radius: 4px; cursor: pointer; color: #333;
}
.action-plan-item button:hover { background-color: #e0e0e0; }
.action-plan-item .save-btn { background-color: #007bff; color: white; }
.action-plan-item .cancel-btn { background-color: #6c757d; color: white; }
.action-plan-item .delete-btn { background-color: #dc3545; color: white; }

.edit-plan-message {
    margin-top: 5px;
    margin-left: 10px;
    color: green;
    display: inline-block;
    font-size: 0.9em;
}

.status-badge {
    display: inline-block; padding: 2px 8px; font-size: 0.8em; font-weight: bold;
    border-radius: 10px; text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle;
}
.status-completed { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-inprogress { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.status-notstarted { background-color: #e2e3e5; color: #6c757d; border: 1px solid #d6d8db; }
.action-plan-item p strong { margin-right: 5px; }


/* ============================================================ */
/* == Styles for Manager Dashboard (manager-dashboard.html) == */
/* ============================================================ */
.manager-dashboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f0f2f5;
}
.manager-header {
    background-color: #0056b3; color: white; padding: 15px 25px;
    display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.manager-header h1 { margin: 0; border: none; padding: 0; color: white; font-size: 1.6em; }
.manager-user-info { font-size: 0.9em; }
#manager-logout-button {
    background-color: #dc3545; color: white; border: none; border-radius: 4px;
    padding: 6px 12px; margin-left: 15px; cursor: pointer;
}
#manager-logout-button:hover { background-color: #c82333; }

.manager-controls {
    background-color: #ffffff; padding: 15px 25px; border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); display: flex; justify-content: space-between;
    align-items: center; gap: 15px; flex-shrink: 0; flex-wrap: wrap;
}
.manager-controls-left { display: flex; align-items: center; gap: 10px; }
.manager-controls-right { display: flex; align-items: center; gap: 10px; }
.manager-controls label { font-weight: bold; }
.manager-controls select { padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; min-width: 200px; }
.manager-controls-right button { padding: 8px 15px; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 0.9em; }
#generate-report-btn { background-color: #28a745; }
#generate-report-btn:hover { background-color: #218838; }
#ai-insights-btn, #ai-insights-btn-learner { background-color: #6f42c1; } /* Target both */
#ai-insights-btn:hover, #ai-insights-btn-learner:hover { background-color: #5a32a3; } /* Target both */
#learners-admin-btn { background-color: #6c757d; }
#learners-admin-btn:hover { background-color: #5a6268; }

.manager-content { padding: 25px; flex-grow: 1; }
.summary-stats-section { display: flex; gap: 25px; margin-bottom: 30px; flex-wrap: wrap; }
.stat-box { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); text-align: center; flex: 1; min-width: 200px; }
.stat-box h2 { margin-top: 0; margin-bottom: 10px; font-size: 1.1em; color: #555; border-bottom: none; padding-bottom: 0; }
.stat-box p { font-size: 2em; font-weight: bold; color: #0056b3; margin: 0; }
.charts-section { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-bottom: 30px; }
.chart-container { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.chart-container h3 { margin-top: 0; margin-bottom: 15px; font-size: 1.1em; text-align: center; color: #555; border-bottom: none; padding-bottom: 0; }

#word-cloud { min-height: 250px; }

.learner-list-section { background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); grid-column: 1 / -1;}
.learner-list-section h2 { margin-top: 0; margin-bottom: 15px; font-size: 1.2em; color: #333; border-bottom: 1px solid #eee; padding-bottom: 10px; }
#learner-list table { width: 100%; border-collapse: collapse; }
#learner-list th, #learner-list td { border: 1px solid #ddd; padding: 10px 12px; text-align: left; vertical-align: middle; }
#learner-list th { background-color: #f2f2f2; font-weight: bold; }
#learner-list td a { color: #0056b3; text-decoration: none; font-weight: bold; }
#learner-list td a:hover { text-decoration: underline; }
.progress-indicator { display: inline-block; font-style: italic; color: #888; font-size: 0.9em; }


/* ============================================================ */
/* == Styles for Admin Pages (learners-admin.html, etc.) == */
/* ============================================================ */
.admin-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #e9ecef;
}
.admin-header {
    background-color: #343a40;
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.admin-header h1 {
    margin: 0;
    border: none;
    padding: 0;
    color: white;
    font-size: 1.6em;
}
.admin-user-info {
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 15px;
}
.admin-action-button.secondary {
    background-color: #6c757d;
    color: white;
}
.admin-action-button.secondary:hover {
    background-color: #5a6268;
}
.admin-header #admin-logout-button,
.admin-header #site-admin-logout-button {
    background-color: #dc3545;
}
.admin-header #admin-logout-button:hover,
.admin-header #site-admin-logout-button:hover {
    background-color: #c82333;
}

/* This is the new, corrected version */
.admin-section {
    background-color: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    
    /* --- Fix starts here --- */
    box-sizing: border-box;   /* Ensures padding is included in the width */
    width: 98%;               /* Use 95% of the available space */
    max-width: 1920px;        /* But don't get wider than 1600px */
    margin: 0 auto 25px auto; /* Center the section horizontally */
}
.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-section-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: #343a40;
    border-bottom: none;
    padding-bottom: 0;
}

.admin-action-button {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}
.admin-action-button:hover {
    background-color: #0056b3;
}
.admin-action-button.ai { background-color: #6f42c1; }
.admin-action-button.ai:hover { background-color: #5a32a3; }

.admin-form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9em;
}
.form-message.error { color: #721c24; background-color: #f8d7da; }
.form-message.success { color: #155724; background-color: #d4edda; }
.form-message.info { color: #0c5460; background-color: #d1ecf1; }


/* ---- Generic Admin Modal Styles ---- */
.admin-modal {
    position: fixed; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
    opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.admin-modal-hidden { opacity: 0; visibility: hidden; }
.admin-modal-content {
    background-color: #fff; padding: 25px 30px; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); width: 90%; max-width: 550px;
    max-height: 90vh; overflow-y: auto; position: relative;
}
.admin-modal-close-btn {
    position: absolute; top: 10px; right: 15px; background: none; border: none;
    font-size: 1.8em; line-height: 1; cursor: pointer; color: #888;
}
.admin-modal-close-btn:hover { color: #333; }
.admin-modal-content h2 {
    margin-top: 0; margin-bottom: 20px; color: #343a40;
    border-bottom: 1px solid #eee; padding-bottom: 10px;
}


/* ---- Styles for AI Insights Modal (Generic for all dashboards) ---- */
.ai-modal { 
    position: fixed; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1000; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    opacity: 1; 
    visibility: visible; 
    transition: opacity 0.3s ease, visibility 0.3s ease; 
}

.ai-modal.ai-modal-hidden { 
    opacity: 0; 
    visibility: hidden; 
}

.ai-modal-content { 
    background-color: #fff; 
    padding: 25px 30px; 
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); 
    width: 90%; 
    max-width: 700px; 
    max-height: 90vh; 
    overflow-y: auto; 
    position: relative; 
}

.ai-modal-close-btn { 
    position: absolute; 
    top: 10px; 
    right: 15px; 
    background: none; 
    border: none; 
    font-size: 1.8em; 
    line-height: 1; 
    cursor: pointer; 
    color: #888; 
}

.ai-modal-close-btn:hover { 
    color: #333; 
}

.ai-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.ai-modal-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.ai-prompt-section { 
    margin-bottom: 20px; 
}

.ai-prompt-section label { 
    display: block; 
    font-weight: bold; 
    margin-bottom: 8px; 
    color: #333; 
}

#ai-system-prompt,
#ai-system-prompt-learner { 
    background-color: #f8f9fa; 
    border: 1px solid #e0e0e0; 
    border-radius: 4px; 
    padding: 10px 15px; 
    font-family: monospace; 
    font-size: 0.85em; 
    white-space: pre-wrap; 
    max-height: 150px; 
    overflow-y: auto; 
    color: #555; 
}

#ai-user-prompt,
#ai-user-prompt-learner { 
    width: calc(100% - 22px); 
    padding: 10px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-family: inherit; 
    font-size: 0.95em; 
    resize: vertical; 
}

#ai-send-btn,
#ai-send-btn-learner { 
    background-color: #007bff; 
    color: white; 
    padding: 10px 20px; 
    border: none; 
    border-radius: 4px; 
    font-size: 1em; 
    cursor: pointer; 
    margin-top: 5px; 
}
#ai-send-btn:hover,
#ai-send-btn-learner:hover { 
    background-color: #0056b3; 
}

.ai-response-section { 
    margin-top: 25px; 
}

#ai-response-area,
#ai-response-area-learner { 
    background-color: #f8f9fa; 
    border: 1px solid #e0e0e0; 
    border-radius: 4px; 
    padding: 15px; 
    min-height: 100px; 
    font-size: 0.9em; 
    white-space: pre-wrap; 
    color: #333; 
}

#ai-response-area.loading,
#ai-response-area-learner.loading { 
    font-style: italic; 
    color: #888; 
}

/* ============================================= */
/* == Styles for AI Insights Persona Buttons == */
/* ============================================= */
.ai-persona-buttons {
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-persona-buttons button.persona-btn,
.ai-persona-buttons button.persona-btn-learner {
    padding: 6px 14px;
    margin: 0;
    border: 1px solid transparent;
    background-color: #f0f2f5;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85em;
    font-weight: 600;
}

.ai-persona-buttons button.persona-btn:hover,
.ai-persona-buttons button.persona-btn-learner:hover {
    background-color: #e2e6ea;
    color: #000;
}

.ai-persona-buttons button.persona-btn.active,
.ai-persona-buttons button.persona-btn-learner.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

#current-persona-name,
#current-persona-name-learner {
    font-style: italic;
    font-weight: bold;
    color: #0056b3;
}

#ai-response-area ul, #ai-response-area ol,
#ai-response-area-learner ul, #ai-response-area-learner ol {
    margin-top: 0.5em;
    margin-bottom: 1em;
    padding-left: 25px;
}

#ai-response-area li,
#ai-response-area-learner li {
    margin-bottom: 0.3em;
}

#ai-response-area strong,
#ai-response-area-learner strong {
    font-weight: bold;
}

#ai-response-area em,
#ai-response-area-learner em {
    font-style: italic;
}

.prompt-placeholder {
    color: #888 !important;
    font-style: italic;
}


/* ======================== */
/* == Responsive Section == */
/* ======================== */
@media (max-width: 768px) {
    .login-container {
        margin: 20px;
        padding: 20px;
        max-width: none;
    }
    .login-container h1 {
        font-size: 1.5em;
    }

    .course-detail-page-container { height: auto; overflow: visible; }
    .action-plan-columns-container { flex-direction: column; height: auto; }
    .personal-actions-column,
    .operational-actions-column { flex-basis: auto; height: auto; border-right: none; border-bottom: 2px solid #eee; overflow-y: visible; padding: 15px; }
    .operational-actions-column { border-bottom: none; }
    .course-detail-header { padding: 10px 15px; flex-direction: column; align-items: flex-start; }
    .course-detail-header h1 { font-size: 1.4em; margin-bottom: 10px;}
    .course-detail-header-buttons { width: 100%; justify-content: space-between; }
    .course-detail-header button { padding: 6px 12px; }

    .container { margin: 10px; padding: 15px; }

    .course-item .view-details-btn { float: none; display: block; width: 100%; margin-top: 15px; text-align: center; }
    .course-item h3 { font-size: 1.1em; }

    #logout-button {
        float: none; display: block; width: 100%; text-align: center;
        margin: 10px 0 15px 0;
    }
    .course-detail-header #logout-button {
        width: auto;
        margin: 0;
    }

    #add-personal-plan-form input[type="text"],
    #add-personal-plan-form textarea { width: calc(100% - 18px); }

    .manager-header { flex-direction: column; align-items: flex-start; padding: 10px 15px; }
    .manager-header h1 { font-size: 1.3em; margin-bottom: 8px;}
    .manager-user-info { width: 100%; display: flex; justify-content: space-between; align-items: center;}
    #manager-logout-button { margin-left: 10px; }
    .manager-controls { justify-content: flex-start; }
    .manager-controls-left, .manager-controls-right { width: 100%; justify-content: flex-start; margin-bottom: 10px; }
    .manager-controls-right { margin-bottom: 0; }
    .manager-controls select { min-width: 0; flex-grow: 1; }
    .manager-controls-right button { flex-grow: 1; text-align: center; }
    .manager-content { padding: 15px; }
    .summary-stats-section { gap: 15px; margin-bottom: 20px; }
    .stat-box { padding: 15px; min-width: 150px; }
    .stat-box p { font-size: 1.6em; }
    .charts-section { gap: 15px; margin-bottom: 20px; }
    .chart-container { padding: 15px; }
    #word-cloud { min-height: 200px; }
    .learner-list-section { padding: 15px; }
    #learner-list th, #learner-list td { padding: 8px; font-size: 0.9em; }

    .admin-header { flex-direction: column; align-items: flex-start; padding: 10px 15px; }
    .admin-header h1 { font-size: 1.3em; margin-bottom: 10px; }
    .admin-user-info { width: 100%; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
    #admin-logout-button, #back-to-dashboard-btn { padding: 5px 10px; }
    .admin-content { padding: 15px; }
    .admin-section { padding: 15px; }

    .admin-modal-content { width: 95%; padding: 20px; }
    .ai-modal-content { width: 95%; padding: 20px; }
}

/* ADD THESE STYLES TO THE END OF YOUR EXISTING ui/style.css FILE */

/* --- Styles for the Table in the Actions Card --- */
.actions-list-card .action-plan-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.actions-list-card .action-plan-table th, .actions-list-card .action-plan-table td { padding: 12px 5px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 0.9em; vertical-align: middle; word-wrap: break-word; }
.actions-list-card .action-plan-table th { font-weight: 600; color: #495057; padding-bottom: 10px; }
.actions-list-card .action-plan-table tr:hover { background-color: #f8f9fa; cursor: pointer; }
.actions-list-card .action-plan-table tr.selected-action { background-color: #e9ecef; }

.action-plan-table th:nth-child(1), .action-plan-table td:nth-child(1) { width: 60%; }
.action-plan-table th:nth-child(2), .action-plan-table td:nth-child(2) { width: 20%; }
.action-plan-table th:nth-child(3), .action-plan-table td:nth-child(3) { width: 20%; }

/* --- Status Badge Styles --- */
.status-badge { display: inline-block; padding: 4px 12px; font-size: 0.75em; font-weight: 700; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.status-badge.status-completed { color: #0f5132; background-color: #d1e7dd; }
.status-badge.status-inprogress { color: #664d03; background-color: #fff3cd; }
.status-badge.status-notstarted { color: #41464b; background-color: #e2e3e5; }

/* --- Styles for the inline detail view --- */
.inline-detail-view h4 { font-size: 1.1em; margin:0 0 5px 0; color: #333; }
.inline-detail-view .due-date { font-style: italic; color: #777; margin-bottom: 10px; }
.inline-detail-view .description { margin-bottom: 20px; color: #555; line-height: 1.5; white-space: pre-wrap; }
.inline-detail-view .form-group { margin-bottom: 15px; }
.inline-detail-view .form-group label { display: block; font-weight: bold; margin-bottom: 5px; color: #444; }
.inline-detail-view .form-group select, .inline-detail-view .form-group textarea, .inline-detail-view .form-group input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.inline-detail-view .form-message { margin-top: 10px; font-size: 0.9em; padding: 8px; border-radius: 4px; }
.inline-detail-view .form-message.success { color: #155724; background-color: #d4edda; }
.inline-detail-view .form-message.error { color: #721c24; background-color: #f8d7da; }

/* --- Styles for Fullscreen Card --- */
.card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.card-header h3 { margin: 0; border: none; padding: 0; }
.fullscreen-toggle-btn { background: none; border: 1px solid #ccc; cursor: pointer; padding: 2px 6px; line-height: 1; border-radius: 4px; font-size: 16px; color: #666; }
.fullscreen-toggle-btn:hover { background-color: #e9ecef; }
.fullscreen-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 1000; }
.fullscreen-card { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80vw; max-width: 900px; max-height: 90vh; z-index: 1001; overflow-y: auto; }
.action-card-grid { align-items: start; }

/* --- AI WIZARD STYLES --- */
.ai-modal-content { max-width: 800px; width: 90%; }
.ai-wizard-step { display: none; }
.ai-wizard-step.active { display: block; }

.persona-selection-container { display: flex; justify-content: space-around; gap: 20px; margin-top: 20px; }
.persona-card { flex: 1; padding: 25px; border: 2px solid #e0e0e0; border-radius: 8px; text-align: center; cursor: pointer; transition: all 0.2s ease-in-out; }
.persona-card:hover { border-color: #007bff; transform: translateY(-5px); box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1); }
.persona-card h3 { margin: 0 0 10px 0; color: #0056b3; font-size: 1.3em; }
.persona-card p { font-size: 0.95em; color: #555; margin: 0; }
.ai-wizard-footer { margin-top: 25px; display: flex; justify-content: space-between; align-items: center; }
#ai-response-area-learner { white-space: pre-wrap; line-height: 1.6; background-color: #f8f9fa; padding: 15px; border-radius: 4px; border: 1px solid #e0e0e0; min-height: 200px; }

/* --- NEW TITLE STYLE --- */
.section-title {
    font-size: 1.5em;
    color: #334155;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}


/* Add to the end of ui/style.css */

.enrolled-courses-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed; /* <-- Add this line */
}

.admin-table .enrolled-courses-list li {
    padding-bottom: 4px; /* Adds a bit of space between course names */
}

.admin-table .enrolled-courses-list li:last-child {
    padding-bottom: 0;
}

/* Add these rules to the end of your ui/style.css file */

/* 1. Ensure all table cells are vertically centered */
.admin-table td {
    vertical-align: middle;
}

/* 2. Add spacing to the action buttons and center them */
.admin-table .actions-cell {
    text-align: center;
}
.admin-table .actions-cell button {
    margin: 2px 4px; /* Adds a little space around each button */
}

/* 3. (Optional but recommended) Add alternating row colors for readability */
.admin-table tbody tr:nth-child(even) {
    background-color: #f8f9fa; /* A very light grey for even rows */
}
.admin-table tbody tr:hover {
    background-color: #e9ecef; /* A slightly darker highlight on hover */
}

/* --- Styles for the new Report Modal --- */
#report-header {
    text-align: center;
    border-bottom: 2px solid #343a40;
    margin-bottom: 20px;
    padding-bottom: 10px;
}
#report-header h2 {
    margin: 0;
    color: #343a40;
    border: none;
    padding: 0;
}
#report-header p {
    margin: 4px 0;
    font-size: 0.9em;
    color: #6c757d;
}
#report-body h3 {
    font-size: 1.2em;
    color: #0056b3;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
}
.report-summary-stats p {
    font-size: 1.1em;
    margin: 5px 0;
}
#report-learner-table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
#report-learner-table-container th,
#report-learner-table-container td {
    border: 1px solid #dee2e6;
    padding: 10px 12px;
    text-align: left;
}
#report-learner-table-container th {
    background-color: #f8f9fa;
    font-weight: 600;
}
.report-footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}