/* BEC Expense Manager Styles - Green Theme */
:root {
    /* PRIMARY GREENS */
    --bec-primary-dark: #0d4d14;
    --bec-primary: #1b5e20;
    --bec-primary-light: #2e7d32;
    --bec-accent: #0b6623;
    
    /* BACKGROUNDS */
    --bec-bg-light: #f8fff9;
    --bec-bg-card: #e8f5e9;
    --bec-border: #c8e6c9;
    
    /* FUNCTIONAL COLORS */
    --bec-success: #0b6623;
    --bec-danger: #dc3545;
    --bec-warning: #ffb900;
    --bec-info: #0073aa;
    
    /* TEXT COLORS */
    --bec-text-dark: #1b5e20;
    --bec-text-light: #666;
    --bec-text-white: #fff;
}

/* ===== COMMON COMPONENT STYLES ===== */

/* Container & Layout */
.bec-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bec-title {
    color: var(--bec-primary);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bec-border);
    font-weight: 600;
}

/* Page Header */
.bec-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bec-border);
}

.bec-page-header h2 {
    margin: 0;
    color: var(--bec-primary-dark);
    font-size: 28px;
    font-weight: 600;
}

.bec-header-actions {
    display: flex;
    gap: 10px;
}

/* ===== TABLE STYLES ===== */
.bec-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.bec-table th {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: var(--bec-accent);
    font-weight: 600;
    padding: 15px 12px;
    text-align: center;
    border-bottom: 2px solid var(--bec-border);
    font-size: 14px;
}

.bec-table td {
    padding: 12px;
    border-bottom: 1px solid var(--bec-border);
    vertical-align: top;
    background: #fff;
    transition: background-color 0.2s ease;
    min-width: 0;
    max-width: 100%;
}



