/* CareSim Admin Portal - Light Green Minimalist Theme */

/* Reset global styles for admin portal */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body.admin-portal,
.admin-portal {
    font-family: 'Poppins', sans-serif;
    background: #FFF8F0;
    min-height: 100vh;
    margin: 0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    padding-top: 0;
    /* Override centering from styles.css */
    justify-content: flex-start !important;
    align-items: stretch !important;
}

/* Ensure all buttons and inputs use Poppins font */
button,
input[type="button"],
input[type="submit"],
input[type="file"],
input[type="file"]::file-selector-button,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
textarea,
select,
.btn-logout,
.btn-primary,
.btn-secondary,
.filter-btn {
    font-family: 'Poppins', sans-serif;
}

/* File input button styling */
input[type="file"]::file-selector-button {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: white;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: #F9FAFB;
    border-color: #C19A6B;
    color: #556B2F;
}

/* Header - Fixed at top */
.portal-header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    color: #556B2F;
    letter-spacing: 1px;
}

.header-logo {
    height: 40px;
    width: auto;
    transition: opacity 0.2s ease;
}

.logo:hover .header-logo {
    opacity: 0.8;
}

.logo-text {
    color: #556B2F;
    font-weight: 600;
    font-family: 'Dancing Script', cursive;
    font-size: 28px;
    transition: color 0.2s ease;
}

.logo-text:hover,
.logo:hover .logo-text {
    color: #C19A6B;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-tab {
    padding: 10px 20px;
    text-decoration: none;
    color: #64748B;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    transform: scale(1);
    display: inline-block;
}

.nav-tab:hover {
    background: #FAF0E6;
    color: #556B2F;
    transform: translateY(-1px) scale(1.02);
}

.nav-tab:active {
    transform: translateY(0) scale(0.98);
}

.nav-tab.active {
    background: #C19A6B;
    color: white;
    transform: scale(1);
}

.nav-tab.active:hover {
    background: #A67A4A;
    transform: translateY(-1px) scale(1.02);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-logout {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    color: #64748B;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    transform: scale(1);
}

.btn-logout:hover {
    border-color: #EF4444;
    color: #EF4444;
    background: #FEE2E2;
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-logout:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.15);
}

/* Portal Container - Admin Dashboard */
.portal-container {
    max-width: min(1400px, 100vw);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
    margin-top: 80px;
    padding: 32px max(24px, 1rem) 16px max(24px, 1rem);
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

/* Section Styles */
.lessons-section,
.quizzes-section {
    width: 100%;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 8px 0;
}

.section-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

.lessons-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 24px;
}

.lesson-search {
    flex: 1 1 280px;
    position: relative;
}

.lesson-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 14px;
}

.lesson-search input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: #1E293B;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lesson-search input:focus {
    outline: none;
    border-color: #C19A6B;
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.15);
}

.status-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.status-filter-btn {
    border: 1px solid #E2E8F0;
    background: white;
    color: #64748B;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.status-filter-btn:hover {
    border-color: #C19A6B;
    color: #556B2F;
}

.status-filter-btn.active {
    background: #C19A6B;
    border-color: #C19A6B;
    color: white;
    box-shadow: 0 4px 10px rgba(193, 154, 107, 0.3);
}

.lesson-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lesson-sort label {
    font-size: 13px;
    color: #64748B;
    font-weight: 500;
}

.lesson-sort select {
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: #1F2937;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lesson-sort select:focus {
    outline: none;
    border-color: #C19A6B;
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.15);
}

/* Lessons Grid */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
    align-items: stretch;
}

/* Lesson Card */
.lesson-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
    cursor: pointer;
}

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

.lesson-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.lesson-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    text-transform: capitalize;
}

.lesson-status.status-draft {
    background: #FEF3C7;
    color: #B45309;
}

.lesson-status.status-published {
    background: #DCFCE7;
    color: #15803D;
}

.lesson-number {
    font-size: 12px;
    font-weight: 600;
    color: #556B2F;
    background: #FAF0E6;
    padding: 4px 12px;
    border-radius: 20px;
}

.lesson-name {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 8px 0;
}

.lesson-card-description {
    margin-top: 8px;
    margin-bottom: 12px;
    color: #64748B;
    font-size: 14px;
    line-height: 1.5em;
    flex-grow: 1; /* Makes cards equal height by pushing content */
    
    /* Limit to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em; /* 3 lines * 1.5em line-height */
    white-space: normal;
}

.lesson-card-description:empty::before {
    content: "No description provided.";
    color: #aaa;
    font-style: italic;
}

.lesson-card-stats {
    margin-bottom: 12px;
    font-size: 13px;
    color: #64748B;
}

.lesson-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.lesson-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    background: #F9FAFB;
    border-radius: 8px;
    padding: 8px 12px;
}

.lesson-metric i {
    color: #94A3B8;
    font-size: 13px;
}

