@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root { 
    --primary: #0078D4; --secondary: #243b55; --accent: #D83B01; 
    --bg: #f8f9fa; --text: #343a40; --text-light: #6c757d; 
    --border: #e5e7eb;
}

body { margin:0; font-family:'Inter', sans-serif; background:var(--bg); height:100vh; overflow:hidden; color:var(--text); }
* { box-sizing:border-box; outline:none; }
.hidden { display:none !important; }

/* --- 1. GİRİŞ EKRANI (YENİ GÜVENLİ TASARIM) --- */
#loginScreen { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: linear-gradient(135deg, #0078D4, #00b4d8); 
    z-index: 9999; display: flex; justify-content: center; align-items: center; 
}
.login-box { 
    background: rgba(255,255,255,0.98); padding: 40px; border-radius: 20px; 
    width: 400px; text-align: center; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.3); 
}
.login-icon { font-size: 40px; color: var(--primary); margin-bottom: 10px; }
.login-title { font-size: 24px; font-weight: 800; color: var(--secondary); letter-spacing: 1px; }

/* Input Grupları */
.input-group { position: relative; margin-bottom: 15px; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }
.login-input-styled {
    width: 100%; padding: 14px 14px 14px 40px; 
    border: 1px solid #ddd; border-radius: 8px; font-size: 14px; 
    background: #f8f9fa; transition: 0.3s;
}
.login-input-styled:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1); }
.toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #999; cursor: pointer; }
.toggle-password:hover { color: var(--primary); }

