/* Location-wise Sales Report Styles */

:root {
    --primary-color: #1a237e;
    --secondary-color: #283593;
    --success-color: #2e7d32;
    --danger-color: #c62828;
    --warning-color: #f57c00;
    --info-color: #0277bd;
    --light-bg: #f8f9fc;
    --border-color: #e3e6f0;
    --text-primary: #1a1a1a;
    --text-secondary: #5a6169;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

.report-container {
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.report-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 3px solid var(--primary-color);
}

.company-name {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.report-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-meta {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Filter Section */
.filter-section {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.quick-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.quick-filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.custom-dates-row {
    display: none;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

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

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.btn-filter,
.btn-print,
.btn-export {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

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

.btn-filter:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-print:hover {
    background: #01579b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-export:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 32px;
    margin-bottom: 16px;
    display: block;
    color: var(--primary-color);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.summary-card h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.summary-card .amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.summary-card.highlight {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    border-color: var(--primary-color);
}

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

.summary-card.success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: var(--success-color);
}

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

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin-top: 16px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

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

.data-table thead {
    background: var(--primary-color);
    color: white;
}

.data-table thead th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table thead th:last-child {
    border-right: none;
}

.data-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f0f4ff;
    transform: scale(1.01);
    box-shadow: var(--shadow-sm);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tfoot {
    background: #f8f9fc;
    font-weight: 700;
    border-top: 3px solid var(--primary-color);
}

.data-table tfoot td {
    padding: 14px 12px;
    font-size: 15px;
}

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

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

.no-data {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--text-secondary);
    font-style: italic;
}

/* Amount Highlighting */
.amount-highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.profit-amount {
    color: var(--success-color);
    font-weight: 700;
}

.profit-high {
    color: var(--success-color);
    font-weight: 700;
}

.profit-medium {
    color: var(--warning-color);
    font-weight: 700;
}

.profit-low {
    color: var(--text-secondary);
    font-weight: 600;
}

.profit-negative {
    color: var(--danger-color);
    font-weight: 700;
}

/* View Details Button */
.btn-view-details {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-view-details:hover {
    background: #01579b;
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

.btn-view-details i {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .summary-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .report-header h1 {
        font-size: 24px;
    }
    
    .quick-filters {
        flex-direction: column;
    }
    
    .quick-filter-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .report-container {
        padding: 16px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table thead th,
    .data-table tbody td {
        padding: 8px;
    }
}

/* Print Styles */
@media print {
    .filter-section,
    .btn-filter,
    .btn-print,
    .btn-export,
    .btn-view-details {
        display: none !important;
    }
    
    .report-container {
        box-shadow: none;
        padding: 0;
    }
    
    .summary-card:hover,
    .data-table tbody tr:hover {
        transform: none;
        box-shadow: none;
    }
}
