/* DEKAN MEVZUAT ASİSTANI — Tasarım Sistemi ve Arayüz Stilleri */
:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-muted: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --primary: #1e3a8a;
    --primary-hover: #1e40af;
    --primary-light: #eff6ff;
    --accent: #0284c7;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --success-bg: #ecfdf5;
    --success-text: #065f46;
    --success-border: #a7f3d0;
    --warning-bg: #fffbeb;
    --warning-text: #92400e;
    --warning-border: #fde68a;
    --danger-bg: #fef2f2;
    --danger-text: #991b1b;
    --danger-border: #fecaca;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Nav */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.header-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1e3a8a, #0284c7);
    color: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

.brand-text h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary);
    line-height: 1.2;
}

.brand-text span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Layout */
.main-wrapper {
    flex: 1;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px 64px 24px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 32px;
}

.hero-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
}

/* Soru Giriş Alanı */
.search-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 24px;
}

.search-form {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.search-textarea {
    width: 100%;
    min-height: 84px;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5;
}

.search-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.institution-pill {
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hızlı Örnek Sorular */
.quick-questions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.quick-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.chip-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.3;
}

.chip-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Sık Kullanılan Mevzuatlar Barı */
.legislation-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 28px;
}

.leg-pill {
    white-space: nowrap;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    background: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.leg-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #ffffff;
}

/* Cevap Kartı */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.answer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeIn 0.25s ease-out;
}

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

.answer-header {
    background: #fafbfc;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.question-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.badges-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-confidence {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.confidence-high { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.confidence-medium { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.confidence-low { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }

.badge-category {
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
}

.answer-body {
    padding: 24px 20px;
}

/* Kısa Cevap / Summary */
.short-answer-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.55;
}

/* Kim Yetkili? Kutusu */
.authority-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.authority-icon {
    font-size: 20px;
}

.authority-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1e40af;
    letter-spacing: 0.04em;
}

.authority-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a8a;
}

/* Kritik Uyarı Kutusu */
.warning-box {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    color: var(--danger-text);
    font-size: 13.5px;
    display: flex;
    gap: 12px;
}

.warning-icon {
    font-size: 18px;
    line-height: 1.2;
}

/* İşlem Akışı (Timeline Workflow) */
.workflow-section {
    margin: 24px 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}

.section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #cbd5e1;
}

.timeline-step {
    position: relative;
    font-size: 13.5px;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.45;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px var(--primary);
}

/* Detaylı Açıklama Metni */
.detailed-text {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Doğrulanmış Kaynaklar Bölümü */
.sources-section {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.source-card {
    background: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.source-card:hover {
    border-color: #cbd5e1;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.source-top {
    margin-bottom: 8px;
}

.source-badge-official {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    background: var(--success-bg);
    color: var(--success-text);
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.source-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.source-article {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 3px;
}

.source-excerpt {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 8px 0;
    border-left: 2px solid #e2e8f0;
    padding-left: 8px;
}

.source-meta {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    margin-top: 6px;
}

.source-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 11.5px;
}

.source-link:hover {
    text-decoration: underline;
}

/* Cevap Alt Araç Çubuğu */
.answer-footer {
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.btn-action:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* Loading Durumu */
.loading-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.loading-subtext {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Footer */
.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
}

.site-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .header-container { padding: 12px 16px; }
    .main-wrapper { padding: 16px 12px 48px 12px; }
    .hero-title { font-size: 22px; }
    .search-card { padding: 16px; }
    .sources-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 10px; font-size: 13px; }
}
