/**
 * Borçlular (Veresiye) Sistemi CSS
 * Mobil uygulamadaki tasarım dilini koruyan responsive stil dosyası
 */

/* Borçlular Container */
.borclular-container {
    padding: 0;
}

/* İstatistik Kartları */
.stat-card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon {
    opacity: 0.8;
}

/* Gradient backgrounds for stat cards */
.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

/* Borçlu Kartları */
.debt-card {
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.debt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.debt-card.border-danger {
    border-left: 5px solid #dc3545 !important;
}

.debt-card.border-warning {
    border-left: 5px solid #ffc107 !important;
}

.customer-avatar {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.debt-amount {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Arama Container */
.search-container input {
    border: 1.5px solid #dee2e6;
    border-radius: 25px;
    padding: 12px 20px 12px 45px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.search-container .fa-search {
    color: #6c757d;
    z-index: 2;
}

/* Tahsilat Modal */
.tahsilat-form .customer-info {
    border: 1px solid #dee2e6;
}

.payment-method-card {
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.payment-method-card:hover {
    border-color: #007bff !important;
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.25);
}

.payment-method-card.border-primary {
    border-color: #007bff !important;
}

.payment-method-card.bg-primary {
    background-color: #007bff !important;
    color: white !important;
}

.payment-method-card i {
    transition: all 0.3s ease;
}

.amount-input .input-group-lg .form-control {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.quick-amounts .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.selected-payment-info {
    font-weight: 500;
    border: none;
}

/* Page Header */
.page-header {
    border: 1px solid #dee2e6;
}

.page-title {
    color: #495057;
    font-weight: 600;
}

/* Filter Buttons */
.btn-group .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Empty State */
.text-center .fa-search {
    opacity: 0.5;
}

/* Progress Bar in Cards */
.progress {
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Action Buttons in Cards */
.btn-group-vertical .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.btn-group-vertical .btn:not(:last-child) {
    margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .borclular-container {
        padding: 0 10px;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .debt-card {
        padding: 1rem !important;
    }

    .debt-card .row {
        flex-direction: column;
        text-align: center;
    }

    .debt-card .col-md-2 {
        margin-top: 1rem;
    }

    .btn-group-vertical {
        flex-direction: row;
        justify-content: center;
    }

    .btn-group-vertical .btn {
        flex: 1;
        margin: 0 0.25rem;
    }

    .page-header .col-md-6:last-child {
        text-align: center !important;
        margin-top: 1rem;
    }

    .customer-avatar {
        width: 50px !important;
        height: 50px !important;
        font-size: 16px !important;
    }

    .debt-amount {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .payment-method-selection .col-md-4 {
        margin-bottom: 1rem;
    }

    .payment-method-card {
        padding: 1rem !important;
    }

    .quick-amounts {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .quick-amounts .btn {
        width: 100%;
    }
}

/* Loading State */
.loading-container .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert Positioning */
.alert.position-fixed {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

/* Sidebar Badge */
.nav-badge {
    background-color: #dc3545;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    min-width: 1.5rem;
    text-align: center;
}

/* Modal Enhancements */
.modal-lg {
    max-width: 600px;
}

.modal-header.bg-success {
    border-bottom: none;
}

.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* WhatsApp Button Style */
.btn .fab.fa-whatsapp {
    color: #25d366;
}

.btn-info {
    background-color: #25d366;
    border-color: #25d366;
}

.btn-info:hover {
    background-color: #128c7e;
    border-color: #128c7e;
}

/* Turkish Currency Formatting */
.debt-amount,
.stat-card h3 {
    font-variant-numeric: tabular-nums;
}

/* Animation for Loading */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.debt-card {
    animation: fadeIn 0.5s ease-out;
}

/* Print Styles */
@media print {

    .debt-card .btn-group-vertical,
    .page-header .btn,
    .search-container {
        display: none !important;
    }

    .debt-card {
        border: 1px solid #000 !important;
        margin-bottom: 1rem !important;
        break-inside: avoid;
    }
}