/* Genel Stiller */
* {
    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: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Stilleri */
header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    text-align: center;
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: 700;
}

header h1 i {
    color: #667eea;
    margin-right: 10px;
}

/* Navigasyon Stilleri */
nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.nav-btn.active {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

/* Ana İçerik */
main {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    color: #4a5568;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Buton Stilleri */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(160, 174, 192, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(160, 174, 192, 0.4);
}

/* Tablo Stilleri */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

tr:hover {
    background-color: #f7fafc;
}

tr:last-child td {
    border-bottom: none;
}

/* Form Stilleri */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: #f7fafc;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Filtre Konteyner */
.filter-container {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-container select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

/* Modal Stilleri */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #f56565;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 120px);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    nav {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-container select {
        min-width: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Özel Animasyonlar */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Başarı Mesajı */
.success-message {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

/* Hata Mesajı */
.error-message {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

/* Boş Durum */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e0;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #718096;
}

.empty-state p {
    font-size: 1rem;
    color: #a0aec0;
}

/* PDF Yükleme Alanı */
.upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    background: #f7fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.upload-area.dragover {
    border-color: #48bb78;
    background: #f0fff4;
}

.upload-content i {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 20px;
}

.upload-content h3 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.upload-content p {
    color: #718096;
    margin-bottom: 20px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    text-align: center;
    color: #4a5568;
    font-weight: 600;
}

/* İçe Aktarım Sonuçları */
#importSummary {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #48bb78;
}

#importSummary h4 {
    color: #2d3748;
    margin-bottom: 10px;
}

#importSummary p {
    color: #4a5568;
    margin: 5px 0;
}

/* Başarı/Hata Durumları */
.status-success {
    color: #38a169;
    font-weight: 600;
}

.status-error {
    color: #e53e3e;
    font-weight: 600;
}

.status-warning {
    color: #ed8936;
    font-weight: 600;
}

/* Excel Import Alanı */
.excel-import-area {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.excel-import-area h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.excel-import-area h3 i {
    color: #28a745;
}

.excel-import-area p {
    color: #6c757d;
    margin-bottom: 20px;
}

.excel-import-area textarea {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
    min-height: 200px;
}

.excel-import-area .form-group {
    margin-bottom: 20px;
}

.excel-import-area .form-group:last-of-type {
    margin-bottom: 25px;
}

/* Filtre ve İstatistik Bölümü */
.filter-stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.filter-section h3,
.stats-section h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-section h3 i {
    color: #6c757d;
}

.stats-section h3 i {
    color: #28a745;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-controls .form-group {
    margin-bottom: 0;
}

.filter-controls .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.filter-controls .form-group input,
.filter-controls .form-group select {
    font-size: 14px;
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.filter-controls .form-group input:focus,
.filter-controls .form-group select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* İstatistik Kartları */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .filter-stats-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Silme Onay Modal Stilleri */
.warning-message {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.warning-message i {
    font-size: 2rem;
    color: #dc2626;
    margin-bottom: 10px;
}

.warning-message h4 {
    color: #dc2626;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.warning-message p {
    color: #7f1d1d;
    margin: 5px 0;
}

.delete-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.delete-summary h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
}

.delete-summary-list {
    max-height: 150px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e9ecef;
}

.delete-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.delete-summary-item:last-child {
    border-bottom: none;
}

.delete-summary-item .student-info {
    font-weight: 500;
    color: #495057;
}

.delete-summary-item .student-class {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
}

.confirmation-input {
    margin-bottom: 20px;
}

.confirmation-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.confirmation-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
}

.confirmation-input input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

#confirmDeleteBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#confirmDeleteBtn:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

#confirmDeleteBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* Silme Modal'ları için özel stiller */
#deleteFilteredModal .modal-content,
#deleteAllModal .modal-content {
    max-width: 700px;
    max-height: 85vh;
}

#deleteFilteredModal .modal-body,
#deleteAllModal .modal-body {
    max-height: calc(85vh - 100px);
    padding: 25px;
}

.delete-summary-list {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
    margin-top: 10px;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 80px);
    }
    
    #deleteFilteredModal .modal-content,
    #deleteAllModal .modal-content {
        max-width: none;
        max-height: 95vh;
    }
    
    #deleteFilteredModal .modal-body,
    #deleteAllModal .modal-body {
        max-height: calc(95vh - 80px);
        padding: 15px;
    }
    
    .delete-summary-list {
        max-height: 150px;
    }
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Otomatik Şube Modal Stilleri */
.auto-branch-info {
    background: #f0fff4;
    border: 2px solid #9ae6b4;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.auto-branch-info p {
    margin: 5px 0;
    color: #2d3748;
}

.auto-branch-info strong {
    color: #38a169;
}

.preview-section {
    margin: 20px 0;
}

.preview-section h4 {
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 1rem;
}

.branch-preview {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.branch-preview-item {
    background: #48bb78;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

.branch-preview-item.existing {
    background: #a0aec0;
}

.branch-preview-item.new {
    background: #48bb78;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Header Actions */
@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
