/* 
   BAP AI - Global Styles
   İstanbul Sabahattin Zaim Üniversitesi Kurumsal Renk Paleti
   Primary Blue: #264A96 | Secondary Gold: #C19E67
*/

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

/* ========================================
   CSS Custom Properties (Design Tokens)
======================================== */:root {
    /* IZU Resmi Kurumsal Renk Paleti */
    --izu-blue: #002f6c;        /* Kurumsal İZÜ Derin Lacivert */
    --izu-blue-dark: #001e47;   /* Koyu Ton Derin Mavi */
    --izu-blue-light: #1e4c8f;  /* Açık Ton Canlı Mavi */
    --izu-gold: #c19e67;        /* Kurumsal İZÜ Altın */
    --izu-gold-dark: #997c4f;   /* Koyu Ton Altın */
    --izu-gold-light: #dbbf91;  /* Açık Ton Altın */
    --izu-red: #ba0c2f;         /* Kurumsal İZÜ Bordo/Kırmızı (Logo Kaligrafisi) */

    /* Functional Colors */
    --primary: var(--izu-blue);
    --primary-dark: var(--izu-blue-dark);
    --primary-light: var(--izu-blue-light);
    --accent: var(--izu-gold);
    --accent-dark: var(--izu-gold-dark);
    --accent-light: var(--izu-gold-light);

    /* Açık İZÜ Teması (Varsayılan) */
    --white: #ffffff;
    --bg-page: #f4f6f9;         /* Hafif Mavi/Gri Arka Plan */
    --bg-surface: #ffffff;
    --bg-surface-light: #f8fafc;
    --text-primary: #0f172a;    /* Daha Okunaklı Slate-900 */
    --text-secondary: #334155;  /* Slate-700 */
    --text-muted: #64748b;      /* Slate-500 */
    --border-color: #e2e8f0;

    /* Status Colors */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Shadows (İZÜ Laciverti Tabanlı Gölgelendirmeler) */
    --shadow-sm: 0 1px 3px rgba(0, 47, 108, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 47, 108, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 47, 108, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 47, 108, 0.15);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Koyu İZÜ Teması
   Logodaki Derin Lacivert Tabanlı Modern Gece Modu
======================================== */
[data-theme="dark"] {
    --izu-blue: #3b82f6;        /* Koyu Modda Kontrast İçin Parlak Mavi */
    --izu-blue-dark: #1d4ed8;
    --izu-blue-light: #60a5fa;
    --izu-gold: #c19e67;
    --izu-gold-dark: #997c4f;
    --izu-gold-light: #dbbf91;
    --izu-red: #ef4444;

    /* Renk Değişimleri */
    --primary: #5c8ee6;         /* Koyu Temada Birincil Mavi */
    --primary-dark: #2563eb;
    --primary-light: #93c5fd;

    --white: #0a1931;           /* Koyu İZÜ Kart Yüzeyi */
    --bg-page: #040d1a;         /* Derin İZÜ Gece Laciverti */
    --bg-surface: #0a1931;
    --bg-surface-light: #15305b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #162e55;    /* İZÜ Temalı Koyu Sınırlar */

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);

    --glass-bg: rgba(10, 25, 49, 0.9);
    --glass-border: rgba(22, 46, 85, 0.5);
}

/* ========================================
   Açık Mezuniyet Teması (Krem & Bordo & Altın)
======================================== */
[data-theme="light-mezuniyet"] {
    --primary: #60051e;         /* Asil Bordo */
    --primary-dark: #3a000e;
    --primary-light: #801b33;
    --accent: #c19e67;          /* Altın */
    --accent-dark: #997c4f;
    --accent-light: #dbbf91;
    --izu-red: #ba0c2f;

    --white: #ffffff;
    --bg-page: #fcf8f2;         /* Sıcak Krem Sayfa Arka Planı */
    --bg-surface: #ffffff;
    --bg-surface-light: #faf5eb;
    --text-primary: #2d1015;    /* Koyu Bordo/Kahve Metin */
    --text-secondary: #4f252c;
    --text-muted: #8c6b71;
    --border-color: #f0e4d3;    /* Krem/Altın Tonlu Sınırlar */

    --shadow-sm: 0 1px 3px rgba(96, 5, 30, 0.05);
    --shadow-md: 0 4px 12px rgba(96, 5, 30, 0.08);
    --shadow-lg: 0 8px 30px rgba(96, 5, 30, 0.12);
    --shadow-xl: 0 20px 60px rgba(96, 5, 30, 0.15);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(240, 228, 211, 0.3);
}