/* ===== FORM STYLES ===== */
.bec-field {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--bec-border);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.bec-field:focus {
    outline: none;
    border-color: var(--bec-primary-light);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.bec-field[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.bec-notes {
    resize: vertical;
    min-height: 38px;
    font-family: inherit;
    width: 100%;
}

/* Date Filter Styles */
.bec-date-filter {
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%231b5e20" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat right 10px center;
    background-size: 16px;
    padding-right: 35px;
    cursor: pointer;
}

.bec-date-filter:focus {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%232e7d32" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>');
}

/* Flex Layout for Select + Button */
.bec-flex {
    display: flex;
    gap: 5px;
    align-items: stretch;
}

.bec-flex .bec-field {
    flex: 1;
    min-width: 0;
}

/* ===== BUTTON STYLES ===== */
.bec-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
	
}

.bec-btn-primary {
    background: linear-gradient(135deg, var(--bec-primary) 0%, var(--bec-primary-light) 100%);
    color: white;
    border: 1px solid #174d19;
	padding: 6px 10px !important;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.bec-btn-primary:hover {
    background: linear-gradient(135deg, var(--bec-primary-dark) 0%, var(--bec-primary) 100%);
	color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
}

.bec-btn-secondary {
    background: linear-gradient(135deg, #f1f7f2 0%, #e8f5e9 100%);
    color: var(--bec-accent);
    border: 1px solid #cfe9d6;
	padding: 6px 10px !important;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.bec-btn-secondary:hover {
    background: linear-gradient(135deg, #e8f5e9 0%, #d4edd8 100%);
    border-color: var(--bec-primary-light);
    color: var(--bec-primary-dark);
    transform: translateY(-1px);
}

/* Button variations */
.bec-btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.bec-btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.bec-btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-color: #c82333;
}

.bec-btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    border-color: #bd2130;
}

.bec-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.bec-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bec-btn-export {
    background: linear-gradient(135deg, #f1f7f2 0%, #e8f5e9 100%);
    color: var(--bec-accent);
    border: 1px solid #cfe9d6;

}

.bec-btn-export:hover {
    background: linear-gradient(135deg, #e8f5e9 0%, #d0ebd0 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 77, 20, 0.15);
}

.bec-btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bec-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Small buttons */
.bec-addsmall {
    padding: 8px 12px;
    background: linear-gradient(135deg, #f1f7f2 0%, #e8f5e9 100%);
    border: 1px solid #cfe9d6;
    border-radius: 4px;
    color: var(--bec-accent);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bec-addsmall:hover {
    background: linear-gradient(135deg, #e8f5e9 0%, #d4edd8 100%);
    border-color: var(--bec-primary-light);
    color: var(--bec-primary-dark);
    transform: translateY(-1px);
}

.bec-remove-row {
    background: #fff;
    border: 1px solid #ffcdd2;
    color: #d32f2f;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bec-remove-row:hover:not(:disabled) {
    background: #ffebee;
    border-color: #ef5350;
    transform: scale(1.05);
}

.bec-remove-row:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== COMMON COMPONENTS ===== */

/* Filters Section */
.bec-filters-section {
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bec-filters-section h4 {
    margin: 0 0 20px 0;
    color: var(--bec-primary-dark);
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bec-border);
}

.bec-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.bec-filter-group {
    display: flex;
    flex-direction: column;
}

.bec-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--bec-text-dark);
    font-size: 14px;
}

.bec-filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Empty State */
.bec-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    margin: 20px 0;
}

.bec-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.bec-empty-state h3,
.bec-empty-state h4 {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 22px;
    font-weight: 500;
}

.bec-empty-state p {
    margin: 0;
    line-height: 1.6;
    font-size: 15px;
    color: #888;
}

/* Pagination */
.bec-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: var(--bec-bg-light);
    border-radius: 8px;
    border: 1px solid var(--bec-border);
}

.bec-pagination-info {
    color: var(--bec-text-light);
    font-size: 14px;
}

.bec-pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bec-pagination-btn {
    padding: 8px 16px;
    border: 1px solid var(--bec-primary);
    background: white;
    color: var(--bec-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bec-pagination-btn:hover:not(:disabled) {
    background: var(--bec-primary);
    color: white;
    transform: translateY(-1px);
}

.bec-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--bec-border);
    color: var(--bec-text-light);
}

.bec-pagination-page {
    font-weight: 600;
    color: var(--bec-primary-dark);
}

/* Loading States */
.bec-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--bec-text-light);
}

.bec-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--bec-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.bec-message {
	background: #e8f5e9;
    padding: 12px 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-weight: 500;
}

.bec-message-success {
    background: #e8f5e9;
    color: var(--bec-success);
    border: 1px solid #c8e6c9;
}

.bec-message-error {
    background: #ffebee;
    color: var(--bec-danger);
    border: 1px solid #ffcdd2;
}

.bec-message-warning {
    background: #fff8e1;
    color: #ff8f00;
    border: 1px solid #ffecb3;
}

/* Summary */
.bec-summary {
    display: flex;
    gap: 25px;
    padding: 15px;
    background: var(--bec-bg-card);
    border-radius: 6px;
    margin: 15px 0;
    border: 1px solid var(--bec-border);
}

.bec-summary > div {
    font-weight: 500;
    color: var(--bec-text-dark);
}

.bec-summary span {
    font-weight: 600;
    color: var(--bec-primary);
}

/* Required Note */
.bec-required-note {
    color: var(--bec-text-light);
    font-size: 13px;
    margin: 10px 0;
    font-style: italic;
}

/* Actions Layout */
.bec-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid var(--bec-border);
}

.bec-actions-left,
.bec-actions-right {
    display: flex;
    gap: 10px;
}

/* ===== ATTACHMENT STYLES ===== */
.bec-attachment-field {
    min-width: 180px;
}

.bec-attachment-controls {
    margin-bottom: 8px;
}

.bec-attachment-list {
    font-size: 12px;
    max-height: 120px;
    overflow-y: auto;
}

.bec-attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    margin-bottom: 4px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 11px;
}

.bec-no-files {
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
    text-align: center;
    padding: 8px;
}

.bec-remove-file {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
}

.bec-remove-file:hover {
    background: #dc3545;
    color: white;
}

.bec-existing-attachments {
    margin-bottom: 8px;
    padding: 4px 8px;
    background: #e8f5e9;
    border-radius: 4px;
    font-size: 11px;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.bec-existing-attachments small {
    font-weight: 600;
}

/* ===== MODAL STYLES ===== */
.bec-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bec-modal.show {
    display: flex !important;
    opacity: 1;
}

.bec-modal-inner {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.bec-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bec-border);
}

.bec-modal-header h4 {
    color: var(--bec-primary);
    margin: 0;
    font-weight: 600;
}

.bec-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--bec-text-light);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.bec-modal-close:hover {
    background: #f5f5f5;
    color: var(--bec-danger);
}

.bec-modal-body {
    margin-bottom: 20px;
}

.bec-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.bec-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bec-border);
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    box-sizing: border-box;
}

