:root {
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    --dark-color: #5a5c69;
    --light-bg: #f8f9fc;
    --border-color: #e3e6f0;
    --text-muted: #858796;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
    color: #5a5c69;
}

.report-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    padding: 2rem;
    margin-bottom: 2rem;
}

.report-header {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.report-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.report-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.filter-section {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.quick-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quick-filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--dark-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.quick-filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.quick-filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.filter-group .form-control {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

.filter-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn-filter, .btn-print, .btn-export {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-filter {
    background: var(--primary-color);
    color: white;
}

.btn-filter:hover {
    background: #2e59d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 89, 217, 0.3);
}

.btn-print {
    background: var(--info-color);
    color: white;
}

.btn-print:hover {
    background: #2c9faf;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(44, 159, 175, 0.3);
}

.btn-export {
    background: var(--success-color);
    color: white;
}

.btn-export:hover {
    background: #17a673;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 166, 115, 0.3);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.summary-card .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.summary-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.summary-card.highlight h3,
.summary-card.highlight .amount {
    color: white;
}

.summary-card.success .amount {
    color: var(--success-color);
}

.summary-card.danger .amount {
    color: var(--danger-color);
}

.summary-card.warning .amount {
    color: var(--warning-color);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table thead th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f8f9fc;
}

.data-table tbody td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
}

.data-table tfoot {
    background: #f8f9fc;
    font-weight: 700;
}

.data-table tfoot td {
    padding: 1rem 0.5rem;
    border-top: 2px solid var(--primary-color);
    font-size: 0.9rem;
}

.text-right {
    text-align: right;
}

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

.no-data {
    text-align: center;
    padding: 3rem !important;
    color: var(--text-muted);
    font-style: italic;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-in-stock {
    background: #d4edda;
    color: #155724;
}

.status-low-stock {
    background: #fff3cd;
    color: #856404;
}

.status-out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.status-negative {
    background: #dc3545;
    color: white;
}

@media (max-width: 768px) {
    .report-container {
        padding: 1rem;
    }

    .report-header h1 {
        font-size: 1.5rem;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table {
        font-size: 0.75rem;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 0.5rem 0.25rem;
    }
}

@media print {
    .filter-section,
    .btn-filter,
    .btn-print,
    .btn-export {
        display: none !important;
    }

    .report-container {
        box-shadow: none;
        padding: 0;
    }

    .data-table {
        page-break-inside: auto;
    }

    .data-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}
