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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    height: 100vh;
}

/* Navigation Styles */
.navbar {
    background-color: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.logo {
    color: #ecf0f1;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #34495e;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #34495e;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    color: #ecf0f1;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid #2c3e50;
    transition: background-color 0.3s;
}

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

.dropdown-item:hover {
    background-color: #2c3e50;
}

.papers-table .btn-group {
    display: inline-block;
    margin: 2px;
}

.papers-table .dropdown-menu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    z-index: 1000;
}

.papers-table .btn-group:hover .dropdown-menu {
    display: block;
}

.papers-table .dropdown-item {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    color: black;
}

.papers-table .dropdown-item:hover {
    background-color: #f5f5f5;
}

.papers-table .score-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.papers-table .score-complete {
    background-color: #28a745;
}

.papers-table .score-incomplete {
    background-color: #dc3545;
}

.papers-table .score-partial {
    background-color: #ffc107;
}


.user-info {
    color: #ecf0f1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.role-badge {
    background-color: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.role-badge.admin {
    background-color: #e74c3c;
}

.role-badge.reviewer {
    background-color: #f39c12;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Header Styles */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3vw;
    margin-right: 3vw;
}

.home-btn {
    background: #3498db;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.home-btn:hover {
    background: #2980b9;
    text-decoration: none;
    color: white;
}

.annotator-info {
    text-align: left;
}

.annotator-name {
    font-weight: bold;
    font-size: 16px;
    color: #ecf0f1;
}

.annotation-count {
    font-size: 12px;
    color: #bdc3c7;
    margin-top: 2px;
}

.problem-info {
    flex: 1;
}

.problem-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.problem-meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

.view-toggle {
    display: flex;
    background-color: #34495e;
    border-radius: 6px;
    padding: 0.25rem;
}

.toggle-btn {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-btn.active {
    background-color: #3498db;
}

/* Layout Styles */
.main-container {
    display: flex;
    height: calc(100vh - 100px);
}

.content-area {
    flex: 1;
    position: relative;
    background-color: white;
    margin: 1rem 0 1rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.content-view {
    height: 100%;
    overflow-y: auto;
    padding: 2rem;
}

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

/* Text Content Styles */
.latex-content {
    font-size: 1.0rem;
    line-height: 1.5;
    max-width: 800px;
}

/* PDF Viewer Styles */
.pdf-container {
    width: 100%;
    height: 100%;
    display: none;
}

.pdf-container.active {
    display: block;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Grading Panel Styles */

.grading-panel {
    width: 350px;
    height: calc(100vh - 120px);
    background-color: #ffffff;
    border-left: 1px solid #e9ecef;
    margin: 1rem 1rem 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.llm-highlight-control {
    margin-left: 20px;
    font-size: 14px;
}

.digital-indicator {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    margin: 0 5px;
}

.digital-indicator.digital {
    background-color: #d4edda;
    color: #155724;
}

.digital-indicator.handwritten {
    background-color: #f8d7da;
    color: #721c24;
}

.panel-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.score-display {
    font-size: 1.8rem;
    /* color: #6c757d; */
    font-weight: bold;
    text-align: center;
}

.panel-content {
    flex: 1;
    font-size: 11px;
    padding: 1rem;
    overflow-y: auto;
}

/* Rubric Styles */
.rubric-item {
    background-color: #f8f9fa;
    /* border: 1px solid #000000; */
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.rubric-item.matched {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border: 3px solid #000000;
}


.rubric-header {
    background-color: #e9ecef;
    padding: 0.75rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rubric-item.matched .rubric-header {
    background-color: #d4edda;
    color: #0c0d0c;
}

.decision-indicator {
    font-size: 10px;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    font-weight: bold;
    display: none;
}

.rubric-item.matched .decision-indicator {
    display: inline-block;
}

.decision-ai {
    background-color: #17a2b8;
    color: white;
}

.decision-human {
    background-color: #6f42c1;
    color: white;
}

.rubric-value {
    background-color: #3498db;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.rubric-content {
    padding: 0.75rem;
}

.rubric-description {
    margin-bottom: 1rem;
    color: #6c757d;
    /* font-size: 0.9rem; */
}

.rubric-solution {
    display: block;
    overflow: hidden;
    font-style: italic;
    color: #666;
    margin: 5px 0;
    /* display: none; */
    height: 0;
    transition: 0.5s height;
}

.rubric-description:hover + .rubric-solution {
    /* display: block; */
    height: 3vh;
}

.comment-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    padding: 2px 5px;
}

.comment-btn:hover {
    color: #333;
}

.rubric-comment {
    display: none;
    margin-top: 10px;
}

.rubric-comment.visible {
    display: block;
}

.comment-textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

/* .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #6c757d;
} */

.status-indicator.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-indicator.clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status-indicator.matched {
    background-color: #28a745;
}

.status-indicator.not-matched {
    background-color: #dc3545;
}

.llm-reasoning {
    background-color: #f8f9fa;
    border-left: 3px solid #3498db;
    padding: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-style: italic;
}


.score-input-group {
    margin-bottom: 1rem;
}

.score-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.score-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.feedback-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

/* Button Styles */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-success {
    background-color: #054804;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.katex .highlighted-answer {
    background-color: rgba(255, 0, 0, 0.2) !important;
    border: 2px solid red !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    line-height: 1.8 !important;
    display: inline-block !important;
}

/* Loading Styles */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


.flag-dropdown {
    position: relative;
    display: inline-block;
}

.flag-options {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.flag-options button {
    color: black;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
}

.flag-options button:hover {
    background-color: #f1f1f1;
}

.highlight-dropdown {
   position: relative;
   display: inline-block;
}

.highlight-options {
   display: none;
   position: absolute;
   bottom: 100%;
   left: 0;
   background-color: white;
   min-width: 200px;
   box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
   z-index: 1;
   border: 1px solid #ddd;
   border-radius: 4px;
}

.highlight-options button {
   color: black;
   padding: 8px 16px;
   text-decoration: none;
   display: block;
   width: 100%;
   text-align: left;
   border: none;
   background: none;
   cursor: pointer;
}

.highlight-options button:hover {
   background-color: #f1f1f1;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}


/* CREATE PROJECT */

.project-form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.project-form-container h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    color: #34495e;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.form-actions .btn {
    padding: 0.75rem 1.5rem;
    min-width: 120px;
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-weight: 500;
}

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

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

/* LOGIN PAGE */
body.login {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* PROJECT MENU */

/* Projects Table Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    color: #2c3e50;
    margin: 0;
}

.projects-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.projects-table-container {
    overflow-x: auto;
}

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

.projects-table th,
.projects-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.projects-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.projects-table tbody tr:hover {
    background-color: #f8f9fa;
}

.project-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.project-description {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    min-width: 40px;
}

.progress-details {
    font-size: 0.75rem;
    color: #6c757d;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.text-muted {
    color: #6c757d;
}

/* Stats Page Styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.btn-primary.button-menu {
    max-width: 10vw;
}

.btn-secondary.button-menu {
    max-width: 10vw;
}

.stats-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stats-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

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

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    color: #2c3e50;
}

.annotator-progress-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.annotator-progress-table th,
.annotator-progress-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.annotator-progress-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}


/* Paper Details Page Specific Styles */
.paper-info {
    background-color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.paper-info h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.paper-info p {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paper-info p:last-child {
    border-bottom: none;
}

.paper-info strong {
    color: #2c3e50;
    font-weight: 600;
    min-width: 120px;
}

.no-data {
    background-color: white;
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.no-data p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

.scoring-section {
    background-color: white;
    margin-bottom: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.scoring-section h3 {
    background-color: #f8f9fa;
    color: #2c3e50;
    margin: 0;
    padding: 1.5rem 2rem;
    font-size: 1.3rem;
    border-bottom: 1px solid #e9ecef;
}

.scoring-section > p {
    padding: 1rem 2rem;
    margin: 0;
    color: #6c757d;
    background-color: #fafbfc;
    border-bottom: 1px solid #e9ecef;
}

.scoring-section > p:last-of-type {
    border-bottom: none;
}

.scoring-details {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.human-scoring, .llm-scoring {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.human-scoring h4, .llm-scoring h4 {
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.human-scoring p, .llm-scoring p {
    margin: 0 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.human-scoring p:last-child, .llm-scoring p:last-child {
    border-bottom: none;
}

.llm-score-item {
    background-color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.llm-score-item:last-child {
    margin-bottom: 0;
}

.rubric-scores {
    grid-column: 1 / -1;
    margin-top: 1rem;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.rubric-scores h4 {
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.rubric-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rubric-table th {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.rubric-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.rubric-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

.llm-processing-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.llm-controls {
    margin-bottom: 15px;
}

.llm-controls label {
    margin-left: 15px;
}

.llm-output-container {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
}

#output-text {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
    margin: 0;
}

.llm-stats-refresh {
    margin-top: 10px;
}

#stop-llm-processing {
    margin-left: 10px;
}

.llm-controls label {
    margin-left: 15px;
}

#processing-limit {
    margin-left: 5px;
}



/* The grading tutorial */
.help-btn {
    background: #e1e14d;
    color: rgb(0, 0, 0);
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
}

.tutorial-highlight {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid #4CAF50;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
}

.tutorial-tooltip {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
}

.tutorial-tooltip h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.tutorial-tooltip p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.4;
}

.tutorial-controls {
    text-align: right;
}

.tutorial-controls button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
}

.tutorial-controls button:hover {
    background: #45a049;
}

.tutorial-controls .skip-btn {
    background: #999;
}

.tutorial-controls .skip-btn:hover {
    background: #777;
}


/* Anntoator control interface */

/* ================================
   ANNOTATOR CONTROL PAGE STYLES
   ================================ */

.annotator-control .filter-section {
    background-color: white;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.annotator-control .filter-section label {
    margin-right: 1rem;
    font-weight: 500;
}

.annotator-control .filter-section select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.annotator-control .annotators-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.annotator-control .annotators-table {
    width: 100%;
    border-collapse: collapse;
}

.annotator-control .annotators-table th,
.annotator-control .annotators-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.annotator-control .annotators-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.annotator-control .annotators-table tbody tr:hover {
    background-color: #f8f9fa;
}

.annotator-control .annotator-name {
    font-weight: 600;
    color: #2c3e50;
}

.annotator-control .annotator-institution {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.role-badge.role-annotator {
    background-color: #17a2b8;
}

.role-badge.role-reviewer {
    background-color: #f39c12;
}

.role-badge.role-admin {
    background-color: #e74c3c;
}

.annotator-control .payment-method {
    padding: 0.25rem 0.5rem;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.85rem;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.annotator-control .action-buttons-table {
     display: flex;
    gap: 5px;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.annotators-table th:last-child,
.annotators-table td:last-child {
    width: 200px;
}

.action-buttons-table .btn {
    padding: 4px 8px;
    min-width: auto;
}

/* Annotator Control Dropdown Styles */
.annotator-control .dropdown {
    position: relative;
    display: inline-block;
}

.annotator-control .dropdown-toggle::after {
    content: '';
    margin-left: 0.5rem;
}

.annotator-control .dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.annotator-control .dropdown:hover .dropdown-menu {
    display: block;
}

.annotator-control .dropdown-menu a {
    color: #2c3e50;
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.annotator-control .dropdown-menu a:hover {
    background-color: #f8f9fa;
}

/* Annotator Control Modal Styles */
.annotator-control .modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.annotator-control .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.annotator-control .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.annotator-control .modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.annotator-control .close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.annotator-control .close:hover {
    color: #2c3e50;
}

.annotator-control .modal form {
    padding: 1.5rem;
}

.annotator-control .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.annotator-control .form-group {
    margin-bottom: 1rem;
}

.annotator-control .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.annotator-control .form-group input,
.annotator-control .form-group select,
.annotator-control .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.annotator-control .form-group input:focus,
.annotator-control .form-group select:focus,
.annotator-control .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.annotator-control .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

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

.notification-error {
    background-color: #dc3545;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 1rem;
    padding: 0;
    line-height: 1;
}


/* Side Panels */
.side-panel, .email-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.email-panel { width: 400px; right: -400px; }
.side-panel.active, .email-panel.active { right: 0; }

.side-panel-overlay, .email-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-panel-overlay.active, .email-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-panel-header, .email-panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.close-panel {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.side-panel-content, .email-panel-content { padding: 20px; }

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child { border-bottom: none; }

.form-section h4 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

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

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

.form-group input, .form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    position: relative;
    cursor: pointer;
}

.upload-area:hover { border-color: #007bff; }

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder { color: #666; }
.upload-placeholder i { font-size: 24px; margin-bottom: 10px; display: block; }

.uploaded-file {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
}

.uploaded-file i { margin-right: 8px; color: #666; }
.uploaded-file span { flex: 1; }
.uploaded-file button { background: none; border: none; color: #dc3545; cursor: pointer; font-size: 16px; }

.form-actions {
    padding-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.email-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.email-list a {
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
}

.email-list a:hover {
    background: #e9ecef;
    border-color: #007bff;
    color: #007bff;
}

.payment-method.clickable {
    cursor: pointer;
    text-decoration: underline;
    color: #0066cc;
}

.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.payment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.payment-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.payment-modal-body {
    padding: 20px;
}

.payment-method-display {
    margin-bottom: 20px;
    font-size: 16px;
}

.payment-details-container {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
}

.payment-detail-item {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.payment-detail-label {
    font-weight: bold;
    color: #555;
}

.payment-detail-value {
    color: #333;
    word-break: break-word;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.tabs {
   display: flex;
   border-bottom: 2px solid #e0e0e0;
   margin-bottom: 20px;
}

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

.tab-btn:hover {
   color: #333;
   background-color: #f5f5f5;
}

.tab-btn.active {
   color: #007bff;
   border-bottom-color: #007bff;
   background-color: #fff;
}

.email-history-list {
    max-height: 400px;
    overflow-y: auto;
}

.email-history-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-type {
    font-weight: bold;
    color: #333;
}

.email-details {
    text-align: right;
    font-size: 0.9em;
}

.email-recipient {
    color: #666;
}

.email-date {
    color: #999;
    font-size: 0.8em;
}

.email-status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

