/* ==================================================
   СТИЛИ ДЛЯ АДМИН-ПАНЕЛИ (admin-style.css)
   ================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f4f8;
    color: #1a2a3a;
    line-height: 1.6;
}

/* ---------- Контейнер входа ---------- */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 28px;
}

.login-form .form-group {
    margin-bottom: 20px;
}
.login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s;
}
.login-form input:focus {
    outline: none;
    border-color: #2a7de1;
}

.login-form .btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #2a7de1, #6c5ce7);
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}
.login-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42,125,225,0.3);
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ---------- Админ-контейнер ---------- */
.admin-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 2px solid #e0e8f0;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header h1 {
    font-size: 28px;
}

.admin-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #2a7de1, #6c5ce7);
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42,125,225,0.3);
}

.btn-secondary {
    background: #f5a623;
    color: #fff;
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245,166,35,0.3);
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220,38,38,0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #2a7de1;
    color: #2a7de1;
}
.btn-outline:hover {
    background: #2a7de1;
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Таблица ---------- */
.table-wrapper {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    overflow-x: auto;
    padding: 4px 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    background: #f8fafc;
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #e0e8f0;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: #fafcfe;
}

/* Бейджи статусов */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-тест-пройден { background: #dbeafe; color: #1d4ed8; }
.status-ожидает-оплату-трипваера { background: #fef3c7; color: #b45309; }
.status-оплатил-трипваер { background: #d1fae5; color: #065f46; }
.status-ожидает-оплату-справочника { background: #fef3c7; color: #b45309; }
.status-оплатил-справочник { background: #d1fae5; color: #065f46; }
.status-ожидает-оплату-мк { background: #fef3c7; color: #b45309; }
.status-оплатил-мк { background: #d1fae5; color: #065f46; }

/* Кнопки действий в таблице */
.btn-icon {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    transition: transform 0.2s;
}
.btn-icon:hover {
    transform: scale(1.15);
}

.admin-footer {
    margin-top: 30px;
    text-align: center;
}

/* ---------- Модальные окна (переопределение) ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    padding: 30px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-wide {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4a5a6a;
    transition: color 0.3s;
    line-height: 1;
}
.modal-close:hover {
    color: #1a2a3a;
}

.modal-content h2 {
    margin-bottom: 16px;
    padding-right: 40px;
}

#reportModalBody .report-block {
    margin-bottom: 16px;
}
#reportModalBody .report-block h3 {
    font-size: 16px;
    margin-bottom: 4px;
}
#reportModalBody .report-block ul {
    padding-left: 20px;
}
#reportModalBody .report-block li {
    margin-bottom: 2px;
}

#copyReportBtn {
    margin-top: 12px;
}

/* Форма статуса */
#statusForm .form-group {
    margin-bottom: 16px;
}
#statusForm label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}
#statusForm select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #fafcfe;
}
#statusForm select:focus {
    outline: none;
    border-color: #2a7de1;
}

/* ---------- Адаптивность ---------- */
@media (max-width: 768px) {
    .admin-container {
        padding: 12px;
    }
    .admin-header h1 {
        font-size: 20px;
    }
    .admin-table {
        font-size: 12px;
    }
    .admin-table th,
    .admin-table td {
        padding: 8px 6px;
    }
    .modal-content {
        padding: 20px;
    }
    .login-container {
        margin: 40px 20px;
        padding: 24px;
    }
}