/* ========================================
   IMPORTANT: FORM INPUT STYLING ARCHITECTURE

   All form inputs (text, email, password, textarea, select, etc.)
   are styled centrally at line ~108 using CSS variables.

   DO NOT add duplicate background-color or color properties
   for inputs elsewhere in this file - they will conflict with
   dark mode. Instead, modify the centralized section.

   Variables used:
   - --color-input-bg: Background for all inputs
   - --color-input-text: Text color for all inputs
   - --color-border: Border color for all inputs
   ======================================== */

:root {
    --color-bg: #F8F9FA;
    --color-text: #212529;
    --color-muted-text: #6c757d;
    --color-primary: #4A90E2;
    --color-success: #198754;
    --color-danger: #dc3545;
    --color-urgent: #d32f2f;
    --color-urgent-bg: #ffebee;
    --color-border: #DEE2E6;
    --color-card-bg: #FFFFFF;
    --color-card-header-bg: #f1f3f5;
    --color-input-bg: #FFFFFF;
    --color-input-text: #212529;
    --color-light-bg: #f8f9fa;
    --color-hover-bg: #f5f5f5;
    --color-warning: #fd7e14;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --color-surface-elevated: #ffffff;
    --color-surface-hover: #f4f6fb;
    --border-subtle: rgba(33, 37, 41, 0.08);
    --shadow-elevated: 0 18px 34px rgba(15, 23, 42, 0.08);
}

html.dark-mode {
    --color-bg: #1E1E1E;              /* Softer main background instead of pure black */
    --color-text: #E8E8E8;             /* Softer primary text for reduced eye strain */
    --color-muted-text: #888888;       /* Readable muted text */
    --color-border: #404040;           /* Visible borders for better separation */
    --color-card-bg: #2A2A2A;          /* Distinct card backgrounds */
    --color-card-header-bg: #333333;   /* Slightly elevated header backgrounds */
    --color-input-bg: #333333;         /* Input backgrounds with good contrast */
    --color-input-text: #E8E8E8;       /* Match primary text color */
    --color-light-bg: #252525;         /* Alternative background areas */
    --color-hover-bg: #333333;         /* Hover states */
    --color-success: #28a745;          /* A slightly brighter green for dark mode */
    --color-warning: #fd7e14;
    --color-urgent: #ef5350;           /* Brighter red for dark mode */
    --color-urgent-bg: rgba(239, 83, 80, 0.15);
    --color-surface-elevated: #2A2A2A;
    --color-surface-hover: rgba(255, 255, 255, 0.05);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-elevated: 0 18px 34px rgba(0, 0, 0, 0.35); /* Softer shadow */
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    transition: background-color 0.2s, color 0.2s;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.container.full-width {
    max-width: none;
    width: 100%;
    margin: 2rem 0;
    padding: 0;
}

nav {
    background: var(--color-card-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Fixed navbar for admin and guide users */
.admin-v2 nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 64px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav a.logo {
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}
nav a, nav span { color: var(--color-text); }
nav a.logout-btn { color: var(--color-primary); }

.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    /* margin-bottom: 1.5rem; */
    padding: 1.5rem 2rem;
}
.card h1, .card h2, .card h3 { color: var(--color-text); margin-top: 0; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.flash-message { padding: 1rem; margin-bottom: 1rem; border-radius: 4px; border: 1px solid transparent; }
.flash-message.success { background-color: var(--color-success); color: white; }
.flash-message.danger { background-color: var(--color-danger); color: white; }
.flash-message.info { background-color: #0dcaf0; color: black; }
.flash-message.warning { background-color: #ffc107; color: black; }

.step-list { list-style: none; padding: 0; }
.step-list li { display: flex; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--color-border); }
.step-list li:last-child { border-bottom: none; }
.step-list input[type="checkbox"] { transform: scale(1.5); cursor: pointer; }

.progress-text { font-size: 1.2rem; font-weight: 500; color: var(--color-muted-text); margin-bottom: 2rem; text-align: center; }

.btn { display: inline-block; padding: 0.5rem 1rem; background: var(--color-primary); color: white; border-radius: 4px; text-decoration: none; border: none; cursor: pointer; }

/* Progress Grid */
.progress-grid { overflow-x: auto; }
.progress-grid table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.progress-grid th, .progress-grid td { padding: 0.75rem; border: 1px solid var(--color-border); text-align: left; }
.progress-grid th { background-color: var(--color-card-header-bg); }
.progress-grid td.check-cell { text-align: center; font-size: 1.2rem; color: var(--color-success); }

/* Dark Mode Toggle Switch */
.theme-switch-wrapper { display: flex; align-items: center; gap: 0.5rem; }
.theme-switch { display: inline-block; height: 20px; position: relative; width: 40px; }
.theme-switch input { display: none; }
.slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; }
.slider:before { background-color: #fff; bottom: 2px; content: ""; height: 16px; left: 2px; position: absolute; transition: .4s; width: 16px; }
input:checked + .slider { background-color: var(--color-primary); }
input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 20px; }
.slider.round:before { border-radius: 50%; }

/* --- Form & Button Enhancements --- */
/* ========================================
   CENTRALIZED FORM INPUT STYLES
   All text inputs, textareas, and selects
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="file"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select,
.form-control {
    background-color: var(--color-input-bg) !important;
    color: var(--color-input-text) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 4px;
    padding: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
}

textarea {
    resize: vertical; /* Allow vertical resizing only */
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Tiptap editor is styled in individual templates - no global styles needed */

/* For links that should look like small buttons */
.btn-small, a.btn-small {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--color-muted-text);
    color: var(--color-card-bg);
    text-decoration: none;
}
a.btn-small:hover { text-decoration: none; }

/* For all delete buttons/links, making them consistently red */
.delete-btn {
    background: none;
    border: none;
    color: var(--color-danger);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
}
.delete-btn:hover { color: #f5c2c7; }

/* Participant view specific tweaks */
.completed-badge {
    font-weight: bold;
    color: var(--color-success);
    font-size: 0.9em;
    margin-right: 1rem;
}
.step-content .content-blocks-container {
    color: var(--color-text);
    opacity: 0.9;
}


/* --- NEW: Step/Block Designer Styles --- */
.block-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-card-bg);
}
.block-drag-handle {
    cursor: grab;
    color: var(--color-muted-text);
    margin-right: 1rem;
    font-size: 1.2rem;
    user-select: none;
}
.block-info { flex-grow: 1; }
.block-item:last-child { border-bottom: none; }
.block-item strong { color: var(--color-text); }
.block-content-preview {
    color: var(--color-muted-text);
    font-family: sans-serif;
    font-size: 0.9em;
    margin: 0.5rem 0 0 0;
}
.add-block-form {
    border-top: 1px solid var(--color-border);
    padding: 1rem 0;
}
.add-block-form[open] { padding-bottom: 1.5rem; }
.add-block-form summary {
    cursor: pointer;
    font-weight: bold;
    list-style: none;
}
.add-block-form summary::-webkit-details-marker { display: none; }
.add-block-form summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    color: var(--color-primary);
}
.add-block-form[open] summary::before {
    transform: rotate(90deg);
}
.add-block-form form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.add-block-form form label {
    font-weight: 500;
    font-size: 0.9em;
    margin-top: 0.5rem;
}
.wysiwyg-toolbar {
    background-color: var(--color-card-header-bg);
    padding: 5px;
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
.wysiwyg-btn {
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text);
}
html:not(.dark-mode) .wysiwyg-btn:hover { background-color: #e9ecef; }
html.dark-mode .wysiwyg-btn:hover { background-color: rgba(255, 255, 255, 0.1); }
.wysiwyg-editor {
    border: 1px solid var(--color-border);
    padding: 10px;
    min-height: 150px;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--color-input-bg);
    color: var(--color-input-text);
}
.wysiwyg-editor:focus {
    outline: none;
    border-color: var(--color-primary);
}
.sortable-ghost {
    opacity: 0.4;
    background: var(--color-primary);
}

