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

/* ===== CONTAINER & LAYOUT ===== */
.working-capital-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-size: 11pt;
    line-height: 1.6;
    color: #1f2937;
    padding: 0;
    border: none;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

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

/* ===== HEADER SECTION ===== */
.working-capital-wrapper .report-title {
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    padding: 2rem 2rem 0.5rem;
    color: #1f2937;
    letter-spacing: -0.01em;
    border-bottom: 1px solid #e5e7eb;
}

.working-capital-wrapper .report-subtitle {
    font-size: 0.95rem;
    text-align: center;
    margin: 0;
    padding: 0.5rem 2rem 1.5rem;
    font-style: normal;
    color: #6b7280;
    font-weight: 400;
}

/* ===== METRICS GRID ===== */
.working-capital-wrapper .cvp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    padding: 1.5rem;
    margin: 0;
}

/* ===== METRIC CARDS ===== */
.wc-metric-card {
    background: #FFFFFF;
    border-radius: 6px;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease;
    position: relative;
}

.wc-metric-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wc-metric-card .metric-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.wc-metric-card .metric-value {
    font-size: 2rem;
    font-weight: 400;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
    font-variant-numeric: tabular-nums;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1.2;
}

.wc-metric-card .metric-interpretation {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

/* ===== METRIC STATUS INDICATORS ===== */
.wc-metric-card .metric-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.wc-metric-card .metric-status.strong {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.wc-metric-card .metric-status.adequate {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.wc-metric-card .metric-status.weak {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.wc-metric-card .metric-status.critical {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ===== COMPONENTS SUMMARY SECTION ===== */
.wc-components-summary {
    margin: 1.5rem;
    padding: 1.25rem;
    background: #FFFFFF;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.wc-components-summary h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.wc-components-summary p {
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #4b5563;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', monospace;
}

.wc-components-summary p strong {
    color: #1f2937;
    font-weight: 500;
}

/* ===== DATA PILLS ===== */
.working-capital-wrapper .data-pill {
    display: inline-block;
    padding: 5px 12px;
    margin: 0.25rem;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.working-capital-wrapper .data-pill:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* ===== ACCOUNT IDENTIFICATION SECTION ===== */
.wc-account-identification {
    margin: 1.5rem;
    padding: 1.25rem;
    background: #FFFFFF;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.wc-account-identification h4 {
    margin: 0 0 1rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1f2937;
}

.wc-account-identification .account-group {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 4px;
}

/* ===== LOADING STATE ===== */
.wc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #FFFFFF;
    border-radius: 6px;
    margin: 1.5rem;
}

.wc-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.wc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #FFFFFF;
    border-radius: 6px;
    margin: 1.5rem;
    padding: 3rem;
    text-align: center;
}

.wc-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.wc-empty h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.wc-empty p {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .working-capital-wrapper .cvp-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

    .working-capital-wrapper .report-title {
        font-size: 1.5rem;
        padding: 1.5rem 1.5rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .working-capital-wrapper .cvp-metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .working-capital-wrapper .report-title {
        font-size: 1.375rem;
        padding: 1.25rem 1.25rem 0.5rem;
    }

    .wc-metric-card {
        padding: 1rem;
    }

    .wc-metric-card .metric-value {
        font-size: 1.75rem;
    }

    .wc-components-summary,
    .wc-account-identification {
        margin: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .wc-metric-card .metric-value {
        font-size: 1.5rem;
    }

    .wc-components-summary h4 {
        font-size: 1rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .working-capital-wrapper {
        background: white;
        box-shadow: none;
    }

    .wc-metric-card,
    .wc-components-summary {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .wc-metric-card:hover {
        transform: none;
    }
}

/* ===== ACCESSIBILITY ===== */
.wc-metric-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