.lesson-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 16px; /* Space before actions */
}

.lesson-card-actions {
    margin-top: auto; /* Push to bottom */
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
}

.btn-card-action {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: white;
    color: #64748B;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    transform: scale(1);
}

.btn-card-action i {
    font-size: 13px;
}

.btn-card-action:hover {
    border-color: #C19A6B;
    color: #556B2F;
    background: #FAF0E6;
}

.btn-card-action.btn-edit {
    background: #C19A6B;
    border-color: #C19A6B;
    color: white;
    transform: scale(1);
}

.btn-card-action.btn-edit:hover {
    background: #A67A4A;
    border-color: #A67A4A;
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 8px rgba(193, 154, 107, 0.3);
}

.btn-card-action.btn-edit:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(193, 154, 107, 0.2);
}

.btn-card-action.btn-pages {
    background: #10B981;
    border-color: #10B981;
    color: white;
    transform: scale(1);
}

.btn-card-action.btn-pages:hover {
    background: #059669;
    border-color: #059669;
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-card-action.btn-pages:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-card-action.btn-view {
    background: #8B5CF6;
    border-color: #8B5CF6;
    color: white;
    transform: scale(1);
}

.btn-card-action.btn-view:hover {
    background: #7C3AED;
    border-color: #7C3AED;
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
}

.btn-card-action.btn-view:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

/* Lesson Tabs for Quizzes */
.lesson-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 0;
}

.lesson-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
    font-family: inherit;
}

.lesson-tab:hover {
    color: #556B2F;
    background: #FAF0E6;
    border-radius: 8px 8px 0 0;
}

.lesson-tab.active {
    color: #556B2F;
    border-bottom-color: #C19A6B;
    background: transparent;
    font-weight: 600;
}

/* Quizzes Section Header */
.quizzes-section-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
}

.quizzes-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 4px 0;
}

.quizzes-count {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

/* Quizzes Grid */
.quizzes-grid {
    width: 100%;
}

.quizzes-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    width: 100%;
}

/* Quiz Card */
.quiz-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
}

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

.quiz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quiz-number {
    font-size: 12px;
    font-weight: 600;
    color: #556B2F;
    background: #FAF0E6;
    padding: 4px 12px;
    border-radius: 20px;
}

.quiz-question {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.answer-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    background: #F9FAFB;
    font-size: 14px;
    color: #64748B;
}

.answer-item.correct {
    background: #FAF0E6;
    border: 1px solid #C19A6B;
    color: #556B2F;
}

.answer-label {
    font-weight: 600;
    min-width: 24px;
    color: #1E293B;
}

.correct-answer-badge {
    font-size: 12px;
    font-weight: 600;
    color: #556B2F;
    background: #FAF0E6;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 8px;
    margin-bottom: 12px;
}

/* Explanation Section */
.explanation-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E2E8F0;
}

.explanation-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1E293B;
    margin-bottom: 6px;
}

.explanation-text {
    font-size: 13px;
    line-height: 1.5;
    color: #1E293B;
    padding: 8px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.explanation-empty {
    color: #94A3B8;
    font-style: italic;
}

/* Buttons */
.btn-edit {
    background: #C19A6B;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit:hover {
    background: #A67A4A;
    transform: translateY(-1px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E2E8F0;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #64748B;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #FAF0E6;
    color: #556B2F;
}

/* Alert modal (admin-videos) */
#alertModal .alert-modal-content {
    max-width: 480px;
    border-radius: 16px;
}

#alertModal .alert-modal-header {
    align-items: center;
    gap: 12px;
}

#alertModal .alert-status-pill {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #DCFCE7;
    border: 2px solid #16A34A;
    display: flex;
    align-items: center;
    justify-content: center;
}

#alertModal .alert-status-pill::before {
    content: '✔';
    font-size: 16px;
    color: #15803D;
    font-weight: 700;
}

#alertModal .alert-modal-body {
    padding: 12px 24px 8px 24px;
}

#alertModal .alert-modal-body p {
    font-size: 14px;
    color: #374151;
    margin: 0;
}

#alertModal .alert-modal-actions {
    padding: 12px 24px 16px 24px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
}

.modal form {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1E293B;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #1E293B;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #C19A6B;
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.1);
}

.form-group input:disabled,
.form-group input[readonly] {
    background: #F9FAFB;
    color: #64748B;
    cursor: not-allowed;
}

/* Quill Editor Styles */
#pageContentEditor {
    min-height: 300px;
    background: white;
}

#pageContentEditor .ql-editor {
    min-height: 300px;
    font-size: 14px;
    line-height: 1.6;
}

#pageContentEditor .ql-toolbar {
    border-top: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #f9fafb;
}

#pageContentEditor .ql-container {
    border-bottom: 1px solid #e5e7eb;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-family: 'Poppins', sans-serif;
}

