/* ═══════════════════════════════════════════════════════════
   Operational Efficiency Modules — Shared Editorial CSS
   Covers: Working Capital, Cash Conversion Cycle,
           Receivables & Payables, Inventory Efficiency,
           Asset Management, Productivity Metrics
   ═══════════════════════════════════════════════════════════ */

/* ═══ CSS Variables — aliased to shared design tokens ═══ */
.oe-module-container {
    --oe-accent: var(--liq-accent);
    --oe-accent-light: var(--liq-accent-light);
    --oe-hero-from: var(--liq-hero-from);
    --oe-hero-to: var(--liq-hero-to);
    --oe-success: var(--liq-profit);
    --oe-danger: var(--liq-loss);
    --oe-warning: var(--liq-warning);
    --oe-blue: var(--liq-info);
    --oe-purple: #7C3AED;
    --oe-orange: #EA580C;
    --oe-bg: var(--liq-bg);
    --oe-surface: var(--liq-surface);
    --oe-border: var(--liq-border);
    --oe-border-light: var(--liq-border-light);
    --oe-text: var(--liq-text);
    --oe-text-secondary: var(--liq-text-secondary);
    --oe-text-muted: var(--liq-text-muted);
    --oe-display: var(--liq-font-display);
    --oe-body: var(--liq-font-body);
    --oe-mono: var(--liq-font-mono);
    --oe-shadow-sm: var(--liq-shadow-sm);
    --oe-shadow-md: var(--liq-shadow-md);
    --oe-shadow-lg: var(--liq-shadow-lg);
    --oe-radius-sm: 6px;
    --oe-radius-md: 8px;
    --oe-radius-lg: var(--liq-card-radius);
}

/* ═══ Module Container ═══ */
.oe-module-container {
    font-family: var(--oe-body);
    color: var(--oe-text);
    padding: 0;
    max-width: 100%;
}

/* ═══ Hero Header ═══ */
.oe-header {
    background: linear-gradient(135deg, var(--oe-hero-from) 0%, var(--oe-hero-to) 100%);
    color: white;
    padding: 0.875rem 1rem;
    border-radius: var(--oe-radius-lg);
    box-shadow: var(--oe-shadow-lg);
    position: relative;
    overflow: hidden;
    margin: 0.625rem 0.875rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: none;
}

.oe-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 40%;
    height: 180%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.oe-title-section h2 {
    font-family: var(--oe-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.oe-subtitle {
    font-size: 0.938rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--oe-body);
    font-weight: 400;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    letter-spacing: 0;
    margin: 0;
}

.oe-actions {
    display: flex;
    gap: 0.375rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.oe-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.125rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    color: white;
    font-family: var(--oe-body);
    font-size: 0.813rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
}

.oe-action-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.oe-action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ═══ Tab Navigation ═══ */
.oe-controls {
    background: transparent;
    padding: 0.5rem 0.875rem 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.125rem;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--oe-border-light, #F5F5F4);
    padding-bottom: 0;
}

.oe-controls::-webkit-scrollbar {
    display: none;
}

.oe-tab-btn {
    padding: 0.625rem 0.875rem;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--oe-body);
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--oe-text-muted, #A8A29E);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    letter-spacing: 0.01em;
}

.oe-tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.375rem;
    right: 0.375rem;
    height: 2px;
    background: transparent;
    border-radius: 2px 2px 0 0;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scaleX(0);
}

