﻿/* ========== GLOBAL STYLING ========== */
:root {
    /* Renk Paleti */
    --primary: #E53935; /* Ana kırmızı */
    --primary-dark: #C62828; /* Koyu kırmızı */
    --secondary: #FDB813; /* Sarı */
    --secondary-light: #FFE082; /* Açık sarı */
    --dark: #191919; /* Siyah */
    --dark-light: #2D2D2D; /* Açık siyah */
    --light: #f8f9fa; /* Açık arkaplan */
    --gray: #6c757d; /* Gri */
    /* Boyutlar */
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

::-webkit-scrollbar {
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

/* ========== BASE STYLES ========== */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: var(--primary-dark);
    }

/* ========== FORM ELEMENTS ========== */
.form-control,
.form-select,
.form-check-input {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
}

    .form-control:focus,
    .form-select:focus,
    .form-check-input:focus,
    .btn:focus,
    .btn:active:focus,
    .btn-link.nav-link:focus {
        border-color: var(--secondary);
        box-shadow: 0 0 0 0.25rem rgba(253, 184, 19, 0.25);
        outline: none;
    }

.form-floating > label {
    color: var(--gray);
}

.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--dark);
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    padding: 0.5rem 1.25rem;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: var(--box-shadow);
    }

.btn-secondary {
    background-color: var(--secondary);
    color: var(--dark);
}

    .btn-secondary:hover {
        background-color: #e6ac00;
        transform: translateY(-1px);
        box-shadow: var(--box-shadow);
    }

.btn-sm {
    min-height: 36px;
}
.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
}

    .btn-outline-primary:hover {
        background-color: var(--primary);
        color: white;
    }

/* ========== NAVBAR ========== */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.75rem 1rem;
    background-color: white !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark) !important;
}

    .navbar-brand img {
        height: 40px;
    }

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--dark) !important;
}

    .nav-link:hover {
        color: var(--primary) !important;
    }

.nav-item.active .nav-link {
    color: var(--primary) !important;
    font-weight: 600;
}

/* Hamburger Menu */
.navbar-toggler {
    border: none;
    font-size: 1.4rem;
    padding: 0.25rem;
}

.navbar-toggler-icon {
    width: 28px;
    height: 28px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
    }
}

/* ========== TABLES ========== */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 1rem;
}

    .table th {
        background-color: #f8f9fa;
        font-weight: 600;
        white-space: nowrap;
        padding: 0.75rem;
        vertical-align: middle;
        border-top: 1px solid #dee2e6;
    }

    .table td {
        padding: 0.75rem;
        vertical-align: middle;
        border-top: 1px solid #dee2e6;
    }

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* ========== CARDS ========== */
.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* ========== LOGIN PAGE ========== */
.login-container {
    display: flex;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light);
}

.login-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
    max-width: 500px;
    margin: 2rem auto;
}

.logo-container {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    padding: 2.5rem 0;
    text-align: center;
}

.company-logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.btn-login {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

    .btn-login:hover {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(229, 57, 53, 0.5);
        color: white;
    }

    .btn-login:active {
        transform: translateY(1px);
    }

    .btn-login::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(to bottom right, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%);
        transform: rotate(30deg);
        transition: all 0.7s;
    }

    .btn-login:hover::before {
        left: 100%;
        top: 100%;
    }

/* ========== UTILITY CLASSES ========== */
.rounded {
    border-radius: var(--border-radius) !important;
}

.shadow {
    box-shadow: var(--box-shadow) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .login-card {
        margin: 1rem;
    }
}

/* ========== CUSTOM COMPONENTS ========== */
/* Accordion */
.accordion-header {
    position: sticky;
    top: 70px;
    z-index: 1020;
    background-color: white;
}

/* Dashboard Boxes */
.rapor-box-1 {
    background-color: #eaf4ff !important;
}

.rapor-box-2 {
    background-color: #e8fff2 !important;
}

.rapor-box-3 {
    background-color: #fff6e8 !important;
}

.rapor-box-4 {
    background-color: #f9eaff !important;
}

/* Sortable Items */
#sortable li {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 10px;
    margin-bottom: 10px;
    background: white;
}

/* Dashboard Tables */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

    .dashboard-table th,
    .dashboard-table td {
        padding: 6px 8px;
        vertical-align: middle;
        text-align: center;
        border: 1px solid #dee2e6;
        white-space: nowrap;
    }

    .dashboard-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background-color: #f0f0f0;
        font-weight: 600;
    }

    .dashboard-table tfoot td {
        font-weight: bold;
        background-color: #f8f9fa;
        border-top: 2px solid #dee2e6;
    }

/* Hover Effects */
.rapor-satiri {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

    .rapor-satiri:hover {
        background-color: #fff8dc;
    }

/* Desktop Hover Dropdown */
@media (min-width: 992px) {
    .hover-dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1050; /* Diğer bileşenlerin üstünde kalması için yeterli */
}

.cursor-move {
    cursor: move;
}

.sortable-placeholder {
    height: 80px;
    background-color: #f5f5f5;
    border: 2px dashed #007bff;
    margin-bottom: 10px;
}

#siralamaUyari {
    transition: opacity 0.3s ease;
}

.ara-toplam-satiri {
    background-color: #fff9db; /* veya #ffe9cc */
    font-weight: bold;
}
.genel-toplam-satiri {
    background-color: ffe9cc; /* Örn: hafif mavi */
    font-weight: bold;
    color: #333;
}


.table-scroll-wrapper {
    max-height: 600px; /* ihtiyaca göre ayarlanabilir */
    overflow-y: auto;
    border: 1px solid #dee2e6;
}

    .table-scroll-wrapper thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background-color: #fff; /* veya tema renginiz */
        border-bottom: 2px solid #dee2e6;
    }



.hidden-row {
    display: none;
}

.toggleable {
    cursor: pointer;
    background-color: #f8f9fa !important;
}

    .toggleable:hover {
        background-color: #e9ecef !important;
    }



/* === Select2 görünümü Bootstrap form alanlarıyla hizalı === */
.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    padding: 5px 8px !important;
    background-color: #fff;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 26px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
    }


/* Tahsilat kartı ufak sıkılaştırma */
.tahsilat-card {
    border-radius: var(--border-radius);
}

    .tahsilat-card .card-header {
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

/* Logo Transfer ikonları */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}

.status-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-fail {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Tahsilat tablo genel hizalama */
.tahsilat-table thead th,
.tahsilat-table tbody td {
    text-align: left; /* her şeyi varsayılan sola hizala */
}

    /* Son kolon (Logo Transfer) ortalı ve dar olsun */
    .tahsilat-table thead th:last-child,
    .tahsilat-table tbody td:last-child {
        text-align: center;
        width: 70px;
    }

/* Sayılar daha düzgün görünsün (ör. tutar) */
.tahsilat-table tbody td {
    font-variant-numeric: tabular-nums; /* 1,2,3 yüksekliği eşit -> sütunlar daha derli toplu görünür */
}

    /* İsteğe bağlı: ilk kolon (İşlem No) taşmasın, tek satır kalsın */
    .tahsilat-table tbody td:first-child {
        white-space: nowrap;
    }