#pageContentEditor .ql-editor.ql-blank::before {
    color: #9ca3af;
    font-style: normal;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Character Counter */
.char-counter {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    font-size: 12px;
    color: #64748B;
    font-weight: 500;
}

.char-counter span {
    font-weight: 600;
    color: #1E293B;
}

.char-counter.char-limit-reached {
    color: #EF4444;
}

.char-counter.char-limit-reached span {
    color: #EF4444;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #E2E8F0;
}

.btn-primary {
    background: #C19A6B;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #A67A4A;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #64748B;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: #556B2F;
    color: #556B2F;
    background: #FAF0E6;
}

/* History Modal Styles (used for logout confirmation) */
.history-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.history-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.history-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.history-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.history-close:hover {
    background: #F3F4F6;
    color: #111827;
}

.history-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* Logout Modal Specific Styles */
.logout-modal-content {
    max-width: 400px;
}

.logout-modal-body {
    padding: 28px 24px 20px 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-modal-body p {
    font-size: 16px;
    color: #1E293B;
    margin: 0;
    line-height: 1.5;
}

/* Dashboard Welcome */
.dashboard-welcome {
    margin-bottom: 32px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 8px 0;
}

.welcome-subtitle {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

.section-heading {
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 20px 0;
}

/* Statistics Cards */
.dashboard-section {
    margin-top: 0;
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

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

.stat-card.stat-primary .stat-icon {
    background: #C19A6B;
}

.stat-card.stat-success .stat-icon {
    background: #10B981;
}

.stat-card.stat-info .stat-icon {
    background: #3B82F6;
}

.stat-card.stat-warning .stat-icon {
    background: #F59E0B;
}

.stat-card.stat-secondary .stat-icon {
    background: #8B5CF6;
}

.stat-card.stat-danger .stat-icon {
    background: #EF4444;
}

.stat-icon {
    font-size: 28px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF0E6;
    border-radius: 12px;
    color: #556B2F;
}

.stat-icon i {
    font-size: 28px;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 4px 0;
}

.stat-label {
    font-size: 14px;
    color: #64748B;
    margin: 0 0 4px 0;
}

.stat-change {
    font-size: 12px;
    color: #94A3B8;
    margin: 0;
}

.stat-change.positive {
    color: #059669;
    font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E2E8F0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.btn-link {
    background: none;
    border: none;
    color: #C19A6B;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    transform: scale(1);
    position: relative;
}

.btn-link:hover {
    color: #556B2F;
    text-decoration: none;
    transform: translateX(4px) scale(1.05);
}

.btn-link:active {
    transform: translateX(2px) scale(1.02);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-empty {
    text-align: center;
    padding: 24px;
    color: #94A3B8;
    font-size: 14px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.activity-item:hover {
    background: #FAF0E6;
}

.activity-icon {
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAF0E6;
    border-radius: 8px;
    flex-shrink: 0;
    color: #556B2F;
}

.activity-icon i {
    font-size: 18px;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #1E293B;
    margin: 0 0 4px 0;
}

.activity-text strong {
    font-weight: 600;
}

.activity-meta {
    color: #64748B;
    font-weight: normal;
}

.activity-time {
    font-size: 12px;
    color: #94A3B8;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    text-decoration: none;
    color: #1E293B;
    transition: all 0.2s;
    background: white;
    cursor: pointer;
    min-height: 150px;
}

.quick-action-card:hover {
    border-color: #C19A6B;
    background: #FAF0E6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(193, 154, 107, 0.15);
}

.quick-action-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #556B2F;
}

.quick-action-icon i {
    font-size: 32px;
}

.quick-action-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.quick-action-card p {
    font-size: 12px;
    color: #64748B;
    margin: 0;
}

/* Recent Users Table */
.recent-users-table {
    overflow-x: auto;
}

.recent-users-table.scrollable {
    max-height: 320px;
    overflow-y: auto;
}

.recent-users-table .compact-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #FAF0E6;
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
}

.compact-table thead {
    background: #FAF0E6;
}

.compact-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    white-space: nowrap;
}

.compact-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 14px;
    color: #1E293B;
    vertical-align: middle;
}

.compact-table tbody tr:hover {
    background: #FAF0E6;
}

.compact-table tbody tr:last-child td {
    border-bottom: none;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-chip::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.status-chip.chip-online {
    background: #D1FAE5;
    color: #047857;
}

.status-chip.chip-offline {
    background: #FEE2E2;
    color: #B91C1C;
}

.dashboard-card.activity-card,
.dashboard-card.quick-actions-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.activity-card .activity-list {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.recent-users-table.scrollable {
    max-height: 320px;
    overflow-y: auto;
}

.recent-users-table.scrollable thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #FAF0E6;
}

.backup-table-wrapper {
    max-height: 300px;
    overflow-y: auto;
}

.backup-table td:last-child {
    text-align: right;
}

.backup-table .btn-secondary {
    padding: 6px 12px;
    font-size: 13px;
}

/* System Status */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-indicator.online {
    background: #D1FAE5;
    color: #065F46;
}

.status-indicator.online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-indicator.offline::before {
    background: #EF4444;
}

.system-status-header {
    align-items: center;
}

.system-status-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.system-status-actions .btn-secondary[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.system-status-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: #F9FAFB;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-label {
    font-size: 12px;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
}

/* System Status Badge (pill-shaped with dot) */
.status-item .status-badge {
    width: 24px;
    height: 12px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
}

.status-item .status-badge.status-online {
    background: #D1FAE5;
}

.status-item .status-badge.status-online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.status-item .status-badge.status-offline {
    background: #FEE2E2;
}

.status-item .status-badge.status-offline::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.status-item .status-badge.status-warning {
    background: #FEF3C7;
}

.status-item .status-badge.status-warning::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #F59E0B;
    border-radius: 50%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

/* Performance Metrics */
.time-filter {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #E2E8F0;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #C19A6B;
    color: #556B2F;
}

.filter-btn.active {
    background: #C19A6B;
    border-color: #C19A6B;
    color: white;
}

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

.metric-item {
    padding: 16px;
    background: #F9FAFB;
    border-radius: 8px;
}

.metric-label {
    font-size: 12px;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
}

.metric-bar {
    height: 6px;
    background: #E2E8F0;
    border-radius: 3px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: linear-gradient(90deg, #C19A6B 0%, #556B2F 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1E293B;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Content Sections */
.content-section {
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.section-header .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.section-header .btn-primary span {
    font-size: 18px;
    font-weight: 600;
}

.section-header .btn-primary i {
    font-size: 14px;
    margin-right: 6px;
}

/* Clickable Lesson Cards */
.lesson-card.clickable {
    cursor: pointer;
}

.lesson-card.clickable:hover {
    border-color: #C19A6B;
    box-shadow: 0 4px 16px rgba(193, 154, 107, 0.15);
}

/* Lesson Editor Page */
.lesson-editor-page {
    margin-top: 80px;
    padding: 32px 24px 24px 24px;
    width: 80%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - 80px);
}

.editor-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid #E2E8F0;
}

.btn-back {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 8px 16px;
    color: #64748B;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.btn-back i {
    font-size: 14px;
}

.btn-back:hover {
    border-color: #C19A6B;
    color: #556B2F;
    background: #FAF0E6;
}

.editor-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.editor-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
}

.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E2E8F0;
}

/* Editor Tabs */
.editor-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 0;
}

.editor-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.editor-tab i {
    font-size: 14px;
}

.editor-tab:hover {
    color: #556B2F;
    background: #FAF0E6;
    border-radius: 8px 8px 0 0;
}

.editor-tab.active {
    color: #556B2F;
    border-bottom-color: #C19A6B;
    background: transparent;
    font-weight: 600;
}

.editor-content-wrapper {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
    min-height: 500px;
    width: 100%;
}

.editor-tab-content {
    display: none;
}

.editor-tab-content.active {
    display: block;
}

/* Form Sections */
.form-section {
    margin-bottom: 32px;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #E2E8F0;
}

/* Rich Text Editor */
.rich-text-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #F9FAFB;
    border: 1px solid #E2E8F0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 6px 12px;
    border: 1px solid #E2E8F0;
    background: white;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
}

