
:root {
    --reportPrimary: #1e3c72;
    --reportSecondary: #2a5298;
    --reportSuccess: #28a745;
    --reportDanger: #dc3545;
    --reportWarning: #ffc107;
    --reportInfo: #17a2b8;
    --savings: #20c997;
    --loan: #fd7e14;
    --interest: #6f42c1;
}

/* Header Styles */
.coop-header {
    /*background: linear-gradient(135deg, var(--reportPrimary) 0%, var(--reportSecondary) 100%);*/
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Stats Cards */
.stat-card {
    background: transparent;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--reportPrimary), var(--savings));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--reportPrimary);
    opacity: 0.8;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--reportPrimary);
}

.stat-change {
    font-size: 0.85rem;
    margin-top: 5px;
}

.trend-up {
    color: var(--reportSuccess);
}
.trend-down {
    color: var(--reportDanger);
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 15px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--reportPrimary) 0%, var(--reportSecondary) 100%);
    color: white;
    cursor: pointer;
}

.product-body {
    padding: 20px;
}

.product-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 8px;
    background: #f8f9fa;
}

.progress {
    height: 8px;
    border-radius: 10px;
}

.badge-product {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* Chart Containers */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Loan Table */
.loan-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.loan-table th {
    background: var(--reportPrimary);
    color: white;
    padding: 12px;
}

/* Alert Banner */
.alert-banner {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--reportPrimary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.2rem;
    }
    .stat-icon {
        font-size: 1.8rem;
    }
}

/* Professional Statement Styles - Dark Mode Optimized */
.statement-container {
    background: rgba(18, 22, 35, 0.95);
    backdrop-filter: blur(10px);
    color: #e0e0e0;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.statement-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 1rem;
}

.statement-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    color: var(--accent, #f3ba2f);
    letter-spacing: 1px;
}

.statement-subtitle {
    font-size: 0.9rem;
    color: #b0b0b0;
}

.statement-period {
    font-size: 0.85rem;
    color: #888888;
    margin-top: 0.5rem;
}

/* Professional Tables - Dark Mode */
.ledger-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.ledger-table th {
    background: rgba(30, 35, 50, 0.95);
    padding: 12px 10px;
    text-align: left;
    border-bottom: 2px solid rgba(243, 186, 47, 0.3);
    font-weight: 600;
    color: var(--accent, #f3ba2f);
}

.ledger-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
    color: #d0d0d0;
}

.ledger-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.ledger-table .text-end {
    text-align: right;
}

.ledger-table .text-center {
    text-align: center;
}

.ledger-table .indent-1 {
    padding-left: 25px;
}

.ledger-table .indent-2 {
    padding-left: 40px;
}

.section-title {
    background: rgba(40, 45, 65, 0.95);
    font-weight: bold;
    font-size: 1rem;
    border-top: 1px solid rgba(243, 186, 47, 0.2);
    border-bottom: 1px solid rgba(243, 186, 47, 0.2);
}

