/* ========================================
   EVRAK KAYIT SİSTEMİ - ÖZEL STIL DOSYASI
   ======================================== */

/* Genel Ayarlar */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Wrapper */
.wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sidebar (Yan Menü) */
.sidebar {
    width: var(--sidebar-width);
    min-height: calc(100vh - 56px);
    background-color: #343a40;
    color: white;
    position: sticky;
    top: 56px;
    transition: all 0.3s ease;
}

.sidebar-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-link.active {
    background-color: rgba(102, 126, 234, 0.2);
    border-left-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    width: 20px;
}

.nav-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 10px 20px;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 0;
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
}

/* Stat Cards (İstatistik Kartları) */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #fff;
    font-weight: 600;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Buttons */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 4px;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 12px;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 12px;
    min-width: 70px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 10px;
    color: #666;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 10px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* File Preview */
#dosyaOnizleme {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#onizlemeIcerik img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Timeline (Paylaşım Geçmişi) */
.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    
    .sidebar.show {
        width: var(--sidebar-width);
    }
    
    .content-area {
        width: 100%;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shadow-sm-hover:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.cursor-pointer {
    cursor: pointer;
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .content-area {
        width: 100%;
    }
}

/* ========================================
   MOBİL UYUMLULUK - RESPONSIVE DESIGN
   ======================================== */

/* Tablet ve Mobil (768px ve altı) */
@media (max-width: 768px) {
    /* Sidebar mobilde gizli */
    .sidebar {
        position: fixed;
        left: -250px;
        top: 56px;
        z-index: 1040;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    /* Content tam genişlik */
    .content-area {
        width: 100%;
        padding: 0.5rem;
    }
    
    .container-fluid {
        padding: 0.5rem;
    }
    
    /* Butonlar mobilde tam genişlik */
    .btn-block-mobile {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Kartlar arasında boşluk azalt */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Başlıklar küçült */
    h1, h2 {
        font-size: 1.5rem;
    }
    
    h3, h4 {
        font-size: 1.25rem;
    }
    
    /* Tablo responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* DataTables mobil */
    .dataTables_wrapper {
        font-size: 0.875rem;
    }
    
    .dataTables_length,
    .dataTables_filter {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .dataTables_length select {
        width: auto;
        display: inline-block;
    }
    
    /* Tablo butonları mobilde küçült */
    .table .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .table .btn i {
        font-size: 0.875rem;
    }
    
    /* Modal mobilde tam genişlik */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* SweetAlert mobil */
    .swal2-popup {
        width: 90% !important;
        padding: 1.5em !important;
    }
    
    .swal2-title {
        font-size: 1.5em !important;
    }
    
    .swal2-html-container {
        font-size: 1em !important;
    }
    
    /* Navbar mobil */
    .navbar-brand {
        font-size: 1rem;
    }
    
    /* Stat kartları mobilde tek sütun */
    .stat-card {
        margin-bottom: 1rem;
    }
    
    /* Filtre alanı mobil */
    #filtreAlani .row > div {
        margin-bottom: 0.75rem;
    }
}

/* Küçük Mobil (576px ve altı) */
@media (max-width: 576px) {
    /* Başlıklar daha küçük */
    h1, h2 {
        font-size: 1.25rem;
    }
    
    h3, h4 {
        font-size: 1.1rem;
    }
    
    /* Padding azalt */
    .container-fluid {
        padding: 0.25rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    /* Butonlar daha küçük */
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Tablo daha compact */
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* İşlem butonları alt alta */
    .table .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    /* SweetAlert daha küçük */
    .swal2-popup {
        width: 95% !important;
        padding: 1em !important;
    }
    
    .swal2-title {
        font-size: 1.25em !important;
        margin-bottom: 0.5em !important;
    }
    
    .swal2-html-container {
        font-size: 0.875em !important;
    }
    
    /* Navbar küçült */
    .navbar {
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-brand {
        font-size: 0.875rem;
    }
    
    /* Dropdown menu tam genişlik */
    .dropdown-menu {
        width: 100%;
    }
}

/* Yatay Mobil (Landscape) */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 200px;
        left: -200px;
    }
    
    .content-area {
        padding: 0.5rem;
    }
}

/* Dosya Input Stilleri */
input[type="file"] {
    cursor: pointer !important;
    display: block !important;
}

input[type="file"]::-webkit-file-upload-button {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #fff;
    color: #495057;
    transition: all 0.3s ease;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

input[type="file"]::file-selector-button {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #fff;
    color: #495057;
    transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}
