/* Profesyonel İş Yönetim Sistemi - Premium Arayüz CSS Tasarımı */

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

/* Değişken Tanımları (Light & Dark Mode) */
:root {
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* AÇIK TEMA RENKLERİ */
    --bg-primary: #f1f5f9;
    --bg-secondary: rgba(255, 255, 255, 0.85);
    --bg-sidebar: #0f172a;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --border-color: rgba(226, 232, 240, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

    /* Renk Paleti */
    --color-primary: #6366f1;
    --color-primary-rgb: 99, 102, 241;
    --color-secondary: #4f46e5;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #06b6d4;
}

[data-theme="dark"] {
    /* KOYU TEMA RENKLERİ */
    --bg-primary: #090d16;
    --bg-secondary: rgba(17, 24, 39, 0.85);
    --bg-sidebar: #0b0f19;
    --bg-card: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

    /* Renk Paleti (Koyu mod için hafif parlak) */
    --color-primary: #818cf8;
    --color-primary-rgb: 129, 140, 248;
    --color-secondary: #6366f1;
    --color-success: #34d399;
    --color-warning: #fbbf24;
    --color-danger: #f87171;
    --color-info: #22d3ee;
}

/* Genel Yapı ve Sıfırlamalar */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-text {
    font-family: var(--font-heading);
}

/* Scrollbar Özelleştirme */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.5);
}

/* Glassmorphism Genel Kart Yapısı */
.glass-card {
    background: var(--bg-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.glass-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.12);
}

/* Responsive Grid/Layout Yapısı */
#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* DİNAMİK SOL MENÜ (SIDEBAR) */
#sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: #ffffff;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

#sidebar.collapsed {
    width: 70px;
}

#sidebar .brand {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: 70px;
    overflow: hidden;
}

#sidebar .brand .logo-icon {
    font-size: 24px;
    color: var(--color-primary);
}

#sidebar .brand .brand-text {
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

#sidebar.collapsed .brand .brand-text {
    opacity: 0;
    pointer-events: none;
}

#sidebar .nav-menu {
    list-style: none;
    padding: 15px 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

#sidebar .nav-item {
    margin-bottom: 4px;
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

#sidebar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

#sidebar .nav-link.active {
    color: #ffffff;
    background: var(--color-primary);
}

#sidebar.collapsed .nav-link span {
    opacity: 0;
    display: none;
}

#sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

/* ANA İÇERİK ALANI */
#main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

#sidebar.collapsed + #main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* ÜST PANEL (NAVBAR) */
#navbar {
    height: 70px;
    background: var(--bg-secondary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.content-body {
    padding: 30px;
    flex: 1;
}

/* ARAMA BARU */
.search-box {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.search-box input {
    width: 100%;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 16px 8px 36px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

[data-theme="dark"] .search-box input {
    background: rgba(255, 255, 255, 0.04);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: transparent;
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* WIDGET GRUPLARI & SÜRÜKLENEBİLİRLİK */
.widget-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget-drag-handle {
    cursor: move;
    color: var(--text-muted);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* FORM ÖGELERİ */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
}

.form-control, .form-select {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* KANBAN BOARD */
.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    flex: 1;
    min-width: 280px;
    background: rgba(15, 23, 42, 0.03);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

[data-theme="dark"] .kanban-column {
    background: rgba(255, 255, 255, 0.02);
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* ÖNCELİK BADGELERİ */
.badge-dusuk { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-normal { background: rgba(99, 102, 241, 0.15); color: var(--color-primary); }
.badge-yuksek { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.badge-acil { background: rgba(239, 68, 68, 0.15); color: var(--color-danger); }
.badge-kritik { background: #ef4444; color: #ffffff; }

/* MODAL & POPUP */
.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* TIMELINE (ZAMAN ÇİZELGESİ) */
.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    border-radius: 50%;
    left: -27px;
    top: 4px;
    border: 2px solid var(--bg-primary);
}

/* ŞİFRE KASASI ALANLARI */
.vault-password-field {
    font-family: monospace;
    font-size: 14px;
    background: rgba(15, 23, 42, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .vault-password-field {
    background: rgba(255, 255, 255, 0.05);
}

/* UYARILAR & ANİMASYONLAR */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* RESPONSIVE AYARLAR */
@media (max-width: 991.98px) {
    #sidebar {
        width: 70px;
    }
    #main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
    }
    #sidebar.collapsed {
        width: 0;
        overflow: hidden;
    }
    #sidebar.collapsed + #main-content {
        margin-left: 0;
        width: 100%;
    }
}