/* ==============================================================================
   ADMIN DASHBOARD STYLES
   ============================================================================== */

/* Admin Dashboard Layout */
.admin-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 2rem; 
}

@media (min-width: 992px) { 
    .admin-grid { 
        grid-template-columns: 2fr 1fr; 
    } 
}

.admin-quick-actions {
    margin-bottom: 2rem;
}

.quick-actions { 
    display: flex; 
    gap: 1rem; 
    flex-wrap: wrap; 
}

/* Enhanced Button Styles */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.btn-secondary {
    background-color: #495057;
    border-color: #495057;
    color: white;
}

.btn-secondary:hover {
    background-color: #3d4449;
    border-color: #373b3f;
}

.btn-outline {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: transparent;
}

.btn-outline:hover {
    color: var(--color-card-bg);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-danger {
    color: white;
    background-color: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* User Management Styles */
.user-list { 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 0 !important; 
}

.user-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 0; 
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.2s ease;
}

.user-row:hover {
    background-color: var(--color-card-header-bg);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 8px;
}

.user-row:last-child { 
    border-bottom: none; 
}

.user-info { 
    flex-grow: 1; 
    margin-right: 1rem; 
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.user-email {
    color: var(--color-muted-text);
    font-size: 0.875rem;
}

.user-role-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Role Badge Colors */
.role-participant {
    background-color: #e3f2fd;
    color: #1565c0;
}

.role-guide {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.role-admin {
    background-color: #ffebee;
    color: #c62828;
}

/* Dark mode role badge colors */
html.dark-mode .role-participant {
    background-color: #1e3a8a;
    color: #bfdbfe;
}

html.dark-mode .role-guide {
    background-color: #581c87;
    color: #e9d5ff;
}

html.dark-mode .role-admin {
    background-color: #7f1d1d;
    color: #fecaca;
}

.user-actions { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
    flex-shrink: 0;
    flex-wrap: wrap;
}

.role-select {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
    /* Other styles inherited from centralized form styles at line ~128 */
}

.role-select:focus {
    /* Focus styles inherited from centralized form styles at line ~139 */
}

.delete-form {
    display: inline;
}

/* Form Groups */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--color-text);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .user-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .user-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .user-details {
        margin-top: 0.25rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-actions .btn {
        text-align: center;
    }
}

/* ==============================================================================
   ANALYTICS DASHBOARD - SENTIMENT ANALYSIS TABLE
   ============================================================================== */

/* Sticky column background - matches parent row background */
.sticky-col {
    background: var(--color-card-bg);
}

/* Low sentiment row highlighting - only on sticky column */
td.sticky-col.low-sentiment-row {
    background: rgba(255, 152, 0, 0.1) !important;
}

html.dark-mode td.sticky-col.low-sentiment-row {
    background: rgba(255, 152, 0, 0.15) !important;
}

/* Ensure other cells in low-sentiment rows maintain normal background */
tr.low-sentiment-row td:not(.sticky-col) {
    background: var(--color-card-bg);
}

/* Sentiment value colors - high/medium/low ratings */
.sentiment-high {
    color: #4CAF50;
}

.sentiment-medium {
    color: #FF9800;
}

.sentiment-low {
    color: #F44336;
}

/* Dark mode sentiment colors - adjusted for better visibility */
html.dark-mode .sentiment-high {
    color: #66BB6A;
}

html.dark-mode .sentiment-medium {
    color: #FFA726;
}

html.dark-mode .sentiment-low {
    color: #EF5350;
}

/* Step number badge for analytics table */
.step-number-badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==============================================================================
   DATA MANAGEMENT STYLES
   ============================================================================== */

.simple-list { 
    list-style: none; 
    padding: 0; 
    margin: 0 0 1rem 0; 
}

.simple-list li { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0.5rem 0; 
    border-bottom: 1px solid var(--color-border); 
}

.inline-form { 
    display: flex; 
    gap: 0.5rem; 
    align-items: center; 
}

.inline-form input[type="text"] { 
    flex-grow: 1;
    margin: 0;
}

.d-grid { 
    display: grid; 
}

.gap-2 { 
    gap: 0.5rem; 
}

.mb-3 { 
    margin-bottom: 1rem; 
}

.form-text { 
    font-size: 0.875em; 
    color: var(--color-muted-text); 
    margin-top: 0.25rem;
}

.input-group { 
    display: flex; 
}

.input-group input[type="file"] { 
    border-top-right-radius: 0; 
    border-bottom-right-radius: 0; 
    border-right: none;
}

.input-group .btn { 
    border-top-left-radius: 0; 
    border-bottom-left-radius: 0; 
}

/* ==============================================================================
   JOURNAL VIEWING STYLES - Add this to your main CSS file
   ============================================================================== */

/* Journal Entry Cards */
.step-journal-entry {
    margin-bottom: 1.5rem;
}

.step-journal-header {
    margin-top: 0 !important;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.journal-content {
    margin: 0;
}

.journal-entry-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--color-card-header-bg);
    color: var(--color-text);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    margin: 0;
    line-height: 1.5;
}

.journal-empty {
    color: var(--color-muted-text);
    font-style: italic;
    margin: 0;
    padding: 1rem;
    background-color: var(--color-card-header-bg);
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

/* ==============================================================================
   COLLAPSIBLE TOPIC STYLES
   ============================================================================== */

.topic-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    transition: color 0.2s ease;
}

.topic-header:hover {
    color: var(--color-primary);
}

.topic-chevron {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    color: var(--color-muted-text);
}

.topic-chevron.expanded {
    transform: rotate(90deg);
}

.topic-courses {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
}

.topic-courses.collapsed {
    max-height: 0;
    opacity: 0;
}

.topic-courses.expanded {
    max-height: 2000px; /* Adjust based on your needs */
    opacity: 1;
}

.expand-all-btn {
    background: var(--color-secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 1rem;
}

.expand-all-btn:hover {
    background: var(--color-primary);
}

/* ==============================================================================
   COURSE CARD STYLES - Guide Dashboard
   ============================================================================== */

.course-card-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.course-info {
    flex: 1;
    min-width: 0;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.course-meta p {
    margin: 0;
}

.course-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    flex-shrink: 0;
}

.course-actions-row {
    display: flex;
    gap: 0.25rem;
}

.emoji-btn {
    background: #FF9800;
    border-color: #FF9800;
    color: #000;
    font-size: 1.1rem;
}

.course-card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.image-modal {
    background-color: rgba(255,255,255,0.95) !important;
}

/* ==============================================================================
   FEEDBACK FILTER STYLES
   ============================================================================== */

.feedback-filters {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

.filter-group label {
    font-weight: 500;
    color: var(--color-text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-group label i {
    margin-right: 5px;
    color: var(--color-primary);
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    /* Other styles inherited from centralized form styles at line ~128 */
}

.filter-group select:focus,
.filter-group input:focus {
    /* Focus styles inherited from centralized form styles at line ~139 */
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: var(--color-card-header-bg);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-outline i {
    font-size: 0.8rem;
}

/* Dark mode adjustments */
html.dark-mode .feedback-filters {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .filter-group select {
        width: 100%;
        min-width: unset;
    }
}

/* ==============================================================================
   FEEDBACK PAGE STYLES
   ============================================================================== */

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--color-text-light);
    padding: 10px 0;
}

.breadcrumb-nav a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav span {
    color: var(--color-text);
}

/* Feedback Entry Styles */
.feedback-entry {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-card-bg);
    transition: all 0.2s ease;
}

.feedback-entry:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.participant-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.participant-details strong {
    color: var(--color-text);
    font-weight: 600;
}

.participant-email {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.feedback-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feedback-date {
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.feedback-edited {
    font-size: 0.8rem;
    color: var(--color-info);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 3px;
}

.feedback-content {
    line-height: 1.6;
    color: var(--color-text);
    font-size: 1rem;
    padding: 0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--color-text-light);
    opacity: 0.5;
}

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

/* Journey Cards */
.journey-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}


.journey-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.journey-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.journey-card.needs-attention {
    border-left: 4px solid var(--color-danger);
    background: linear-gradient(135deg, var(--color-card-bg) 0%, rgba(220, 53, 69, 0.05) 100%);
}

.journey-card.health-high {
    border-left: 4px solid var(--color-success);
}

.journey-card.health-medium {
    border-left: 4px solid var(--color-warning);
}

.journey-card.health-low {
    border-left: 4px solid var(--color-danger);
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.journey-title h3 {
    margin: 0 0 8px 0;
    color: var(--color-text);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attention-icon {
    color: var(--color-danger);
    font-size: 1rem;
}

.journey-guide {
    color: var(--color-text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.health-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.health-indicator.health-high {
    background: var(--color-success);
}

.health-indicator.health-medium {
    background: var(--color-warning);
}

.health-indicator.health-low {
    background: var(--color-danger);
}

.journey-stats {
    margin-bottom: 15px;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
}

.stat-item {
    text-align: center;
    padding: 12px 8px;
    background: var(--color-card-header-bg);
    border-radius: 6px;
    min-width: 0;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
    display: block;
    margin-top: 4px;
}

.journey-meta {
    margin-bottom: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.last-activity {
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.last-activity.no-activity {
    color: var(--color-danger);
}

.journey-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Health status specific styling */
html.dark-mode .journey-card.needs-attention {
    background: linear-gradient(135deg, var(--color-card-bg) 0%, rgba(220, 53, 69, 0.1) 100%);
}

html.dark-mode .journey-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

html.dark-mode .stat-item {
    background: rgba(255, 255, 255, 0.05);
}

/* Mobile only - single column for very small screens */
@media (max-width: 480px) {
    .journey-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .stat-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .journey-actions {
        flex-direction: column;
        gap: 6px;
    }

    .journey-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.feedback-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 16px 24px;
}

.journey-feedback-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.journey-feedback-table th,
.journey-feedback-table td {
    padding: 0.35rem 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
}

.journey-feedback-table th:not(:first-child),
.journey-feedback-table td:not(:first-child) {
    white-space: nowrap;
}

.journey-feedback-table td:first-child {
    white-space: normal;
}

.journey-feedback-table thead th {
    background: var(--color-light-bg);
    font-weight: 600;
    border-bottom: 2px solid var(--color-border);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
}

.page-header h1 {
    color: var(--color-text);
    font-size: 1.8rem;
    margin: 0;
}

.page-header .fas {
    margin-right: 10px;
    color: var(--color-primary);
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.feedback-summary {
    margin-bottom: 15px;
    padding: 12px 16px;
    background: var(--color-card-header-bg);
    border-radius: 8px;
    color: var(--color-muted-text);
    font-size: 0.9rem;
}

.step-feedback-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

html.dark-mode .step-feedback-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-muted-text);
}

.empty-state .fas {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--color-text);
    margin-bottom: 10px;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--color-card-header-bg);
    border-bottom: 1px solid var(--color-border);
}

.step-header h3 {
    margin: 0;
    flex-grow: 1;
    font-size: 1.1rem;
}

.step-header h3 a {
    color: var(--color-text);
    text-decoration: none;
}

.step-header h3 a:hover {
    color: var(--color-primary);
}

.feedback-stats {
    display: flex;
    gap: 10px;
}

.badge {
    background-color: var(--color-muted-text);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

.badge-new {
    background-color: var(--color-success);
}

.feedback-entry {
    margin-bottom: 12px;
    padding: 12px 16px;
    background: var(--color-card-header-bg);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 6px 6px 0;
}

.feedback-meta {
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.feedback-meta strong {
    color: var(--color-text);
}

.feedback-date {
    color: var(--color-muted-text);
    margin-left: 8px;
}

.feedback-content {
    line-height: 1.5;
    color: var(--color-text);
    font-size: 0.9rem;
}

.recent-feedback {
    padding: 20px;
}

.recent-feedback h4 {
    color: var(--color-text);
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Emotion ratings section styles */
.trend-indicator {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    background: var(--color-light-bg);
    border: 1px solid var(--color-border);
}

.trend-indicator i {
    margin-right: 0.5rem;
}

.trend-improving {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

html.dark-mode .trend-improving {
    background: #1e4620;
    border-color: #2d5a2f;
    color: #8fd999;
}

.trend-declining {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

html.dark-mode .trend-declining {
    background: #4a1f23;
    border-color: #5f2c31;
    color: #f5a3ab;
}

.trend-stable {
    background: #e2e3e5;
    border-color: #d6d8db;
    color: #383d41;
}

html.dark-mode .trend-stable {
    background: #2d3139;
    border-color: #383d41;
    color: #b8bec4;
}

.emotion-ratings-section .card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.emotion-ratings-section .participant-count {
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--color-muted-text);
    margin-left: 0.5rem;
}

.individual-ratings-list {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-border);
}

.individual-ratings-list h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.rating-item:hover {
    background: var(--color-light-bg);
}

.rating-item .participant-name {
    font-weight: 500;
    color: var(--color-text);
}

.rating-item .emotion-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-item .emotion-emoji {
    font-size: 1.5rem;
}

.rating-item .emotion-label {
    font-size: 0.9rem;
    color: var(--color-muted-text);
}

/* Responsive design for feedback pages */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .nav-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Emotion distribution responsive */
    .emotion-ratings-section .card-body > div[style*="display: flex"] {
        flex-wrap: wrap;
    }

    .emotion-ratings-section .card-body > div[style*="display: flex"] > div {
        min-width: 120px;
    }

    .rating-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ==============================================================================
   FEEDBACK BY STUDENT PAGE STYLES
   ============================================================================== */

.feedback-nav {
    margin-bottom: 20px;
}

.feedback-nav .btn {
    margin-right: 10px;
}

.participant-feedback-card {
    margin-bottom: 25px;
}

.participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
}

.participant-header h3 {
    margin: 0;
    color: var(--color-text);
}

.participant-stats {
    display: flex;
    gap: 10px;
}

.show-more {
    margin-top: 15px;
}

.show-more details {
    border: 1px solid var(--color-border);
    border-radius: 5px;
    padding: 10px;
}

.show-more summary {
    font-weight: bold;
    cursor: pointer;
    color: var(--color-primary);
}

.show-more summary:hover {
    color: var(--color-primary);
    opacity: 0.8;
}

/* ==============================================================================
   USER MANAGEMENT TABLE STYLES
   ============================================================================== */

.section-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-border);
    gap: 16px;
}

.section-header h2 {
    color: var(--color-text);
    font-size: 1.5rem;
    margin: 0;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}

/* User table wrapper - provides horizontal scrolling */
.users-table-wrapper {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
}

html.dark-mode .users-table-wrapper {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* User table - main styling */
.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin: 0;
    font-size: 0.85rem;
}

.users-table thead {
    background: var(--color-card-header-bg);
}

.users-table th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.85rem;
    border-top: 3px solid #444;
    border-bottom: 3px solid #444;
    background-color: #2a2a2a;
    white-space: normal;
}

/* Column widths - flexible sizing for better responsiveness */
.users-table th,
.users-table td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
}

.users-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.users-table tbody tr:nth-child(odd) {
    background-color: #1a1a1a;
}

.users-table tbody tr:nth-child(even) {
    background-color: #242424;
}

.users-table tbody tr:hover {
    background-color: #2d3748 !important;
    transform: scale(1.002);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.users-table td {
    padding: 0.85rem 0.7rem;
    vertical-align: middle;
    color: var(--color-text);
    border-top: 3px solid #555;
    border-bottom: 3px solid #555;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .header-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .header-actions .btn {
        width: 100%;
        max-width: 220px;
    }

    .users-table th,
    .users-table td {
        min-width: 0;
    }
}

.user-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar .avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar-circle.role-participant {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.avatar-circle.role-guide {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.avatar-circle.role-admin {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.user-full-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
}

.user-email {
    color: var(--color-muted-text);
    font-size: 0.9rem;
}

.role-form {
    margin: 0;
}

.role-select {
    background: var(--color-input-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.85rem;
    color: var(--color-input-text);
    cursor: pointer;
    min-width: 90px;
}

/* Duplicate .role-select:focus removed - see line ~453 */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--color-muted-text);
    font-style: italic;
}

.stat-badge {
    background: var(--color-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 20px;
    display: inline-block;
    text-align: center;
}

.date-text {
    color: var(--color-text);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
}

.role-badge {
    display: inline-block;
    padding: 9px 12px 9px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    line-height: 1;
    text-align: left;
}
.role-badge i {
    margin-right: 5px;
    vertical-align: baseline;
}

.role-badge.role-participant {
    background: var(--color-primary);
}

.role-badge.role-guide {
    background: var(--color-info);
}

.role-badge.role-admin {
    background: var(--color-danger);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary.btn-sm {
    background: var(--color-primary);
    color: white;
}

.btn-primary.btn-sm:hover {
    background: #3078c9;
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-danger.btn-sm {
    background: var(--color-danger);
    color: white;
}

.btn-danger.btn-sm:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--color-success);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
    text-decoration: none;
}

.delete-form {
    margin: 0;
    display: inline;
}

/* Responsive design for user table - use horizontal scroll instead of hiding columns */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .user-name-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

    .btn-sm {
        width: 100%;
        justify-content: center;
    }

    /* Ensure table wrapper scrolls on mobile */
    .users-table-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}

/* ==============================================================================
   ADMIN DASHBOARD STYLES
   ============================================================================== */

.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Make user management page wider to accommodate table */
.admin-dashboard.user-management-page {
    max-width: 100%;
    width: 100%;
    padding: 20px 24px;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    color: var(--color-text);
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.dashboard-subtitle {
    color: var(--color-muted-text);
    font-size: 1.1rem;
    margin: 0;
}

.dashboard-section {
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.dashboard-section.compact-stats {
    margin-bottom: 25px;
}

/* Compact Stats */
.compact-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

/* Admin dashboard has 6 stats instead of 5 */
.admin-compact-stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.admin-compact-stats-grid .compact-stat {
    padding: 10px 6px;
}

@media (max-width: 768px) {
    .compact-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .admin-compact-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
}

.compact-stat {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.compact-stat:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.compact-stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
    line-height: 1;
}

.compact-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stat Icons */
.stat-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.stat-icon {
    font-size: 1.8rem;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.compact-stat:hover .stat-icon {
    transform: scale(1.1);
    opacity: 1;
}

/* Action Cards Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.action-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

html.dark-mode .action-card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.action-card:hover::before {
    transform: scaleX(1);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    text-decoration: none;
}

html.dark-mode .action-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.action-card.primary { border-left: 4px solid var(--color-primary); }
.action-card.secondary { border-left: 4px solid var(--color-muted-text); }
.action-card.info { border-left: 4px solid #17a2b8; }
.action-card.success { border-left: 4px solid var(--color-success); }

.action-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 2rem;
    flex-shrink: 0;
}

.action-card.primary .action-icon { color: var(--color-primary); }
.action-card.secondary .action-icon { color: var(--color-muted-text); }
.action-card.info .action-icon { color: #17a2b8; }
.action-card.success .action-icon { color: var(--color-success); }
.action-card.warning .action-icon { color: var(--color-warning); }

.action-content h3 {
    margin: 0 0 8px 0;
    color: var(--color-text);
    font-size: 1.2rem;
    font-weight: 600;
}

.action-content p {
    margin: 0;
    color: var(--color-muted-text);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

html.dark-mode .stat-card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

html.dark-mode .stat-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.stat-card.people::before { background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); }
.stat-card.students::before { background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%); }
.stat-card.courses::before { background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%); }
.stat-card.enrollments::before { background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%); }
.stat-card.active::before { background: linear-gradient(90deg, #fa709a 0%, #fee140 100%); }
.stat-card.feedback::before { background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%); }

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.stat-icon.people { color: #667eea; }
.stat-icon.students { color: #f5576c; }
.stat-icon.courses { color: #4facfe; }
.stat-icon.enrollments { color: #43e97b; }
.stat-icon.active { color: #fa709a; }
.stat-icon.feedback { color: #a8edea; }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-sublabel {
    font-size: 0.8rem;
    color: var(--color-muted-text);
    line-height: 1.3;
}

/* Dashboard Responsive Design */
@media (max-width: 1200px) {
    .admin-dashboard {
        padding: 15px;
    }

    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

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

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .action-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-section:nth-child(1) { animation-delay: 0s; }
.dashboard-section:nth-child(2) { animation-delay: 0.1s; }
.dashboard-section:nth-child(3) { animation-delay: 0.2s; }
.dashboard-section:nth-child(4) { animation-delay: 0.3s; }

/* Journey Card Links */
.journey-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.journey-card-link:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.journey-card-link:hover .journey-card {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Journey Feedback Detail Page */
.step-feedback-card {
    background: var(--color-card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--color-primary);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.step-info h3 {
    margin: 0 0 5px 0;
    color: var(--color-text);
    font-size: 1.1em;
}

.step-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: var(--color-muted-text);
}

.step-order, .step-section {
    background: var(--color-card-header-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.step-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.step-stat {
    text-align: center;
}

.step-stat .stat-value {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--color-primary);
}

.step-stat .stat-label {
    display: block;
    font-size: 0.85em;
    color: var(--color-muted-text);
    margin-top: 2px;
}

.step-feedback h4 {
    margin: 15px 0 10px 0;
    color: var(--color-text);
    font-size: 1em;
}

.feedback-entry-mini {
    background: var(--color-card-header-bg);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid var(--color-success);
}

.feedback-meta-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.feedback-meta-mini strong {
    color: var(--color-text);
    font-size: 0.9em;
}

.feedback-date {
    color: var(--color-muted-text);
    font-size: 0.85em;
}

.feedback-content-mini {
    color: var(--color-text);
    font-size: 0.9em;
    line-height: 1.4;
}

.more-feedback {
    text-align: center;
    margin-top: 15px;
}

.no-feedback {
    text-align: center;
    padding: 20px;
    color: var(--color-muted-text);
    font-style: italic;
}

.no-feedback i {
    margin-right: 8px;
    opacity: 0.6;
}

/* Student Summary Cards */
.students-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.student-summary-card {
    background: var(--color-card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-border);
}

.student-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.student-avatar {
    margin-right: 15px;
}

.avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: white;
}

.role-participant {
    background: var(--color-success);
}

.student-info h4 {
    margin: 0 0 5px 0;
    color: var(--color-text);
    font-size: 1.1em;
}

.student-email {
    color: var(--color-muted-text);
    font-size: 0.9em;
}

.student-progress {
    margin-bottom: 15px;
}

.progress-stat {
    margin-bottom: 15px;
}

.progress-value {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.progress-label {
    display: block;
    font-size: 0.9em;
    color: var(--color-muted-text);
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-card-header-bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.feedback-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--color-card-header-bg);
    border-radius: 6px;
}

.feedback-value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--color-success);
}

.feedback-label {
    color: var(--color-muted-text);
    font-size: 0.9em;
}

.student-actions {
    text-align: center;
}

/* Journey Overview */
.journey-overview {
    background: var(--color-card-bg);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.journey-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-label {
    font-weight: 600;
    color: var(--color-muted-text);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1.1em;
    color: var(--color-text);
    font-weight: 500;
}

/* Notification dropdown styles */
.notification-dropdown {
    background: var(--color-card-bg) !important;
    border: 1px solid var(--color-border) !important;
    color: var(--color-text) !important;
}

.notification-dropdown .notification-header {
    background: var(--color-card-header-bg) !important;
    border-bottom: 1px solid var(--color-border) !important;
    color: var(--color-text) !important;
}

.notification-item {
    border-bottom: 1px solid var(--color-border) !important;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: var(--color-card-header-bg) !important;
}

.notification-item .participant-name {
    color: var(--color-text) !important;
}

.notification-item .course-info {
    color: var(--color-muted-text) !important;
}

.notification-item .timestamp {
    color: var(--color-muted-text) !important;
}

/* Form control styling for dark mode compatibility */
/* Form control styles now centralized at top of file - see line 108 */

/* Mobile responsive navigation and dropdown */
@media (max-width: 768px) {
    /* Hide logo text on mobile to save space */
    nav a.logo {
        display: none;
    }

    /* Improve nav layout for mobile */
    nav {
        position: relative;
        padding: 0.8rem 1rem;
        flex-wrap: nowrap;
        overflow-x: hidden;
    }

    /* Make nav items more compact */
    nav > div:first-of-type {
        font-size: 0.9em;
        gap: 1rem !important;
    }

    /* Adjust welcome message for mobile */
    nav span {
        font-size: 0.85em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    /* Mobile notification dropdown */
    .notification-dropdown {
        /* On mobile, make dropdown full width and position from the left */
        left: 0 !important;
        right: auto !important;
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }

    .notification-container {
        /* Ensure the container doesn't overflow */
        position: static !important;
    }

    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }

    /* Course cards - mobile layout */
    .course-card-main {
        flex-direction: column;
        align-items: stretch;
    }

    .course-actions {
        width: 100%;
        align-items: stretch;
        margin-top: 1rem;
    }

    .course-actions .btn,
    .course-actions .btn-small {
        width: 100%;
        text-align: center;
    }

    /* Stack Progress Map and emoji button vertically on mobile */
    .course-actions-row {
        flex-direction: column;
        width: 100%;
    }

    .course-actions-row .btn-small {
        width: 100%;
    }

    /* Footer actions wrap and stack */
    .course-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .course-card-footer a,
    .course-card-footer button {
        width: 100%;
        text-align: center;
    }

    .course-card-footer form {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Course cards - even more compact on small screens */
    .course-card {
        padding: 1rem !important;
    }

    .course-card h2 {
        font-size: 1.2rem;
    }

    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .course-actions {
        gap: 0.75rem;
    }

    .course-card-footer {
        gap: 0.75rem;
    }

    /* Extra compact navigation for very small screens */
    nav {
        padding: 0.5rem 0.8rem;
    }

    /* Make navigation links even more compact */
    nav > div:first-of-type {
        font-size: 0.8em;
        gap: 0.8rem !important;
    }

    /* Shorter welcome message */
    nav span {
        font-size: 0.8em;
        max-width: 120px;
    }

    /* Smaller logout button */
    .logout-btn {
        font-size: 0.8em;
        padding: 0.3rem 0.6rem;
    }

    /* Dark mode toggle smaller */
    .theme-switch-wrapper {
        gap: 0.3rem;
    }

    .theme-switch {
        width: 40px;
        height: 20px;
    }

    .theme-switch .slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }

    input:checked + .slider:before {
        transform: translateX(20px);
    }

    /* Notification dropdown for small screens */
    .notification-dropdown {
        /* For very small screens, use even less margin */
        margin-left: 5px !important;
        margin-right: 5px !important;
        width: calc(100vw - 10px) !important;
        font-size: 0.9em;
    }

    .notification-header {
        /* Smaller padding on mobile */
        padding: 10px 12px !important;
    }

    .notification-item {
        /* Smaller padding for notification items */
        padding: 10px !important;
    }

    .journal-preview {
        /* Smaller font and padding for journal preview on mobile */
        font-size: 0.8em !important;
        padding: 4px 6px !important;
    }
}

/* Audio placeholder styles for on-demand loading */
.audio-placeholder {
    margin: 1rem 0;
}

.audio-placeholder .audio-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.play-button {
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.play-button:hover:not(:disabled) {
    opacity: 0.9;
}

.play-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.audio-duration {
    color: var(--color-muted-text);
    font-size: 0.9rem;
}

.audio-container {
    margin-top: 0.5rem;
}

.audio-container audio {
    width: 100%;
    border-radius: 8px;
    background: var(--color-light-bg);
}

/* ==============================================================================
   MODAL STYLES
   ============================================================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--color-card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-card-header-bg);
    color: var(--color-text);
}

.modal-header h2, .modal-header h5 {
    margin: 0;
    color: var(--color-text);
}

.modal-header .btn-close {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
    opacity: 0.5;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    color: var(--color-text);
}

/* Modal input styles now inherit from centralized form styles - see line 108 */

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-card-header-bg);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-body textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: var(--color-input-bg);
    color: var(--color-input-text);
    resize: vertical;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

/* ==============================================================================
   FEEDBACK ENTRY STYLES
   ============================================================================== */

.feedback-entry {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-card-bg);
    transition: all 0.2s ease;
}

.feedback-entry:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.participant-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.participant-details strong {
    color: var(--color-text);
    font-weight: 600;
}

.participant-email {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.feedback-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feedback-date {
    font-size: 0.85rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.feedback-edited {
    font-size: 0.8rem;
    color: var(--color-info);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 3px;
}

.feedback-content {
    line-height: 1.6;
    color: var(--color-text);
    font-size: 1rem;
    padding: 0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--color-text-light);
    opacity: 0.5;
}

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

/* ========================================
   USER MANAGEMENT PAGE SPECIFIC OVERRIDES
   ======================================== */
/* These styles are kept in sync with .users-table above */

/* Focus Step Navigation */
.focus-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem 0;
    gap: 1rem;
}

.focus-nav .nav-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.focus-nav .nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.focus-nav .nav-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.focus-nav .checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.focus-nav .checkbox-container input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.focus-nav .checkbox-container label {
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

/* Chat Bubble Comments */
.comments-thread {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    background: var(--color-card-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.comments-thread h3 {
    margin-top: 0;
    /* margin-bottom: 0.5rem; */
    color: var(--color-text);
}

.chat-bubbles {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0;
    max-height: 500px;
    overflow-y: auto;
}

.chat-bubble {
    max-width: 75%;
    padding: 0.35rem 0.5rem;
     padding-bottom: 0.25rem;
    border-radius: 8px;
    position: relative;
}

.guide-bubble {
    align-self: flex-start;
    background: #e3f2fd;
    color: #1e3a5f;
}

html.dark-mode .guide-bubble {
    background: #2C4158;    /* Softer blue-gray instead of harsh dark blue */
    color: #E8E8E8;         /* Consistent with primary text color */
}

.student-bubble {
    align-self: flex-end;
    background: #4caf50;
    color: white;
}

html.dark-mode .student-bubble {
    background: #3A5F3C;    /* Softer green instead of harsh dark green */
    color: #E8E8E8;         /* Softer white for reduced eye strain */
}

.bubble-content {
    font-size: 0.95em;
    line-height: 1.3;
    padding-right: 3.5rem;
    padding-bottom: 0.1rem;
}

.bubble-time {
    position: absolute;
    bottom: 0.2rem;
    right: 0.4rem;
    font-size: 0.65em;
    opacity: 0.6;
}

.discussion-header {
    margin-bottom: 0.5rem;
     padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.discussion-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.date-divider {
    text-align: center;
    margin: 0.5rem 0 0.35rem 0;
    position: relative;
}

.date-divider span {
    background: var(--color-card-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75em;
    color: var(--color-muted-text);
    border: 1px solid var(--color-border);
    display: inline-block;
}

.comment-section {
    margin-top: 0.5rem;
}

.add-comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 1rem;
}

.add-comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-input-bg);
    color: var(--color-input-text);
    resize: vertical;
    font-family: inherit;
    margin: 0;
}

.add-comment-form button {
    align-self: flex-end;
}

.comment-status {
    text-align: right;
    font-size: 0.9em;
    min-height: 1.2em;
}

/* ==============================================================================
   ADMIN SIDEBAR NAVIGATION - Professional Design
   ============================================================================== */

.admin-layout {
    display: flex;
    min-height: calc(100vh - 60px);
    position: relative;
}

/* Sidebar Styles - Professional & Modern */
.admin-sidebar {
    width: 260px;
    background: var(--color-card-bg);
    border-right: 2px solid var(--color-border);
    padding: 0;
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    align-items: stretch;
}

/* Navigation Sections */
.admin-nav-section {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.admin-nav-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.admin-nav-section-title {
    padding: 0.5rem 1.25rem 0.25rem 1.25rem;
    margin-bottom: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted-text);
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    padding-left: 1rem;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.15s ease;
    font-weight: 700;
    font-size: 1rem;
    border-left: 4px solid transparent;
    background: transparent;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-link:hover {
    background: var(--color-hover-bg);
    text-decoration: none;
    border-left-color: var(--color-primary);
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.15) 0%, rgba(74, 144, 226, 0.05) 100%);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.sidebar-link.active .sidebar-text {
    color: var(--color-primary);
}

.sidebar-icon {
    font-size: 1.3rem;
    width: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-muted-text);
    transition: all 0.3s ease;
}

.sidebar-link:hover .sidebar-icon:not([class*="icon-"]) {
    color: var(--color-primary);
}

.sidebar-link.active .sidebar-icon:not([class*="icon-"]) {
    color: var(--color-primary);
}

.sidebar-text {
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
    display: inline-block;
}

/* Cool Icon Colors & Animations */
.sidebar-link:hover .sidebar-icon {
    transform: scale(1.1);
}

/* Individual Icon Colors - Increased Specificity */
.sidebar-icon.icon-dashboard { color: #4A90E2 !important; }
.sidebar-icon.icon-courses { color: #7B68EE !important; }
.sidebar-icon.icon-journals { color: #FF6B6B !important; }
.sidebar-icon.icon-users { color: #4ECDC4 !important; }
.sidebar-icon.icon-enrollments { color: #FFA500 !important; }
.sidebar-icon.icon-identities { color: #9B59B6 !important; }
.sidebar-icon.icon-analytics { color: #2ECC71 !important; }
.sidebar-icon.icon-database { color: #E74C3C !important; }
.sidebar-icon.icon-announcements { color: #F39C12 !important; }
.sidebar-icon.icon-digest { color: #3498DB !important; }
.sidebar-icon.icon-journey { color: #FF69B4 !important; }
.sidebar-icon.icon-progress { color: #00CED1 !important; }
.sidebar-icon.icon-steps { color: #FFD700 !important; }
.sidebar-icon.icon-students { color: #32CD32 !important; }


/* Hover animations - simplified */
.sidebar-link:hover .sidebar-icon {
    transform: scale(1.1);
}

/* Dark mode adjustments */
html.dark-mode .admin-sidebar {
    box-shadow: 2px 0 15px rgba(0,0,0,0.3);
}

html.dark-mode .sidebar-link.active {
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.18) 0%, rgba(74, 144, 226, 0.08) 100%);
    color: #82B1FF;         /* Softer blue for active links */
}

html.dark-mode .sidebar-link.active .sidebar-text {
    color: #82B1FF;         /* Match the softer blue */
}

/* Main Content Area */
.admin-content {
    width: calc(100% - 260px);
    margin-left: 260px;
    padding: 0;
    background: var(--color-bg);
    min-height: calc(100vh - 60px);
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Add padding to specific admin pages that need it */
.admin-layout .admin-dashboard {
    padding: 2rem;
}

/* Mobile Toggle Button */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 70px;
    left: 15px;
    z-index: 101;
    background: var(--color-primary);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: 2px 0 15px rgba(0,0,0,0.2);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        width: 100%;
        margin-left: 0;
        padding: 1rem;
    }

    /* Overlay when sidebar is open on mobile */
    .admin-sidebar.show::after {
        content: '';
        position: fixed;
        top: 0;
        left: 260px;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
    }
}

@media (max-width: 480px) {
    .admin-content {
        padding: 0.75rem;
    }

    .sidebar-link {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

/* Fix paragraph spacing in content blocks - match Quill editor exactly (NO margins) */
.content-block p {
    margin: 0;
    line-height: 1.6;
}

/* Also fix spacing in the Quill editor content when displayed to students */
.content-blocks-container p {
    margin: 0;
    line-height: 1.6;
}

/* Fix paragraph spacing in block preview for guides */
.block-full-content p {
    margin: 0;
    line-height: 1.6;
}

/* List styling for content blocks - supports both Quill (legacy) and TinyMCE (new) */

/* === Legacy Quill List Support === */
/* Quill uses flat lists with data-list attributes and ql-indent-N classes */

/* Fix Quill's empty wrapper li elements that break nested lists */
.content-blocks-container li[style*="list-style-type: none"],
.content-block li[style*="list-style-type: none"],
.block-full-content li[style*="list-style-type: none"] {
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: list-item !important;
}

/* Ordered lists from Quill */
.content-blocks-container li[data-list="ordered"],
.content-block li[data-list="ordered"],
.block-full-content li[data-list="ordered"] {
    list-style-type: decimal !important;
    margin: 0;
    padding: 0 !important;
    border: none !important;
    line-height: 1.6;
    display: list-item !important;
}

/* Nested ordered lists (level 1) - should show as a, b, c */
.content-blocks-container li[data-list="ordered"].ql-indent-1,
.content-block li[data-list="ordered"].ql-indent-1,
.block-full-content li[data-list="ordered"].ql-indent-1 {
    list-style-type: lower-alpha !important;
    padding-left: 3rem !important;
    display: list-item !important;
}

/* Nested ordered lists (level 2) - should show as i, ii, iii */
.content-blocks-container li[data-list="ordered"].ql-indent-2,
.content-block li[data-list="ordered"].ql-indent-2,
.block-full-content li[data-list="ordered"].ql-indent-2 {
    list-style-type: lower-roman !important;
    padding-left: 6rem !important;
    display: list-item !important;
}

/* Bullet lists from Quill */
.content-blocks-container li[data-list="bullet"],
.content-block li[data-list="bullet"],
.block-full-content li[data-list="bullet"] {
    list-style-type: disc !important;
    margin: 0;
    padding: 0 !important;
    border: none !important;
    line-height: 1.6;
    display: list-item !important;
}

/* Nested bullet lists */
.content-blocks-container li[data-list="bullet"].ql-indent-1,
.content-block li[data-list="bullet"].ql-indent-1,
.block-full-content li[data-list="bullet"].ql-indent-1 {
    list-style-type: circle !important;
    padding-left: 3rem !important;
    display: list-item !important;
}

.content-blocks-container li[data-list="bullet"].ql-indent-2,
.content-block li[data-list="bullet"].ql-indent-2,
.block-full-content li[data-list="bullet"].ql-indent-2 {
    list-style-type: square !important;
    padding-left: 6rem !important;
    display: list-item !important;
}

/* === TinyMCE Semantic HTML Support === */
/* TinyMCE uses proper nested <ol> and <ul> tags */

.content-blocks-container ol,
.content-block ol,
.block-full-content ol {
    margin: 0;
    padding-left: 2.5rem;
    list-style-type: decimal !important;
    display: block !important;
}

.content-blocks-container ul,
.content-block ul,
.block-full-content ul {
    margin: 0;
    padding-left: 2.5rem;
    list-style-type: disc !important;
    display: block !important;
}

.content-blocks-container li,
.content-block li,
.block-full-content li {
    margin: 0;
    padding: 0 !important;
    border: none !important;
    line-height: 1.6;
    display: list-item !important;
}

/* Paragraph spacing to match TinyMCE editor */
.content-blocks-container p,
.content-block p,
.block-full-content p {
    margin: 1rem 0;
}

.content-blocks-container p:first-child,
.content-block p:first-child,
.block-full-content p:first-child {
    margin-top: 0;
}

.content-blocks-container p:last-child,
.content-block p:last-child,
.block-full-content p:last-child {
    margin-bottom: 0;
}

/* Nested lists with proper letter/roman numeral styling - tight indent between levels */
.content-blocks-container ol ol,
.content-block ol ol,
.block-full-content ol ol {
    list-style-type: lower-alpha !important;
    margin: 0 !important;
    padding-left: 2.2rem !important;
}

.content-blocks-container ol ol ol,
.content-block ol ol ol,
.block-full-content ol ol ol {
    list-style-type: lower-roman !important;
    padding-left: 2.2rem !important;
}

.content-blocks-container ul ul,
.content-block ul ul,
.block-full-content ul ul {
    list-style-type: circle !important;
    margin: 0 !important;
    padding-left: 2.2rem !important;
}

.content-blocks-container ul ul ul,
.content-block ul ul ul,
.block-full-content ul ul ul {
    list-style-type: square !important;
    padding-left: 2.2rem !important;
}

/* Mobile Full-Width Experience - Remove all wasted space on mobile */
@media (max-width: 768px) {
    .container {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }

    .card {
        margin: 0;
        padding: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    body {
        margin: 0;
        padding: 0;
    }

    main {
        padding: 0;
        margin: 0;
    }

    /* Remove gaps between cards on mobile */
    .card + .card {
        margin-top: 0;
        border-top: none;
    }
}
