/* Selçuk Abanoz - Admin Panel Stilleri */

:root {
    --sidebar-width: 260px;
    --primary-color: #1e3a5f;
    --sidebar-bg: #1a2332;
    --sidebar-hover: #243044;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--sidebar-hover);
    border-left-color: #4dabf7;
}

.sidebar-subnav-wrap {
    margin-top: -0.35rem;
    margin-bottom: 0.5rem;
}

.sidebar-subnav .nav-link {
    padding: 0.45rem 1.25rem 0.45rem 2.5rem;
    font-size: 0.875rem;
}

.sidebar-subnav .nav-link i {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
}

.content-area {
    max-width: 1400px;
}

/* Stat cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Tables */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.25rem;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.table td,
.table tfoot td {
    vertical-align: middle;
    font-size: 12px;
}

.table td input.form-control,
.table td select.form-select,
.table td textarea.form-control,
.table td .form-control-sm,
.table td .form-select-sm {
    font-size: 12px;
}

.table td .btn-sm {
    font-size: 12px;
}

/* Forms */
.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 1.5rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Badges */
.badge-gelir { background-color: #d3f9d8; color: #2b8a3e; }
.badge-gider { background-color: #ffe3e3; color: #c92a2a; }

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Filter bar */
.filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Mobile */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Net positive/negative */
.text-net-positive { color: #2b8a3e !important; }
.text-net-negative { color: #c92a2a !important; }

/* Toplu gelir girişi tablosu */
.toplu-gelir-wrap {
    max-height: 70vh;
    overflow: auto;
}

.toplu-gelir-table {
    min-width: 1200px;
}

.toplu-gelir-table th,
.toplu-gelir-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.toplu-gelir-table input.form-control-sm,
.toplu-gelir-table select.form-select-sm {
    min-width: 90px;
}

.toplu-gelir-table input[type="date"] {
    min-width: 130px;
}

.toplu-gelir-table .toplam_gelir {
    min-width: 100px;
    font-weight: 600;
}

.toplu-gelir-table .gelir-satir,
.toplu-gelir-table .td-gelir-satir,
.toplu-gider-table .gider-satir {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.toplu-gelir-table .gelir-satir.toplu-satir-aktif > td,
.toplu-gelir-table .td-gelir-satir.toplu-satir-aktif > td,
.toplu-gider-table .gider-satir.toplu-satir-aktif > td {
    background-color: #e7f5ff !important;
}

.toplu-gelir-table .gelir-satir.toplu-satir-aktif > td:first-child,
.toplu-gelir-table .td-gelir-satir.toplu-satir-aktif > td:first-child,
.toplu-gider-table .gider-satir.toplu-satir-aktif > td:first-child {
    box-shadow: inset 3px 0 0 #339af0;
}

.toplu-gider-table .gider-satir.toplu-satir-aktif td.gider-alan-pasif {
    background-color: #dbeafe !important;
    opacity: 1;
}

.toplu-gider-table {
    min-width: 1500px;
}

.toplu-td-gider-table {
    min-width: 1100px;
}

.toplu-td-gider-table .td-gider-aciklama-col,
.toplu-td-gider-table .td-gider-aciklama {
    min-width: 180px;
    white-space: normal;
}

.toplu-td-gider-table .td-gider-aciklama {
    min-width: 160px;
}

.toplu-td-gider-table td.td-gider-alan-pasif {
    opacity: 0.45;
    background-color: #f1f3f5;
}

.toplu-td-gider-table td.td-gider-alan-pasif input,
.toplu-td-gider-table td.td-gider-alan-pasif select {
    background-color: #f1f3f5;
    cursor: not-allowed;
}

.toplu-td-gider-table .td-gider-satir.toplu-satir-aktif > td {
    background-color: #fff8e6;
}

.toplu-td-gider-table .td-gider-tutar:not([readonly]) {
    background-color: #fff;
}

/* Taş duvar Excel tarzı toplu gider tablosu */
.td-gider-excel-wrap {
    max-height: 75vh;
}

.td-gider-excel-table {
    min-width: 920px;
    border-collapse: collapse;
    font-size: 0.875rem;
    font-weight: 600;
}

.td-gider-excel-table .satir-no {
    font-weight: 700;
}

.td-gider-excel-table thead th {
    background: #e8eef5;
    border: 1px dotted #adb5bd;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
    vertical-align: middle;
}

.td-gider-excel-table tbody td,
.td-gider-excel-table tfoot td {
    border: 1px dotted #ced4da;
    padding: 0;
    vertical-align: middle;
}

.td-gider-excel-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.td-gider-excel-table tbody tr.toplu-satir-aktif {
    background-color: #fff3cd !important;
}

.td-gider-excel-table tbody tr.td-gider-satir-kirmizi .td-gider-excel-input {
    color: #dc3545;
}

.td-gider-excel-table tbody tr.td-gider-satir-kirmizi .toplam_gider {
    color: #dc3545;
}

.td-gider-excel-input {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.35rem 0.5rem;
    font-size: inherit;
    line-height: 1.3;
    min-height: 2rem;
}

.td-gider-excel-input:focus {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
    background: #fff;
}

.td-gider-excel-input.toplam_gider {
    background: transparent;
    cursor: default;
}

.td-gider-col-no { width: 2.5rem; }
.td-gider-col-tarih { width: 7rem; }
.td-gider-col-aciklama { min-width: 280px; }
.td-gider-col-birim { width: 5.5rem; }
.td-gider-col-miktar { width: 5.5rem; }
.td-gider-col-fiyat { width: 8rem; }
.td-gider-col-toplam { width: 8.5rem; }

.td-gider-footer td {
    background: #e8eef5;
    border-top: 2px solid #adb5bd !important;
    padding: 0.5rem !important;
}

.td-gider-varsayilan-bar {
    background: #f8f9fa;
}

.toplu-gider-table .toplam_gider {
    min-width: 100px;
    font-weight: 600;
}

.toplu-gider-table td.gider-alan-pasif {
    opacity: 0.4;
    background-color: #f1f3f5;
}

.toplu-gider-table td.gider-alan-pasif input,
.toplu-gider-table td.gider-alan-pasif select {
    background-color: #f1f3f5;
    cursor: not-allowed;
}

.gider-liste-table .gider-grup-satir > td {
    background-color: #fafbfc;
}

.gider-grup-kalem + .gider-grup-kalem {
    margin-top: 0.2rem;
    padding-top: 0.2rem;
    border-top: 1px dashed #dee2e6;
}

.gider-kalem-etiket {
    display: inline-block;
    font-weight: 600;
    font-size: 11px;
    line-height: 1.3;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

.gider-kalem-personel {
    color: #364fc7;
    background-color: #edf2ff;
}

.gider-kalem-akaryakit {
    color: #d9480f;
    background-color: #fff4e6;
}

.gider-kalem-adblue {
    color: #1864ab;
    background-color: #e7f5ff;
}

.gider-kalem-servis {
    color: #087f5b;
    background-color: #e6fcf5;
}

.gider-kalem-yag {
    color: #e67700;
    background-color: #fff9db;
}

.gider-kalem-nakliye {
    color: #0b7285;
    background-color: #e3fafc;
}

.gider-kalem-diger {
    color: #495057;
    background-color: #f1f3f5;
}

.gider-grup-islem-etiket {
    max-width: 72px;
    display: inline-block;
}

.proje-kayit-table {
    table-layout: auto;
}

.proje-kayit-table th,
.proje-kayit-table td {
    vertical-align: middle;
}

.proje-kayit-table thead th {
    white-space: nowrap;
}

.cari-meta a:hover {
    color: var(--primary-color) !important;
}

.cari-tahsilat-progress {
    background-color: #e9ecef;
}

#tahsilatFormCard {
    position: sticky;
    top: 1rem;
}

.cari-gelir-aylik-table thead th {
    white-space: nowrap;
}

.cari-gelir-aylik-table tfoot td {
    border-top: 2px solid #dee2e6;
}

.cari-gelir-ay-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.25rem;
}

.cari-gelir-ay-tabs .nav-link {
    white-space: nowrap;
    font-size: 0.875rem;
    padding: 0.5rem 0.85rem;
}

.cari-gelir-ay-tabs .nav-link .badge {
    font-size: 0.7rem;
    vertical-align: middle;
}

.cari-gelir-kalem-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    height: 100%;
    border: 1px solid #e9ecef;
}

.cari-gelir-kalem-card.cari-gelir-kalem-toplam {
    background: #edf7ed;
    border-color: #badbcc;
}

.cari-gelir-kalem-label {
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.cari-gelir-kalem-value {
    font-size: 1rem;
    font-weight: 600;
}

.cari-gelir-kalem-alt {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.cari-gelir-aylik-table td small,
.gelir-liste-table td small,
.gelir-aylik-table td small {
    font-size: 11px;
}

.gelir-liste-table thead th,
.gelir-aylik-table thead th,
.gider-liste-table thead th,
.gider-aylik-table thead th {
    white-space: nowrap;
}

.gelir-liste-table tfoot td,
.gelir-aylik-table tfoot td,
.gider-liste-table tfoot td,
.gider-aylik-table tfoot td {
    border-top: 2px solid #dee2e6;
}

/* Print */
@media print {
    .sidebar, .navbar, .btn, .filter-bar { display: none !important; }
    .main-content { margin-left: 0 !important; }
}

.kayit-onay-ozet th {
    width: 38%;
    font-weight: 600;
    color: #495057;
    vertical-align: top;
    padding: 0.2rem 0.5rem 0.2rem 0 !important;
}

.kayit-onay-ozet td {
    padding: 0.2rem 0 !important;
}

.kayit-onay-swalert {
    text-align: left !important;
}

/* Ayarlar kartları */
.ayar-kart {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ayar-kart:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

.ayar-kart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}
