/* QuickBooks UI Components - Shared Styles - Enhanced Shadows & Better Visibility */
/* These classes are used across multiple components for consistency */

/* QuickBooks-style Cards - More Pronounced Shadows */
.qb-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--qb-shadow);
    transition: var(--qb-transition);
    margin-bottom: 2rem;
}

.qb-card:hover {
    box-shadow: var(--qb-shadow-lg);
    transform: translateY(-2px);
}

.qb-card-header {
    background: var(--bg-gray-100);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: var(--text-primary);
}

.qb-card-body {
    padding: 1.5rem;
}

/* QuickBooks-style Buttons - Enhanced Shadows */
.qb-btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: var(--qb-transition);
    font-size: 0.875rem;
}

.qb-btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--qb-shadow-sm);
}

.qb-btn-primary:hover {
    background: var(--primary-darker);
    border-color: var(--primary-darker);
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 6px 12px rgba(44, 160, 28, 0.2);
}

.qb-btn-outline {
    background: white;
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: var(--qb-shadow-sm);
}

.qb-btn-outline:hover {
    background: var(--bg-gray-100);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--qb-shadow);
}

/* QuickBooks-style Badges */
.qb-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--qb-shadow-sm);
}

.qb-badge-success { 
    background: var(--success-light); 
    color: var(--success); 
}

.qb-badge-warning { 
    background: var(--warning-light); 
    color: var(--warning); 
}

.qb-badge-primary { 
    background: var(--primary-light); 
    color: var(--primary); 
}

.qb-badge-secondary { 
    background: var(--bg-gray-100); 
    color: var(--text-muted); 
}

.qb-badge-danger { 
    background: var(--danger-light); 
    color: var(--danger); 
}

.qb-badge-info { 
    background: var(--info-light); 
    color: var(--info); 
}

/* QuickBooks-style Form Fields */
.qb-field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.qb-field-value {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* QuickBooks-style Progress Bars */
.qb-progress {
    height: 8px;
    background: var(--bg-gray-100);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.qb-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.qb-progress-bar-primary {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.qb-progress-bar-success {
    background: linear-gradient(90deg, var(--success) 0%, #39B829 100%);
}

.qb-progress-bar-warning {
    background: linear-gradient(90deg, var(--warning) 0%, #FFD60A 100%);
}

/* QuickBooks-style Statistics Cards - Enhanced Shadows */
.qb-stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border-color);
    transition: var(--qb-transition);
    box-shadow: var(--qb-shadow);
}

.qb-stat-card:hover {
    box-shadow: var(--qb-shadow-lg);
    transform: translateY(-3px);
}

.qb-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.qb-stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* QuickBooks-style Alerts */
.qb-alert {
    border-radius: 8px;
    border: 1px solid;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--qb-shadow-sm);
}

.qb-alert-success {
    background: var(--success-light);
    border-color: rgba(44, 160, 28, 0.15);
    color: var(--success);
}

.qb-alert-warning {
    background: var(--warning-light);
    border-color: rgba(242, 163, 36, 0.15);
    color: var(--warning);
}

.qb-alert-danger {
    background: var(--danger-light);
    border-color: rgba(226, 61, 40, 0.15);
    color: var(--danger);
}

.qb-alert-info {
    background: var(--info-light);
    border-color: rgba(14, 165, 233, 0.15);
    color: var(--info);
}

/* QuickBooks-style Page Headers */
.qb-page-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    margin-left: -2rem;
    margin-right: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* QuickBooks-style Modals */
.qb-modal {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.qb-modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.qb-modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    background: var(--bg-gray-100);
    border-radius: 12px 12px 0 0;
}

.qb-modal-body {
    padding: 1.5rem;
}

.qb-modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    background: var(--bg-gray-100);
    border-radius: 0 0 12px 12px;
}

/* QuickBooks-style Loading States */
.qb-loading {
    background: var(--bg-gray-100);
    border-radius: 12px;
    padding: 3rem;
    margin: 2rem auto;
    max-width: 400px;
    box-shadow: var(--qb-shadow-lg);
    text-align: center;
}

.qb-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
    color: var(--primary);
}

/* QuickBooks-style Empty States */
.qb-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.qb-empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.qb-empty-state h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* QuickBooks-style Toolbar */
.qb-toolbar {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--qb-shadow);
}

.qb-toolbar-left,
.qb-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Dashboard Toolbar Actions */
.qb-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* QuickBooks-style Tables - Enhanced Shadows */
.qb-table {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--qb-shadow);
}

.qb-table .table {
    margin-bottom: 0;
}

.qb-table .table thead th {
    background: var(--bg-gray-100);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
}

.qb-table .table tbody td {
    padding: 0.875rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.qb-table .table tbody tr:hover {
    background-color: var(--bg-gray-100);
}

/* QuickBooks-style Action Buttons */
.qb-action-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qb-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    transition: var(--qb-transition);
    text-decoration: none;
    box-shadow: var(--qb-shadow-sm);
}

.qb-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(44, 160, 28, 0.2);
}