.bec-input:focus {
    outline: none;
    border-color: var(--bec-primary-light);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

/* File details in modal */
.bec-file-details-container {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #dc3545;
}

.bec-file-info .bec-file-name {
    font-weight: 600;
    color: #1b5e20;
}

.bec-file-info .bec-file-id {
    font-size: 12px;
    color: #666;
}

.bec-file-list {
    max-height: 100px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin: 8px 0;
    border: 1px solid #e9ecef;
}

/* Warning styles */
.bec-delete-warning,
.bec-remove-warning {
    background: rgba(255, 185, 0, 0.1);
    border: 1px solid rgba(255, 185, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 14px;
}

.bec-delete-warning strong {
    color: #856404;
}

/* ===== SELECT2 STYLES ===== */
.select2-container {
    z-index: 9999 !important;
}

.select2-dropdown {
    z-index: 10000 !important;
    border: 1px solid var(--bec-border) !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.select2-container--default .select2-selection--single {
    border: 1px solid var(--bec-border);
    border-radius: 4px;
    height: 38px;
}

.select2-container--default .select2-selection--single:focus {
    outline: none;
    border-color: var(--bec-primary-light);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #333;
    line-height: 36px;
    padding-right: 35px !important;
    z-index: 2 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 6px !important;
    z-index: 1 !important;
}

/* Clear button */
.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 25px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #999 !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 14px !important;
    text-align: center !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    opacity: 0.6 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #d32f2f !important;
    opacity: 1 !important;
    background: none !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Table Select2 */
.bec-table .select2-container {
    width: 100% !important;
}

.bec-table .select2-selection--single {
    border: 1px solid var(--bec-border) !important;
    border-radius: 4px !important;
    height: 38px !important;
}

.bec-table .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 10px !important;
}

.bec-table .select2-container--default .select2-selection--single .select2-selection__clear {
    font-size: 14px !important;
    opacity: 0.5 !important;
}

.bec-table .select2-container--default .select2-selection--single .select2-selection__clear:hover {
    opacity: 1 !important;
}

/* Filter Select2 */
.bec-filters-section .select2-container {
    z-index: 1000;
}

.bec-filters-section .select2-dropdown {
    z-index: 1001;
}

.bec-filters-section .select2-selection--single {
    border: 1px solid var(--bec-border) !important;
    border-radius: 6px !important;
    height: 42px !important;
}

.bec-filters-section .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 12px !important;
}

.bec-filters-section .select2-selection__arrow {
    height: 40px !important;
}

/* ===== STORAGE STYLES ===== */
.bec-storage-overview {
    margin-bottom: 30px;
}

.bec-storage-card {
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bec-storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.bec-storage-header h4 {
    margin: 0;
    color: var(--bec-primary-dark);
    font-size: 20px;
    font-weight: 600;
}

.bec-storage-usage {
    font-weight: 600;
    color: var(--bec-primary);
    font-size: 16px;
}

.bec-storage-progress {
    margin-bottom: 20px;
}

.bec-progress-bar {
    width: 100%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.bec-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.bec-progress-normal {
    background: var(--bec-primary);
}

.bec-progress-warning {
    background: var(--bec-warning);
}

.bec-progress-danger {
    background: var(--bec-danger);
}

.bec-progress-under_limit {
    background: #00a32a !important;
}

.bec-progress-near_limit {
    background: #dba617 !important;
}

.bec-progress-over_limit {
    background: #d63638 !important;
}

.bec-storage-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.bec-storage-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bec-bg-light);
    border-radius: 6px;
    border: 1px solid var(--bec-border);
}

.bec-storage-stat .bec-stat-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.bec-storage-stat .bec-stat-value {
    font-weight: 600;
    color: var(--bec-primary-dark);
    font-size: 15px;
}

/* Status text colors */
.bec-status-under {
    color: #00a32a;
    font-weight: 600;
}

.bec-status-near {
    color: #dba617;
    font-weight: 600;
}

.bec-status-over {
    color: #d63638;
    font-weight: 600;
}

/* ===== EXPENSE CARDS STYLES ===== */
.bec-expense-card {
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bec-expense-card:hover {
    border-color: var(--bec-primary-light);
    box-shadow: 0 4px 12px rgba(11, 102, 35, 0.1);
    transform: translateY(-2px);
}

.bec-expense-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e9 100%);
    border-bottom: 1px solid var(--bec-border);
}

.bec-expense-info h3 {
    margin: 0 0 8px 0;
    color: var(--bec-primary-dark);
    font-size: 18px;
}

.bec-expense-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.bec-expense-meta span {
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(13, 77, 20, 0.1);
}

.bec-expense-amounts {
    display: flex;
    gap: 20px;
    text-align: center;
}

.bec-amount-item {
    display: flex;
    flex-direction: column;
}

.bec-amount-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.bec-amount-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--bec-primary-dark);
}

.bec-attachments-preview {
    padding: 15px 20px;
    background: white;
}

