.invoice-table td:nth-child(3) {
    font-weight: 600;
}

/* Action Links */
.actions-cell {
    white-space: nowrap;
    text-align: center;
}

.action-link {
    display: inline-block;
    margin: 0 0.3rem;
    padding: 0.4rem;
    text-decoration: none;
    border-radius: 0.3rem;
    transition: background 0.2s ease;
    font-size: 1.4rem;
}

.action-link:hover {
    background: #f0f0f0;
}

.view-link {
    color: #2196F3;
    title: "Rechnung ansehen";
}

.edit-link {
    color: #FF9800;
    title: "Rechnung bearbeiten";
}

.action-link:hover {
    transform: scale(1.1);
}/* Bear Dashboard Styles */
/* Base: 1rem = 10px */

.bear-dashboard-container {
    background: white;
    padding: 2rem;
    border-radius: 0.8rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.4rem;
    line-height: 1.5;
}

/* Loading State */
.dashboard-loading {
    text-align: center;
    padding: 4rem;
    color: #666;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-header h2 {
    margin: 0;
    color: #333;
    font-size: 2.4rem;
    font-weight: 600;
}

/* Dashboard Filters */
.dashboard-filters {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-filters select {
    padding: 0.8rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 0.4rem;
    font-size: 1.4rem;
    background: white;
    color: #333;
    cursor: pointer;
}

.dashboard-filters select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

#date-range-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.4rem;
    border: 1px solid #e0e0e0;
}

#date-range-selector label {
    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

#date-range-selector input[type="date"] {
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 0.3rem;
    font-size: 1.3rem;
}

#apply-date-range {
    padding: 0.6rem 1.2rem;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 0.3rem;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

#apply-date-range:hover {
    background: #1976D2;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.metric-card {
    background: white;
    padding: 2rem;
    border-radius: 0.8rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.metric-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #333;
}

.metric-label {
    font-size: 1.2rem;
    color: #888;
    font-weight: 500;
}

.metric-sub {
    font-size: 1.2rem;
    color: #666;
    margin-top: 0.5rem;
}

/* Metric Card Colors */
.revenue-card {
    border-left: 4px solid #4CAF50;
}

.revenue-card .metric-value {
    color: #4CAF50;
}

.outstanding-card {
    border-left: 4px solid #FF9800;
}

.outstanding-card .metric-value {
    color: #FF9800;
}

.overdue-card {
    border-left: 4px solid #F44336;
}

.overdue-card .metric-value {
    color: #F44336;
}

.expenses-card {
    border-left: 4px solid #FF6B6B;
}

.expenses-card .metric-value {
    color: #FF6B6B;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 0.8rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-container h3 {
    margin: 0 0 2rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.chart-container canvas {
    max-height: 300px;
}

/* Category Breakdown */
.category-breakdown {
    margin-bottom: 4rem;
}

.category-breakdown h3 {
    margin: 0 0 2rem 0;
    font-size: 2rem;
    font-weight: 600;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.category-section {
    background: white;
    padding: 2rem;
    border-radius: 0.8rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-section h4 {
    margin: 0 0 1.5rem 0;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
}

.category-table {
    width: 100%;
    border-collapse: collapse;
}

.category-table th,
.category-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.category-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 1.3rem;
}

.category-table td {
    font-size: 1.4rem;
}

.category-table tr:hover {
    background: #f8f9fa;
}

/* Recent Invoices */
.recent-invoices {
    margin-bottom: 4rem;
}

.recent-invoices h3 {
    margin: 0 0 2rem 0;
    font-size: 2rem;
    font-weight: 600;
    color: #333;
}

.invoice-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.tab-button {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 1.4rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #2196F3;
}

.tab-button.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
}

#recent-invoices-content {
    background: white;
    border-radius: 0.8rem;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

#recent-invoices-content h4 {
    margin: 0;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

#recent-invoices-content p {
    padding: 2rem;
    margin: 0;
    color: #666;
    text-align: center;
}

/* Invoice Table */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.3rem;
}

.invoice-table th,
.invoice-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.invoice-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-table tbody tr:hover {
    background: #f8f9fa;
}

.invoice-table td:nth-child(3) {
    font-weight: 600;
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status.paid {
    background: #E8F5E8;
    color: #2E7D2E;
}

.status.open {
    background: #FFF3E0;
    color: #F57C00;
}

.status.overdue {
    background: #FFEBEE;
    color: #C62828;
}

.status.draft {
    background: #F5F5F5;
    color: #616161;
}

.status.cancelled {
    background: #ECEFF1;
    color: #455A64;
}

.status.special {
    background: #F3E5F5;
    color: #7B1FA2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bear-dashboard-container {
        padding: 1.5rem;
        font-size: 1.3rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }
    
    .dashboard-header h2 {
        font-size: 2rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .invoice-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 0.8rem 1.5rem;
        font-size: 1.3rem;
    }
    
    .invoice-table {
        font-size: 1.2rem;
    }
    
    .invoice-table th,
    .invoice-table td {
        padding: 1rem 0.8rem;
    }
    
    /* Hide some columns on mobile */
    .invoice-table th:nth-child(6),
    .invoice-table td:nth-child(6),
    .invoice-table th:nth-child(7),
    .invoice-table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 480px) {
    .bear-dashboard-container {
        padding: 1rem;
    }
    
    .metric-card {
        padding: 1.5rem;
    }
    
    .metric-value {
        font-size: 2.4rem;
    }
    
    .chart-container {
        padding: 1.5rem;
    }
    
    .category-section {
        padding: 1.5rem;
    }
    
    /* Hide more columns on small mobile */
    .invoice-table th:nth-child(5),
    .invoice-table td:nth-child(5),
    .invoice-table th:nth-child(6),
    .invoice-table td:nth-child(6),
    .invoice-table th:nth-child(7),
    .invoice-table td:nth-child(7) {
        display: none;
    }
    
    .dashboard-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    #date-range-selector {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    #date-range-selector input[type="date"] {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .bear-dashboard-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .dashboard-filters,
    .invoice-tabs {
        display: none;
    }
    
    .charts-grid {
        break-inside: avoid;
    }
    
    .chart-container {
        break-inside: avoid;
    }
}

/* Enhanced Dashboard Filters */
.dashboard-filters-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-filters {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-group label {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.custom-date-range {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.custom-date-range span {
    font-size: 1.3rem;
    color: #666;
    font-weight: 500;
}

.custom-date-range input[type="date"] {
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: 0.3rem;
    font-size: 1.3rem;
    min-width: 140px;
}

.current-period-display {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0.4rem;
    border: 1px solid #e0e0e0;
    font-size: 1.4rem;
}

.current-period-display strong {
    color: #333;
}

#current-period-text {
    color: #2196F3;
    font-weight: 600;
}

/* Responsive updates for new filter layout */
@media (max-width: 768px) {
    .dashboard-filters {
        flex-direction: column;
        gap: 2rem;
    }
    
    .custom-date-range {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    
    .custom-date-range input[type="date"] {
        width: 100%;
        min-width: auto;
    }
    
    .current-period-display {
        text-align: center;
    }
}

.paid-amount {
    color: #4CAF50;
    font-weight: 600;
}

.outstanding-amount {
    color: #FF9800;
    font-weight: 600;
}

.category-table td.paid-amount,
.category-table td.outstanding-amount {
    text-align: right;
}

.category-section p {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
}