.toolbar-btn i {
    font-size: 13px;
}

.toolbar-btn:hover {
    background: #FAF0E6;
    border-color: #C19A6B;
    color: #556B2F;
}

.toolbar-separator {
    width: 1px;
    background: #E2E8F0;
    margin: 4px 8px;
}

.rich-text-editor {
    min-height: 400px;
    padding: 16px;
    border: 1px solid #E2E8F0;
    border-radius: 0 0 6px 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #1E293B;
    background: white;
    outline: none;
}

.rich-text-editor:focus {
    border-color: #C19A6B;
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.1);
}

.rich-text-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

/* Image Preview Grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.preview-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

.preview-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-image:hover {
    background: rgba(220, 38, 38, 0.9);
}

.image-preview-single {
    margin-top: 12px;
}

.image-preview-single img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

/* Tools Section */
.tools-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

.empty-tools-state {
    text-align: center;
    padding: 60px 20px;
    color: #94A3B8;
    background: #F9FAFB;
    border-radius: 8px;
    border: 2px dashed #E2E8F0;
}

.tool-card {
    background: #F9FAFB;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.tool-card:hover {
    border-color: #C19A6B;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E2E8F0;
}

.tool-name {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.tool-card-actions {
    display: flex;
    gap: 8px;
}

.btn-tool-edit,
.btn-tool-delete {
    padding: 6px 12px;
    border: 1px solid #E2E8F0;
    background: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
}

.btn-tool-edit i,
.btn-tool-delete i {
    font-size: 12px;
}

.btn-tool-edit {
    color: #C19A6B;
}

.btn-tool-edit:hover {
    background: #FAF0E6;
    border-color: #A67A4A;
    color: #A67A4A;
}

.btn-tool-delete {
    color: #EF4444;
}

.btn-tool-delete:hover {
    background: #FEE2E2;
    border-color: #DC2626;
    color: #DC2626;
}

.tool-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-description {
    font-size: 14px;
    color: #64748B;
    margin: 0;
    line-height: 1.6;
}

.tool-category {
    display: inline-block;
    padding: 4px 10px;
    background: #E0E7FF;
    color: #4F46E5;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.tool-image-preview {
    margin: 12px 0;
}

.tool-image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.tool-3d-indicator {
    padding: 8px 12px;
    background: #E9D5FF;
    color: #7C3AED;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-3d-indicator i {
    font-size: 12px;
}

.tool-instructions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E2E8F0;
}