.bec-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--bec-primary-dark);
    margin-bottom: 10px;
}

.bec-preview-grid {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.bec-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bec-bg-light);
    border: 1px solid var(--bec-border);
    border-radius: 6px;
    font-size: 12px;
}

.bec-preview-icon .dashicons {
    color: var(--bec-primary);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.bec-preview-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bec-preview-more {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Enhanced Attachment Preview */
.bec-preview-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.bec-preview-info {
    flex: 1;
    min-width: 0;
}

.bec-preview-actions {
    display: flex;
    gap: 4px;
}

.bec-preview-actions .bec-btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bec-preview-actions .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ===== SINGLE EXPENSE ATTACHMENTS ===== */
.bec-back-nav {
    margin-bottom: 20px;
}

.bec-expense-detail-header {
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.bec-expense-main-info h2 {
    margin: 0 0 15px 0;
    color: var(--bec-primary-dark);
    font-size: 24px;
}

.bec-expense-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bec-meta-item {
    font-size: 14px;
}

.bec-meta-item strong {
    color: var(--bec-primary-dark);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bec-single-attachments-section {
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    padding: 25px;
}

.bec-single-attachments-section h3 {
    margin: 0 0 20px 0;
    color: var(--bec-primary-dark);
    font-size: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bec-border);
}

.bec-no-attachments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.bec-attachments-grid-single {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.bec-attachment-card-single {
    background: var(--bec-bg-card);
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.bec-attachment-card-single:hover {
    background: var(--bec-bg-light);
    border-color: var(--bec-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 102, 35, 0.1);
}

.bec-attachment-preview-single {
    text-align: center;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    border: 1px solid #dfeee0;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bec-attachment-preview-single img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bec-file-icon-single .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--bec-primary);
}

.bec-attachment-info-single h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--bec-primary-dark);
    word-break: break-word;
}

.bec-file-meta-single {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.bec-file-meta-single span {
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #dfeee0;
}

.bec-attachment-actions-single {
    display: flex;
    gap: 5px;
    justify-content: center;
}

/* ===== RECYCLE BIN STYLES ===== */
.bec-recycle-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bec-recycle-file-card {
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
}

.bec-recycle-file-card:hover {
    border-color: var(--bec-warning);
    box-shadow: 0 2px 8px rgba(255, 185, 0, 0.1);
}

.bec-file-selector {
    flex-shrink: 0;
}

.bec-file-preview {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bec-bg-light);
    border: 1px solid var(--bec-border);
    border-radius: 6px;
    overflow: hidden;
}

.bec-file-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.bec-file-details {
    flex: 1;
    min-width: 0;
}

.bec-file-name {
    font-weight: 600;
    color: var(--bec-primary-dark);
    margin-bottom: 8px;
    word-break: break-word;
}

.bec-file-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.bec-file-meta span {
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #dfeee0;
}

.bec-file-actions {
    display: flex;
    gap: 10px;
}

.bec-btn-view, .bec-btn-download {
    font-size: 12px;
    padding: 4px 8px;
    text-decoration: none;
}

.bec-recycle-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: var(--bec-bg-light);
    border: 1px solid var(--bec-border);
    border-radius: 8px;
}

/* Stat Cards */
.bec-stat-card {
    background: white;
    border: 1px solid var(--bec-border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.bec-stat-card h4 {
    margin: 0 0 15px 0;
    color: var(--bec-primary-dark);
    font-size: 16px;
}

.bec-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.bec-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bec-bg-light);
    border-radius: 6px;
    border: 1px solid var(--bec-border);
}

.bec-stat-label {
    font-size: 14px;
    color: #666;
}

.bec-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--bec-primary-dark);
}

/* ===== ANALYTICS SPECIFIC ===== */
.bec-analytics-table th {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.bec-filter-icon {
    margin-left: 5px;
    cursor: pointer;
    opacity: 0.6;
    font-size: 12px;
    transition: all 0.3s ease;
}

.bec-filter-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Column Filter Modal */
.bec-column-filter-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white !important;
    border: 1px solid var(--bec-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    z-index: 100000 !important;
    min-width: 300px !important;
    max-width: 500px !important;
    max-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.bec-filter-modal-header {
    padding: 15px 20px !important;
    border-bottom: 1px solid var(--bec-border) !important;
    background: var(--bec-bg-light) !important;
    font-weight: 600 !important;
    color: var(--bec-primary-dark) !important;
    font-size: 16px !important;
}

.bec-filter-modal-body {
    padding: 15px 20px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

.bec-filter-options {
    max-height: 300px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid var(--bec-border);
    border-radius: 6px;
    padding: 10px;
}

.bec-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.bec-filter-option:hover {
    background-color: var(--bec-bg-light);
}

.bec-filter-options-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px 15px !important;
}

.bec-filter-search {
    padding: 10px 15px;
    border-bottom: 1px solid var(--bec-border);
    background: var(--bec-bg-light);
}

.bec-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bec-border);
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 5px;
}

