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

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px;
}

/* Container */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: #4f46e5;
    color: white;
    border-radius: 8px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

header h1 i {
    margin-right: 10px;
    color: #fbbf24;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #fecaca;
    background-color: #fef2f2;
}

.error-content i {
    font-size: 3rem;
    color: #dc2626;
    margin-bottom: 20px;
}

.error-content h3 {
    color: #dc2626;
    margin-bottom: 10px;
}

/* Filters Section */
.filters-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Customer Summary */
.customer-summary {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

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

.summary-card {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 6px;
}

.summary-card h3 {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.points-value {
    font-size: 2rem;
    font-weight: bold;
    color: #059669;
}

.period-value, .transaction-count {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
}

/* Monthly Breakdown */
.monthly-breakdown {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.monthly-breakdown h2 {
    margin-bottom: 20px;
    color: #111827;
}

.monthly-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.monthly-item:last-child {
    border-bottom: none;
}

.month-info h4 {
    margin: 0;
    color: #374151;
}

.month-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.month-points {
    font-weight: bold;
    color: #059669;
    font-size: 1.1rem;
}

/* Transaction Details */
.transaction-details {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 30px;
}

.transaction-details h2 {
    margin-bottom: 20px;
    color: #111827;
}

/* Transaction Table */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.transactions-table th,
.transactions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.transactions-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.transactions-table tr:hover {
    background-color: #f8fafc;
}

/* Table Cell Alignments */
.date-cell {
    text-align: left;
    color: #6b7280;
    font-size: 14px;
}

.amount-cell {
    text-align: right;
    font-weight: 600;
    color: #374151;
}

.points-cell {
    text-align: center;
    font-weight: 700;
    color: #4f46e5;
}

.breakdown-cell {
    text-align: left;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Fallback for non-table layout */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info h4 {
    margin: 0 0 5px 0;
    color: #374151;
}

.transaction-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

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

.transaction-amount {
    font-weight: bold;
    color: #374151;
    margin-bottom: 5px;
}

.points-earned {
    color: #059669;
    font-weight: 600;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.page-info {
    color: #6b7280;
    font-size: 14px;
}

/* No Data State */
.no-data-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.no-data-content i {
    font-size: 3rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.no-data-content h3 {
    color: #374151;
    margin-bottom: 10px;
}

.no-data-content p {
    color: #6b7280;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .transaction-points {
        text-align: left;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}