.tool-instructions strong {
    display: block;
    font-size: 12px;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.tool-instructions p {
    font-size: 14px;
    color: #1E293B;
    margin: 0;
    line-height: 1.6;
}

.model-preview {
    margin-top: 12px;
    padding: 40px;
    background: #F9FAFB;
    border: 2px dashed #E2E8F0;
    border-radius: 8px;
    text-align: center;
}

.model-placeholder {
    color: #94A3B8;
    font-size: 13px;
    font-style: italic;
}

/* Preview Tab */
.preview-section {
    padding: 20px 0;
}

.preview-hint {
    color: #64748B;
    font-size: 14px;
    margin-bottom: 24px;
    font-style: italic;
}

.preview-content {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #E2E8F0;
}

.preview-lesson {
    max-width: 800px;
    margin: 0 auto;
}

.preview-title {
    font-size: 32px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 16px 0;
}

.preview-description {
    font-size: 16px;
    color: #64748B;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.preview-body {
    font-size: 15px;
    color: #1E293B;
    line-height: 1.8;
    margin-bottom: 40px;
}

.preview-body h1, .preview-body h2, .preview-body h3 {
    color: #1E293B;
    margin-top: 24px;
    margin-bottom: 12px;
}

.preview-body p {
    margin-bottom: 16px;
}

.preview-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}

.preview-tools-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #E2E8F0;
}

.preview-tools-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 24px 0;
}

.preview-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.preview-tool-item {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.preview-tool-image {
    width: 100%;
    max-width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 8px;
}

.preview-tool-item h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 8px 0;
}

.preview-tool-item p {
    font-size: 13px;
    color: #64748B;
    margin: 0 0 12px 0;
}

.btn-3d-preview {
    padding: 6px 12px;
    background: #8B5CF6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-3d-preview:hover {
    background: #7C3AED;
}

/* Editor Page Actions */
.editor-page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #E2E8F0;
}

.editor-actions-right {
    display: flex;
    gap: 12px;
}

.btn-danger {
    background: #EF4444;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #DC2626;
}

/* User Management Styles */
.user-role-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 0;
    width: 100%;
}

.user-role-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.user-role-tab i {
    font-size: 14px;
}

.user-role-tab:hover {
    color: #556B2F;
    background: #FAF0E6;
    border-radius: 8px 8px 0 0;
}

.user-role-tab.active {
    color: #556B2F;
    border-bottom-color: #C19A6B;
    background: transparent;
    font-weight: 600;
}

.tab-action-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-action-bar .btn-primary {
    display: none;
}

.tab-action-bar .btn-primary.active {
    display: inline-flex;
}

.role-tab-content {
    display: none;
}

.role-tab-content.active {
    display: block;
}

/* Search and Filter Section */
.users-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    flex-wrap: nowrap; /* Force single line on desktop */
}

.search-group {
    flex: 1;
    min-width: 200px; /* Allow shrinking */
}

.search-input {
    width: 100%;
    padding: 0 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    height: 40px;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #C19A6B;
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.1);
}

.actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap; /* Force single line */
}

.filter-select {
    padding: 0 12px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    height: 40px;
    box-sizing: border-box;
    width: auto; /* Let it size to content */
    min-width: 120px;
}

.filter-select:focus {
    border-color: #C19A6B;
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.1);
}

.users-filters .btn-primary,
.users-filters .btn-secondary {
    height: 40px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0; /* Prevent squishing */
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .users-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-group {
        width: 100%;
    }
    
    .actions-group {
        width: 100%;
        justify-content: space-between; /* Wrap items nicely */
        flex-wrap: wrap; /* Allow wrapping on mobile */
    }
    
    .actions-group > * {
        flex: 1 1 auto; /* Allow items to grow and fill space */
        text-align: center;
        justify-content: center;
    }
}

