:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #dfe6e9;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: var(--card-bg);
    border-bottom: 2px solid var(--primary-color);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

header .container:has(.header-left) {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

header .header-left {
    flex: 1;
}

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

header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

header .subtitle {
    color: #7f8c8d;
    font-size: 1rem;
}

header .admin-nav {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
}

header .admin-nav:hover {
    color: var(--primary-color);
    background: var(--bg-color);
    text-decoration: none;
}

.session-info {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.session-info h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

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

.info-item label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.info-item .value {
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:disabled {
    background: #bdc3c7 !important;
    color: #7f8c8d !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    transform: none !important;
}

.btn:disabled:hover {
    background: #bdc3c7 !important;
    transform: none !important;
}

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

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

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

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

.btn-success:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

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

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

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

.btn-secondary:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    opacity: 0.6;
}

.question-form {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.question-form h3 {
    margin-bottom: 15px;
    color: var(--text-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

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

.questions-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.questions-header h3 {
    color: var(--text-color);
}

.question-count {
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.question-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.question-card.answered {
    opacity: 0.7;
    border-left: 4px solid var(--success-color);
}

.question-card.previously-flagged {
    border-left: 4px solid #27ae60;
    background: #f0fdf4;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.question-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.85rem;
    min-width: 45px;
    text-align: center;
    flex-shrink: 0;
}

.question-content {
    flex-grow: 1;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.question-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: flex;
    gap: 10px;
    align-items: center;
}

.approved-badge {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #c3e6cb;
}

.question-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.upvote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.upvote-btn:hover {
    border-color: var(--secondary-color);
    background: #fff9f0;
}

.upvote-btn.upvoted {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: white;
}

.upvote-icon {
    font-size: 1.2rem;
}

.upvote-count {
    font-weight: 700;
    font-size: 1.1rem;
}

.answer-badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.answer-badge.answered {
    background: var(--success-color);
    color: white;
}

.answer-badge.unanswered {
    background: var(--border-color);
    color: var(--text-color);
}

/* Written Answer Styles */
.written-answer {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    background: #f0f8ff;
}

.written-answer.published {
    border-left-color: var(--success-color);
    background: #f0fff4;
}

.written-answer.draft {
    border-left-color: var(--secondary-color);
    background: #fffaf0;
}

.written-answer-header {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.written-answer-text {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Markdown Content Styles */
.markdown-content {
    line-height: 1.7;
}

.markdown-content p {
    margin: 0.5em 0;
}

.markdown-content h1, .markdown-content h2, .markdown-content h3,
.markdown-content h4, .markdown-content h5, .markdown-content h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.markdown-content h1 { font-size: 1.6em; }
.markdown-content h2 { font-size: 1.4em; }
.markdown-content h3 { font-size: 1.2em; }

.markdown-content ul, .markdown-content ol {
    margin: 0.5em 0;
    padding-left: 2em;
}

.markdown-content li {
    margin: 0.25em 0;
}

.markdown-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background: #2d2d2d;
    color: #f8f8f8;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.75em 0;
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 0.75em 0;
    padding-left: 1em;
    color: #666;
    font-style: italic;
}

.markdown-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0.5em 0;
}

.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 1.2rem;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

/* Override center alignment for answer modal (needs left-aligned text editor) */
#answer-modal .modal-content {
    text-align: left;
    max-width: 800px;
}

#answer-modal h2,
#answer-modal .form-group label {
    text-align: left;
}

/* EasyMDE editor should be left-aligned */
.EasyMDEContainer,
.EasyMDEContainer .CodeMirror,
.EasyMDEContainer .editor-toolbar,
.EasyMDEContainer .editor-preview {
    text-align: left;
}

.modal-content img {
    max-width: 100%;
    margin: 20px 0;
}

.status-indicator {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-indicator.active {
    background: var(--success-color);
    color: white;
}

.status-indicator.ended {
    background: var(--danger-color);
    color: white;
}

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

    header h1 {
        font-size: 1.5rem;
    }

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

    .question-header {
        flex-direction: column;
    }

    .question-actions {
        align-self: flex-start;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideIn 0.3s ease;
    color: white;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

/* Session ended warning message */
.session-ended-warning {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
    border: 2px solid #f5c6cb;
}

/* ============================================================================
   Breadcrumb Navigation
   ============================================================================ */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: #666;
    font-size: 1.2rem;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    text-decoration: underline;
    color: var(--secondary-color);
}

.breadcrumbs a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

.breadcrumbs [aria-current="page"] {
    color: var(--text-color);
    font-weight: 500;
}

/* ============================================================================
   Loading States
   ============================================================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* ============================================================================
   Mobile Responsiveness & Touch Targets
   ============================================================================ */

/* Minimum touch target: 44x44px per WCAG guidelines */
.btn, .action-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
    font-size: 16px; /* Prevent iOS zoom */
}

.upvote-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 10px;
}

/* Form inputs */
input, select, textarea, button {
    font-size: 16px; /* Prevent iOS zoom on focus */
    min-height: 44px;
}

textarea {
    min-height: 100px;
}

/* Increase spacing between interactive elements */
.button-group {
    gap: 12px;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    /* Stack buttons vertically on mobile */
    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-bottom: 8px;
    }

    /* Question cards */
    .question-card {
        padding: 16px;
    }

    .question-header {
        flex-direction: column;
        gap: 10px;
    }

    /* Question actions */
    .question-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .question-actions .btn {
        width: 100%;
    }

    /* Info grid on mobile */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* Breadcrumbs on mobile */
    .breadcrumbs {
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }

    /* Forms */
    .form-group {
        margin-bottom: 16px;
    }

    /* Modal close buttons */
    .modal-close {
        min-height: 44px;
        min-width: 44px;
        padding: 10px;
    }

    /* Session info */
    .session-info {
        padding: 15px;
    }

    /* Questions list */
    .questions-container {
        padding: 15px;
    }
}

/* Small phone screens */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.25rem;
    }

    .btn {
        font-size: 14px;
        padding: 10px 16px;
    }

    .question-card {
        padding: 12px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   Accessibility (WCAG 2.1 AA Compliance)
   ============================================================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 10000;
}

.skip-to-main:focus {
    top: 0;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Color contrast improvements */
.btn-secondary {
    background: #5a6c7d;
    color: white;
}

.btn-secondary:hover {
    background: #4a5c6d;
}

/* Focus indicators for buttons */
.btn:focus-visible,
.upvote-btn:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Form field focus */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-color: var(--primary-color);
}

/* Link focus */
a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Ensure sufficient color contrast */
.text-muted {
    color: #5a6c7d; /* WCAG AA compliant */
}

/* Error states with icons */
.error-message::before {
    content: "⚠️ ";
}

.success-message::before {
    content: "✓ ";
}

/* Status indicators */
.status-active::before {
    content: "●";
    color: var(--success-color);
    margin-right: 0.5rem;
}

.status-inactive::before {
    content: "●";
    color: #999;
    margin-right: 0.5rem;
}

/* ============================================================================
   Navigation Menu - Responsive with Hamburger
   ============================================================================ */

.nav-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.nav-brand h1 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
}

