* {
    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;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

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

/* Hasta Bölümü Stilleri */
.hasta-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 20px;
}

.hasta-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hasta-bilgileri {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Hızlı Seçim Butonları */
.quick-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-all {
    background: #27ae60;
    color: white;
}

.clear-all {
    background: #e74c3c;
    color: white;
}

.common {
    background: #f39c12;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.selected-count {
    margin-left: auto;
    font-weight: 600;
    color: #2c3e50;
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid #3498db;
}

/* Filtreler */
.filters {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.filters select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.filters select:focus {
    outline: none;
    border-color: #3498db;
}

/* Tablo Container */
.table-container {
    overflow-x: auto;
    padding: 20px;
}

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

.tani-table th {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s ease;
    position: sticky;
    top: 0;
}

.tani-table th:hover {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.tani-table td {
    padding: 16px 15px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.9em;
    line-height: 1.5;
}

.tani-table tr {
    transition: all 0.3s ease;
}

.tani-table tr:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tani-table tr:nth-child(even) {
    background: #fafbfc;
}

.tani-table tr:nth-child(even):hover {
    background: #f1f3f4;
}

/* Tablo Checkbox Stilleri */
.select-col {
    width: 50px;
    text-align: center;
}

.tablo-semptom {
    cursor: pointer;
    transform: scale(1.2);
    margin: 0;
    transition: all 0.3s ease;
}

.tablo-semptom:checked {
    transform: scale(1.3);
}

#selectAllHeader {
    cursor: pointer;
    transform: scale(1.2);
}

/* Seçili Satır Stili */
.tani-table tr.selected {
    background: #e3f2fd !important;
    border-left: 4px solid #3498db;
}

.tani-table tr.selected:hover {
    background: #bbdefb !important;
}

.organ-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    white-space: nowrap;
}

.nokta-list {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    display: inline-block;
}

/* Analiz Butonları */
.analysis-actions {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    justify-content: center;
}

.analiz-btn, .temizle-btn, .yazdir-btn, .yeni-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analiz-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.analiz-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

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

.temizle-btn {
    background: #95a5a6;
    color: white;
}

.temizle-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Sonuç Bölümü */
.sonuc-section {
    margin: 20px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.hasta-ozet {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.hasta-ozet h3 {
    margin-bottom: 10px;
    font-size: 1.4em;
}

.hasta-ozet p {
    margin: 5px 0;
    opacity: 0.9;
}

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

.analiz-kart {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.analiz-kart:hover {
    transform: translateY(-5px);
}

.analiz-kart h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    font-size: 1.1em;
}

.analiz-icerik {
    max-height: 200px;
    overflow-y: auto;
}

/* Kart Renkleri */
.organ-kart {
    border-left: 4px solid #3498db;
}

.patoloji-kart {
    border-left: 4px solid #e74c3c;
}

.tedavi-kart {
    border-left: 4px solid #27ae60;
}

.beslenme-kart {
    border-left: 4px solid #f39c12;
}

.organ-item, .patoloji-item, .nokta-item, .beslenme-item {
    padding: 8px 12px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.frekans {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 5px;
}

.frekans-yuksek { color: #e74c3c; font-weight: bold; }
.frekans-orta { color: #f39c12; font-weight: bold; }
.frekans-dusuk { color: #27ae60; font-weight: bold; }

.oneri-section {
    background: #e8f4f8;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.oneri-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.oneri-section p {
    margin: 8px 0;
    padding-left: 15px;
    position: relative;
}

.oneri-section p:before {
    content: "•";
    color: #3498db;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Rapor Butonları */
.report-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.yazdir-btn {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
}

.yazdir-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

.yeni-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.yeni-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

/* Mesaj Stilleri */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.success-message {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.error-message {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.warning-message {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
}

/* Loading animasyonu */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .hasta-section {
        margin: 10px;
        padding: 15px;
    }
    
    .hasta-bilgileri {
        flex-direction: column;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .selected-count {
        margin-left: 0;
        text-align: center;
    }
    
    .analiz-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-actions {
        flex-direction: column;
    }
    
    .report-actions {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filters select {
        min-width: auto;
    }
    
    .tani-table {
        font-size: 0.8em;
    }
    
    .tani-table th,
    .tani-table td {
        padding: 12px 8px;
    }
}

/* Scrollbar Stili */
.table-container::-webkit-scrollbar,
.analiz-icerik::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track,
.analiz-icerik::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb,
.analiz-icerik::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.analiz-icerik::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Yazdırma stilleri */
@media print {
    .hasta-form, 
    .filters, 
    .analysis-actions, 
    .yazdir-btn,
    .yeni-btn,
    .quick-actions {
        display: none !important;
    }
    
    .sonuc-section {
        display: block !important;
        box-shadow: none;
        margin: 0;
        padding: 0;
        page-break-inside: avoid;
    }
    
    .analiz-grid {
        page-break-inside: avoid;
    }
    
    body {
        background: white !important;
    }
    
    .container {
        box-shadow: none !important;
        margin: 0 !important;
    }
}