/* Table Wrapper */
.table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: #F9FAFB;
    border-bottom: 2px solid #E2E8F0;
}

.users-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    white-space: nowrap;
}

.users-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #E2E8F0;
    font-size: 14px;
    color: #1E293B;
    vertical-align: middle;
}

.users-table tbody tr:hover {
    background: #FAF0E6;
}

.users-table tbody tr:last-child td {
    border-bottom: none;
}

.users-table tbody tr {
    cursor: pointer;
    transition: background 0.2s ease;
}

.user-name-link {
    color: #556B2F;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.user-name-link:hover {
    text-decoration: underline;
    color: #C19A6B;
}

/* Status Toggle */
.status-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.status-toggle input[type="checkbox"] {
    display: none;
}

/* User Status Badge (text badge) */
.users-table .status-badge,
.user-details-popup .status-badge,
.compact-table .status-badge {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    width: auto;
    height: auto;
    position: static;
}

.users-table .status-badge::before,
.user-details-popup .status-badge::before,
.compact-table .status-badge::before {
    display: none;
}

.status-active {
    background: #10B981;
    color: white;
}

.status-deactivated {
    background: #EF4444;
    color: white;
}

.status-pending {
    background: #F59E0B;
    color: white;
}

.status-verified {
    background: #059669;
    color: white;
}

.status-expired {
    background: #F97316;
    color: white;
}

.status-archived {
    background: #94A3B8;
    color: white;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-small {
    width: 100px;
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill-small {
    height: 100%;
    background: #10B981;
    border-radius: 4px;
    transition: width 0.3s;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 6px;
}

.btn-action {
    padding: 6px 10px;
    border: 1px solid #E2E8F0;
    background: white;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: #F9FAFB;
    border-color: #C19A6B;
}

.action-buttons .btn-action {
    cursor: pointer;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 16px 0 32px 0;
}

.pagination-info {
    font-size: 14px;
    color: #475569;
    min-width: 110px;
    text-align: center;
}

.btn-edit-small {
    background: #C19A6B;
    color: white;
    border-color: #C19A6B;
}

.btn-edit-small:hover {
    background: #A67A4A;
    border-color: #A67A4A;
    color: white;
}

.btn-edit-small i,
.btn-disable-small i,
.btn-view-small i,
.btn-convert-small i {
    font-size: 12px;
}

.btn-disable-small {
    background: #EF4444;
    color: white;
    border-color: #EF4444;
}

.btn-disable-small i {
    color: white;
}

.btn-disable-small:hover {
    background: #DC2626;
    border-color: #DC2626;
    color: white;
}

.btn-view-small {
    background: #8B5CF6;
    color: white;
    border-color: #8B5CF6;
}

.btn-view-small:hover {
    background: #7C3AED;
    border-color: #7C3AED;
    color: white;
}

.btn-convert-small {
    background: #10B981;
    color: white;
    border-color: #10B981;
}

.btn-convert-small:hover {
    background: #059669;
    border-color: #059669;
    color: white;
}

/* Add User Modal - Role Specific Fields */
.role-specific-fields {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E2E8F0;
}

.password-input-group {
    display: flex;
    gap: 8px;
}

.password-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 40px;
}

.btn-toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #64748B;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    font-size: 14px;
}

.btn-toggle-password:hover {
    color: #C19A6B;
}

.btn-toggle-password i {
    font-size: 14px;
}

.btn-generate-password {
    padding: 10px 16px;
    background: #F9FAFB;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-generate-password:hover {
    background: #FAF0E6;
    border-color: #C19A6B;
    color: #556B2F;
}

/* Edit User Page */
.user-edit-page {
    margin-top: 80px;
    padding: 32px 24px 24px 24px;
    width: 80%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - 80px);
}

.edit-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.edit-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.edit-page-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 24px;
    background: #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #059669);
    border-radius: 12px;
    transition: width 0.3s;
}

.edit-page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #E2E8F0;
}

/* User Details Popup */
.user-details-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #64748B;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.popup-close:hover {
    background: #F9FAFB;
    color: #1E293B;
}

.user-details-header {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #E2E8F0;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #FAF0E6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
    border: 3px solid #C19A6B;
    color: #556B2F;
}

.user-avatar i {
    font-size: 32px;
}

.user-details-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 8px 0;
}

.user-details-header p {
    font-size: 14px;
    color: #64748B;
    margin: 0;
}

.user-details-body {
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: #64748B;
    font-weight: 500;
}

