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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.program-title {
    font-size: 1.2rem;
    opacity: 0.9;
}

.main-layout {
    display: flex;
    gap: 30px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.sidebar ul {
    list-style: none;
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar li {
    margin-bottom: 5px;
}

.sidebar a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar a:hover {
    background: #667eea;
    color: white;
}

.program-selector {
    margin-bottom: 15px;
    padding: 10px;
}

.program-link {
    display: block;
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
}

.program-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

/* Programs page */
.programs-section {
    margin-bottom: 30px;
}

.programs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.program-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.program-card.active {
    background: #e8f4f8;
    border-left-color: #28a745;
}

.program-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.program-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

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

.empty-message {
    padding: 20px;
    text-align: center;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
}

.content {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h2 {
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

h3 {
    color: #444;
    margin: 20px 0 15px;
}

/* Flash messages */
.flash {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

/* Info cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.info-card h3 {
    margin-top: 0;
    color: #667eea;
}

.stats {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

/* Forms */
.form {
    max-width: 800px;
}

.form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    margin-top: 20px;
}

/* Buttons */
.btn-primary {
    background: #667eea;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

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

.btn-edit {
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-edit:hover {
    background: #218838;
}

.btn-small {
    background: #6c757d;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.8rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #667eea;
    color: white;
}

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

/* Curriculum */
.section-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

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

.section-header h3 {
    margin: 0;
    color: #333;
}

.section-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.topics-list {
    background: white;
    border-radius: 8px;
    padding: 15px;
}

.topics-list h4 {
    margin-bottom: 10px;
    color: #667eea;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

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

.topic-number {
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
}

.topic-title {
    flex: 1;
}

.topic-hours {
    color: #666;
    font-size: 0.9rem;
}

/* Competencies */
.competence-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #28a745;
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comp-header h3 {
    margin: 0;
    color: #667eea;
}

.comp-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

/* Literature */
.lit-section {
    margin-bottom: 25px;
}

.lit-section h3 {
    color: #667eea;
}

.lit-list {
    list-style: none;
    padding-left: 0;
}

.lit-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* Final work */
.final-exam-card,
.final-work-card {
    background: #e8f4f8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #17a2b8;
}

.info-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Summary */
.summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.summary h3 {
    color: white;
}

/* Questions */
.questions-list {
    padding-left: 20px;
}

.questions-list li {
    padding: 5px 0;
}

/* Lab works */
.lab-card {
    background: #fff3cd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
}

.lab-card h4 {
    color: #856404;
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
    }
}
