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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    height: 100vh;
}

.app {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #1e2b3c;
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #2c3e50;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    color: #ffffff;
}

.sidebar-nav {
    padding: 20px 0;
    flex: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #b0c4de;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #2c3e50;
    color: #fff;
}

.nav-btn.active {
    background: #3498db;
    color: #fff;
    border-left: 4px solid #fff;
}

.nav-btn .icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Main content */
.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #fff;
}

.tab {
    display: none;
}

.tab.active {
    display: block;
}

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

h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    gap: 10px;
}

/* Upload area */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 30px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #3498db;
    background: #f0f7ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #7f8c8d;
}

.btn-link {
    background: none;
    border: none;
    color: #3498db;
    text-decoration: underline;
    cursor: pointer;
    font-size: 1rem;
}

.small {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 10px;
}

.queue-info, .progress-area {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 15px 0;
    padding: 10px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.file-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

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

.btn-primary {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

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

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-danger {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

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

.progress-bar {
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: #3498db;
    transition: width 0.3s;
}

/* Filters */
.filters {
    margin-bottom: 20px;
}

select {
    padding: 8px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    width: 200px;
}

/* Table */
.table-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

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

th {
    background: #f2f4f6;
    padding: 12px;
    text-align: left;
    font-weight: 500;
    color: #2c3e50;
}

td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

tr:hover {
    background: #f9f9f9;
}

.badge-good {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
}

.badge-bad {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    margin: 0 2px;
    border-radius: 5px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #ecf0f1;
}

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

.page-btn {
    padding: 5px 10px;
    border: 1px solid #bdc3c7;
    background: #fff;
    cursor: pointer;
    border-radius: 3px;
    min-width: 35px;
}

.page-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

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

.stat-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-card .label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}
.uncertain-row {
    background-color: #fff3e0 !important; /* оранжевый оттенок */
}

.btn-feedback {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 4px;
    transition: background 0.2s;
}
.btn-feedback:hover {
    background: #f0f0f0;
}
.btn-feedback.active {
    background-color: #4caf50;
    color: white;
}
.feedback-status {
    font-size: 1.2rem;
    margin-left: 8px;
}


/* Responsive */
@media (max-width: 768px) {
    .app {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
    }
    .sidebar-nav {
        display: flex;
        padding: 10px;
    }
    .nav-btn {
        flex: 1;
        justify-content: center;
        padding: 10px;
    }
    .nav-btn .icon {
        margin-right: 5px;
    }
    .content {
        padding: 15px;
    }
}