/* Глобальные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand h1 {
    font-size: 1.5em;
    color: #667eea;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: #667eea;
    color: white;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 300px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    top: 100%;
    left: 0;
    margin-top: 5px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-radius: 0;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: #667eea;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Основной контент */
main {
    background: white;
    margin: 30px auto;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    min-height: 70vh;
}

/* Заголовки страниц */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.page-header h2 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

/* Статистика */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1em;
    opacity: 0.9;
}

.stat-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Панели управления */
.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.control-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.control-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
}

/* Формы */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Кнопки */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Фильтры */
.filter-panel {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #e0e0e0;
}

.filter-panel h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Таблицы */
.table-container {
    margin: 30px 0;
}

.table-container h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

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

.data-table tbody tr.with-consent {
    background-color: #e8f5e9;
}

.data-table tbody tr.enrolled {
    background-color: #c8e6c9;
    font-weight: 600;
}

/* Бейджи */
.program-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: white;
}

.program-pm { background: #667eea; }
.program-ivt { background: #11998e; }
.program-itss { background: #f093fb; }
.program-ib { background: #ff6b6b; }

.priority-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50%;
    font-weight: 700;
    color: white;
    width: 35px;
    height: 35px;
    text-align: center;
    line-height: 25px;
}

.priority-1 { background: #4caf50; }
.priority-2 { background: #2196f3; }
.priority-3 { background: #ff9800; }
.priority-4 { background: #f44336; }

.consent-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.consent-yes {
    background: #4caf50;
    color: white;
}

.consent-no {
    background: #e0e0e0;
    color: #666;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-enrolled {
    background: #4caf50;
    color: white;
}

.status-waiting {
    background: #ff9800;
    color: white;
}

.status-not-enrolled {
    background: #e0e0e0;
    color: #666;
}

/* Информационные панели */
.info-panel {
    background: #e3f2fd;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    border-left: 5px solid #2196f3;
}

.info-panel h3 {
    color: #1976d2;
    margin-bottom: 15px;
}

.info-panel ul {
    list-style-position: inside;
}

.info-panel li {
    margin: 8px 0;
    color: #555;
}

.highlight {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 15px 0;
}

.highlight.warning {
    background: #f8d7da;
    border-left-color: #f44336;
}

/* Уведомления */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    transition: opacity 0.3s ease;
}

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

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.close-alert {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.close-alert:hover {
    opacity: 1;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

/* Кнопки действий */
.action-buttons {
    margin-top: 30px;
    text-align: center;
}

/* Панель информации о программе */
.program-info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .nav-menu a {
        text-align: center;
    }

    .page-header h2 {
        font-size: 1.8em;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 2em;
    }

    .control-panel {
        grid-template-columns: 1fr;
    }

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

    main {
        padding: 20px;
        margin: 15px;
    }

    .data-table {
        font-size: 0.85em;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}