.login-btn { 
    width: 100%; padding: 14px; background: var(--primary); color: white; 
    border: none; border-radius: 8px; cursor: pointer; font-weight: bold; 
    font-size: 14px; margin-top: 10px; box-shadow: 0 4px 15px rgba(0, 120, 212, 0.3);
    transition: 0.2s;
}
.login-btn:hover { background: #0060aa; transform: translateY(-1px); }
.quick-login { margin-top: 20px; font-size: 12px; color: #666; }
.quick-login span { cursor: pointer; font-weight: bold; margin: 0 5px; color: var(--primary); }

/* --- 2. ANA YERLEŞİM (LAYOUT) --- */
.module-container { display: flex; height: 100vh; width: 100vw; overflow: hidden; }

/* Sol Menü */
.sidebar { 
    width: 70px; background: var(--secondary); color: white; display: flex; flex-direction: column; 
    align-items: center; padding-top: 20px; flex-shrink: 0; z-index: 20; 
    transition: all 0.3s ease; box-shadow: 4px 0 10px rgba(0,0,0,0.1);
}
.sidebar-btn { 
    width: 46px; height: 46px; border-radius: 10px; border: none; background: rgba(255,255,255,0.05); 
    color: rgba(255,255,255,0.7); font-size: 18px; cursor: pointer; margin-bottom: 15px; 
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.sidebar-btn:hover, .sidebar-btn.active { background: var(--accent); color: white; box-shadow: 0 4px 12px rgba(216, 59, 1, 0.4); }
.sidebar-spacer { flex: 1; }

/* Orta Menü (Kriter Listesi) */
.criteria-drawer { 
    width: 320px; background: white; border-right: 1px solid #eee; 
    display: flex; flex-direction: column; transition: 0.3s; flex-shrink: 0; z-index: 10; 
}
.criteria-drawer.closed { margin-left: -320px; }
.drawer-header { padding: 20px; border-bottom: 1px solid #eee; font-weight: bold; color: var(--secondary); display: flex; justify-content: space-between; }
.criteria-list { flex: 1; overflow-y: auto; padding: 10px; }
.criteria-item { 
    padding: 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; 
    font-size: 13px; display: flex; justify-content: space-between; align-items: center;
}
.criteria-item:hover { background: #f1f3f5; } 
.criteria-item.active { background: #e0efff; color: var(--primary); font-weight: bold; }

/* Sağ Çalışma Alanı */
.workspace { flex: 1; display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--bg); position: relative; }
.top-bar { 
    height: 60px; background: white; border-bottom: 1px solid #eee; 
    display: flex; justify-content: space-between; align-items: center; padding: 0 20px; flex-shrink: 0; 
}
.breadcrumb { font-size: 14px; font-weight: 600; color: var(--secondary); }

/* --- 3. İÇERİK DÜZENLERİ --- */
.split-view { display: flex; flex: 1; overflow: hidden; padding: 20px; gap: 20px; }
.read-panel { flex: 1; overflow-y: auto; }
.write-panel { width: 450px; display: flex; flex-direction: column; gap: 15px; flex-shrink: 0; overflow-y: auto; padding-bottom: 50px; }
.single-view { flex: 1; overflow-y: auto; padding: 30px; display: block; max-width: 1200px; margin: 0 auto; }

/* Form Grid */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; margin-bottom: 20px; }
.form-full-width { grid-column: 1 / -1; }
.form-actions { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }

/* --- 4. BİLEŞENLER (KARTLAR, INPUTLAR) --- */
.data-card, .team-card, .radar-card, .notes-container { 
    background: white; border-radius: 12px; padding: 25px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); border: 1px solid #eee; margin-bottom: 15px; 
}
.team-card { border-left: 4px solid #6c757d; }
.record-item { 
    padding: 15px; border: 1px solid #ddd; border-radius: 8px; 
    background: white; margin-bottom: 10px; display: flex; 
    justify-content: space-between; align-items: center; 
}

/* Standart Inputlar */
.input-wrapper { position: relative; }
.input-wrapper label { 
    font-size: 11px; font-weight: bold; color: #666; 
    display: block; margin-bottom: 5px; text-transform: uppercase; 
}
.input-wrapper input, .input-wrapper textarea { 
    width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; 
    font-family: 'Inter'; background: white; 
}
.mic-btn { position: absolute; right: 10px; bottom: 10px; background: none; border: none; color: #bbb; cursor: pointer; }
.mic-active { color: red !important; }

/* Dinamik Başlık Kutusu */
.custom-field-box {
    background: #f0f9ff; border: 1px dashed var(--primary);
    padding: 15px; border-radius: 8px; position: relative; margin-bottom: 15px;
}
.custom-field-box .cf-title {
    font-weight: bold; color: var(--primary); border: none; border-bottom: 1px solid #ccc;
    background: transparent; padding: 5px 0; font-size: 14px; margin-bottom: 10px; width: 100%;
}
.custom-field-box .cf-content {
    background: white; border: 1px solid #ddd; border-radius: 6px; 
    padding: 10px; width: 100%; min-height: 80px; font-family: 'Inter';
}

/* Tablo & Grafik Input */
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.data-table th { background: #f9fafb; padding: 10px; border: 1px solid #eee; text-align: center; }
.data-table td { padding: 10px; border: 1px solid #eee; text-align: center; }
.chart-input { border: none; background: transparent; font-weight: bold; color: var(--primary); text-align: center; width: 100%; }

/* --- 5. MODAL (ÖNİZLEME PENCERESİ) --- */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    background: rgba(0,0,0,0.6); z-index: 99999; 
    display: flex; justify-content: center; align-items: center; 
    backdrop-filter: blur(3px);
}
.modal-box { 
    background: white; width: 70%; max-width: 800px; height: 80%; 
    border-radius: 12px; display: flex; flex-direction: column; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.25); animation: popIn 0.3s ease;
}
.modal-header { 
    padding: 15px 20px; border-bottom: 1px solid #eee; background: #f8f9fa;
    display: flex; justify-content: space-between; align-items: center; font-weight: bold; color: var(--secondary);
}
.modal-body { 
    flex: 1; padding: 40px; overflow-y: auto; background: #f4f6f8; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.preview-icon { font-size: 80px; color: #cbd5e1; margin-bottom: 20px; }
.preview-filename { font-size: 18px; font-weight: 600; color: #334155; margin-bottom: 10px; }
.preview-meta { font-size: 13px; color: #64748b; margin-bottom: 30px; }
.btn-close-modal { background: none; border: none; font-size: 24px; cursor: pointer; color: #666; }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- 6. RAPORLAMA --- */
#feedbackReportArea { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #f3f4f6; z-index: 5000; overflow-y: auto; padding-top: 50px; }
.report-paper { max-width: 210mm; margin: 0 auto; background: white; padding: 40px; min-height: 100vh; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.report-chart-container { width: 100%; height: 280px; margin: 20px 0; border: 1px solid #eee; border-radius: 8px; padding: 10px; page-break-inside: avoid; }

/* Butonlar */
.btn { padding: 8px 16px; border-radius: 6px; border: none; cursor: pointer; font-weight: bold; font-size: 13px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-primary { background: var(--primary); color: white; }
.btn-white { background: white; border: 1px solid #ddd; color: #333; }
.btn-red { background: #c0392b; color: white; }
.badge { background: #0078D4; color: white; padding: 2px 6px; border-radius: 4px; font-size: 11px; }

/* --- 7. RESPONSIVE --- */
@media (max-width: 900px) { 
    .module-container { flex-direction: column; } 
    .sidebar { width: 100%; height: 60px; flex-direction: row; padding: 0 10px; justify-content: space-around; }
    .sidebar-btn { margin-bottom: 0; margin-right: 5px; } .sidebar-spacer { display: none; }
    .criteria-drawer { position: fixed; z-index: 100; height: calc(100% - 60px); top: 60px; } 
    .split-view { flex-direction: column; } .write-panel { width: 100%; } 
    .modal-box { width: 95%; height: 60%; }
}
@media print { 
    #feedbackReportArea { padding: 0; } 
    .report-paper { box-shadow: none; } 
    .btn, .sidebar, .top-bar { display: none !important; } 
    .report-chart-container { page-break-inside: avoid; } 
}