/* Root Variables */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --success-color: #198754;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
    --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    --shadow-md: 0 .5rem 1rem rgba(0,0,0,.15);
    --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
}

/* Base Styles */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark-color);
}

/* Focus States */
.btn:focus, 
.btn:active:focus, 
.btn-link.nav-link:focus, 
.form-control:focus, 
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Form Floating Labels */
.form-floating > .form-control-plaintext::placeholder, 
.form-floating > .form-control::placeholder {
    color: var(--secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, 
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Sync Status Styles */
.synced-row {
    background-color: rgba(40, 167, 69, 0.05);
}

.synced-row:hover {
    background-color: rgba(40, 167, 69, 0.1);
}

.not-synced-row {
    background-color: rgba(255, 193, 7, 0.05);
}

.not-synced-row:hover {
    background-color: rgba(255, 193, 7, 0.1);
}

.sync-status-icon {
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-hover {
    transition: box-shadow 0.2s ease-in-out;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-md);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        margin: 0;
        padding: 15px;
    }
    
    a[href]:after {
        content: none !important;
    }
}

/* Card styles */
.card {
    margin-bottom: 1.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
    border: 1px solid rgba(33, 40, 50, 0.125);
}

.card .card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(33, 40, 50, 0.125);
    padding: 1rem 1.35rem;
}

.card .card-body {
    padding: 1.35rem;
}

