/* Borç Takip Sistemi - Stil Dosyası */

/* Ana konteyner */
.debt-tracking-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 15px;
    max-width: 1200px;
    margin: 30px;
}

/* Form ve içerik bölümlerini yan yana düzenleme */
.debt-content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

/* Form bölümü */
.debt-form-section {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    min-width: 320px;
}

/* Tablo bölümü */
.debts-tab-section {
    flex: 3;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    overflow: hidden;
}

/* Form başlığı */
.form-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Form grup */
.form-group {
    margin-bottom: 15px;
}

/* Form etiketi */
.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

/* Form girdi alanları */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Tuş grubu */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Temel buton stilleri */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    transform: translateY(1px);
}

/* Birincil buton */
.btn-primary {
    background-color: #4a90e2;
    color: white;
}

/* İkincil buton */
.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

/* Tehlike butonu */
.btn-danger {
    background-color: #e74c3c;
    color: white;
}

/* Başarı butonu */
.btn-success {
    background-color: #2ecc71;
    color: white;
}

/* Tab butonları */
.tab-buttons {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 1px;
}

.tab-button {
    padding: 10px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #777;
    white-space: nowrap;
}

.tab-button:hover {
    color: #4a90e2;
}

.tab-button.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

/* Özet kutuları */
.debt-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-box {
    flex: 1;
    min-width: 180px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.summary-box.receivables {
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
}

.summary-box.payables {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
}

.summary-box.invoices {
    background-color: rgba(234, 171, 16, 0.1);
    border-left: 3px solid #EAAB10;
}

.summary-box.net {
    background-color: rgba(74, 144, 226, 0.1);
    border-left: 3px solid #4a90e2;
}

.summary-box.system {
    background-color: rgba(138, 43, 226, 0.1);
    border-left: 3px solid #8A2BE2;
}

.summary-title {
    font-size: 14px;
    color: #777;
    margin-bottom: 5px;
}

.value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.value.income {
    color: #2ecc71;
}

.value.expense {
    color: #e74c3c;
}

.value.invoice {
    color: #EAAB10;
}

.value.system {
    color: #8A2BE2;
}

.debt-type.invoice.sistem-borcu {
    color: #9c27b0; /* Purple color for sistem borcu */
}

/* Arama ve filtreleme */
.debt-filter-section {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.search-box {
    flex: 2;
    min-width: 200px;
}

.filter-box {
    flex: 1;
    min-width: 150px;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pagination-button {
    padding: 8px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-button:hover {
    background-color: #e0e0e0;
}

.pagination-button.active {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.dark-theme .pagination-button {
    background-color: #333;
    border-color: #444;
    color: #ddd;
}

body.dark-theme .pagination-button:hover {
    background-color: #444;
}

body.dark-theme .pagination-button.active {
    background-color: #4a90e2;
    color: white;
    border-color: #3a7fcf;
}

@media (max-width: 768px) {
    .pagination-controls {
        margin: 15px 0;
    }
    
    .pagination-button {
        padding: 8px 10px;
        min-width: 36px;
        font-size: 13px;
    }
}

/* Borç tablosu */
.debts-table {
    width: 100%;
    border-collapse: collapse;
}

.debts-table th {
    text-align: left;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #555;
}

.debts-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.debts-table tr:hover {
    background-color: #f5f5f5;
}

.debts-table tr.overdue {
    background-color: rgba(231, 76, 60, 0.05);
}

.debts-table tr.overdue:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Tablo içindeki etiketler */
.debt-type {
    display: inline-block;
    font-weight: 500;
}

.debt-type.income {
    color: #2ecc71;
}

.debt-type.expense {
    color: #e74c3c;
}

.debt-type.invoice {
    color: #EAAB10;
}

.debt-type.invoice.sistem-borcu {
    color: #9c27b0; /* Purple color for sistem borcu */
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: rgba(74, 144, 226, 0.1);
    color: #4a90e2;
}

.status-paid {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.status-partial {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.overdue-badge {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Tablo içindeki işlem butonları */
.actions {
    white-space: nowrap;
}

.btn-icon {
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    font-size: 16px;
    margin-right: 5px;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: #f0f0f0;
}

/* Bildirim stili */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 90%;
    width: 350px;
    z-index: 20000; /* Highest z-index to always be on top */
}

.notification {
    display: none; /* Varsayılan olarak gizli */
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s;
    z-index: 20000;
}

.notification.info {
    border-left: 4px solid #4a90e2;
}

.notification.success {
    border-left: 4px solid #2ecc71;
}

.notification.warning {
    border-left: 4px solid #f39c12;
}

.notification.error {
    border-left: 4px solid #e74c3c;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.notification-message {
    font-size: 14px;
    color: #666;
}

/* Yükleme göstergesi - ana CSS'te olmadığı için burada tanımlıyoruz */
#loading.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

.loading-text {
    font-size: 16px;
    color: #555;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Karanlık tema uyumlu stilller için yükleme göstergesi */
body.dark-theme #loading.loading-overlay {
    background-color: rgba(30, 30, 45, 0.8);
}

body.dark-theme .loading-text {
    color: #c0c0c0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 10001;
}

.modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-body {
    padding: 20px 25px;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    transition: color 0.2s;
    border: none;
    background: none;
    padding: 0;
    line-height: 1;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-button:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

/* Form inside modal */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal .form-group {
    margin-bottom: 18px;
}

.modal .form-group:last-child {
    margin-bottom: 0;
}

.modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Form input fields */
.modal input[type="text"],
.modal input[type="number"],
.modal input[type="date"],
.modal select,
.modal textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background-color: #fff;
    transition: all 0.2s ease;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    border-color: #4285f4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.15);
}

.modal input:hover,
.modal select:hover,
.modal textarea:hover {
    border-color: #bbb;
}

/* Modal action buttons */
.modal .button-group {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
    gap: 12px;
}

.modal .btn {
    padding: 12px 20px;
    min-width: 100px;
}

.modal .btn-primary {
    background-color: #4285f4;
    box-shadow: 0 2px 5px rgba(66, 133, 244, 0.3);
}

.modal .btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.4);
}

.modal .btn-secondary {
    background-color: #f1f3f4;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.modal .btn-secondary:hover {
    background-color: #e8eaed;
    border-color: #d2d6da;
}

/* Dark theme compatibility */
body.dark-theme .modal-content {
    background-color: #2a2a3c;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

body.dark-theme .modal-header {
    border-bottom-color: #3a3a4c;
}

body.dark-theme .modal-header h3 {
    color: #e0e0e0;
}

body.dark-theme .close-button {
    color: #b0b0b0;
}

body.dark-theme .close-button:hover {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.15);
}

body.dark-theme .modal .form-group label {
    color: #c0c0c0;
}

body.dark-theme .modal input[type="text"],
body.dark-theme .modal input[type="number"],
body.dark-theme .modal input[type="date"],
body.dark-theme .modal select,
body.dark-theme .modal textarea {
    background-color: #1e1e2d;
    border-color: #3a3a4c;
    color: #e0e0e0;
}

body.dark-theme .modal input:hover,
body.dark-theme .modal select:hover,
body.dark-theme .modal textarea:hover {
    border-color: #4a4a5c;
}

body.dark-theme .modal .btn-secondary {
    background-color: #3a3a4c;
    color: #e0e0e0;
    border-color: #4a4a5c;
}

body.dark-theme .modal .btn-secondary:hover {
    background-color: #45455d;
    border-color: #55556d;
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 80vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 15px 20px;
    }
    
    .modal .button-group {
        flex-direction: column;
    }
    
    .modal .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Mobil ve tablet için duyarlı tasarım */
@media (max-width: 768px) {
    .debt-content-wrapper {
        flex-direction: column;
    }
    
    .debt-form-section,
    .debts-tab-section {
        min-width: 100%;
    }
    
    .debt-summary {
        flex-direction: column;
    }
    
    .summary-box {
        min-width: 100%;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        text-align: center;
        padding: 8px;
    }
    
    .debt-filter-section {
        flex-direction: column;
    }
    
    .search-box,
    .filter-box {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        margin-bottom: 10px;
    }
    
    .debts-table {
        display: block;
        overflow-x: auto;
    }
    
    .navbar {
        padding: 10px 15px;
    }
    
    .container {
        padding: 10px 5px;
    }
    
    .debt-tracking-container {
        padding: 10px;
        gap: 15px;
    }
    
    /* Table responsive improvements with collapsible rows */
    .debts-table thead {
        display: none;
    }
    
    .debts-table, 
    .debts-table tbody, 
    .debts-table tr, 
    .debts-table td {
        display: block;
        width: 100%;
    }
    
    .debts-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
        position: relative;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    
    body.dark-theme .debts-table tr {
        border-color: #3a3a4c;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    
    /* Initially hide all cells except the first one (person/institution) */
    .debts-table td:not(:first-child) {
        display: none;
    }
    
    /* When row is expanded, show all cells */
    .debts-table tr.expanded td {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        border-bottom: 1px solid #f5f5f5;
        min-height: 40px;
    }
    
    body.dark-theme .debts-table tr.expanded td {
        border-bottom-color: #2a2a3c;
    }
    
    .debts-table tr.expanded td:last-child {
        border-bottom: none;
    }
    
    /* Style the first cell (person/institution) as clickable */
    .debts-table td:first-child {
        display: flex;
        padding: 15px;
        font-weight: 500;
        align-items: center;
        cursor: pointer;
        position: relative;
        min-height: 50px;
        justify-content: space-between;
        border-bottom: none;
    }
    
    .debts-table td:first-child > span:first-child {
        max-width: 60%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        justify-content: flex-start;
        margin-right: 0;
    }
    
    /* Style for mobile preview in person cell */
    .mobile-preview {
        font-size: 12px;
        color: #777;
        display: flex;
        gap: 10px;
        align-items: center;
        max-width: 40%;
        text-align: right;
        margin-right: 25px;
    }
    
    .debt-type-preview {
        font-weight: 500;
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 3px;
        background-color: rgba(0,0,0,0.05);
        white-space: nowrap;
    }
    
    .debt-type-preview.income {
        color: #2ecc71;
    }
    
    .debt-type-preview.expense {
        color: #e74c3c;
    }
    
    .debt-type-preview.invoice {
        color: #EAAB10;
    }
    
    .amount-preview {
        font-weight: 500;
    }
    
    .amount-preview.income {
        color: #2ecc71;
    }
    
    .amount-preview.expense {
        color: #e74c3c;
    }
    
    .amount-preview.invoice {
        color: #EAAB10;
    }
    
    body.dark-theme .mobile-preview {
        color: #aaa;
    }
    
    body.dark-theme .debt-type-preview {
        background-color: rgba(255,255,255,0.1);
    }
    
    /* Fix arrow position */
    .debts-table td:first-child:after {
        content: '▼';
        color: #999;
        font-size: 10px;
        transition: transform 0.3s ease;
        position: absolute;
        right: 15px;
    }
    
    .debts-table tr.expanded td:first-child:after {
        transform: rotate(180deg);
    }
    
    /* Add some background color difference for expanded rows */
    .debts-table tr.expanded {
        background-color: #f9f9f9;
    }
    
    body.dark-theme .debts-table tr.expanded {
        background-color: #2d2d40;
    }
    
    /* Improve alignment of content in expanded cells */
    .debts-table tr.expanded td:before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 10px;
        min-width: 100px;
        width: 30%;
        max-width: 150px;
        color: #555;
        flex-shrink: 0;
    }
    
    body.dark-theme .debts-table tr.expanded td:before {
        color: #aaa;
    }
    
    /* Improve alignment of the debt type and status badges */
    .debts-table tr.expanded td span.debt-type,
    .debts-table tr.expanded td span.status-badge {
        min-width: 80px;
        text-align: left;
        margin-left: 0;
        display: inline-flex;
        justify-content: flex-start;
        align-items: center;
    }
    
    /* Improve styling of action buttons */
    .debts-table tr.expanded td.actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 15px;
    }
    
    .debts-table tr.expanded td.actions button {
        margin: 0;
    }
    
    /* Fix status badge positioning */
    .status-badge {
        margin-left: 0;
    }
    
    /* Remove width constraint for improved overflow behavior */
    .debt-content-wrapper {
        width: 100%;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
    }
    
    /* Fix for alerts in mobile view */
    .alert {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        top: 10px;
    }
    
    /* For very small screens, further adjustments */
    @media (max-width: 480px) {
        .mobile-preview {
            flex-direction: column;
            align-items: flex-end;
            gap: 5px;
            margin-right: 25px;
        }
        
        .debts-table tr.expanded td:before {
            min-width: 90px;
            font-size: 13px;
        }
        
        .debts-table tr.expanded td {
            padding: 10px 12px;
            font-size: 13px;
            flex-wrap: wrap;
        }
        
        .debts-table tr.expanded td.actions {
            padding: 10px 12px;
            justify-content: space-between;
        }
        
        .debts-table tr.expanded td.actions button {
            padding: 5px;
            min-width: auto;
        }
        
        .btn-icon {
            margin-right: 0;
        }
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .navbar {
        padding: 8px 10px;
    }
    
    .navbar-title {
        font-size: 16px;
    }
    
    .debt-tracking-container {
        padding: 5px;
    }
    
    .debt-form-section, 
    .debts-tab-section {
        padding: 15px 10px;
    }
    
    /* Smaller inputs for very small screens */
    .form-input, 
    .form-select, 
    .form-textarea {
        padding: 8px;
        font-size: 13px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Better payment details on mobile */
    .payment-details-container {
        padding: 5px;
    }
    
    .payment-info-row {
        padding: 10px 5px;
    }
}

/* Additional dark mode adjustments */
body.dark-theme {
    color-scheme: dark;
}

body.dark-theme .payment-status-final {
    background-color: rgba(76, 175, 80, 0.8);
}

body.dark-theme .payment-status-partial {
    background-color: rgba(33, 150, 243, 0.8);
}

body.dark-theme .payment-history-empty {
    background-color: #2a2a3c;
    color: #aaa;
}

body.dark-theme .sidebar-backdrop.visible {
    background-color: rgba(0, 0, 0, 0.7);
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder,
body.dark-theme select::placeholder {
    color: #666;
}

body.dark-theme .btn-icon span {
    color: #e0e0e0;
}

/* Make alerts and modals readable on all screen sizes in dark mode */
body.dark-theme .alert {
    background-color: #2a2a3c;
    color: #e0e0e0;
}

body.dark-theme .notification {
    background-color: #2a2a3c;
    color: #e0e0e0;
}

body.dark-theme .notification-message {
    color: #bbb;
}

/* Kısmi ödeme bilgisi için stiller */
.paid-amount-info {
    display: flex;
    flex-direction: column;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.5;
}

.paid-badge, .remaining-badge, .paid-date-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 2px;
    font-weight: 500;
    background-color: rgba(0, 0, 0, 0.05);
}

.paid-badge {
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
}

.remaining-badge {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.paid-date-badge {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

/* Dark theme support */
body.dark-theme .paid-badge {
    background-color: rgba(46, 204, 113, 0.2);
}

body.dark-theme .remaining-badge {
    background-color: rgba(231, 76, 60, 0.2);
}

body.dark-theme .paid-date-badge {
    background-color: rgba(52, 152, 219, 0.2);
}

/* Form guidance text */
.form-guidance {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    padding: 8px 10px;
    background-color: #f8f9fa;
    border-left: 3px solid #4a90e2;
    border-radius: 4px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.form-guidance strong {
    color: #333;
    font-weight: 600;
}

body.dark-theme .form-guidance {
    color: #aaa;
    background-color: #2a2a3c;
    border-left-color: #4a90e2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

body.dark-theme .form-guidance strong {
    color: #ddd;
}

/* Ödeme Detayları Modalı Stilleri */
.payment-details-container {
    margin-bottom: 20px;
}

.payment-info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.payment-info-row:last-child {
    border-bottom: none;
}

.payment-info-label {
    flex: 1;
    font-weight: 500;
    color: #555;
    min-width: 140px;
}

.payment-info-value {
    flex: 2;
}

.payment-highlight {
    background-color: rgba(0, 0, 0, 0.02);
    padding: 12px;
    border-radius: 6px;
    margin: 5px 0;
    border: none;
}

.payment-positive {
    color: #2ecc71;
    font-weight: 600;
}

.payment-negative {
    color: #e74c3c;
    font-weight: 600;
}

/* Tıklanabilir status badge */
.status-badge.status-partial,
.status-badge.status-paid,
.status-badge.status-active {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-badge.status-partial:hover {
    background-color: rgba(243, 156, 18, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.status-paid:hover {
    background-color: rgba(46, 204, 113, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.status-active:hover {
    background-color: rgba(74, 144, 226, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.status-partial:active,
.status-badge.status-paid:active,
.status-badge.status-active:active {
    transform: translateY(1px);
}

/* Dark theme for payment details */
body.dark-theme .payment-info-row {
    border-bottom-color: #3a3a4c;
}

body.dark-theme .payment-info-label {
    color: #b0b0b0;
}

body.dark-theme .payment-highlight {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Simplified amount display for partial payments */
.debt-amount {
    font-weight: 600;
}

.remaining-amount {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    font-weight: 500;
}

/* Payment History styles */
.payment-history-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.payment-history-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
    font-size: 15px;
}

.payment-history-item {
    padding: 10px;
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    font-size: 14px;
    border-left: 3px solid rgba(46, 204, 113, 0.3);
}

.payment-main-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-history-date {
    color: #666;
}

.payment-history-amount {
    font-weight: 600;
    color: #2ecc71;
}

.payment-history-details {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dotted #eee;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

.payment-history-details span {
    color: #888;
    margin-right: 4px;
}

/* Dark theme support */
body.dark-theme .payment-history-container {
    border-top-color: #3a3a4c;
}

body.dark-theme .payment-history-title {
    color: #b0b0b0;
}

body.dark-theme .payment-history-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-left-color: rgba(46, 204, 113, 0.4);
}

body.dark-theme .payment-history-date {
    color: #aaa;
}

body.dark-theme .payment-history-details {
    border-top-color: #3a3a4c;
}

body.dark-theme .payment-history-details span {
    color: #999;
}

/* Final payment label */
.final-payment-label {
    display: inline-block;
    font-size: 11px;
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
    font-weight: 500;
}

/* Make paid status badge clickable too */
.status-badge.status-partial,
.status-badge.status-paid {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-badge.status-partial:hover {
    background-color: rgba(243, 156, 18, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.status-paid:hover {
    background-color: rgba(46, 204, 113, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-badge.status-partial:active,
.status-badge.status-paid:active {
    transform: translateY(1px);
}

/* Dark theme support */
body.dark-theme .final-payment-label {
    background-color: rgba(46, 204, 113, 0.25);
}

/* Payment History Table */
.payment-history-title {
    margin: 20px 0 10px;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.payment-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.payment-history-table th,
.payment-history-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.payment-history-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.payment-history-table tr:hover {
    background-color: #f9f9f9;
}

.payment-status-final {
    background-color: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

.payment-status-partial {
    background-color: #2196F3;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

.payment-history-empty {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    color: #777;
    text-align: center;
    font-style: italic;
}

/* Dark theme adjustments */
body.dark-theme .payment-history-title {
    color: #ddd;
    border-bottom-color: #444;
}

body.dark-theme .payment-history-table th {
    background-color: #333;
    color: #ddd;
}

body.dark-theme .payment-history-table td {
    border-bottom-color: #444;
}

body.dark-theme .payment-history-table tr:hover {
    background-color: #2c2c2c;
}

body.dark-theme .payment-history-empty {
    background-color: #333;
    color: #bbb;
}

.payment-history-error {
    background-color: #ffecec;
    color: #e74c3c;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

/* Dark theme adjustments */
body.dark-theme .payment-history-error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

/* Quick Payment Modal Styles */
#quickPaymentModal .modal-content {
    max-width: 400px;
    margin: auto;
}

#quickPaymentModal .form-group {
    margin-bottom: 20px;
}

#quickPaymentModal select.form-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

#quickPaymentModal .button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

#quickPaymentModal .btn-primary {
    background-color: #4CAF50;
}

#quickPaymentModal .btn-secondary {
    background-color: #f1f1f1;
    color: #333;
}

/* Dark theme support */
body.dark-theme #quickPaymentModal .modal-content {
    background-color: #333;
    color: #fff;
}

body.dark-theme #quickPaymentModal select.form-select {
    background-color: #444;
    color: #fff;
    border-color: #555;
}

body.dark-theme #quickPaymentModal .btn-secondary {
    background-color: #555;
    color: #fff;
}

/* Alerts and Notifications */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 90%;
    width: 350px;
    z-index: 20000;
}

.alert {
    display: none; /* Varsayılan olarak gizli */
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s;
    z-index: 20000;
}

.alert.show {
    display: block;
}

.alert.info {
    border-left: 4px solid #4a90e2;
}

.alert.success {
    border-left: 4px solid #2ecc71;
}

.alert.warning {
    border-left: 4px solid #f39c12;
}

.alert.error {
    border-left: 4px solid #e74c3c;
}

.alert-message {
    margin-right: 20px;
    font-size: 14px;
    color: #333;
}

.alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    background: none;
    border: none;
    padding: 0;
}

.alert-close:hover {
    color: #333;
}

/* Fix for sidebar backdrop */
.sidebar-backdrop {
    z-index: 999;
}

/* Fix for quick pay overlay */
.quick-pay-overlay {
    z-index: 10000;
}

/* Fix for payment details modal */
#paymentDetailsModal {
    z-index: 10010;
}

/* Fix for loading overlay */
.loading-overlay {
    z-index: 30000;
}

/* Dark mode improvements */
body.dark-theme {
    color-scheme: dark;
}

body.dark-theme .payment-status-final {
    background-color: rgba(76, 175, 80, 0.8);
}

body.dark-theme .payment-status-partial {
    background-color: rgba(33, 150, 243, 0.8);
}

body.dark-theme .payment-history-empty {
    background-color: #2a2a3c;
    color: #aaa;
}

body.dark-theme .sidebar-backdrop.visible {
    background-color: rgba(0, 0, 0, 0.7);
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder,
body.dark-theme select::placeholder {
    color: #666;
}

body.dark-theme .btn-icon span {
    color: #e0e0e0;
}

/* Make alerts and modals readable on all screen sizes in dark mode */
body.dark-theme .alert {
    background-color: #2a2a3c;
    color: #e0e0e0;
}

body.dark-theme .notification {
    background-color: #2a2a3c;
    color: #e0e0e0;
}

body.dark-theme .notification-message {
    color: #bbb;
}

/* Dark theme support for alert and notification */
body.dark-theme .alert,
body.dark-theme .notification {
    background-color: #2a2a3c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.dark-theme .alert-message,
body.dark-theme .notification-message {
    color: #eee;
}

body.dark-theme .alert-close,
body.dark-theme .notification-close {
    color: #aaa;
}

body.dark-theme .notification-close {
    color: #aaa;
}

body.dark-theme .alert-close:hover,
body.dark-theme .notification-close:hover {
    color: #eee;
}

/* Notification ve alert kapatma butonu */
.notification .alert-close,
.alert .alert-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.notification .alert-close:hover,
.alert .alert-close:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-theme .notification .alert-close,
body.dark-theme .alert .alert-close {
    color: #aaa;
}

body.dark-theme .notification .alert-close:hover,
body.dark-theme .alert .alert-close:hover {
    color: #eee;
    background-color: rgba(255, 255, 255, 0.1);
}

.status-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.add-new-debt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
    width: 22px;
    padding: 0;
    margin: 0;
    font-size: 12px;
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-radius: 50%;
}

.add-new-debt:hover {
    background-color: rgba(46, 204, 113, 0.2);
}

body.dark-theme .add-new-debt {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

body.dark-theme .add-new-debt:hover {
    background-color: rgba(46, 204, 113, 0.3);
}

/* Mobil görünüm için düzenleme */
@media (max-width: 768px) {
    .status-actions {
        justify-content: flex-start;
    }
}

/* Cari Borç Takip Sayfası Stilleri */
.current-debt-tracking-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
    padding: 30px;
    width: 100%;
}

/* Page header */
.current-debt-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.current-debt-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.current-debt-header .description {
    color: #666;
    font-size: 14px;
}

/* Total summary */
.wholesaler-total-summary {
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.wholesaler-total-summary h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #555;
}

.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.positive {
    color: #2ecc71;
}

.negative {
    color: #e74c3c;
}

/* Wholesaler summary boxes */
.wholesaler-summary-section {
    margin-bottom: 30px;
}

.wholesaler-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.wholesaler-summary-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 4px solid #4a90e2;
}

.wholesaler-summary-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wholesaler-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.wholesaler-total {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.wholesaler-debt-count {
    font-size: 12px;
    color: #777;
}

/* Wholesaler selection */
.wholesaler-selection-section {
    margin-bottom: 30px;
}

/* Add wholesaler form */
.add-wholesaler-section {
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.add-wholesaler-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

/* Debt details section */
.debt-details-section {
    margin-top: 30px;
}

.wholesaler-info {
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wholesaler-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.wholesaler-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-item {
    margin-bottom: 5px;
}

.detail-label {
    font-weight: 500;
    color: #555;
    margin-right: 5px;
}

.detail-value {
    color: #333;
}

/* Add debt form */
.add-debt-section {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.add-debt-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.add-debt-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.debt-form-row {
    display: flex;
    gap: 15px;
}

.debt-form-row .form-group {
    flex: 1;
}

/* Debt list */
.wholesaler-debts-list-section {
    margin-bottom: 30px;
}

.wholesaler-debts-list-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.wholesaler-debts-list {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.no-debts {
    padding: 20px;
    text-align: center;
    color: #777;
    font-style: italic;
}

/* Debt table */
.wholesaler-debts-table {
    width: 100%;
    border-collapse: collapse;
}

.wholesaler-debts-table th {
    background-color: #f5f5f5;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #eee;
}

.wholesaler-debts-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.wholesaler-debts-table tr:hover {
    background-color: #f9f9f9;
}

.debt-description {
    font-weight: 500;
}

.debt-notes {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

.due-date {
    font-size: 12px;
    color: #777;
    margin-top: 3px;
}

.debt-actions {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: #f0f0f0;
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Payment info in modal */
.payment-info-summary {
    background-color: #f5f7fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .current-debt-tracking-container {
        padding: 15px;
    }
    
    .debt-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .wholesaler-summary {
        grid-template-columns: 1fr;
    }
    
    .wholesaler-details {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Table responsiveness for mobile */
    .wholesaler-debts-table thead {
        display: none;
    }
    
    .wholesaler-debts-table, 
    .wholesaler-debts-table tbody, 
    .wholesaler-debts-table tr, 
    .wholesaler-debts-table td {
        display: block;
        width: 100%;
    }
    
    .wholesaler-debts-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .wholesaler-debts-table td {
        display: flex;
        flex-direction: column;
        padding: 10px 15px;
        position: relative;
        padding-left: 35%;
        min-height: 40px;
    }
    
    .wholesaler-debts-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 30%;
        font-weight: 600;
        font-size: 13px;
        color: #555;
    }
    
    .debt-actions {
        justify-content: flex-start;
        padding-left: 0;
    }
}

/* Dark theme support */
body.dark-theme .current-debt-tracking-container {
    background-color: #252836;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.dark-theme .current-debt-header h1 {
    color: #e0e0e0;
}

body.dark-theme .current-debt-header .description {
    color: #aaa;
}

body.dark-theme .current-debt-header {
    border-bottom-color: #3a3a4c;
}

body.dark-theme .wholesaler-total-summary {
    background-color: #2a2a3c;
}

body.dark-theme .wholesaler-total-summary h2 {
    color: #bbb;
}

body.dark-theme .total-amount {
    color: #e0e0e0;
}

body.dark-theme .wholesaler-summary-box {
    background-color: #2a2a3c;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

body.dark-theme .wholesaler-summary-box:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .wholesaler-name {
    color: #e0e0e0;
}

body.dark-theme .wholesaler-debt-count {
    color: #aaa;
}

body.dark-theme .add-wholesaler-section,
body.dark-theme .wholesaler-info {
    background-color: #2a2a3c;
}

body.dark-theme .add-wholesaler-section h3,
body.dark-theme .wholesaler-info h3,
body.dark-theme .add-debt-section h3,
body.dark-theme .wholesaler-debts-list-section h3 {
    color: #e0e0e0;
}

body.dark-theme .detail-label {
    color: #bbb;
}

body.dark-theme .detail-value {
    color: #e0e0e0;
}

body.dark-theme .add-debt-section {
    background-color: #2a2a3c;
    border-color: #3a3a4c;
}

body.dark-theme .wholesaler-debts-table th {
    background-color: #333;
    color: #e0e0e0;
    border-bottom-color: #3a3a4c;
}

body.dark-theme .wholesaler-debts-table td {
    border-bottom-color: #3a3a4c;
    color: #e0e0e0;
}

body.dark-theme .wholesaler-debts-table tr:hover {
    background-color: #2d2d40;
}

body.dark-theme .debt-notes,
body.dark-theme .due-date {
    color: #aaa;
}

body.dark-theme .btn-icon:hover {
    background-color: #3a3a4c;
}

body.dark-theme .payment-info-summary {
    background-color: #2a2a3c;
}

body.dark-theme .no-debts {
    color: #aaa;
}

body.dark-theme .wholesaler-debts-table tr {
    border-color: #3a3a4c;
}

.pagination-ellipsis {
    display: inline-block;
    padding: 8px 5px;
    min-width: 20px;
    text-align: center;
    color: #777;
}

body.dark-theme .pagination-ellipsis {
    color: #aaa;
}

body.dark-theme .pagination-button {
    background-color: #333;
    border-color: #444;
    color: #ddd;
} 