.qb-action-btn.danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    box-shadow: 0 4px 8px rgba(226, 61, 40, 0.2);
}

/* Dashboard Specific Components */

/* Enhanced Chart Placeholder - Better Visibility */
.chart-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--qb-shadow);
}

.placeholder-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-grow: 1;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 16px;
    gap: 4px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-darker) 100%);
    opacity: 0.9;
    border-radius: 4px 4px 0 0;
    transition: var(--qb-transition);
    min-height: 20px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-bar:nth-child(even) {
    background: linear-gradient(135deg, var(--secondary) 0%, #0B6175 100%);
}

.chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    gap: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.legend-text {
    font-weight: 500;
}

/* Enhanced Activity Timeline - Better Visibility */
.activity-timeline {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--qb-transition);
    position: relative;
    border-radius: 6px;
    margin: 2px 0;
}

.activity-item:hover {
    background-color: var(--bg-gray-100);
    box-shadow: var(--qb-shadow-sm);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
    flex-shrink: 0;
    position: relative;
    box-shadow: var(--qb-shadow-sm);
}

.activity-icon i {
    margin: 0;
    font-size: 1rem;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.activity-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Quick Link Cards - Enhanced Shadows */
.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    height: 120px;
    transition: var(--qb-transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--qb-shadow);
}

.quick-link-card:hover:not([style*="opacity"]) {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--qb-shadow-lg);
    border-color: var(--primary);
    text-decoration: none;
}

.quick-link-card i {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    transition: var(--qb-transition);
}

.quick-link-card:hover:not([style*="opacity"]) i {
    color: white;
    transform: scale(1.1);
}

.quick-link-card span {
    font-weight: 600;
    font-size: 0.875rem;
}

/* Disabled state for quick link cards */
.quick-link-card[style*="opacity"] {
    background-color: var(--bg-gray-100);
    color: var(--text-muted);
    box-shadow: var(--qb-shadow-sm);
}

.quick-link-card[style*="opacity"] i {
    color: var(--text-muted);
}

/* Enhanced List Group Items - Better Visibility */
.list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    transition: var(--qb-transition);
    background: white;
    border-radius: 0;
}

.list-group-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.list-group-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.list-group-item:hover:not(.disabled) {
    background-color: var(--bg-gray-100);
    transform: translateX(2px);
    border-left: 4px solid var(--primary);
    padding-left: calc(1rem - 4px);
    box-shadow: var(--qb-shadow-sm);
}

.list-group-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.list-group-item.disabled:hover {
    background: white;
    transform: none;
    border-left: none;
    padding-left: 1rem;
}

/* Navigation Group Labels (Improved Aesthetic) */
.nav-group-label {
    font-size: 0.65rem; /* slightly smaller for hierarchy */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.085em;
    color: var(--primary);
    padding: 0.55rem 0.75rem 0.35rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    user-select: none;
    opacity: 0.95;
    background: linear-gradient(90deg, var(--primary-light) 0%, rgba(255,255,255,0) 70%);
    border-radius: 6px;
    margin-top: 1.75rem; /* section spacing */
}

.nav-group-label:first-of-type { margin-top: 1rem; }

.nav-group-label:before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover, var(--primary)) 100%);
    box-shadow: 0 0 0 3px rgba(44,160,28,0.18);
}

.nav-group-label:hover {
    opacity: 1;
    background: linear-gradient(90deg, var(--primary-light) 0%, rgba(255,255,255,0) 85%);
}

/* Compact spacing when a group label is directly followed by a nav-section */
.nav-group-label + .nav-section { margin-top: 0.3rem; }


/* Utility Classes for QuickBooks Style */
.qb-shadow-sm { box-shadow: var(--qb-shadow-sm); }
.qb-shadow { box-shadow: var(--qb-shadow); }
.qb-shadow-lg { box-shadow: var(--qb-shadow-lg); }

.qb-border { border: 1px solid var(--border-color); }
.qb-border-radius { border-radius: 8px; }

.qb-text-primary { color: var(--text-primary); }
.qb-text-secondary { color: var(--text-secondary); }
.qb-text-muted { color: var(--text-muted); }

.qb-bg-light { background-color: var(--bg-gray-100); }
.qb-bg-white { background-color: white; }

/* Page Headers */
.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .qb-page-header {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .qb-card-body {
        padding: 1rem;
    }
    
    .qb-toolbar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .qb-toolbar-left,
    .qb-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .qb-toolbar-actions {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .qb-toolbar-actions .btn {
        width: 100%;
    }
    
    .qb-stat-card {
        padding: 1rem;
    }
    
    .qb-stat-number {
        font-size: 2rem;
    }
    
    .qb-action-buttons {
        flex-wrap: wrap;
    }
    
    .qb-empty-state {
        padding: 2rem 1rem;
    }
    
    .qb-empty-state i {
        font-size: 3rem;
    }
    
    .chart-placeholder {
        height: 200px;
        padding: 15px;
    }
    
    .placeholder-chart {
        gap: 2px;
    }
    
    .activity-timeline {
        padding: 0.25rem;
    }
}