/* Admin Panel Styles */

:root {
    --primary-color: #2196F3;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #f44336;
    --dark-bg: #1e1e2e;
    --sidebar-bg: #282838;
    --content-bg: #f5f5f5;
    --card-bg: #ffffff;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #ddd;
    --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, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--content-bg);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

.admin-info {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

.nav-link i {
    width: 24px;
    margin-right: 12px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer button,
.sidebar-footer a {
    display: block;
    width: 100%;
    margin-bottom: 8px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 32px;
    max-width: 1400px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover {
    background: #1976D2;
}

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

.btn-secondary:hover {
    background: #616161;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

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

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

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

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-content h3 {
    font-size: 28px;
    margin-bottom: 4px;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

/* Test Results Card */
.test-results-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.test-results-card h3 {
    margin-bottom: 16px;
}

.test-result-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

/* Pending Reviews Widget */
.pending-reviews-widget {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 24px;
    overflow: hidden;
}

.pending-reviews-widget .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to right, #f8f9fa, #fff);
}

.pending-reviews-widget .widget-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.pending-reviews-widget .widget-header h2 i {
    color: var(--primary-color);
}

.count-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-link:hover {
    background: rgba(33, 150, 243, 0.1);
}

.pending-reviews-list {
    padding: 16px;
}

.pending-review-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-left: 4px solid var(--warning-color);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pending-review-card:hover {
    border-left-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(2px);
}

.pending-review-card:last-child {
    margin-bottom: 0;
}

.pending-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.pending-review-sentence {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    margin-right: 12px;
}

.pending-review-score {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}

.pending-review-score.score-low {
    background: #ffebee;
    color: #c62828;
}

.pending-review-score.score-mid {
    background: #fff3e0;
    color: #ef6c00;
}

.pending-review-score.score-high {
    background: #e8f5e9;
    color: #2e7d32;
}

.pending-review-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.pending-review-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pending-review-meta i {
    font-size: 12px;
}

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

.pending-reviews-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Filters */
.filters {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

/* Table */
.table-container {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

.data-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
}

.data-table th {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

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

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

.data-table .loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-sentence {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-word {
    background: #f3e5f5;
    color: #7b1fa2;
}

.badge-success {
    background: #e8f5e9;
    color: #388e3c;
}

.badge-fail {
    background: #ffebee;
    color: #d32f2f;
}

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

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.action-btn-edit {
    background: #2196F3;
    color: white;
}

.action-btn-edit:hover {
    background: #1976D2;
}

.action-btn-delete {
    background: #f44336;
    color: white;
}

.action-btn-delete:hover {
    background: #d32f2f;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

#page-info {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Test Progress */
.test-progress {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
    width: 0%;
}

#test-progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Test Summary */
.test-summary,
.test-history {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.test-summary h3,
.test-history h3 {
    margin-bottom: 16px;
}

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

.test-metric {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.test-metric-value {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 4px;
}

.test-metric-label {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.failure-item {
    padding: 12px;
    background: #fff3e0;
    border-left: 3px solid var(--warning-color);
    border-radius: 4px;
    margin-bottom: 8px;
}

.failure-item strong {
    display: block;
    margin-bottom: 4px;
}

.failure-item code {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* Settings */
.settings-grid {
    display: grid;
    gap: 20px;
}

.setting-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.setting-card h4 {
    margin-bottom: 8px;
}

.setting-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Import Sections */
.import-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.import-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.import-card h3 {
    margin-bottom: 8px;
}

.import-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

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

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

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.import-results {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #323232;
    color: white;
    padding: 16px 24px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
    max-width: 400px;
}

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

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

.toast.error {
    background: var(--danger-color);
}

/* Utilities */
.text-muted {
    color: var(--text-secondary);
}

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

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.button-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ==================== Code Editor ==================== */

.editor-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.editor-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.editor-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-help {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-size: 14px;
}

.editor-help p {
    margin: 4px 0;
}

.editor-help code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d32f2f;
}

.code-editor {
    width: 100%;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    resize: vertical;
    min-height: 300px;
}

.code-editor:focus {
    outline: none;
    border-color: #2196F3;
    background: white;
}

.editor-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 14px;
    color: #666;
}

.modified-indicator {
    color: #ff9800;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modified-indicator i {
    font-size: 8px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Editor Test Section */
.editor-test-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.test-status {
    padding: 12px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
}

.test-status.pass {
    background: #c8e6c9;
    color: #2e7d32;
    border: 2px solid #4caf50;
}

.test-status.fail {
    background: #ffcdd2;
    color: #c62828;
    border: 2px solid #f44336;
}

/* Quick Reference */
.quick-reference {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quick-reference h4 {
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.reference-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.reference-section h5 {
    margin: 0 0 12px 0;
    color: #2196F3;
    font-size: 16px;
}

.reference-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reference-section li {
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
}

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

.reference-section code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #d32f2f;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-260px);
    }

    .main-content {
        margin-left: 0;
    }

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

    .import-sections {
        grid-template-columns: 1fr;
    }

    .editor-container {
        grid-template-columns: 1fr;
    }

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

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

/* ============================================================================
   ACTIVITY LOG PAGE
   ============================================================================ */

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

.activity-stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.activity-stat-card i {
    font-size: 32px;
    color: var(--primary-color);
}

.activity-stat-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.activity-stat-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Filters */
.activity-filters {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.activity-filters .filter-input {
    flex: 1;
    min-width: 250px;
}

/* Timeline Container */
.activity-timeline {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 24px;
    min-height: 400px;
}

/* Event Cards */
.activity-event {
    position: relative;
    padding-left: 40px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-left: 2px solid #e0e0e0;
}

.activity-event:last-child {
    border-left-color: transparent;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Timeline Dot */
.activity-event::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Time Badge */
.activity-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.activity-time i {
    font-size: 11px;
}

/* Event Card */
.activity-card {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    border: 1px solid #e8e8e8;
    transition: all 0.2s;
}

.activity-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

/* Conversion Display */
.activity-conversion {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.activity-conversion .arrow {
    color: var(--primary-color);
    margin: 0 8px;
}

.activity-conversion .english {
    color: #333;
}

.activity-conversion .romanian {
    color: var(--primary-color);
    font-weight: 600;
}

/* Metadata Row */
.activity-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-secondary);
}

.activity-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-meta i {
    font-size: 12px;
    opacity: 0.7;
}

.activity-meta .user-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.activity-meta .anon-badge {
    background: #999;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Loading Indicator */
.activity-loading {
    text-align: center;
    padding: 32px;
    color: var(--text-light);
}

.activity-loading i {
    font-size: 32px;
    margin-bottom: 12px;
}

/* Empty State */
.activity-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.activity-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.activity-empty h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .activity-stats {
        grid-template-columns: 1fr;
    }

    .activity-filters {
        flex-direction: column;
    }

    .activity-filters .filter-input {
        width: 100%;
    }

    .activity-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================================================
   UNIFIED ACTIVITY LOG - Click-to-Edit & Status Badges
   ============================================================================ */

/* Clickable Activity Cards */
.activity-event {
    cursor: pointer;
    transition: all 0.2s ease;
}

.activity-event:hover {
    transform: translateX(4px);
}

.activity-event:hover .activity-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-color);
}

/* Status-based Card Styling */
.activity-event.reviewed-reviewed {
    opacity: 0.85;
}

.activity-event.reviewed-reviewed .activity-card {
    border-left: 4px solid #10b981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent);
}

.activity-event.reviewed-needs_review .activity-card {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent);
}

.activity-event.reviewed-has_errors .activity-card {
    border-left: 4px solid #ef4444;
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.reviewed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.needs-review {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-badge.has-errors {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-badge i {
    font-size: 12px;
}

/* Confidence Score Display */
.confidence-score {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 12px;
}

.confidence-score.confidence-high {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.confidence-score.confidence-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.confidence-score.confidence-low {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Activity Conversion - Add flex layout for score */
.activity-conversion {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.activity-conversion .english,
.activity-conversion .romanian {
    flex-shrink: 1;
}

.activity-conversion .arrow {
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .confidence-score {
        margin-left: 0;
        margin-top: 8px;
    }

    .activity-conversion {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================================
   STATUS FILTERS & BULK ACTIONS
   ============================================================================ */

/* Status Filter Buttons */
.activity-status-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-filter-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.status-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.status-filter-btn[data-status="reviewed"].active {
    background: #10b981;
    border-color: #10b981;
}

.status-filter-btn[data-status="needs_review"].active {
    background: #f59e0b;
    border-color: #f59e0b;
}

.status-filter-btn[data-status="has_errors"].active {
    background: #ef4444;
    border-color: #ef4444;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.bulk-actions-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bulk-actions-left span {
    font-weight: 700;
    font-size: 16px;
}

.bulk-actions-left .btn-link {
    color: white;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.bulk-actions-left .btn-link:hover {
    opacity: 1;
}

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

.bulk-actions-right button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bulk-actions-right .btn-success {
    background: #10b981;
    color: white;
}

.bulk-actions-right .btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.bulk-actions-right .btn-warning {
    background: #f59e0b;
    color: white;
}

.bulk-actions-right .btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
}

/* Bulk Selection Checkbox */
.bulk-select-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
}

.activity-event {
    position: relative;
}

.activity-event.bulk-mode {
    padding-left: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .activity-status-filters {
        flex-direction: column;
    }

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

    .bulk-actions-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .bulk-actions-left,
    .bulk-actions-right {
        flex-direction: column;
    }
}

/* ============================================================================
   ACTIVITY STATS WIDGET
   ============================================================================ */

.activity-stats-widget {
    padding: 16px 0;
}

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

.activity-stats-grid .stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.activity-stats-grid .stat-item i {
    font-size: 24px;
    color: var(--primary-color);
}

.activity-stats-grid .stat-item h3 {
    margin: 0;
    font-size: 24px;
    color: var(--text-primary);
}

.activity-stats-grid .stat-item p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Review Progress Bar */
.review-progress {
    margin-bottom: 24px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-percentage {
    color: var(--primary-color);
}

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

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.high {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-fill.medium {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-fill.low {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Top Phrases Section */
.top-phrases-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.top-phrases-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-phrase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.phrase-text {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.phrase-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .activity-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== BULK CONVERT ==================== */

.bulk-convert-container {
    max-width: 900px;
    margin: 0 auto;
}

.bulk-convert-input-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.bulk-input-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--text-primary);
}

.bulk-input-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.bulk-input-help {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary-color);
}

.bulk-input-help p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.bulk-input-help code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
}

.bulk-json-textarea {
    width: 100%;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    min-height: 200px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bulk-json-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    background: white;
}

.bulk-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
}

.bulk-input-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.json-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.json-status.valid {
    color: var(--success-color);
}

.json-status.invalid {
    color: var(--danger-color);
}

.json-status.warning {
    color: var(--warning-color);
}

.sentence-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.bulk-input-options {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
}

/* Progress Section */
.bulk-progress-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
}

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

.bulk-progress-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--text-primary);
}

.bulk-progress-bar {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.bulk-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #64b5f6);
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Results Section */
.bulk-results-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.bulk-results-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--success-color);
}

.bulk-results-stats {
    display: flex;
    gap: 20px;
}

.stat-success {
    color: var(--success-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-failed {
    color: var(--danger-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bulk-results-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.bulk-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.bulk-result-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.bulk-result-item.result-success {
    border-left: 4px solid var(--success-color);
}

.bulk-result-item.result-error {
    border-left: 4px solid var(--danger-color);
    background: #fff5f5;
}

.result-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.result-error .result-number {
    background: var(--danger-color);
}

.result-content {
    flex: 1;
    min-width: 0;
}

.result-original {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-wrap: break-word;
}

.result-arrow {
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 8px;
}

.result-converted {
    font-size: 14px;
    color: var(--success-color);
    font-weight: 500;
    word-wrap: break-word;
}

.result-error-msg {
    color: var(--danger-color);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-status {
    flex-shrink: 0;
}

.result-status i {
    font-size: 20px;
}

.result-success .result-status i {
    color: var(--success-color);
}

.result-error .result-status i {
    color: var(--danger-color);
}

/* Responsive for bulk convert */
@media (max-width: 768px) {
    .bulk-input-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .bulk-input-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

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

    .bulk-results-actions {
        flex-direction: column;
    }

    .bulk-results-actions button {
        width: 100%;
    }
}
