/* ===================================================================
   REPORTS CELLULAR YEARLY SUMMARY VIEW STYLES
   Single-line row layout for yearly summary in reports page
   =================================================================== */

/* View Toggle Bar */
.rpt-view-toggle-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #cbd5e0;
    margin-bottom: 20px;
}

.rpt-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    background: white;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.rpt-view-btn:hover {
    background: #edf2f7;
    border-color: #a0aec0;
    transform: translateY(-1px);
}

.rpt-view-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.rpt-view-btn.active:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.rpt-view-icon {
    font-size: 1.1em;
}

/* Compact Stats in Toggle Bar */
.rpt-view-stats-row {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.rpt-view-stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    min-width: 70px;
}

.rpt-stat-number {
    font-weight: 700;
    font-size: 1.1em;
    color: #2d3748;
    line-height: 1.2;
}

.rpt-stat-number.expenses {
    color: #dc2626;
}

.rpt-stat-number.income {
    color: #059669;
}

.rpt-stat-number.net-positive {
    color: #059669;
}

.rpt-stat-number.net-negative {
    color: #dc2626;
}

.rpt-stat-label {
    font-size: 0.65em;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Cellular View Container */
.rpt-cellular-view-container {
    display: none;
}

.rpt-cellular-view-container.active {
    display: block;
}

/* Cellular View Header */
.rpt-cellular-view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px 12px 0 0;
    border: 1px solid #93c5fd;
    border-bottom: none;
    flex-wrap: wrap;
}

/* Search Box */
.rpt-cellular-search {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.rpt-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em;
    color: #64748b;
}

.rpt-cellular-search input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 2px solid #93c5fd;
    border-radius: 10px;
    font-size: 0.95em;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.rpt-cellular-search input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.rpt-cellular-search input::placeholder {
    color: #9ca3af;
}

/* Filters */
.rpt-cellular-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.rpt-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rpt-filter-icon {
    font-size: 0.85em;
    color: #64748b;
}

.rpt-filter-label {
    font-size: 0.75em;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.rpt-cellular-filters select {
    padding: 10px 14px;
    border: 2px solid #93c5fd;
    border-radius: 8px;
    font-size: 0.9em;
    background: white;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 120px;
}

.rpt-cellular-filters select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Clear Filters Button */
.rpt-clear-filters-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    color: #64748b;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.rpt-clear-filters-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Export to CSV Button */
.rpt-export-csv-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.rpt-export-csv-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.rpt-export-csv-btn:active {
    transform: translateY(0);
}

/* Cellular View Content */
.rpt-cellular-view-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 60vh;
    overflow-y: auto;
}

/* ===================================================================
   SINGLE-LINE ROW LAYOUT - Table Style with Header
   =================================================================== */

/* Header Row */
.rpt-header-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-bottom: 2px solid #4338ca;
}

