* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #f5f7fb;
    color: #1f2933;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    width: 220px;
    background: #111827;
    color: white;
    padding: 20px;
}

.logo {
    margin-bottom: 30px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar a {
    color: #cbd5f5;
    text-decoration: none;
    padding: 8px;
    border-radius: 8px;
}

.sidebar a:hover {
    background: #1f2937;
    color: white;
}

/* Main */

.main {
    flex: 1;
    padding: 20px 30px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    gap: 10px;
}

/* Buttons */

.btn {
    background: #e5e7eb;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.btn.primary {
    background: #2563eb;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

/* Cards */

.card {
    background: white;
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

/* Stats */

.stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.stat {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 12px;
    flex: 1;
}

/* Table */

.table-actions {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

input, select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
}

/* Badges */

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.badge.yes {
    background: #dcfce7;
    color: #166534;
}

.badge.no {
    background: #fee2e2;
    color: #991b1b;
}

.btn-download {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    margin: 5px;
}

.btn-download:hover {
    opacity: 0.9;
}

.report-list {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.report-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 8px;
}

.report-item a.btn-download {
    margin-left: 10px;
}

/* Стиль для select файлов */
select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: white;
    color: #1f2933;
    cursor: pointer;
}

label {
    margin-right: 10px;
    font-weight: 500;
}


/* Селект для выбора CSV */
select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    background: white;
    color: #1f2933;
    cursor: pointer;
}

label {
    margin-right: 10px;
    font-weight: 500;
}

/* Скрываем стандартный input */
input[type="file"] {
    display: none;
}

/* Контейнер для кастомной кнопки */
.file-upload-wrapper {
    display: inline-block;
    position: relative;
}

/* Кастомная кнопка */
.file-upload-btn {
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    transition: 0.2s;
}

.file-upload-btn:hover {
    background: #1e40af;
}

/* Отображаем выбранный файл */
.file-upload-text {
    margin-left: 10px;
    font-size: 14px;
    color: #1f2933;
}

/* Кнопка рассчитать баллы */
.btn-calc {
    background: #10b981; /* зеленый, чтобы отличать от загрузки */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-calc:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Всплывающее уведомление результатов */
.flash-message {
    position: relative; /* внутри карточки под кнопкой */
    background: #d1fae5;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 15px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

/* Список результатов */
.flash-message ul {
    margin: 0;
    padding-left: 20px;
}

/* Кнопка закрытия */
.flash-message button.close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: #065f46;
}

/* Анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 15px;
    position: relative;
}

.flash-message ul {
    margin: 0;
    padding-left: 20px;
}

.flash-message li {
    list-style: disc;
    margin-bottom: 5px;
    font-weight: 500;
}
.flash-message button.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    color: #065f46;
}

.flash-message li.success {
    color: #155724;
}

.flash-message li.error {
    color: #721c24;
}

.flash-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.flash-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}