.nav-brand .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.9;
}

.nav-link:focus-visible {
    outline: 3px solid white;
    outline-offset: 2px;
}

.nav-link.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.nav-link.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hamburger Menu Button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger-btn:focus-visible {
    outline: 3px solid white;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 20px 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        margin-bottom: 8px;
    }

    /* Close button in mobile menu */
    .nav-menu::before {
        content: '✕';
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 2rem;
        color: white;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
    }

    .nav-menu::before:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-overlay.open {
        display: block;
    }
}

/* Ensure proper spacing for content below nav */
main {
    margin-top: 20px;
}

/* Question Tabs (for flagged questions review) */
.question-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(52, 152, 219, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-badge {
    display: inline-block;
    background: #e0e0e0;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 6px;
}

.tab-badge.warning {
    background: #ff9800;
    color: white;
}

.tab-content {
    display: none;
}

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

/* Flagged Question Styling */
.question-card.flagged {
    border-left: 4px solid #ff9800;
    background: #fff9f0;
}

.question-card.flagged.rejected {
    border-left: 4px solid #e74c3c;
    background: #fdf0f0;
}

.flagged-badge {
    display: inline-block;
    background: #ff9800;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 8px;
}

.status-badge.flagged {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================================================
   Admin Dashboard Badges
   ============================================================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-active {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-ended {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-placeholder {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.moderation-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.btn-approve {
    background: var(--success-color);
    color: white;
}

.btn-approve:hover:not(:disabled) {
    background: #27ae60;
}

.btn-approve:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

.btn-reject {
    background: #e74c3c;
    color: white;
}

.btn-reject:hover:not(:disabled) {
    background: #c0392b;
}

.btn-reject:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* ============================================================================
   Admin Dashboard Stats Cards
   ============================================================================ */
.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

/* ============================================================================
   Modal Improvements for Instructor Details
   ============================================================================ */

/* Ensure modals scroll on small screens */
.modal {
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    margin: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close modal when clicking outside */
.modal.active {
    cursor: pointer;
}

.modal.active .modal-content {
    cursor: default;
}

/* Mobile responsiveness for modals */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: 95% !important;
        padding: 20px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* Password Toggle Styles */
.password-field {
    position: relative;
    display: inline-block;
    width: 100%;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: color 0.2s;
    z-index: 2;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary-color);
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 45px !important;
}

/* Icons using Unicode characters */
.password-toggle .eye-open::before {
    content: "👁";
}

.password-toggle .eye-closed::before {
    content: "🙈";
}