/* ========================================
   Koyu Mezuniyet Teması (Derin Bordo & Altın)
   Tören Görselinden Esinlenilen Premium Bordo Modu
======================================== */
[data-theme="dark-mezuniyet"] {
    --izu-blue: #c19e67;
    --izu-blue-dark: #997c4f;
    --izu-blue-light: #dbbf91;
    --izu-gold: #c19e67;
    --izu-gold-dark: #997c4f;
    --izu-gold-light: #dbbf91;
    --izu-red: #ba0c2f;

    --primary: #c19e67;         /* Koyu Temada Altın Yazılar ve Vurgular */
    --primary-dark: #997c4f;
    --primary-light: #dbbf91;

    --white: #24020a;           /* Çok Koyu Bordo Kart Yüzeyi */
    --bg-page: #190106;         /* Derin Tören Bordo Gece Arka Planı */
    --bg-surface: #24020a;
    --bg-surface-light: #3d030f;
    --text-primary: #faf5eb;    /* Krem/Beyaz Metinler */
    --text-secondary: #e5dcd0;
    --text-muted: #bdae9e;
    --border-color: #4a0314;    /* Koyu Bordo Sınırlar */

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);

    --glass-bg: rgba(36, 2, 10, 0.9);
    --glass-border: rgba(74, 3, 20, 0.5);
}