.user-details-actions {
    display: flex;
    justify-content: center;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

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

    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .nav-tabs {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-tab {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px;
    }

    .btn-logout {
        width: 100%;
        text-align: center;
    }
    
    /* User Detail Modal Responsive */
    .user-details-popup .popup-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 24px 16px;
    }
    
    /* Action Bar Buttons */
    .tab-action-bar {
        justify-content: stretch;
    }
    
    .tab-action-bar .btn-primary {
        flex: 1;
        justify-content: center;
    }

    /* Table Responsive Styles */
    .users-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-group {
        width: 100%;
    }
    
    .actions-group {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .users-table {
        font-size: 12px;
    }
    
    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }

    .mobile-hidden {
        display: none !important;
    }

    .pagination-controls {
        justify-content: center;
    }
}

/* Desktop Modal Width */
@media (min-width: 769px) {
    .user-details-popup .popup-content {
        max-width: 800px;
        width: 90%;
    }
}

/* Image Preview */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #64748B;
    margin-top: 4px;
}

/* Modal Large */
.modal-large {
    max-width: 800px;
}

/* Users Table */
.users-table-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: #FAF0E6;
}

.users-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    border-bottom: 2px solid #E2E8F0;
}

.users-table td {
    padding: 16px;
    border-bottom: 1px solid #E2E8F0;
    font-size: 14px;
    color: #64748B;
}

.users-table tbody tr:hover {
    background: #FAF0E6;
}

.users-table tbody tr:last-child td {
    border-bottom: none;
}

/* Role and Status Badges */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

/* User Status Badge (for Recent Users table) - Small green pill with dot */
.compact-table .status-badge.status-active,
.compact-table .status-badge.status-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 24px;
    border-radius: 12px;
    padding: 0;
    font-size: 0;
}

.role-student {
    background: #C19A6B;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.role-admin {
    background: #EF4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.role-instructor {
    background: #8B5CF6;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.compact-table .status-badge.status-active {
    background: #D1FAE5;
}

.compact-table .status-badge.status-active::before {
    content: '●';
    color: #059669;
    font-size: 10px;
    line-height: 1;
    display: block;
}

.compact-table .status-badge.status-disabled {
    background: #FEE2E2;
}

.compact-table .status-badge.status-disabled::before {
    content: '●';
    color: #DC2626;
    font-size: 10px;
    line-height: 1;
    display: block;
}

/* Action Buttons */
.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
}

.btn-edit-small {
    background: #C19A6B;
    color: white;
}

.btn-edit-small:hover {
    background: #A67A4A;
}

.btn-disable-small {
    background: #EF4444;
    color: white;
    border: 1px solid #EF4444;
}

.btn-disable-small:hover {
    background: #DC2626;
    border-color: #DC2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portal-container {
        padding: 4px 16px 16px 16px;
        grid-template-columns: 1fr;
    }

    .lessons-grid,
    .quizzes-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .users-table-container {
        overflow-x: scroll;
    }

    .nav-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .nav-tab {
        padding: 8px 12px;
        font-size: 13px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .time-filter {
        width: 100%;
        justify-content: flex-start;
    }
}

/* =========================================
   Admin Dev Tools (Super Admin Only)
   ========================================= */
.admin-devtools-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #F59E0B;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
}

.admin-devtools-fab:hover {
    transform: scale(1.1);
    background: #D97706;
}