.oe-tab-btn:hover {
    background: transparent;
    color: var(--oe-text-secondary, #57534E);
}

.oe-tab-btn:hover::after {
    background: var(--oe-border, #E7E5E4);
    transform: scaleX(1);
}

.oe-tab-btn.active,
#contentSectionEl .oe-tab-btn.active {
    background: transparent;
    background-color: transparent;
    border: none;
    border-color: transparent;
    color: var(--oe-text, #1C1917);
    font-weight: 600;
    box-shadow: none;
}

.oe-tab-btn.active::after {
    background: var(--oe-accent, #4a9080);
    transform: scaleX(1);
}

/* ═══ Content Area ═══ */
.oe-content {
    padding: 1rem 1.125rem 1.125rem;
}

.oe-tab-panel {
    display: none;
    animation: oeSlideInUp 0.3s ease both;
}

.oe-tab-panel.active {
    display: block;
}

/* ═══ Metric Cards ═══ */
.oe-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.oe-metrics-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.oe-metrics-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.oe-metric-card {
    background: var(--oe-surface);
    border: none;
    border-radius: 12px;
    padding: 1.125rem 1.25rem;
    border-left: 3px solid var(--oe-border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    animation: oeSlideInUp 0.35s ease both;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.oe-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.oe-metric-card[data-drilldown] {
    cursor: pointer;
}

.oe-metric-card:nth-child(1) { border-left-color: var(--oe-success); animation-delay: 0.05s; }
.oe-metric-card:nth-child(2) { border-left-color: var(--oe-accent); animation-delay: 0.1s; }
.oe-metric-card:nth-child(3) { border-left-color: var(--oe-blue); animation-delay: 0.15s; }
.oe-metric-card:nth-child(4) { border-left-color: var(--oe-purple); animation-delay: 0.2s; }
.oe-metric-card:nth-child(5) { border-left-color: var(--oe-orange); animation-delay: 0.25s; }
.oe-metric-card:nth-child(6) { border-left-color: var(--oe-warning); animation-delay: 0.3s; }
.oe-metric-card:nth-child(7) { border-left-color: var(--oe-danger); animation-delay: 0.35s; }
.oe-metric-card:nth-child(8) { border-left-color: #0EA5E9; animation-delay: 0.4s; }

/* Subtle per-card gradient overlay for depth */
.oe-metric-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    pointer-events: none;
}
.oe-metric-card:nth-child(1)::before { background: linear-gradient(135deg, rgba(4, 120, 87, 0.025) 0%, transparent 50%); }
.oe-metric-card:nth-child(2)::before { background: linear-gradient(135deg, rgba(74, 144, 128, 0.025) 0%, transparent 50%); }
.oe-metric-card:nth-child(3)::before { background: linear-gradient(135deg, rgba(30, 64, 175, 0.025) 0%, transparent 50%); }
.oe-metric-card:nth-child(4)::before { background: linear-gradient(135deg, rgba(124, 58, 237, 0.025) 0%, transparent 50%); }
.oe-metric-card:nth-child(5)::before { background: linear-gradient(135deg, rgba(234, 88, 12, 0.025) 0%, transparent 50%); }
.oe-metric-card:nth-child(6)::before { background: linear-gradient(135deg, rgba(202, 138, 4, 0.025) 0%, transparent 50%); }
.oe-metric-card:nth-child(7)::before { background: linear-gradient(135deg, rgba(190, 18, 60, 0.025) 0%, transparent 50%); }
.oe-metric-card:nth-child(8)::before { background: linear-gradient(135deg, rgba(14, 165, 233, 0.025) 0%, transparent 50%); }

.oe-metric-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--oe-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.45rem;
}

.oe-metric-label {
    font-family: var(--oe-body);
    font-size: 0.688rem;
    font-weight: 600;
    color: var(--oe-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.375rem;
}

.oe-metric-value {
    font-family: var(--oe-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--oe-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.oe-metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-family: var(--oe-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    margin-top: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 100px;
    line-height: 1;
}

.oe-trend-positive { color: var(--oe-success); background: rgba(4, 120, 87, 0.08); }
.oe-trend-negative { color: var(--oe-danger); background: rgba(190, 18, 60, 0.08); }
.oe-trend-neutral { color: var(--oe-text-muted); background: rgba(168, 162, 158, 0.08); }
.oe-trend-warning { color: var(--oe-warning); background: rgba(202, 138, 4, 0.08); }

/* Score badges — refined pills */
.oe-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 100px;
    font-size: 0.5625rem;
    font-weight: 600;
    font-family: var(--oe-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.oe-score-badge.excellent { background: rgba(4, 120, 87, 0.08); color: #065F46; border: 1px solid rgba(4, 120, 87, 0.12); }
.oe-score-badge.good { background: rgba(4, 120, 87, 0.08); color: #065F46; border: 1px solid rgba(4, 120, 87, 0.12); }
.oe-score-badge.fair { background: rgba(202, 138, 4, 0.08); color: #92400E; border: 1px solid rgba(202, 138, 4, 0.12); }
.oe-score-badge.poor { background: rgba(190, 18, 60, 0.08); color: #991B1B; border: 1px solid rgba(190, 18, 60, 0.12); }
.oe-score-badge.critical { background: rgba(190, 18, 60, 0.08); color: #991B1B; border: 1px solid rgba(190, 18, 60, 0.12); }

/* ═══ Chart Cards ═══ */
.oe-chart-card {
    background: var(--oe-surface);
    border: 1px solid var(--oe-border-light, #F5F5F4);
    border-radius: 12px;
    padding: 1.125rem;
    box-shadow: var(--oe-shadow-sm);
    margin-bottom: 0.875rem;
    animation: oeSlideInUp 0.35s ease both;
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.oe-chart-card:hover {
    box-shadow: var(--oe-shadow-md);
}

.oe-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.oe-chart-title {
    font-family: var(--oe-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--oe-text);
    margin: 0;
}

.oe-chart-subtitle {
    font-size: 0.813rem;
    color: var(--oe-text-muted);
    margin: 0.25rem 0 0;
}

.oe-chart-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}

.oe-chart-container {
    position: relative;
    height: 210px;
}

.oe-chart-container.tall {
    height: 260px;
}

.oe-chart-container.short {
    height: 220px;
}

.am-accent .oe-chart-container .liq-apex-host[id^="am"] {
    width: 100%;
    height: 100%;
}

.oe-chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ═══ Calculator / Simulator ═══ */
.oe-calculator {
    overflow: hidden;
    border-radius: var(--oe-radius-lg);
    border: 1px solid var(--oe-border);
    box-shadow: var(--oe-shadow-sm);
    margin-bottom: 0.875rem;
    animation: oeSlideInUp 0.35s ease both;
}

.oe-calculator-header {
    background: linear-gradient(135deg, var(--oe-hero-from) 0%, var(--oe-hero-to) 100%);
    color: white;
    padding: 0.625rem 0.75rem;
    position: relative;
    overflow: hidden;
}

.oe-calculator-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 35%;
    height: 160%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.oe-calculator-header h4 {
    font-family: var(--oe-display);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    position: relative;
    z-index: 1;
}

.oe-calculator-header p {
    font-size: 0.813rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    position: relative;
    z-index: 1;
}

.oe-calculator-body {
    padding: 0.75rem;
    background: var(--oe-surface);
}

.oe-slider-group {
    margin-bottom: 0.5rem;
}

.oe-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.oe-slider-label {
    font-family: var(--oe-body);
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--oe-text-secondary);
}

.oe-slider-value {
    font-family: var(--oe-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--oe-accent);
    min-width: 60px;
    text-align: right;
}

.oe-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--oe-border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.oe-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--oe-accent);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.oe-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.oe-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--oe-accent);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.oe-result-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.oe-result-cards.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.oe-result-card {
    background: var(--oe-bg);
    border: 1px solid var(--oe-border);
    border-radius: var(--oe-radius-md);
    padding: 0.625rem 0.75rem;
    text-align: center;
}

.oe-result-label {
    font-family: var(--oe-body);
    font-size: 0.688rem;
    font-weight: 600;
    color: var(--oe-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.oe-result-value {
    font-family: var(--oe-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--oe-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.oe-result-delta {
    font-family: var(--oe-mono);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.oe-result-delta.positive { color: var(--oe-success); }
.oe-result-delta.negative { color: var(--oe-danger); }
.oe-result-delta.neutral { color: var(--oe-text-muted); }

/* ═══ Ask RiQ ═══ */
.oe-riq-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    background: transparent;
    border: 1.5px solid var(--oe-accent);
    border-radius: 2rem;
    font-family: var(--oe-body);
    font-size: 0.688rem;
    font-weight: 600;
    color: var(--oe-accent);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.oe-riq-btn:hover {
    background: var(--oe-accent);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 128, 0.25);
}

.oe-riq-btn:hover svg { stroke: white; }

.oe-riq-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.oe-riq-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(74, 144, 128, 0.3);
    border-top-color: var(--oe-accent);
    border-radius: 50%;
    animation: oeRiqSpin 0.6s linear infinite;
}

.oe-riq-card {
    background: linear-gradient(135deg, #FAFAF9 0%, #F5F5F4 100%);
    border: 1px solid var(--oe-border);
    border-left: 4px solid var(--oe-accent);
    border-radius: var(--oe-radius-md);
    padding: 0.625rem 0.75rem;
    margin-top: 0.75rem;
    position: relative;
    animation: oeSlideDown 0.3s ease;
}

.oe-riq-label {
    font-family: var(--oe-body);
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--oe-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.oe-riq-text {
    font-family: var(--oe-body);
    font-size: 0.875rem;
    color: var(--oe-text-secondary);
    line-height: 1.6;
}

.oe-riq-dismiss {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.125rem;
    color: var(--oe-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.oe-riq-dismiss:hover { color: var(--oe-text); }

/* ═══ Alert System ═══ */
.oe-alert-banner {
    border-radius: 10px;
    border-left: 4px solid;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    animation: oeSlideDown 0.3s ease;
}

.oe-alert-banner.critical {
    background: #FEF2F2;
    border-left-color: var(--oe-danger);
    color: #991B1B;
}

.oe-alert-banner.warning {
    background: #FFFBEB;
    border-left-color: var(--oe-warning);
    color: #92400E;
}

.oe-alert-banner.success {
    background: #F0FDF4;
    border-left-color: var(--oe-success);
    color: #065F46;
}

.oe-alert-banner.info {
    background: #EFF6FF;
    border-left-color: var(--oe-blue);
    color: #1E3A5F;
}

.oe-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.oe-alert-text {
    flex: 1;
    font-family: var(--oe-body);
    font-weight: 500;
}

.oe-alert-dismiss {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0;
    line-height: 1;
}

.oe-alert-dismiss:hover { opacity: 1; }

/* ═══ Insights Panel ═══ */
.oe-insights-panel {
    background: var(--oe-bg);
    border: 1px solid var(--oe-border);
    border-radius: var(--oe-radius-lg);
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
}

.oe-insights-title {
    font-family: var(--oe-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--oe-text);
    margin: 0 0 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.oe-insight-item {
    border-left: 4px solid var(--oe-accent);
    padding: 0.375rem 0.75rem;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--oe-text-secondary);
    line-height: 1.5;
    background: var(--oe-surface);
    border-radius: 0 var(--oe-radius-sm) var(--oe-radius-sm) 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.oe-insight-item:hover {
    background: rgba(0, 0, 0, 0.015);
}

.oe-insight-item.positive { border-left-color: var(--oe-success); }
.oe-insight-item.negative { border-left-color: var(--oe-danger); }
.oe-insight-item.warning { border-left-color: var(--oe-warning); }
.oe-insight-item.info { border-left-color: var(--oe-blue); }

/* ═══ Data Tables ═══ */
.oe-table-container {
    overflow-x: auto;
    margin-bottom: 0.875rem;
}

.oe-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.oe-table thead th {
    background: var(--oe-bg);
    padding: 0.5rem 0.75rem;
    font-family: var(--oe-body);
    font-weight: 600;
    font-size: 0.688rem;
    color: var(--oe-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--oe-border);
    text-align: left;
    white-space: nowrap;
}

.oe-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--oe-border-light);
    font-family: var(--oe-body);
    color: var(--oe-text);
}

.oe-table tbody td.mono {
    font-family: var(--oe-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.oe-table tbody tr:hover {
    background: var(--oe-accent-light);
}

.oe-table tbody tr[data-drilldown] {
    cursor: pointer;
}

/* ═══ CCC Visual Timeline ═══ */
.oe-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.875rem 0.375rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.oe-timeline-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.oe-timeline-bar {
    height: 40px;
    width: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--oe-mono);
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    position: relative;
}

.oe-timeline-bar.dio { background: linear-gradient(135deg, #F59E0B, #D97706); }
.oe-timeline-bar.dso { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.oe-timeline-bar.dpo { background: linear-gradient(135deg, #10B981, #059669); }
.oe-timeline-bar.ccc { background: linear-gradient(135deg, #4a9080, #357568); }

.oe-timeline-label {
    font-family: var(--oe-body);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--oe-text-secondary);
    margin-top: 0.5rem;
    text-align: center;
}

.oe-timeline-days {
    font-family: var(--oe-mono);
    font-weight: 700;
    color: var(--oe-text);
}

.oe-timeline-connector {
    width: 24px;
    height: 2px;
    background: var(--oe-border);
    flex-shrink: 0;
}

.oe-timeline-node {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--oe-accent);
    background: white;
    flex-shrink: 0;
    z-index: 1;
}

/* ═══ Placeholder / Empty State ═══ */
.oe-placeholder {
    text-align: center;
    padding: 1rem 0.875rem;
    color: var(--oe-text-muted);
    font-size: 0.938rem;
    line-height: 1.6;
}

.oe-placeholder-icon {
    font-size: 1.15rem;
    margin-bottom: 0.625rem;
    opacity: 0.5;
}

/* ═══ Section Divider ═══ */
.oe-divider {
    height: 1px;
    background: var(--oe-border);
    margin: 0.5rem 0;
}

/* ═══ Benchmark / Radar Section ═══ */
.oe-benchmark-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.oe-benchmark-card {
    background: var(--oe-surface);
    border: 1px solid var(--oe-border);
    border-radius: var(--oe-radius-md);
    padding: 0.5rem 0.625rem;
}

.oe-benchmark-bar {
    height: 8px;
    background: var(--oe-border-light);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.oe-benchmark-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.oe-benchmark-fill.excellent { background: var(--oe-success); }
.oe-benchmark-fill.good { background: #34D399; }
.oe-benchmark-fill.fair { background: var(--oe-warning); }
.oe-benchmark-fill.poor { background: var(--oe-danger); }

/* ═══ Gap Analysis Bar ═══ */
.oe-gap-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.oe-gap-bar {
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--oe-mono);
    font-size: 0.688rem;
    font-weight: 700;
    color: white;
    min-width: 40px;
    padding: 0 0.5rem;
}

/* ═══ Treemap Grid ═══ */
.oe-treemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.oe-treemap-cell {
    border-radius: var(--oe-radius-sm);
    padding: 0.625rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.oe-treemap-cell:hover {
    transform: scale(1.03);
    box-shadow: var(--oe-shadow-md);
}

.oe-treemap-cell-name {
    font-family: var(--oe-body);
    font-size: 0.688rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.oe-treemap-cell-value {
    font-family: var(--oe-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
}

/* ═══ Note / Disclaimer ═══ */
.oe-note {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--oe-radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.813rem;
    color: #92400E;
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

.oe-note strong {
    font-weight: 700;
}

/* ═══ Animations ═══ */
@keyframes oeSlideInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes oeSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes oePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ═══ Responsive ═══ */
@media (max-width: 1200px) {
    .oe-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .oe-metrics-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .oe-chart-row {
        grid-template-columns: 1fr;
    }
    .oe-benchmark-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .oe-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
        padding: 1rem 0.875rem;
        margin: 0.625rem 0.625rem 0;
    }
    .oe-title-section h2 {
        font-size: 1.15rem;
    }
    .oe-controls {
        padding: 0.625rem 0.625rem 0;
    }
    .oe-content {
        padding: 0.625rem;
    }
    .oe-metrics-grid,
    .oe-metrics-grid.cols-4,
    .oe-metrics-grid.cols-2 {
        grid-template-columns: 1fr;
    }
    .oe-result-cards,
    .oe-result-cards.cols-3 {
        grid-template-columns: 1fr;
    }
    .oe-metric-value {
        font-size: 1.1rem;
    }
    .oe-timeline {
        flex-direction: column;
        gap: 0.5rem;
    }
    .oe-timeline-connector {
        width: 2px;
        height: 16px;
    }
    .oe-timeline-segment {
        max-width: 100%;
    }
    .oe-treemap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══ Module-Specific Accent Overrides ═══ */
/* Working Capital */
.wc-accent .oe-metric-card:nth-child(1) { border-left-color: #047857; }
.wc-accent .oe-riq-btn { border-color: #047857; color: #047857; }
.wc-accent .oe-riq-btn:hover { background: #047857; color: white; }

/* Cash Conversion Cycle */
.ccc-accent .oe-riq-btn { border-color: #2563EB; color: #2563EB; }
.ccc-accent .oe-riq-btn:hover { background: #2563EB; color: white; }

/* Inventory */
.inv-accent .oe-riq-btn { border-color: #D97706; color: #D97706; }
.inv-accent .oe-riq-btn:hover { background: #D97706; color: white; }

/* Asset Management */
.am-accent .oe-riq-btn { border-color: #7C3AED; color: #7C3AED; }
.am-accent .oe-riq-btn:hover { background: #7C3AED; color: white; }

/* Productivity */
.pm-accent .oe-riq-btn { border-color: #0EA5E9; color: #0EA5E9; }
.pm-accent .oe-riq-btn:hover { background: #0EA5E9; color: white; }

/* Liquidity Ratios */
.lr-accent .oe-riq-btn { border-color: #3B82F6; color: #3B82F6; }
.lr-accent .oe-riq-btn:hover { background: #3B82F6; color: white; }

/* Debt & Leverage */
.dl-accent .oe-riq-btn { border-color: #7C3AED; color: #7C3AED; }
.dl-accent .oe-riq-btn:hover { background: #7C3AED; color: white; }

/* Return Ratios */
.rr-accent .oe-riq-btn { border-color: #EA580C; color: #EA580C; }
.rr-accent .oe-riq-btn:hover { background: #EA580C; color: white; }

/* Financial Health Scoring */
.fhs-accent .oe-riq-btn { border-color: #1E40AF; color: #1E40AF; }
.fhs-accent .oe-riq-btn:hover { background: #1E40AF; color: white; }

/* ═══ Financial Health Scoring — Module-Specific Classes ═══ */

/* Health Gauge Overlay */
.fhs-gauge-container {
    position: relative;
    display: inline-block;
}
.fhs-gauge-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    text-align: center;
}
.fhs-gauge-score {
    font-family: var(--oe-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}
.fhs-gauge-label {
    font-family: var(--oe-body);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Altman Z-Score Risk Zones */
.fhs-risk-zones {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}
.fhs-risk-zone {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.fhs-risk-zone.active {
    opacity: 1;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.fhs-zone-safe {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}
.fhs-zone-safe.active {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.15);
}
.fhs-zone-gray {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}
.fhs-zone-gray.active {
    border-color: #F59E0B;
    background: rgba(245, 158, 11, 0.15);
}
.fhs-zone-distress {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}
.fhs-zone-distress.active {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.15);
}
.fhs-zone-label {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}
.fhs-zone-range {
    font-family: var(--oe-mono);
    font-size: 0.8rem;
    color: #64748B;
    margin-bottom: 4px;
}
.fhs-zone-description {
    font-size: 0.85rem;
    color: #475569;
}

/* Piotroski Criteria Checklist */
.fhs-criteria-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.92rem;
    transition: background 0.2s ease;
}
.fhs-criteria-item.pass {
    background: rgba(16, 185, 129, 0.08);
    color: #065F46;
}
.fhs-criteria-item.fail {
    background: rgba(239, 68, 68, 0.08);
    color: #991B1B;
}
.fhs-criteria-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* DuPont Tree Diagram (used by Return Ratios) */
.dupont-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
}
.dupont-tree-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dupont-node {
    background: white;
    border: 2px solid var(--oe-accent, #EA580C);
    border-radius: 10px;
    padding: 8px 12px;
    text-align: center;
    min-width: 140px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dupont-node:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.dupont-node-label {
    font-size: 0.75rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.dupont-node-value {
    font-family: var(--oe-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--oe-accent, #EA580C);
}
.dupont-node-formula {
    font-size: 0.7rem;
    color: #94A3B8;
    margin-top: 4px;
}
.dupont-node.primary {
    background: var(--oe-accent, #EA580C);
    border-color: var(--oe-accent, #EA580C);
}
.dupont-node.primary .dupont-node-label,
.dupont-node.primary .dupont-node-value,
.dupont-node.primary .dupont-node-formula {
    color: white;
}
.dupont-connector {
    font-size: 1.05rem;
    color: #CBD5E1;
    font-weight: 300;
}
@media (max-width: 768px) {
    .dupont-tree-row {
        flex-direction: column;
    }
    .dupont-connector {
        transform: rotate(90deg);
    }
    .fhs-risk-zones {
        flex-direction: column;
    }
}

/* FHS Metric Color Classes */
.fhs-metric-good { color: #10B981; }
.fhs-metric-moderate { color: #F59E0B; }
.fhs-metric-bad { color: #EF4444; }
