/**
 * Sales Reports Styles
 */

/* Filter Section */
.sales-report-filters {
    margin-bottom: 20px;
}

.sales-report-filters .form-group {
    margin-bottom: 15px;
}

.quick-date-buttons {
    margin-top: 5px;
}

.quick-date-buttons .btn {
    margin-right: 5px;
}

/* Metric Cards */
.metrics-row {
    margin-bottom: 25px;
}

.metric-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}

.metric-card:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.metric-icon {
    font-size: 28px;
    color: #3498db;
    margin-bottom: 10px;
}

.metric-icon .glyphicon-usd {
    color: #27ae60;
}

.metric-icon .glyphicon-briefcase {
    color: #3498db;
}

.metric-icon .glyphicon-ok-circle {
    color: #2ecc71;
}

.metric-icon .glyphicon-stats {
    color: #9b59b6;
}

.metric-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1.2;
}

.metric-label {
    font-size: 13px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Chart Containers */
.charts-row {
    margin-bottom: 25px;
}

.chart-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.chart-container h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.chart-container canvas {
    max-height: 300px;
}

/* Specific chart heights */
#salesByOwnerChart,
#pipelineByStageChart {
    height: 280px !important;
}

#revenueTrendChart {
    height: 250px !important;
}

/* Data Tables */
#sales-report-table,
#pipeline-table {
    margin-top: 10px;
}

#sales-report-table thead th,
#pipeline-table thead th {
    background-color: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

/* Export Button */
#export-csv-btn {
    margin-left: 5px;
}

#export-csv-btn .glyphicon {
    margin-right: 5px;
}

/* Date inputs */
.sr-date-today {
    cursor: pointer;
}

.sr-date-today:hover {
    background-color: #e8e8e8;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .metric-value {
        font-size: 22px;
    }

    .metric-card {
        margin-bottom: 15px;
    }

    .chart-container canvas {
        max-height: 250px;
    }

    .quick-date-buttons {
        margin-bottom: 15px;
    }

    .quick-date-buttons .btn {
        margin-bottom: 5px;
    }
}

@media (max-width: 768px) {
    .metrics-row .col-md-3 {
        width: 50%;
        float: left;
    }

    .metric-value {
        font-size: 20px;
    }

    .metric-icon {
        font-size: 24px;
    }

    .chart-container {
        padding: 15px;
    }

    #salesByOwnerChart,
    #pipelineByStageChart,
    #revenueTrendChart {
        height: 220px !important;
    }
}

@media (max-width: 480px) {
    .metrics-row .col-md-3 {
        width: 100%;
    }

    .quick-date-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Print Styles */
@media print {
    .sales-report-filters,
    .list-group,
    .col-md-3:first-child,
    #export-csv-btn,
    .dataTables_filter,
    .dataTables_info {
        display: none !important;
    }

    .col-md-9 {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .metric-card {
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .chart-container {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .charts-row {
        page-break-after: always;
    }

    table {
        font-size: 11px;
    }

    h2.bg-info {
        background-color: #d9edf7 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