[data-theme="dark"] .auth-page {
    background: linear-gradient(135deg, #0a0d14 0%, #111827 40%, #0f1117 100%);
}

[data-theme="dark"] .auth-card {
    background: rgba(26, 29, 35, 0.95);
    border-color: var(--border-color);
}

[data-theme="light-mezuniyet"] .auth-page {
    background: linear-gradient(135deg, #fcf8f2 0%, #faf5eb 50%, #f0e4d3 100%);
}

[data-theme="dark-mezuniyet"] .auth-page {
    background: linear-gradient(135deg, #190106 0%, #24020a 50%, #3d030f 100%);
}

[data-theme="dark-mezuniyet"] .auth-card {
    background: rgba(36, 2, 10, 0.95);
    border-color: var(--border-color);
}

/* ========================================
   Tema Toggle Butonu
======================================== */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background: var(--bg-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(74, 123, 212, 0.2);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Açık temada güneş görünür */
.theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #f59e0b;
}

.theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    color: #6366f1;
}

/* Koyu temada ay görünür */
[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: #a5b4fc;
}

[data-theme="dark"] .theme-toggle {
    border-color: #3d4255;
    background: #22252d;
}

/* ========================================
   Reset & Base
======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Tema geçişlerinde yumuşak animasyon */
html, body, .sidebar, .topbar, .content-area, .card-table, .form-section,
.stat-card, .auth-card, .auth-page, .kanban-col, .k-card, .modal-content,
.btn, .form-control, .badge, .profile-dropdown, .navbar, .step-progress,
.kanban-col-header, .review-box, .budget-box, .update-bar, .tabs, .tab-btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* ========================================
   Layout
======================================== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   Glassmorphism Card
======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* ========================================
   Brand Logo
======================================== */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo img {
    height: 48px;
    width: auto;
}

.brand-logo-text {
    display: flex;
    flex-direction: column;
}

.brand-logo-text .university-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.brand-logo-text .system-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ========================================
   Form Elements
======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(38, 74, 150, 0.12);
}

.form-control.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   Buttons
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(38, 74, 150, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 20px rgba(38, 74, 150, 0.4);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(193, 158, 103, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    box-shadow: 0 6px 20px rgba(193, 158, 103, 0.4);
    transform: translateY(-1px);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
}

/* ========================================
   Auth Pages (Login / Register)
======================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, var(--izu-blue) 0%, #1a3570 40%, #0f2350 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative circles for depth */
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: var(--radius-full);
    opacity: 0.07;
    background: var(--izu-gold);
}

.auth-page::before {
    width: 500px;
    height: 500px;
    top: -150px;
    right: -100px;
}

.auth-page::after {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -60px;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
    animation: cardSlideUp 0.6s ease-out;
}

.auth-card.wide {
    max-width: 560px;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header img {
    height: 86px;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

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

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.form-options label input[type="checkbox"] {
    width: auto;
    accent-color: var(--primary);
}

.form-options a {
    font-weight: 500;
}

/* ========================================
   Multi-Step Form
======================================== */
.multistep-page {
    min-height: 100vh;
    background: var(--bg-page);
}

/* Navbar */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.autosave-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.autosave-status .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--success);
    display: inline-block;
}

.autosave-status .dot.saving {
    background: var(--warning);
    animation: pulse 1s infinite;
}

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

/* Step Progress Bar */
.step-progress {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.step-progress .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.step-item:hover {
    opacity: 0.8;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--border-color);
    color: var(--text-muted);
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(38, 74, 150, 0.15);
}

.step-item.completed .step-number {
    background: var(--success);
    color: var(--white);
}

.step-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-item.completed .step-label {
    color: var(--success);
}

.step-connector {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.step-connector.completed {
    background: var(--success);
}

@media (max-width: 768px) {
    .step-label {
        display: none;
    }
    .step-connector {
        width: 24px;
    }
}

/* Form Content Area */
.form-content {
    padding: 2rem 0;
}

.form-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.4s ease-out;
}

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

.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Step containers */
.step-container {
    display: none;
}

.step-container.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

/* Dynamic list items */
.dynamic-list-item {
    background: var(--bg-surface-light, #22252d);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}

.dynamic-list-item .remove-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--error);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.dynamic-list-item .remove-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.add-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-item-btn:hover {
    border-color: var(--primary);
    background: rgba(38, 74, 150, 0.03);
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Alerts / Messages
======================================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: rgba(38, 74, 150, 0.08);
    color: var(--primary);
    border: 1px solid rgba(38, 74, 150, 0.15);
}

/* ========================================
   Utility Classes
======================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* ========================================
   Dashboard Layout
   ======================================== */
.dashboard-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg-page);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
    flex: 1;
    padding: 1.25rem 0.75rem;
    overflow-y: auto;
    display: flex !important;
    flex-direction: column !important;
}