.bec-search-input:focus {
    outline: none;
    border-color: var(--bec-primary-light);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

.bec-search-results {
    font-size: 12px;
    color: var(--bec-text-light);
    font-style: italic;
}

.bec-no-results {
    padding: 20px;
    text-align: center;
    color: var(--bec-text-light);
    font-style: italic;
}

.bec-filter-count {
    font-size: 12px;
    color: var(--bec-text-light);
    font-weight: normal;
    margin-left: 8px;
}

.bec-selection-info {
    font-size: 12px;
    padding: 10px;
    color: var(--bec-primary);
    font-weight: 600;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

.bec-filter-modal-footer {
    padding: 15px 20px !important;
    border-top: 1px solid var(--bec-border) !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.bec-footer-actions {
    display: flex;
    gap: 8px;
}

.bec-footer-actions .bec-btn-secondary {
    font-size: 12px !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

/* Show entries */
.bec-show-entries {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 15px 0 !important;
    padding: 12px 15px !important;
    background: var(--bec-bg-light) !important;
    border-radius: 6px !important;
    border: 1px solid var(--bec-border) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.bec-show-entries label {
    margin: 0 !important;
    font-weight: 600 !important;
    color: var(--bec-text-dark) !important;
    font-size: 14px !important;
}

.bec-page-size-select {
    width: auto !important;
    min-width: 80px !important;
    padding: 6px 10px !important;
    border: 1px solid var(--bec-border) !important;
    border-radius: 4px !important;
    background: white !important;
    font-size: 14px !important;
}

.bec-entries-text {
    color: var(--bec-text-light) !important;
    font-size: 14px !important;
}

/* Duplicates */
.bec-duplicates-action {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bec-border);
}

.bec-duplicates-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
}

.bec-duplicate-group {
    border: 1px solid var(--bec-border);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.bec-duplicate-header {
    background: var(--bec-bg-card);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bec-border);
}

.bec-duplicate-value {
    font-weight: 600;
    color: var(--bec-primary-dark);
}

.bec-duplicate-count {
    background: var(--bec-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.bec-duplicate-entries {
    padding: 10px 15px;
    background: white;
}

.bec-duplicate-entry {
    display: flex;
    gap: 15px;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f8f9fa;
}

.bec-duplicate-entry:last-child {
    border-bottom: none;
}

/* ===== PIVOT ANALYSIS STYLES ===== */
.bec-pivot-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #c8e6c9;
}

.bec-pivot-header .bec-title {
    color: #0d4d14;
    margin-bottom: 5px;
}

.bec-pivot-header .bec-subtitle {
    color: #666;
    font-size: 14px;
}

.bec-pivot-filters {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e8f5e9;
}

.bec-pivot-filters .bec-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8f5e9;
}

.bec-pivot-filters .bec-filters-header h4 {
    color: #1b5e20;
    margin: 0;
}

.bec-pivot-config {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fff9;
    border-radius: 8px;
    border: 1px solid #e8f5e9;
}

.bec-pivot-results {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e8f5e9;
}

.bec-pivot-results .bec-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5e9;
}

.bec-pivot-results .bec-table-header h4 {
    color: #1b5e20;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bec-pivot-results .bec-badge {
    background: linear-gradient(135deg, #0d4d14 0%, #1a6b23 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
}

/* Summary Cards */
.bec-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.bec-summary-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid #c8e6c9;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bec-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 77, 20, 0.1);
}

.bec-summary-card-label {
    font-size: 12px;
    color: #0b6623;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bec-summary-card-value {
    font-size: 20px;
    font-weight: bold;
    color: #0d4d14;
    font-family: monospace;
}

/* Pivot Table */
.bec-pivot-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.bec-pivot-table th {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #0b6623;
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #c8e6c9;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.bec-pivot-table th:hover {
    background: linear-gradient(135deg, #d0ebd0 0%, #b8e0b8 100%);
}

.bec-pivot-table td {
    padding: 10px 15px;
    border: 1px solid #e8f5e9;
    transition: background-color 0.2s;
}

.bec-pivot-table tr:hover td {
    background-color: #f8fff9;
}

.bec-pivot-table .even-row td {
    background-color: #fafefa;
}

.bec-pivot-table .even-row:hover td {
    background-color: #f0fff4;
}

.bec-pivot-table .col-dimension {
    font-weight: 600;
    color: #2c3e50;
}

.bec-pivot-table .col-count {
    text-align: center;
}

.bec-pivot-table .col-before,
.bec-pivot-table .col-vat,
.bec-pivot-table .col-total {
    text-align: center;
    font-family: 'Courier New', monospace;
}

.bec-pivot-table .col-total {
    color: #0d4d14;
    font-weight: 600;
}

.bec-count-badge {
    background: #0d4d14;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Loading State */
.bec-loading-state {
    text-align: center;
    padding: 40px 20px;
}

.bec-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e8f5e9;
    border-top: 3px solid #0d4d14;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* ===== TAX INVOICES STYLES ===== */
.bec-vat-notice {
    background: #fff3e0;
    border-left: 4px solid #f57c00;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bec-vat-notice-icon {
    font-size: 20px;
}

.bec-vat-notice-content {
    flex: 1;
    font-size: 14px;
}

.bec-vat-summary {
    background: #ffebee;
    border: 1px solid #ffb300;
}

.bec-vat-column {
    background: #ffebee;
    color: #c62828;
    font-weight: bold;
}

.bec-vat-amount {
    color: #c62828;
    font-weight: bold;
}

.bec-tax-invoices-table .bec-vat-column {
    background: #ffebee;
}

.bec-tax-invoices-table th.bec-vat-column .bec-filter-icon {
    color: #c62828;
}

/* Delete stats */
.bec-delete-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid #dc3545;
}

.bec-delete-stats div {
    margin-bottom: 8px;
    font-size: 14px;
}

.bec-delete-stats div:last-child {
    margin-bottom: 0;
    font-weight: 600;
    color: #dc3545;
}

.bec-warning-text {
    color: #dc3545;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    background: #fff5f5;
    border-radius: 4px;
    border: 1px solid #ffcdd2;
}

/* ===== SHARE MANAGEMENT STYLES ===== */
.bec-shared-notice {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--bec-primary);
}

.bec-shared-header h3 {
    margin: 0 0 10px 0;
    color: Black;
}

.bec-shared-header p {
    margin: 5px 0;
    color: black;
}

.bec-shared-note {
    margin: 10px 0 0 0;
    color: black;
    font-size: 14px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.bec-shared-note strong {
    color: white;
}

.bec-shared-footer {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    text-align: center;
    color: var(--bec-primary-dark);
}

.bec-share-section {
    background: var(--bec-bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(11, 102, 35, 0.1);
    border: 1px solid var(--bec-border);
}

.bec-share-link-item {
    border: 1px solid var(--bec-border);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    background: var(--bec-bg-light);
    transition: all 0.3s ease;
}

.bec-share-link-item:hover {
    background: var(--bec-bg-card);
    border-color: var(--bec-primary-light);
    color: var(--bec-primary-dark);
}

.bec-share-link-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bec-share-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.bec-share-status.active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: var(--bec-success);
    border: 1px solid #c3e6cb;
}

.bec-share-status.inactive {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: var(--bec-danger);
    border: 1px solid #f5c6cb;
}

.bec-share-link-url {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.bec-copy-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--bec-border);
    border-radius: 4px;
    background: white;
    color: var(--bec-primary-dark);
    font-family: monospace;
}

.bec-copy-input:focus {
    outline: none;
    border-color: var(--bec-primary-light);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

/* Shared Links Dashboard */
.bec-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.bec-shared-link-card {
    background: var(--bec-bg-card);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(11, 102, 35, 0.1);
    border: 1px solid var(--bec-border);
    transition: all 0.3s ease;
}

.bec-shared-link-card:hover {
    background: var(--bec-bg-light);
    border-color: var(--bec-primary-light);
    box-shadow: 0 4px 8px rgba(11, 102, 35, 0.15);
    color: var(--bec-primary-dark);
}

.bec-shared-link-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bec-border);
}

.bec-shared-link-header h4 {
    color: var(--bec-primary);
    margin: 0 0 5px 0;
    transition: color 0.3s ease;
}

.bec-shared-link-card:hover .bec-shared-link-header h4 {
    color: var(--bec-primary-dark);
}

.bec-shared-by {
    color: var(--bec-primary-light);
    font-size: 14px;
    transition: color 0.3s ease;
}

.bec-shared-link-card:hover .bec-shared-by {
    color: var(--bec-primary);
}

.bec-shared-link-details p {
    margin: 5px 0;
    color: var(--bec-primary);
    transition: color 0.3s ease;
}

.bec-shared-link-card:hover .bec-shared-link-details p {
    color: var(--bec-primary-dark);
}

.bec-shared-link-details p strong {
    color: var(--bec-primary-dark);
}

.bec-shared-link-actions {
    margin-top: 15px;
    text-align: center;
}

/* Copy success */
.bec-copy-success {
    background: #d4edda;
    color: #155724;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
    border: 1px solid #c3e6cb;
    display: inline-block;
}

/* ===== CHART ANALYSIS STYLES ===== */
.bec-chart-container-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.bec-chart-canvas-container {
    position: relative;
    height: 500px;
    width: 100%;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.bec-chart-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.bec-chart-type-selector,
.bec-chart-dimension,
.bec-chart-breakdown {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bec-chart-controls-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.bec-chart-legend {
    flex: 1;
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.bec-chart-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.bec-chart-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.bec-color-palette {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.bec-color-palette .bec-field.small {
    padding: 5px 8px;
    font-size: 13px;
}

.bec-chart-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5e9;
}

.bec-chart-type-badge {
    background: #1b5e20;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.bec-chart-stats {
    display: flex;
    gap: 20px;
}

.bec-chart-data-table {
    margin-top: 20px;
}

.bec-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 100px;
    overflow-y: auto;
    padding: 5px;
    background: #f9f9f9;
    border-radius: 4px;
}

.bec-breakdown-item {
    font-size: 12px;
    padding: 2px 5px;
    background: white;
    border-radius: 3px;
    border: 1px solid #eee;
}

/* Chart animations */
@keyframes chartLoad {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.bec-chart-canvas-container canvas {
    animation: chartLoad 0.5s ease;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .bec-container {
        padding: 10px;
    }
    
    .bec-table {
        font-size: 13px;
    }
    
    .bec-table th,
    .bec-table td {
        padding: 8px 6px;
    }
    
    .bec-table th:nth-child(n) { 
        width: auto !important; 
        min-width: 100px;
    }
    
    .bec-field {
        width: 100% !important;
    }
    
    .bec-filters-grid {
        grid-template-columns: 1fr;
    }
    
    .bec-filter-actions {
        flex-direction: column;
    }
    
    .bec-filter-actions .bec-btn {
        width: 100%;
        justify-content: center;
    }
    
    .bec-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .bec-header-actions {
        justify-content: center;
    }
    
    .bec-summary {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .bec-flex {
        flex-direction: column;
    }
    
    .bec-pagination {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .bec-modal-inner {
        padding: 20px;
        margin: 20px;
        width: 95%;
    }
    
    .bec-expense-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .bec-attachments-grid-single {
        grid-template-columns: 1fr;
    }
    
    .bec-recycle-files-grid {
        grid-template-columns: 1fr;
    }
    
    .bec-storage-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bec-storage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .bec-links-grid {
        grid-template-columns: 1fr;
    }
    
    .bec-chart-controls {
        grid-template-columns: 1fr;
    }
    
    .bec-chart-header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .bec-chart-controls-panel {
        flex-direction: column;
    }
    
    .bec-chart-canvas-container {
        height: 400px;
    }
    
    .bec-share-link-url {
        flex-direction: column;
        gap: 8px;
    }
    
    .bec-copy-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bec-summary-cards {
        grid-template-columns: 1fr;
    }
    
    .bec-pivot-table {
        display: block;
        overflow-x: auto;
    }
    
    .bec-chart-canvas-container {
        height: 300px;
        padding: 10px;
    }
    
    .bec-stat-item {
        padding: 6px 10px;
    }
    
    .bec-stat-value {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .bec-filters-section,
    .bec-header-actions,
    .bec-pagination {
        display: none !important;
    }
    
    .bec-analytics-table,
    .bec-pivot-table {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}

/* Focus states for accessibility */
.bec-btn-small:focus,
.bec-copy-input:focus,
.bec-shared-link-actions a:focus {
    outline: 2px solid var(--bec-primary-light);
    outline-offset: 2px;
}

/* Animation for status updates */
@keyframes statusPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.bec-share-status.active {
    animation: statusPulse 2s infinite;
}

/* Security Notice Styles */
.bec-security-notice {
    text-align: center;
    padding: 20px;
    background: #fff8e1;
    border: 1px solid #ffecb3;
    border-radius: 6px;
    margin: 15px 0;
}

.bec-security-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.bec-security-notice h5 {
    color: #ff8f00;
    margin-bottom: 15px;
    font-weight: 600;
}

.bec-security-notice p {
    color: #5d4037;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Modal backdrop */
.bec-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
}

/* v-cloak directive - hides elements until Vue is ready */
[v-cloak] {
    display: none !important;
}

/* Loading overlay for Vue initialization */
.bec-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 8px;
}

.bec-loading-overlay .bec-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: bec-spin 1s linear infinite;
    margin-bottom: 15px;
}

.bec-loading-overlay p {
    color: #333;
    font-size: 14px;
    margin: 0;
}

/* ===== RTL (ARABIC) SUPPORT ===== */
html[dir="rtl"] .bec-date-filter {
    background-position: left 10px center !important;
    padding-left: 35px !important;
    padding-right: 10px !important;
}

html[dir="rtl"] .bec-date-filter:focus {
    background-position: left 10px center !important;
}

/* Select2 RTL adjustments */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 6px !important;
    right: auto !important;
}

html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 10px !important;
    padding-left: 35px !important;
    text-align: right !important;
}

/* Select2 clear button RTL */
html[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__clear {
    right: auto !important;
    left: 25px !important;
}

/* ===== MINIMAL DATEPICKER Z-INDEX FIX ===== */

/* Ensure it appears above Select2 */
.select2-container--open .select2-dropdown--below {
    z-index: 9999 !important;
}

.ui-datepicker {
    z-index: 10000 !important;
}



/* ===== BULK CREATE APP COLUMN WIDTHS ===== */

#bec-bulk-create-app .bec-table,
#bec-bulk-edit-app .bec-table {
    min-width: 1600px; /* Ensure enough horizontal space */
}

#bec-bulk-create-app .bec-table th,
#bec-bulk-edit-app .bec-table th {
    white-space: nowrap;
    padding: 12px 8px;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

#bec-bulk-create-app .bec-table td,
#bec-bulk-edit-app .bec-table td {
    padding: 10px 8px;
    vertical-align: middle;
}


#bec-bulk-create-app .bec-th-date { 
    width: 140px; 
    min-width: 140px; 
}

#bec-bulk-create-app .bec-field.bec-invoiceno { 
    width: 100px; 
    min-width: 100px; 
}

#bec-bulk-create-app .bec-field.bec-company { 
    width: 180px; 
    min-width: 180px; 
}

