/**
 * MUHASEBE Modülleri - Ortak CSS Stilleri
 * SQL Tablo Gerektirmez - Sadece Frontend İyileştirmeleri
 */

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 300px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ============================================
   DATATABLES CUSTOMIZATION
   ============================================ */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
}

.dataTables_wrapper .dt-buttons {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dt-buttons .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   FORM VALIDATION
   ============================================ */
.is-invalid {
    border-color: #dc3545;
}

.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* ============================================
   BULK ACTIONS
   ============================================ */
.bulk-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.bulk-actions .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.quick-action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.quick-action-btn:hover {
    transform: scale(1.1);
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */
.card-animate {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-animate:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.counter-value {
    font-weight: 600;
    color: #495057;
}

/* ============================================
   TABLE IMPROVEMENTS
   ============================================ */
.table-hover tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

.table-actions {
    white-space: nowrap;
}

.table-actions .btn {
    margin-right: 0.25rem;
}

/* ============================================
   BADGE IMPROVEMENTS
   ============================================ */
.badge-soft-success {
    color: #0f5132;
    background-color: #d1e7dd;
}

.badge-soft-danger {
    color: #842029;
    background-color: #f8d7da;
}

.badge-soft-warning {
    color: #664d03;
    background-color: #fff3cd;
}

.badge-soft-info {
    color: #055160;
    background-color: #cff4fc;
}

.badge-soft-primary {
    color: #084298;
    background-color: #cfe2ff;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 0;
}

/* ============================================
   STATS CARD
   ============================================ */
.stats-card {
    border-left: 4px solid;
    transition: all 0.3s;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stats-card.stats-primary {
    border-left-color: #0d6efd;
}

.stats-card.stats-success {
    border-left-color: #198754;
}

.stats-card.stats-danger {
    border-left-color: #dc3545;
}

.stats-card.stats-warning {
    border-left-color: #ffc107;
}

.stats-card.stats-info {
    border-left-color: #0dcaf0;
}

/* ============================================
   FILTER PANEL
   ============================================ */
.filter-panel {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.filter-panel .form-group {
    margin-bottom: 0.75rem;
}

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

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-box input {
    padding-left: 2.5rem;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    white-space: nowrap;
}

/* ============================================
   MODAL IMPROVEMENTS
   ============================================ */
.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

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

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

.chart-container canvas {
    max-height: 100%;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .quick-actions {
        bottom: 1rem;
        right: 1rem;
    }
    
    .quick-action-btn {
        width: 48px;
        height: 48px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .no-print {
        display: none !important;
    }
    
    .page-break {
        page-break-after: always;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .card {
        border: 1px solid #dee2e6;
        box-shadow: none;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
[data-bs-theme="dark"] .filter-panel {
    background: #212529;
    border-color: #495057;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background-color: #2c3034;
}

[data-bs-theme="dark"] .bulk-actions {
    background: #212529;
    border-color: #495057;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

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

/* ============================================
   LOADING SKELETON
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* ============================================
   TOOLTIP CUSTOMIZATION
   ============================================ */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    max-width: 300px;
    text-align: left;
}

/* ============================================
   SCROLLBAR CUSTOMIZATION
   ============================================ */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}