.admin-devtools-panel {
    position: fixed;
    bottom: 85px;
    right: 24px;
    width: 340px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 1px solid #E2E8F0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.2s ease-out;
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.admin-devtools-header {
    padding: 12px 16px;
    background: #FEF3C7;
    border-bottom: 1px solid #FDE68A;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-devtools-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #92400E;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.admin-devtools-close {
    background: none;
    border: none;
    color: #92400E;
    cursor: pointer;
    padding: 4px;
}

.admin-devtools-content {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.admin-devtools-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-devtools-btn {
    padding: 10px;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    color: #4B5563;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.admin-devtools-btn:hover {
    border-color: #F59E0B;
    color: #D97706;
    background: #FFFBEB;
}

.admin-devtools-separator {
    height: 1px;
    background: #E2E8F0;
    margin: 12px 0;
}

.admin-devtools-list-header {
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.admin-devtools-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-devtools-table th {
    text-align: left;
    color: #9CA3AF;
    font-weight: 500;
    padding-bottom: 6px;
    font-size: 11px;
}

.admin-devtools-table td {
    padding: 6px 0;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

.admin-devtools-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.admin-devtools-badge.lms {
    background: #DBEAFE;
    color: #1E40AF;
}

.admin-devtools-badge.game {
    background: #D1FAE5;
    color: #065F46;
}

/* =========================================
   Admin Dev Tools Demo Table (Scoped)
   ========================================= */
.admin-devtools-demo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-devtools-demo-header th {
    text-align: left;
    color: #9CA3AF;
    font-weight: 500;
    padding-bottom: 6px;
    font-size: 11px;
}

.admin-devtools-demo-row td {
    padding: 6px 0;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

.admin-devtools-demo-delete {
    background: none;
    border: none;
    color: #EF4444;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.admin-devtools-demo-delete:hover {
    opacity: 1;
}

/* =========================================
   Dev Advanced Settings Modal (Scoped)
   ========================================= */
.dev-advanced-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dev-advanced-overlay.hidden {
    display: none;
}

.dev-advanced-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dev-advanced-header {
    padding: 20px 24px;
    background: #FEF3C7;
    border-bottom: 1px solid #FDE68A;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dev-advanced-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #92400E;
    letter-spacing: 0.5px;
}

.dev-advanced-close {
    background: none;
    border: none;
    color: #92400E;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.dev-advanced-close:hover {
    background: rgba(146, 64, 14, 0.1);
}

.dev-advanced-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.dev-advanced-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dev-advanced-table thead {
    background: #F9FAFB;
}

.dev-advanced-table th {
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #E5E7EB;
}

.dev-advanced-table td {
    padding: 12px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

.dev-advanced-table tbody tr:hover {
    background: #F9FAFB;
}

.dev-advanced-counter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dev-advanced-counter-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #CBD5E1;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #4B5563;
    transition: all 0.2s;
}

.dev-advanced-counter-btn:hover {
    border-color: #F59E0B;
    background: #FFFBEB;
    color: #D97706;
}

.dev-advanced-counter-btn:active {
    transform: scale(0.95);
}

.dev-advanced-counter-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: #1F2937;
}

.dev-advanced-quiz-input {
    width: 60px;
    padding: 6px;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.dev-advanced-quiz-input:focus {
    outline: none;
    border-color: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.dev-advanced-actions {
    display: flex;
    gap: 8px;
}

.dev-advanced-btn-apply,
.dev-advanced-btn-reset {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dev-advanced-btn-apply {
    background: #2563EB;
    color: white;
}

.dev-advanced-btn-apply:hover {
    background: #1D4ED8;
}

.dev-advanced-btn-apply:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dev-advanced-btn-reset {
    background: #EF4444;
    color: white;
}

.dev-advanced-btn-reset:hover {
    background: #DC2626;
}

/* Responsive: horizontal scroll on small screens */
@media (max-width: 768px) {
    .dev-advanced-modal {
        max-width: 95vw;
    }
    
    .dev-advanced-body {
        overflow-x: auto;
    }
    
    .dev-advanced-table {
        min-width: 700px;
    }
}

/* =========================================
   Game Certificates Page - Scoped Styles
   ========================================= */
.admin-game-certificates-page {
    width: 100%;
}

.admin-game-certs-main-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 0;
}

.admin-game-certs-main-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
    font-family: 'Poppins', sans-serif;
}

.admin-game-certs-main-tab:hover {
    color: #556B2F;
    background: #FAF0E6;
    border-radius: 8px 8px 0 0;
}

.admin-game-certs-main-tab.active {
    color: #556B2F;
    border-bottom-color: #C19A6B;
    background: transparent;
    font-weight: 600;
}

.admin-game-certs-secondary-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-left: 4px;
}

.admin-game-certs-secondary-tab {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.admin-game-certs-secondary-tab:hover {
    border-color: #C19A6B;
    color: #556B2F;
    background: #FAF0E6;
}

.admin-game-certs-secondary-tab.active {
    background: #C19A6B;
    border-color: #C19A6B;
    color: white;
}

.admin-game-certs-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
    overflow: hidden;
}

.admin-game-certs-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-game-certs-table thead {
    background: #FAF0E6;
}

.admin-game-certs-table th {
    padding: 16px 24px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #556B2F;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-game-certs-table td {
    padding: 16px 24px;
    border-bottom: 1px solid #E2E8F0;
    color: #1E293B;
    font-size: 14px;
    vertical-align: middle;
}

.admin-game-certs-table tr:last-child td {
    border-bottom: none;
}

.admin-game-certs-table tr:hover {
    background: #FAFAF9;
}

.admin-game-certs-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.admin-game-certs-status.eligible {
    background: #FEF3C7;
    color: #B45309;
}

.admin-game-certs-status.issued {
    background: #DCFCE7;
    color: #15803D;
}

.admin-game-certs-btn {
    padding: 8px 16px;
    background: #C19A6B;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-game-certs-btn:hover {
    background: #A67A4A;
}

.admin-game-certs-btn:disabled {
    background: #E2E8F0;
    color: #94A3B8;
    cursor: not-allowed;
}

/* Responsive table wrapper */
.admin-game-certificates-page .admin-game-certs-table {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .admin-game-certificates-page .admin-game-certs-table {
        margin: 0 -16px;
        border-radius: 0;
    }
    
    .admin-game-certificates-page .admin-game-certs-table table {
        min-width: 600px;
    }
    
    .admin-game-certs-main-tabs {
        flex-wrap: wrap;
    }
    
    .admin-game-certs-secondary-tabs {
        flex-wrap: wrap;
    }
}
