/* Reset a základní styly */
* {
    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;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 0;
    min-height: 100vh;
    overflow: hidden;
}

/* Hlavička */
.main-header {
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    color: white;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.main-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.main-header p {
    opacity: 0.9;
    font-size: 1.1em;
}

/* Navigace */
.navigation {
    background: #f8f9fa;
    padding: 0;
    display: flex;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
}

.nav-btn {
    background: none;
    border: none;
    padding: 20px 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-weight: 500;
}

.nav-btn:hover {
    background: #e9ecef;
    color: #2196F3;
}

.nav-btn.active {
    background: white;
    color: #2196F3;
    border-bottom-color: #2196F3;
}

/* Sekce obsahu */
.content-section {
    display: none;
    padding: 30px;
    min-height: 600px;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 10px;
}

.section-header p {
    color: #666;
    font-size: 1.1em;
}

/* Karty */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #2196F3;
}

.card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Upload oblasti */
.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #2196F3;
    background: #f0f8ff;
}

.file-upload-area.inline {
    padding: 15px;
    display: inline-block;
    margin: 0 10px;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.7;
}

.file-upload-area p {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.file-upload-area small {
    color: #666;
    font-style: italic;
}

/* Status zprávy */
.upload-status {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.upload-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.upload-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.upload-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Tlačítka */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

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

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

.btn-large {
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 30px;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-buttons {
    text-align: center;
    margin: 30px 0;
}

/* Tabulky */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.data-table th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

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

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

.data-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Toolbar */
.toolbar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    min-width: 150px;
}

/* Status panel */
.status-panel {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #2196F3;
}

.status-panel.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.status-panel.error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.status-panel.info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Import panel */
.student-import-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

.import-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.import-controls select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    min-width: 150px;
}

/* Generátor rozpisů */
.schedule-generator {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.generator-controls h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.control-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.control-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.control-item input, .control-item select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1em;
}

.control-item input:focus, .control-item select:focus {
    outline: none;
    border-color: #2196F3;
}

/* Progress bar */
.progress-panel {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.progress-text {
    font-weight: 500;
    color: #666;
}

/* Schedule display */
.schedule-display {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.schedule-display h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.schedule-day {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #fafafa;
}

.schedule-day h4 {
    color: #2196F3;
    margin-bottom: 15px;
    font-size: 1.3em;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.schedule-table th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #ddd;
    font-size: 0.9em;
}

.schedule-table td {
    padding: 10px 6px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 0.85em;
}

.schedule-table .student-name {
    background: #f8f9fa;
    font-weight: 600;
    text-align: left;
    padding-left: 12px;
    min-width: 150px;
}

.exam-slot {
    background: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
}

.preparation-slot {
    background: #fff3e0;
    font-style: italic;
    color: #f57c00;
}

.break-slot {
    background: #f1f8e9;
    color: #689f38;
}

.unavailable {
    background: #ffebee;
    color: #c62828;
}

/* Export karty */
.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.export-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.export-card:hover {
    transform: translateY(-5px);
    border-color: #2196F3;
}

.export-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.export-card p {
    color: #666;
    margin-bottom: 20px;
}

/* Modal dialogy */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(45deg, #2196F3, #21CBF3);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3em;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Formuláře v modalu */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
}

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

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Badges a indikátory */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Utility třídy */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Responzivní design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 20px;
    }
    
    .main-header h1 {
        font-size: 2em;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .control-grid {
        grid-template-columns: 1fr;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
    
    .navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }
    
    .nav-btn.active {
        border-left-color: #2196F3;
        border-bottom-color: transparent;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar select {
        min-width: auto;
    }
    
    .import-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .data-table {
        font-size: 0.9em;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
    
    .schedule-table {
        font-size: 0.8em;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 6px 4px;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .modal {
        width: 95%;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .btn-large {
        padding: 12px 30px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 15px;
    }
    
    .main-header h1 {
        font-size: 1.8em;
    }
    
    .content-section {
        padding: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .file-upload-area {
        padding: 20px;
    }
    
    .upload-icon {
        font-size: 2em;
    }
    
    .data-table {
        font-size: 0.8em;
    }
    
    .schedule-table {
        font-size: 0.7em;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85em;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px;
    }
}

/* Print styly */
/* Nové styly pro upravené rozhraní */

/* Import sequence info */
.import-sequence-info {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid #2196F3;
}

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

.import-sequence-info ol {
    margin: 15px 0;
    padding-left: 20px;
}

.import-sequence-info ol li {
    margin-bottom: 8px;
    font-weight: 500;
}

.warning-box {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    color: #e65100;
    font-weight: 600;
}

/* Priority cards */
.card.priority-1 {
    border-left: 5px solid #4caf50;
    position: relative;
}

.card.priority-2 {
    border-left: 5px solid #ff9800;
    position: relative;
}

.card.priority-3 {
    border-left: 5px solid #2196f3;
    position: relative;
}

.card.priority-4 {
    border-left: 5px solid #9c27b0;
    position: relative;
}

.step-number {
    position: absolute;
    top: -10px;
    left: -10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

/* Student import section */
.student-import-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.class-selector {
    margin-bottom: 15px;
}

.class-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.class-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
}

.pup-explanation, .subject-logic-explanation {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid #17a2b8;
}

.pup-explanation h4, .subject-logic-explanation h4 {
    color: #17a2b8;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.pup-explanation ul, .subject-logic-explanation ul {
    margin: 0;
    padding-left: 20px;
}

.pup-explanation li, .subject-logic-explanation li {
    margin-bottom: 5px;
}

.import-btn {
    width: 100%;
    margin-top: 15px;
    padding: 15px;
    font-size: 1.1em;
    border-radius: 10px;
}

/* Data consistency panel */
.data-consistency-panel {
    background: linear-gradient(135deg, #fff3e0, #f3e5f5);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    border-left: 5px solid #ff9800;
}

.data-consistency-panel h3 {
    color: #f57c00;
    margin-bottom: 15px;
}

.consistency-results {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    min-height: 60px;
}

.consistency-results.error {
    border-left: 4px solid #f44336;
    background: #ffebee;
}

.consistency-results.success {
    border-left: 4px solid #4caf50;
    background: #e8f5e8;
}

.consistency-results.warning {
    border-left: 4px solid #ff9800;
    background: #fff3e0;
}

/* Validation info */
.validation-info {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9em;
}

.validation-info.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.validation-info.success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.validation-info.warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left: 4px solid #ff9800;
}

/* Maturity type selector */
.maturity-type-selector {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
}

.maturity-type-selector h4 {
    color: #333;
    margin-bottom: 15px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.radio-label:hover {
    border-color: #2196F3;
    background: #f0f8ff;
}

.radio-label input[type="radio"] {
    margin: 0;
}

.radio-label input[type="radio"]:checked + span,
.radio-label:has(input[type="radio"]:checked) {
    color: #2196F3;
    border-color: #2196F3;
    background: #f0f8ff;
}

/* Enhanced tables */
.data-table tbody tr td:first-child {
    font-weight: 600;
    color: #2196F3;
}

.data-table .pup-column {
    text-align: center;
    font-weight: 600;
}

.data-table .pup-20 {
    background: #fff3e0;
    color: #ef6c00;
}

.data-table .pup-30 {
    background: #ffebee;
    color: #d32f2f;
}

.data-table .subjects-column {
    font-family: monospace;
    font-size: 0.9em;
}

.data-table .chairman-missing {
    background: #ffebee;
    color: #c62828;
    font-weight: 600;
}

.data-table .chairman-ok {
    background: #e8f5e8;
    color: #2e7d32;
}

/* Responsive updates */
@media (max-width: 768px) {
    .import-sequence-info {
        padding: 20px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }
    
    .radio-group {
        gap: 8px;
    }
    
    .radio-label {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .pup-explanation, .subject-logic-explanation {
        padding: 12px;
        margin: 10px 0;
    }
    
    .data-consistency-panel {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .import-sequence-info ol {
        padding-left: 15px;
    }
    
    .import-sequence-info ol li {
        font-size: 0.9em;
    }
    
    .step-number {
        width: 25px;
        height: 25px;
        font-size: 0.9em;
        top: -8px;
        left: -8px;
    }
}

@media (max-width: 600px) {
    .main-header {
        padding: 10px;
    }
    .main-header h1 {
        font-size: 1.3em;
    }
    .content-section {
        padding: 10px;
    }
    .card-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .export-options {
        grid-template-columns: 1fr;
    }
    .schedule-table, .data-table {
        font-size: 0.75em;
    }
    .schedule-table th, .schedule-table td, .data-table th, .data-table td {
        padding: 4px 2px;
    }
    .nav-btn {
        font-size: 1em;
        padding: 12px 10px;
        min-width: 100%;
    }
    .export-card, .card {
        padding: 10px;
    }
    .student-import-section {
        padding: 10px;
    }
    .btn, .btn-primary, .btn-secondary, .btn-danger {
        font-size: 1em;
        padding: 10px 8px;
        min-width: 100%;
        margin-bottom: 5px;
    }
    .export-card ul {
        font-size: 0.95em;
    }
}