.rpt-header-col {
    font-size: 0.75em;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* Data Row */
.rpt-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 24px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

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

.rpt-row:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Column Values */
.rpt-col {
    font-size: 0.95em;
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================================================================
   YEARLY SUMMARY - Column Widths
   =================================================================== */

.rpt-header-col.rpt-col-year,
.rpt-col.rpt-col-year {
    flex: 0 0 90px;
}

.rpt-header-col.rpt-col-category,
.rpt-col.rpt-col-category {
    flex: 0 0 100px;
}

.rpt-header-col.rpt-col-type,
.rpt-col.rpt-col-type {
    flex: 0 0 80px;
}

.rpt-header-col.rpt-col-classification,
.rpt-col.rpt-col-classification {
    flex: 0 0 120px;
}

.rpt-header-col.rpt-col-amount,
.rpt-col.rpt-col-amount {
    flex: 0 0 110px;
    font-weight: 700;
}

.rpt-header-col.rpt-col-taxnote,
.rpt-col.rpt-col-taxnote {
    flex: 1;
    min-width: 150px;
    white-space: normal;
    word-wrap: break-word;
}

/* ===================================================================
   MONTHLY CLASSIFICATION - Column Widths
   =================================================================== */

.rpt-header-col.rpt-col-year-sm,
.rpt-col.rpt-col-year-sm {
    flex: 0 0 60px;
}

.rpt-header-col.rpt-col-type-sm,
.rpt-col.rpt-col-type-sm {
    flex: 0 0 75px;
}

.rpt-header-col.rpt-col-month,
.rpt-col.rpt-col-month {
    flex: 0 0 60px;
}

.rpt-header-col.rpt-col-amount-sm,
.rpt-col.rpt-col-amount-sm {
    flex: 0 0 100px;
    font-weight: 700;
}

.rpt-header-col.rpt-col-classification-sm,
.rpt-col.rpt-col-classification-sm {
    flex: 0 0 110px;
}

.rpt-header-col.rpt-col-subclass1,
.rpt-col.rpt-col-subclass1 {
    flex: 1;
    min-width: 140px;
}

.rpt-header-col.rpt-col-subclass2,
.rpt-col.rpt-col-subclass2 {
    flex: 1;
    min-width: 140px;
}

.rpt-header-col.rpt-col-company,
.rpt-col.rpt-col-company {
    flex: 1;
    min-width: 150px;
}

/* Amount Colors */
.rpt-amount-positive {
    color: #059669 !important;
}

.rpt-amount-negative {
    color: #dc2626 !important;
}

/* Classification column color */
.rpt-col-classification,
.rpt-col-classification-sm {
    color: #4338ca;
}

/* Type Badge - Clean style without background */
.rpt-type-expense {
    color: #dc2626 !important;
}

.rpt-type-income {
    color: #059669 !important;
}

/* Search Highlight */
.rpt-search-highlight {
    background-color: #fef08a;
    color: #854d0e;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* Empty State */
.rpt-cellular-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.rpt-empty-icon {
    font-size: 4em;
    display: block;
    margin-bottom: 20px;
}

.rpt-cellular-empty-state h3 {
    margin-bottom: 10px;
    color: #475569;
    font-size: 1.3em;
}

.rpt-cellular-empty-state p {
    font-size: 0.95em;
}

/* Scrollbar Styling */
.rpt-cellular-view-content::-webkit-scrollbar {
    width: 8px;
}

.rpt-cellular-view-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.rpt-cellular-view-content::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.rpt-cellular-view-content::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===================================================================
   RESPONSIVE DESIGN
   =================================================================== */

@media (max-width: 1100px) {
    .rpt-row {
        flex-wrap: wrap;
        gap: 12px 16px;
    }
    
    .rpt-col-year {
        flex: 0 0 80px;
    }
    
    .rpt-col-category {
        flex: 0 0 90px;
    }
    
    .rpt-col-type {
        flex: 0 0 80px;
    }
    
    .rpt-col-classification {
        flex: 0 0 110px;
    }
    
    .rpt-col-amount {
        flex: 0 0 100px;
    }
    
    .rpt-col-taxnote {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .rpt-view-toggle-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .rpt-view-stats-row {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }
    
    .rpt-view-stat-mini {
        flex: 1;
        min-width: 60px;
    }
    
    .rpt-cellular-view-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .rpt-cellular-search {
        width: 100%;
        max-width: none;
    }
    
    .rpt-cellular-filters {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .rpt-filter-group {
        flex: 1;
    }
    
    .rpt-cellular-filters select {
        flex: 1;
        min-width: 100px;
    }
    
    .rpt-row {
        padding: 14px 16px;
    }
    
    .rpt-col-label {
        font-size: 0.62em;
    }
    
    .rpt-col-value {
        font-size: 0.88em;
    }
}

@media (max-width: 480px) {
    .rpt-view-btn {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .rpt-view-btn span:not(.rpt-view-icon) {
        display: none;
    }
    
    .rpt-view-stat-mini {
        padding: 6px 10px;
    }
    
    .rpt-stat-number {
        font-size: 0.95em;
    }
    
    .rpt-row {
        padding: 12px;
        gap: 8px 12px;
    }
    
    .rpt-col-value {
        font-size: 0.82em;
    }
    
    .rpt-classification-badge {
        font-size: 0.75em;
        padding: 3px 8px;
    }
}