#bec-bulk-create-app .bec-field.bec-vatid { 
    width: 120px; 
    min-width: 120px; 
}

#bec-bulk-create-app .bec-field.bec-category { 
    width: 140px; 
    min-width: 140px; 
}

#bec-bulk-create-app .bec-field.bec-before,
#bec-bulk-create-app .bec-field.bec-vat,
#bec-bulk-create-app .bec-field.bec-after { 
    width: 100px; 
    min-width: 100px; 
}

#bec-bulk-create-app .bec-field.bec-notes { 
    width: 180px; 
    min-width: 180px; 
}

#bec-bulk-create-app .bec-field.bec-project { 
    width: 140px; 
    min-width: 140px; 
}

#bec-bulk-create-app .bec-attachment-field { 
    width: 220px; 
    min-width: 220px; 
}

#bec-bulk-create-app .bec-remove-row { 
    width: 40px; 
    min-width: 40px; 
}

/* ===== BULK EDIT APP COLUMN WIDTHS ===== */
#bec-bulk-edit-app .bec-th-id { 
    width: 90px; 
    min-width: 90px; 
}

#bec-bulk-edit-app .bec-th-date { 
    width: 135px; 
    min-width: 135px; 
}

#bec-bulk-edit-app .bec-field.bec-invoiceno { 
    width: 130px; 
    min-width: 130px; 
}

#bec-bulk-edit-app .bec-field.bec-company { 
    width: 180px; 
    min-width: 180px; 
}

#bec-bulk-edit-app .bec-field.bec-vatid { 
    width: 130px; 
    min-width: 130px; 
}

#bec-bulk-edit-app .bec-field.bec-category { 
    width: 140px; 
    min-width: 140px; 
}

#bec-bulk-edit-app .bec-field.bec-before,
#bec-bulk-edit-app .bec-field.bec-vat,
#bec-bulk-edit-app .bec-field.bec-after { 
    width: 100px; 
    min-width: 100px; 
}

#bec-bulk-edit-app .bec-field.bec-notes { 
    width: 180px; 
    min-width: 180px; 
}

#bec-bulk-edit-app .bec-field.bec-project { 
    width: 140px; 
    min-width: 140px; 
}

#bec-bulk-edit-app .bec-attachment-field { 
    width: 240px; 
    min-width: 240px; 
}

/* NEW: Search Box Styles for Shared Links Dashboard */




.bec-search-info #bec-search-match-count {
    font-weight: bold;
    color: #174d19;
}