.section-title td,
.section-title th {
    color: var(--accent, #f3ba2f);
    font-weight: bold;
}

.total-row {
    background: rgba(30, 35, 50, 0.8);
    font-weight: bold;
    border-top: 2px solid rgba(243, 186, 47, 0.4);
}

.total-row td,
.total-row th {
    color: #ffffff;
    font-weight: bold;
}

.grand-total {
    background: rgba(40, 45, 65, 0.95);
    font-weight: bold;
    font-size: 1rem;
    border-top: 2px solid var(--accent, #f3ba2f);
}

.grand-total td,
.grand-total th {
    color: var(--accent, #f3ba2f);
    font-weight: bold;
}

.profit-row {
    background: rgba(40, 167, 69, 0.15);
    font-weight: bold;
    border-top: 2px solid #28a745;
    border-bottom: 2px solid #28a745;
}

.profit-row td,
.profit-row th {
    color: #6bff8e;
    font-weight: bold;
}

.loss-row {
    background: rgba(220, 53, 69, 0.15);
    font-weight: bold;
    border-top: 2px solid #dc3545;
    border-bottom: 2px solid #dc3545;
}

.loss-row td,
.loss-row th {
    color: #ff8b8b;
    font-weight: bold;
}

/* Alert Boxes - Dark Mode */
.alert-info {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid rgba(23, 162, 184, 0.3);
    color: #6dd5ff;
    border-radius: 10px;
    padding: 1rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #6bff8e;
    border-radius: 10px;
    padding: 1rem;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffe08c;
    border-radius: 10px;
    padding: 1rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff8b8b;
    border-radius: 10px;
    padding: 1rem;
}

/* Asset Cards - Dark Mode */
.asset-card {
    background: rgba(25, 30, 45, 0.95);
    border-left: 4px solid var(--accent, #f3ba2f);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.asset-card:hover {
    background: rgba(35, 40, 60, 0.95);
    transform: translateX(3px);
}

.asset-card strong {
    color: var(--accent, #f3ba2f);
}

.asset-card small {
    color: #a0a0a0;
}

.asset-card .text-success {
    color: #6bff8e !important;
}

.asset-card .text-warning {
    color: #ffe08c !important;
}

/* Stat Cards - Dark Mode */
.stat-card {
    background: rgba(25, 30, 45, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(35, 40, 60, 0.95);
    transform: translateY(-3px);
    border-color: rgba(243, 186, 47, 0.3);
}

.stat-label {
    color: #b0b0b0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent, #f3ba2f);
    margin-top: 0.5rem;
}

.stat-icon {
    font-size: 2rem;
    color: rgba(243, 186, 47, 0.6);
}

/* Chart Containers - Dark Mode */
.chart-container {
    background: rgba(20, 24, 38, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
}

.chart-container h5,
.chart-container h6 {
    color: var(--accent, #f3ba2f);
    margin-bottom: 1rem;
}

/* Floating Toggle Button */
.floating-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #e0b23a);
    border: none;
    color: #000;
    font-size: 1.4rem;
    display: none;
    z-index: 1050;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.floating-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Print Styles */
@media print {
    .sidebar-report,
    .floating-toggle,
    .print-hide {
        display: none !important;
    }
    
    .main-content-report {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .statement-container {
        background: #ffffff !important;
        color: #000000 !important;
        box-shadow: none !important;
        page-break-after: always;
        border: 1px solid #ddd !important;
    }
    
    .statement-title {
        color: #000000 !important;
    }
    
    .ledger-table th {
        background: #f0f0f0 !important;
        color: #000000 !important;
    }
    
    .ledger-table td {
        color: #000000 !important;
    }
    
    .total-row {
        background: #e0e0e0 !important;
    }
    
    .asset-card {
        background: #f8f9fa !important;
        color: #000000 !important;
        border-left-color: #f3ba2f !important;
    }
}

/* Responsive Styles */
@media (max-width: 900px) {
    .sidebar-report {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar-report.open {
        transform: translateX(0);
    }
    
    .main-content-report {
        margin-left: 0;
    }
    
    .floating-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .statement-container {
        padding: 1rem;
    }
    
    .ledger-table {
        font-size: 0.75rem;
    }
    
    .ledger-table th,
    .ledger-table td {
        padding: 6px 4px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
}

/* Print Button - Dark Mode */
.print-btn {
    background: linear-gradient(135deg, var(--accent), #e0b23a);
    color: #000000;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 186, 47, 0.3);
}

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

/* Scrollbar Styling for Dark Mode */
.statement-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.statement-container::-webkit-scrollbar-track {
    background: rgba(30, 35, 50, 0.5);
    border-radius: 10px;
}

.statement-container::-webkit-scrollbar-thumb {
    background: var(--accent, #f3ba2f);
    border-radius: 10px;
}

.statement-container::-webkit-scrollbar-thumb:hover {
    background: #e0b23a;
}

/* Additional Dark Mode Utilities */
.text-muted-dark {
    color: #a0a0a0;
}

.bg-dark-card {
    background: rgba(18, 22, 35, 0.95);
}

.border-accent {
    border-color: var(--accent, #f3ba2f);
}

.text-accent {
    color: var(--accent, #f3ba2f);
}

/* Table Striping for Dark Mode */
.ledger-table.striped tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Hover Effects for Interactive Elements */
.report-link:hover,
.menu-toggle:hover {
    background: rgba(243, 186, 47, 0.1);
    color: var(--accent, #f3ba2f);
}

/* Badge Styles for Dark Mode */
.badge-success {
    background: rgba(40, 167, 69, 0.2);
    color: #6bff8e;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffe08c;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #ff8b8b;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}