/* =====================================================================
   Akademik Proje Yönetim ve Analiz Sistemi - Ana Stil
   AdminLTE benzeri layout, Bootstrap 5 + dark mode destegi
   ===================================================================== */

:root {
    --sidebar-width: 250px;
    --topbar-height: 60px;
    --sidebar-bg: #1f2937;
    --sidebar-bg-dark: #0f172a;
    --sidebar-hover: #374151;
    --sidebar-text: #9ca3af;
    --sidebar-active-bg: #0d6efd;
}

[data-bs-theme="light"] body { background: #f1f5f9; }

/* ---------- Genel ---------- */
* { scrollbar-width: thin; }

a { text-decoration: none; }

.avatar {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-weight: 600; font-size: .9rem;
}
.avatar-sm { width: 30px; height: 30px; font-size: .8rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }

/* ---------- Layout ---------- */
.layout-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
[data-bs-theme="dark"] .sidebar { background: var(--sidebar-bg-dark); }

.sidebar-brand {
    height: var(--topbar-height);
    display: flex; align-items: center; gap: .6rem;
    padding: 0 1.2rem;
    color: #fff; font-weight: 700; font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { color: #60a5fa; font-size: 1.3rem; }

.sidebar-nav { overflow-y: auto; flex: 1; padding: .8rem .6rem 2rem; }

.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: .7rem;
    color: var(--sidebar-text);
    padding: .6rem .8rem;
    border-radius: .5rem;
    margin-bottom: .15rem;
    font-size: .92rem;
    transition: background .15s, color .15s;
}
.sidebar-nav .nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-link.active {
    background: var(--sidebar-active-bg);
    color: #fff;
    font-weight: 500;
}

.nav-section {
    padding: 1rem .8rem .35rem;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
}

/* ---------- Ana alan ---------- */
.layout-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-height);
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.sidebar-toggle { color: var(--bs-body-color); }

.topbar-search {
    position: relative;
    width: min(380px, 100%);
}
.topbar-search i {
    position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
    color: var(--bs-secondary-color);
}
.topbar-search input { padding-left: 2.3rem; }

.content { flex: 1; padding: 1.5rem; }
.content-footer {
    padding: .8rem 1.5rem;
    border-top: 1px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    font-size: .82rem;
}

/* Mobilde sidebar kapat */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.35); }
    .layout-main { margin-left: 0; }
}

/* ---------- Istatistik kartlari ---------- */
.stat-card { border: 1px solid var(--bs-border-color); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.08); transition: all .2s; }

.stat-icon {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border-radius: .75rem; font-size: 1.4rem; flex-shrink: 0;
}
.stat-value { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.stat-value.small-value { font-size: 1rem; }
.stat-label { font-size: .8rem; color: var(--bs-secondary-color); }

/* ---------- Tablolar ---------- */
.table thead th {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bs-secondary-color);
    border-bottom-width: 1px;
    white-space: nowrap;
}
.dataTables_filter input, .dataTables_length select {
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    padding: .3rem .6rem;
}
.dataTables_wrapper .row { margin-bottom: .75rem; }

/* ---------- Form ---------- */
.form-label { font-weight: 500; font-size: .9rem; }

/* ---------- Auth sayfasi ---------- */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1d4ed8 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
}
.auth-container { width: 100%; max-width: 440px; }
.auth-card { border: none; border-radius: 1rem; }
.auth-logo {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}

/* ---------- Kart basliklari ---------- */
.card { border: 1px solid var(--bs-border-color); box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.card-header { border-bottom: 1px solid var(--bs-border-color); }

/* ---------- Diger ---------- */
.page-title { font-size: 1.35rem; font-weight: 700; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

.badge-soft { font-weight: 500; }

/* Dropzone */
.dropzone {
    border: 2px dashed var(--bs-border-color);
    border-radius: .75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--bs-tertiary-bg);
}
.dropzone:hover, .dropzone.dragover {
    border-color: #0d6efd;
    background: rgba(13,110,253,.06);
}

/* Tablo hucre uzunluklarini kisitla */
.text-truncate-max { max-width: 220px; }

/* ---------- Takvim ---------- */
.table-calendar td { height: 110px; vertical-align: top; width: 14.28%; }
.cal-cell { padding: .4rem .5rem !important; }
.cal-day { font-weight: 600; font-size: .9rem; }
.cal-outside { background: var(--bs-tertiary-bg); opacity: .75; }
.cal-today { background: rgba(13, 110, 253, .08) !important; }
.cal-today .cal-day { color: #0d6efd; }
.cal-events { margin-top: .35rem; display: flex; flex-direction: column; gap: .2rem; overflow: hidden; }
.cal-event {
    display: block;
    font-size: .72rem;
    line-height: 1.15;
    padding: .18rem .35rem;
    border-radius: .35rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.cal-event:hover { color: #fff; filter: brightness(1.08); }
.cal-more { font-size: .7rem; padding-left: .3rem; }


@media print {
    .sidebar, .topbar, .content-footer, .dataTables_filter, .dataTables_length, .dataTables_paginate, .no-print { display: none !important; }
    .layout-main { margin-left: 0; }
    .content { padding: 0; }
    .report-area .card { border: none; box-shadow: none; }
    .report-area .card-header { display: none; }
    .report-area .card-body { padding: 0; }
}