/* Table styles */
.table {
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-bordered thead th {
    border-bottom-width: 1px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

/* Button styles */
.btn {
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group {
    display: flex;
    gap: 0.25rem;
}

.btn-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
}

.btn-outline-info:hover {
    color: #fff;
}

.btn-outline-primary:hover {
    color: #fff;
}

.btn-outline-warning:hover {
    color: #fff;
}

.btn-outline-danger:hover {
    color: #fff;
}

/* Icon styles */
.fas {
    margin-right: 0.25rem;
}

/* Navbar styles */
.navbar {
    padding: 0.5rem 1rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(33, 40, 50, 0.15);
}

.navbar-brand {
    font-weight: 600;
}

.nav-item {
    margin-right: 0.5rem;
}

/* Navbar butonları için stiller */
.btn-light {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    color: #333;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease-in-out;
}

.btn-light:hover {
    background-color: #e9ecef;
    border-color: #ccc;
    color: #000;
}

.btn-light i {
    font-size: 0.875rem;
}

/* Navbar düzenlemeleri */
.navbar {
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-nav {
    align-items: center;
}

/* Toastr customization */
.toast-success {
    background-color: #198754 !important;
}

.toast-error {
    background-color: #dc3545 !important;
}

.toast-info {
    background-color: #0dcaf0 !important;
}

.toast-warning {
    background-color: #ffc107 !important;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_length select {
    min-width: 60px;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 250px;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.5rem;
    margin-left: 2px;
    border-radius: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0d6efd;
    border-color: #0d6efd;
    color: white !important;
}

/* Modal styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.form-label {
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.form-control-plaintext {
    font-size: 1rem;
    padding: 0.375rem 0;
    margin-bottom: 0;
    color: #212529;
}

/* Spinner styles */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Responsive düzenlemeler */
@media (max-width: 991.98px) {
    .d-flex.align-items-center {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-light {
        width: calc(50% - 0.5rem);
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .btn-light {
        width: 100%;
    }
}

/* Footer */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

/* Responsive styles */
@media (max-width: 768px) {
    .btn-group {
        flex-wrap: nowrap;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        min-width: 150px;
    }
    
    .card .card-body {
        padding: 1rem;
    }
}

/* Temel Stiller */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Navbar Stiller */
.navbar-brand {
    padding: 0.5rem 0;
}

.brand-container {
    position: relative;
    padding: 5px 10px;
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
    transition: all 0.3s ease;
}

.brand-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 2px;
}

.brand-plus {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.brand-pro {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e3f2fd;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 5px;
    margin-left: 4px;
    text-transform: uppercase;
}

.brand-tagline {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #dc3545;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transition: all 0.3s ease;
}

.brand-container:hover .brand-tagline {
    opacity: 1;
    bottom: -22px;
}

/* Modal Stiller */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.modal-dialog {
    max-width: 400px;
}

.modal-header {
    background: linear-gradient(135deg, #0d6efd, #0099ff);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 6px 10px;
}

.modal-title {
    font-weight: 600;
    font-size: 1rem;
}

.modal-body {
    padding: 8px;
}

/* DataTable Stiller */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-size: 0.875rem;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.875rem;
    padding-top: 0.5em;
}

.dataTables_wrapper .dataTables_paginate {
    font-size: 0.875rem;
    padding-top: 0.5em;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.25em 0.5em;
}

/* Tablo Stiller */
.table {
    font-size: 0.875rem;
}

.table thead th {
    background-color: #0d6efd;
    color: white;
    padding: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.table tbody td {
    padding: 6px 8px;
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Form Stiller */
.form-control {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* Button Stiller */
.btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .brand-text, .brand-plus {
        font-size: 1.3rem;
    }
    .brand-pro {
        font-size: 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Menü Butonları */
.btn-menu {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-menu:hover {
    background-color: #e9ecef;
    color: #212529;
}

.btn-menu i {
    font-size: 1.1rem;
}

.dropdown-menu {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #e9ecef;
    color: #0d6efd;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #6c757d;
}

.dropdown-item:hover i {
    color: #0d6efd;
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Presto Tablo Stilleri */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.05);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
    font-weight: 600;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    transform: translateY(-1px);
}

/* Responsive Düzenlemeler */
@media (max-width: 992px) {
    .nav-menu-container {
        margin-top: 15px;
    }

    .d-flex.gap-3 {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-menu {
        min-width: 45%;
        margin: 5px;
    }
}

@media (max-width: 576px) {
    .btn-menu {
        min-width: 100%;
    }
}

/* Genel Stiller */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background-color: #f8f9fa;
}

/* Navbar Stiller */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-link {
    font-size: 0.95rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* Kart Stiller */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    border-radius: 8px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 1rem;
}

.card-title {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Form Stiller */
.form-control {
    border-radius: 4px;
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Button Stiller */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.btn-primary {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-primary:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Tablo Stiller */
.table {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table td, .table th {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Footer Stiller */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

/* Validation Stiller */
.text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* DataTables Özelleştirmeleri */
.dataTables_wrapper .row {
    margin: 0;
    padding: 1rem 0;
}

.dataTables_filter input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
}

.dataTables_length select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.375rem 1.75rem 0.375rem 0.75rem;
}

/* Responsive Düzenlemeler */
@media (max-width: 768px) {
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding: 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Özel Komponentler */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Toast Bildirimleri */
.toast {
    background-color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.toast-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Modal Stiller */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem;
}

/* Select2 Özelleştirmeleri */
.select2-container--default .select2-selection--single {
    border: 1px solid #ddd;
    border-radius: 4px;
    height: calc(1.5em + 0.75rem + 2px);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(1.5em + 0.75rem);
    padding-left: 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem);
}

/* Modal Kompakt Görünüm Stilleri */
.modal-table-compact {
    margin-bottom: 0;
}

.modal-table-compact tbody tr {
    line-height: 1.2;
}

.modal-table-compact td {
    padding: 4px 8px;
    vertical-align: middle;
}

/* Modal içindeki tablolar için kompakt görünüm */
#musteriTable tbody tr,
#malzemeTable tbody tr,
#hizmetTable tbody tr {
    line-height: 1.2;
}

#musteriTable td,
#malzemeTable td,
#hizmetTable td {
    padding: 4px 8px;
    vertical-align: middle;
}

/* Modal içindeki seç butonları için kompakt stil */
.modal .btn-success.btn-sm {
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.5;
}

/* Modal başlık ve içerik için kompakt ayarlar */
.modal .modal-header {
    padding: 8px 15px;
}

.modal .modal-body {
    padding: 10px;
}

/* Modal form elemanları için kompakt stil */
.modal .form-control {
    height: 30px;
    padding: 4px 8px;
}

.modal select {
    height: 30px;
    padding: 2px 8px;
}