/* inventoryEfficiency.css - Professional Financial SaaS Version */

/* ===== LAYOUT & CONTAINERS ===== */
.inventory-efficiency-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* ===== METRICS GRID ===== */
.inventory-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0;
}

.inventory-metrics-grid .metric-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: box-shadow 0.2s ease;
    position: relative;
}

.inventory-metrics-grid .metric-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.inventory-metrics-grid .metric-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inventory-metrics-grid .metric-value {
    font-size: 1.75rem;
    font-weight: 400;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
    color: #1f2937;
    line-height: 1.2;
}

.inventory-metrics-grid .metric-description {
    font-size: 0.8125rem;
    color: #6b7280;
    font-style: italic;
    line-height: 1.4;
}

/* ===== SCORE-BASED STYLING ===== */
.inventory-metrics-grid .metric-card.score-excellent {
    border-left: 3px solid #10b981;
}

.inventory-metrics-grid .metric-card.score-excellent .metric-value {
    color: #059669;
}

.inventory-metrics-grid .metric-card.score-good {
    border-left: 3px solid #10b981;
}

.inventory-metrics-grid .metric-card.score-good .metric-value {
    color: #059669;
}

.inventory-metrics-grid .metric-card.score-fair {
    border-left: 3px solid #f59e0b;
}

.inventory-metrics-grid .metric-card.score-fair .metric-value {
    color: #d97706;
}

.inventory-metrics-grid .metric-card.score-poor {
    border-left: 3px solid #ef4444;
}

.inventory-metrics-grid .metric-card.score-poor .metric-value {
    color: #dc2626;
}

/* ===== INSIGHTS PANEL ===== */
.inventory-insights {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #3b82f6;
}

.inventory-insights h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.inventory-insights .insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.inventory-insights .insight-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 6px;
    border-left: 3px solid #e5e7eb;
    background-color: white;
    transition: box-shadow 0.2s ease;
}

.inventory-insights .insight-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.inventory-insights .insight-card.positive {
    border-left-color: #10b981;
    background-color: white;
}

.inventory-insights .insight-card.warning {
    border-left-color: #f59e0b;
    background-color: white;
}

.inventory-insights .insight-card.negative {
    border-left-color: #ef4444;
    background-color: white;
}

.inventory-insights .insight-card.info {
    border-left-color: #3b82f6;
    background-color: white;
}

.inventory-insights .insight-icon {
    font-size: 1.125rem;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.inventory-insights .insight-card.positive .insight-icon {
    color: #059669;
}

.inventory-insights .insight-card.warning .insight-icon {
    color: #d97706;
}

.inventory-insights .insight-card.negative .insight-icon {
    color: #dc2626;
}

.inventory-insights .insight-card.info .insight-icon {
    color: #3b82f6;
}

.inventory-insights .insight-content {
    flex: 1;
}

.inventory-insights .insight-content h5 {
    margin: 0 0 0.375rem 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
}

.inventory-insights .insight-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
}

/* ===== CHARTS SECTION ===== */
.inventory-charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.inventory-chart-wrapper {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 450px;

    max-width: 1200px; /* Maximum width for readability */
    margin: 0 auto; /* Center the content */}

.inventory-chart-wrapper .chart-title {
    text-align: center;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
    flex-shrink: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.inventory-chart-wrapper canvas {
    flex-grow: 1;
    min-height: 0;
    max-height: 400px;
}

/* ===== SUMMARY NOTE ===== */
.inventory-summary-note {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1.5rem;
    text-align: center;
}

.inventory-summary-note p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .inventory-charts-section {
        grid-template-columns: 1fr;
    }

    .inventory-chart-wrapper {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .inventory-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .inventory-metrics-grid .metric-card {
        padding: 1rem;
    }

    .inventory-metrics-grid .metric-value {
        font-size: 1.5rem;
    }

    .inventory-chart-wrapper {
        padding: 1.25rem;
        min-height: 350px;
    }

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

    .inventory-insights {
        padding: 1.25rem;
    }

    .inventory-insights .insight-card {
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .inventory-insights .insight-content h5 {
        font-size: 0.875rem;
    }

    .inventory-insights .insight-content p {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .inventory-metrics-grid {
        grid-template-columns: 1fr;
    }

    .inventory-chart-wrapper {
        padding: 1rem;
        min-height: 300px;
    }

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

    .inventory-chart-wrapper .chart-title {
        font-size: 1rem;
    }

    .inventory-insights {
        padding: 1rem;
    }

    .inventory-insights h4 {
        font-size: 1rem;
    }

    .inventory-insights .insight-card {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
    }

    .inventory-insights .insight-icon {
        align-self: center;
    }

    .inventory-summary-note {
        padding: 0.875rem;
    }

    .inventory-summary-note p {
        font-size: 0.8125rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .inventory-efficiency-container {
        background: white;
    }

    .inventory-metrics-grid {
        page-break-inside: avoid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

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

    .inventory-metrics-grid .metric-card:hover {
        box-shadow: none;
    }

    .inventory-insights {
        page-break-inside: avoid;
        border: 1px solid #d1d5db;
        box-shadow: none;
    }

    .inventory-insights .insight-card {
        page-break-inside: avoid;
    }

    .inventory-insights .insight-card:hover {
        box-shadow: none;
    }

    .inventory-charts-section {
        display: block;
        page-break-inside: avoid;
    }

    .inventory-chart-wrapper {
        page-break-inside: avoid;
        margin-bottom: 1rem;
        min-height: 300px;
        border: 1px solid #d1d5db;
        box-shadow: none;
    }

    .inventory-chart-wrapper canvas {
        max-height: 280px;
    }

    .inventory-summary-note {
        page-break-inside: avoid;
        border: 1px solid #d1d5db;
    }
}

/* ===== ACCESSIBILITY ===== */
.inventory-metrics-grid .metric-card:focus-within,
.inventory-insights .insight-card:focus-within,
.inventory-chart-wrapper:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