.menu-label {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: var(--text-muted, #6b7280) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.5rem 0.75rem 0.25rem 0.75rem !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.35rem !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.menu-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 1rem 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.menu-item {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.menu-item a {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 0.85rem !important;
    color: var(--text-secondary, #374151) !important;
    font-weight: 500 !important;
    font-size: 0.88rem !important;
    border-radius: var(--radius-md, 8px) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.menu-item a:hover {
    background: rgba(38, 74, 150, 0.08) !important;
    color: var(--primary, #264a96) !important;
}

.menu-item.active a {
    background: var(--primary, #264a96) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(38, 74, 150, 0.2) !important;
}

.menu-item a i {
    width: 20px !important;
    text-align: center !important;
    font-size: 1.05rem !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.menu-item a span {
    flex: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex overflow */
}

/* Top Bar */
.topbar {
    height: 70px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.user-profile:hover {
    background: var(--bg-page);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--izu-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Content Area */
.content-area {
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-info .label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-info .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.primary { background: rgba(38, 74, 150, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.info { background: rgba(59, 130, 246, 0.1); color: var(--info); }

/* Dashboard Content Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.card-table {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    background: var(--bg-surface-light, #22252d);
    border-bottom: 1px solid var(--border-color);
}

/* Tablo Başlıkları Sıralama Stilleri */
th.sortable-header {
    cursor: pointer !important;
    user-select: none !important;
    transition: background-color var(--transition-fast, 0.2s);
}

th.sortable-header:hover {
    background-color: rgba(74, 123, 212, 0.12) !important;
    color: var(--primary, #264a96) !important;
}

th.sortable-header .sort-icon {
    margin-left: 0.4rem;
    font-size: 0.8rem;
    opacity: 0.4;
    transition: opacity 0.2s, color 0.2s, transform 0.2s;
}

th.sortable-header:hover .sort-icon {
    opacity: 0.85;
}

th.sortable-header.sorted-asc .sort-icon,
th.sortable-header.sorted-desc .sort-icon {
    opacity: 1 !important;
    color: var(--primary, #264a96) !important;
}

td {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

/* Tablo Başlık Altı Arama / Filtre Kutuları (Column Header Filter Inputs) */
.table-filter-row th {
    padding: 0.45rem 0.6rem !important;
    background: var(--bg-surface-light, rgba(248, 250, 252, 0.9)) !important;
    border-bottom: 2px solid var(--border-color, #e2e8f0) !important;
    vertical-align: middle;
}

.table-col-filter {
    width: 100%;
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-color, #1e293b);
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: var(--radius-sm, 6px);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
    text-transform: none !important;
}

.table-col-filter:focus {
    border-color: var(--primary, #264a96);
    box-shadow: 0 0 0 3px rgba(38, 74, 150, 0.15);
    background: #ffffff;
}

.table-col-filter::placeholder {
    color: var(--text-muted, #94a3b8);
    font-size: 0.75rem;
    font-weight: 400;
}

.btn-clear-table-filters {
    background: transparent;
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-muted, #64748b);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm, 6px);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
    white-space: nowrap;
}

.btn-clear-table-filters:hover {
    color: #ef4444;
    border-color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-success { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.badge-error { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #2563eb; }

/* Responsive Sidebar Mobile */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
}

/* ========================================
   Profil Dropdown
======================================== */
.topbar-right {
    position: relative;
}

.profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1001;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(74, 123, 212, 0.1);
    color: var(--primary);
}

.dropdown-item.logout {
    color: var(--error);
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.25rem 0;
}

/* ========================================
   Eksik Badge ve Buton Stilleri
======================================== */
.badge-secondary {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(74, 123, 212, 0.1);
    color: var(--primary);
}

/* ========================================
   Profil Sayfası
======================================== */

/* Profil Üst Kartı */
.profil-header-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 2.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

/* Profil kartı dekoratif arka plan */
.profil-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    opacity: 0.08;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.profil-avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 2.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(38, 74, 150, 0.25);
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.profil-header-info {
    position: relative;
    z-index: 1;
}

.profil-header-info .profil-isim {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.profil-header-info .profil-unvan {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profil-header-info .profil-bolum {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Profil Durum Badge'leri */
.profil-durum-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.profil-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
}

.profil-badge.akademisyen {
    background: rgba(38, 74, 150, 0.1);
    color: var(--primary);
}

.profil-badge.ogrenci {
    background: rgba(193, 158, 103, 0.15);
    color: var(--accent-dark);
}

.profil-badge.aktif {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.profil-badge.pasif {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Profil İçerik Grid */
.profil-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1100px) {
    .profil-content-grid {
        grid-template-columns: 1fr;
    }
}

/* Kişisel Bilgiler Kartı */
.profil-bilgi-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeIn 0.4s ease-out 0.1s both;
}

.profil-bilgi-card .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profil-bilgi-card .card-header h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
}

.profil-bilgi-card .card-header i {
    color: var(--primary);
}

.profil-info-grid {
    padding: 1.5rem;
}

.profil-info-item {
    display: flex;
    align-items: flex-start;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
}

.profil-info-item:last-child {
    border-bottom: none;
}

.profil-info-item .info-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(38, 74, 150, 0.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 0.85rem;
}

.profil-info-item .info-content {
    flex: 1;
    min-width: 0;
}

.profil-info-item .info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.profil-info-item .info-value {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

/* Projelerim Kartı */
.profil-projeler-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeIn 0.4s ease-out 0.2s both;
}

.profil-projeler-card .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profil-projeler-card .card-header h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profil-projeler-card .card-header h3 i {
    color: var(--accent);
}

.proje-sayisi-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 0.5rem;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
}

/* Proje Kartları Grid */
.proje-kartlari {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proje-kart {
    background: var(--bg-surface-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all var(--transition-normal);
    position: relative;
}

.proje-kart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.proje-kart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.proje-kart-baslik {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    margin-right: 0.75rem;
}

.proje-kart-detaylar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.proje-kart-rol {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.proje-kart-rol i {
    font-size: 0.75rem;
    color: var(--primary);
}

/* Anahtar Kelime Badge'leri (Tür) */
.anahtar-kelime {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(193, 158, 103, 0.12);
    color: var(--accent-dark);
    border: 1px solid rgba(193, 158, 103, 0.2);
}

.anahtar-kelime i {
    font-size: 0.65rem;
}

/* Profil Proje Durum Badge'leri */
.proje-durum-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.proje-durum-badge.taslak {
    background: rgba(107, 114, 128, 0.12);
    color: #9ca3af;
}

.proje-durum-badge.incelemede {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.proje-durum-badge.onaylandi {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.proje-durum-badge.reddedildi {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.proje-durum-badge.tamamlandi {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

/* Profil Boş Durum */
.profil-bos-durum {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.profil-bos-durum i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.4;
}

.profil-bos-durum p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Profil Yükleniyor */
.profil-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.profil-loading i {
    margin-right: 0.5rem;
}

/* Profil sayfası responsive */
@media (max-width: 768px) {
    .profil-header-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .profil-avatar {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }

    .profil-durum-badges {
        justify-content: center;
    }

    .profil-header-info .profil-bolum {
        justify-content: center;
    }

    .proje-kart-detaylar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   Yapay Zeka Sohbet Robotu (Chatbot) Stilleri
   ======================================== */
.chatbot-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(38, 74, 150, 0.3);
    z-index: 1000;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-normal);
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(38, 74, 150, 0.45);
}

.chatbot-toggle-btn:active {
    transform: scale(0.95);
}

.chatbot-toggle-btn.online {
    background: linear-gradient(135deg, var(--success, #10b981), #059669) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3) !important;
}

.chatbot-toggle-btn.offline {
    background: linear-gradient(135deg, var(--error, #ef4444), #b91c1c) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3) !important;
}

.chatbot-toggle-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--white);
}

.chatbot-container {
    position: fixed;
    right: -400px; /* Kapalıyken ekran dışında */
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-container.active {
    right: 0; /* Açıkken ekranda */
}

/* Chatbot Header */
.chatbot-header {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chatbot-header-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.1rem;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    padding: 2px;
}

.chatbot-header-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: var(--bg-surface);
    scroll-behavior: smooth;
}

/* Scrollbar styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Chat Message Bubbles */
.chat-message-row {
    display: flex;
    width: 100%;
}

.chat-message-row.user {
    justify-content: flex-end;
}

.chat-message-row.bot {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 85%;
    font-size: 0.92rem;
    line-height: 1.6;
    position: relative;
}

.chat-message-row.user .chat-bubble {
    background: var(--bg-surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 0.75rem 1rem;
}

/* Bot responses render directly on the background without a bubble or borders */
.chat-message-row.bot .chat-bubble {
    background: transparent;
    color: var(--text-primary);
    border: none;
    padding: 0;
    max-width: 100%;
    box-shadow: none;
}

.chat-bubble p {
    margin-bottom: 0.75rem;
}
.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble strong {
    font-weight: 600;
}

/* Markdown table in bubbles */
.chat-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.chat-bubble th, .chat-bubble td {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
}

.chat-bubble th {
    background: var(--bg-surface-light);
    font-weight: 700;
}

.chat-bubble ul, .chat-bubble ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.chat-bubble li {
    margin-bottom: 0.35rem;
}

.chat-bubble-time {
    font-size: 0.72rem;
    opacity: 0.5;
    margin-top: 6px;
    display: block;
}

.chat-message-row.user .chat-bubble-time {
    text-align: right;
}

.chat-message-row.bot .chat-bubble-time {
    text-align: left;
}

/* Typing/Loading Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-muted);
    border-radius: 50%;
    opacity: 0.6;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Chatbot Input Area (Google Gemini style) */
.chatbot-input-container {
    padding: 1rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chatbot-input-field {
    width: 100%;
    border: none;
    padding: 0;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    resize: none;
    height: auto;
    min-height: 40px;
    max-height: 120px;
    line-height: 1.5;
}

/* Input Controls Row */
.chatbot-input-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.chatbot-input-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.chatbot-action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.chatbot-action-btn:hover {
    background: var(--bg-surface-light);
    color: var(--text-primary);
}

/* Model Selector Pill */
.chatbot-model-selector {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg-surface-light);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.chatbot-model-selector:hover {
    background: var(--border-color);
}

.chatbot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0b57d0; /* Google blue */
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.chatbot-send-btn:hover {
    background: #0049b0;
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

.chatbot-send-btn:disabled {
    background: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Responsive adjustments for mobile */
@media (max-width: 480px) {
    .chatbot-container {
        width: 100%;
        height: 100%;
        max-height: 100%;
        right: -100%;
        bottom: 0;
        border-radius: 0;
        border: none;
    }
    .chatbot-container.active {
        right: 0;
    }
}

/* Chatbot Status Dot Indicator */
.chatbot-status-dot {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--text-muted, #9ca3af); /* Default grey (loading) */
    border: 2px solid var(--white, #ffffff);
    box-shadow: 0 0 4px rgba(0,0,0,0.15);
    transition: background var(--transition-fast);
}

.chatbot-status-dot.online {
    background: var(--success, #10b981) !important; /* Green (online) */
}

.chatbot-status-dot.offline {
    background: var(--error, #ef4444) !important; /* Red (offline) */
}

/* Pinned side panel layout for desktop (shrinks the main wrapper instead of overlaying) */
@media (min-width: 769px) {
    .main-wrapper {
        transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    body.chatbot-open .main-wrapper {
        margin-right: 400px;
    }
}

/* ==========================================================================
   GERİ BİLDİRİM MODÜLÜ (FEEDBACK DRAWER & TOGGLE BUTTON)
   ========================================================================== */

/* Sağ dikey yüzen geri bildirim butonu */
.feedback-toggle-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right bottom;
    z-index: 1040;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 -4px 15px rgba(30, 58, 138, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.feedback-toggle-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    padding-bottom: 0.8rem;
    box-shadow: 0 -6px 20px rgba(30, 58, 138, 0.4);
}

.feedback-toggle-btn i {
    transform: rotate(90deg);
    font-size: 1rem;
}

/* Karartma Arka Planı (Overlay) */
.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.feedback-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Sağdan Kayarak Açılan Çekmece Paneli (Slide-Drawer) */
.feedback-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: var(--bg-surface, #ffffff);
    color: var(--text-color, #1e293b);
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feedback-drawer.open {
    transform: translateX(0);
}

/* Header */
.feedback-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feedback-header-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.feedback-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.feedback-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Body */
.feedback-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.feedback-info-box {
    background: rgba(37, 99, 235, 0.08);
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-color, #334155);
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    line-height: 1.4;
}

.feedback-info-box i {
    color: #2563eb;
    font-size: 1.1rem;
    margin-top: 2px;
}

.feedback-form-group {
    margin-bottom: 1.25rem;
}

.feedback-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    color: var(--text-color, #1e293b);
}

.feedback-input, .feedback-textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 8px;
    background: var(--input-bg, #ffffff);
    color: var(--text-color, #0f172a);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-input:focus, .feedback-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.feedback-page-badge {
    background: var(--bg-surface-light, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    word-break: break-all;
}

.feedback-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.feedback-alert.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid #10b981;
    color: #065f46;
}

.feedback-alert.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Footer */
.feedback-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.feedback-btn-cancel {
    padding: 0.65rem 1.2rem;
    background: transparent;
    border: 1px solid var(--border-color, #cbd5e1);
    color: var(--text-color, #475569);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.feedback-btn-cancel:hover {
    background: var(--bg-surface-light, #f1f5f9);
}

.feedback-btn-send {
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border: none;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s;
}

.feedback-btn-send:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.feedback-btn-send:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .feedback-drawer {
        width: 100%;
        max-width: 100%;
    }
}




