/* Light variant of the FDD embed panel (Admin Management ▸ Branding ▸ Embed Panel Theme = Light).
   embed-operations.css and embed-fdd.css keep the v3 dark look; everything here only applies under
   .embed-shell--light and re-tones the same surfaces for a white iframe. */

.embed-shell--light {
    --ops-bg: #f1f5f9;
    --ops-panel: rgba(255, 255, 255, 0.94);
    --ops-border: rgba(2, 132, 199, 0.22);
    --ops-cyan: #0369a1;
    --ops-cyan-dim: #0284c7;
    --ops-green: #15803d;
    --ops-red: #dc2626;
    --ops-amber: #b45309;
    --ops-text: #0f172a;
    --ops-muted: #64748b;
    color: var(--ops-text);
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(2, 132, 199, 0.10), transparent 55%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.embed-shell--light .embed-shell-grid {
    background-image:
        linear-gradient(rgba(2, 132, 199, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2, 132, 199, 0.06) 1px, transparent 1px);
}

/* Cards and heroes */
.embed-shell--light .ops-card {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.embed-shell--light .ops-card--link:hover,
.embed-shell--light .ops-grid--display-only .ops-card--link:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.embed-shell--light .ops-drill-hero {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(124, 58, 237, 0.05));
}

.embed-shell--light .ops-drill-hero-icon {
    background: linear-gradient(145deg, rgba(2, 132, 199, 0.18), rgba(124, 58, 237, 0.12));
    box-shadow: none;
}

.embed-shell--light .ops-drill-hero--fdd-crit {
    border-color: rgba(220, 38, 38, 0.28);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.10), rgba(255, 255, 255, 0.75));
}

.embed-shell--light .ops-drill-hero--fdd-crit .ops-drill-hero-icon {
    background: rgba(220, 38, 38, 0.14);
    color: #b91c1c;
    box-shadow: none;
}

.embed-shell--light .ops-drill-hero--fdd-major {
    border-color: rgba(217, 119, 6, 0.3);
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.10), rgba(255, 255, 255, 0.75));
}

.embed-shell--light .ops-drill-hero--fdd-major .ops-drill-hero-icon {
    background: rgba(217, 119, 6, 0.14);
    color: #b45309;
    box-shadow: none;
}

.embed-shell--light .ops-drill-hero--fdd-minor {
    border-color: rgba(234, 88, 12, 0.28);
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.09), rgba(255, 255, 255, 0.75));
}

.embed-shell--light .ops-drill-hero--fdd-minor .ops-drill-hero-icon {
    background: rgba(234, 88, 12, 0.14);
    color: #c2410c;
    box-shadow: none;
}

.embed-shell--light .ops-alert {
    background: rgba(217, 119, 6, 0.10);
    border-color: rgba(217, 119, 6, 0.32);
    color: #92400e;
}

.embed-shell--light .ops-alert .mud-icon-root {
    color: #b45309 !important;
}

.embed-shell--light .ops-viz-icon {
    background: linear-gradient(145deg, rgba(2, 132, 199, 0.12), rgba(124, 58, 237, 0.08));
    border-color: rgba(2, 132, 199, 0.28);
    box-shadow: none;
}

.embed-shell--light .ops-viz-icon--click:hover {
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.18);
}

/* Fault cells (hub bands) */
.embed-shell--light .ops-fault-cell {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

.embed-shell--light .ops-fault-cell--crit,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--crit {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%) !important;
    border-color: rgba(220, 38, 38, 0.32) !important;
    box-shadow: none;
}

.embed-shell--light .ops-fault-cell--major,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--major {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%) !important;
    border-color: rgba(217, 119, 6, 0.32) !important;
    box-shadow: none;
}

.embed-shell--light .ops-fault-cell--minor,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--minor {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.10) 0%, rgba(255, 255, 255, 0.92) 100%) !important;
    border-color: rgba(234, 88, 12, 0.3) !important;
    box-shadow: none;
}

.embed-shell--light .ops-panel .ops-fault-cell--crit .ops-fault-num,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--crit .ops-fault-num { color: #b91c1c !important; }
.embed-shell--light .ops-panel .ops-fault-cell--major .ops-fault-num,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--major .ops-fault-num { color: #b45309 !important; }
.embed-shell--light .ops-panel .ops-fault-cell--minor .ops-fault-num,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--minor .ops-fault-num { color: #c2410c !important; }

.embed-shell--light .ops-panel .ops-fault-cell--crit .ops-fault-lbl,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--crit .ops-fault-lbl { color: #dc2626 !important; }
.embed-shell--light .ops-panel .ops-fault-cell--major .ops-fault-lbl,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--major .ops-fault-lbl { color: #d97706 !important; }
.embed-shell--light .ops-panel .ops-fault-cell--minor .ops-fault-lbl,
.embed-shell--light .ops-grid--display-only .ops-fault-cell--minor .ops-fault-lbl { color: #ea580c !important; }

.embed-shell--light .ops-fault-cell--disabled,
.embed-shell--light .ops-fault-cell--click:disabled {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

.embed-shell--light .ops-fault-cell--disabled .ops-fault-num,
.embed-shell--light .ops-fault-cell--click:disabled .ops-fault-num,
.embed-shell--light .ops-fault-cell--disabled .ops-fault-lbl,
.embed-shell--light .ops-fault-cell--click:disabled .ops-fault-lbl {
    color: var(--ops-muted) !important;
}

/* Hub fault bar and legend */
.embed-shell--light .embed-fdd-fault-bar {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.embed-shell--light .embed-fdd-fault-bar-seg--crit { background: linear-gradient(90deg, #dc2626, #ef4444); box-shadow: none; }
.embed-shell--light .embed-fdd-fault-bar-seg--major { background: linear-gradient(90deg, #d97706, #f59e0b); box-shadow: none; }
.embed-shell--light .embed-fdd-fault-bar-seg--minor { background: linear-gradient(90deg, #ea580c, #fb923c); box-shadow: none; }
.embed-shell--light .embed-fdd-fault-bar-seg--empty { background: rgba(15, 23, 42, 0.06); }

.embed-shell--light .embed-fdd-fault-bar-legend-item--crit { color: #b91c1c; }
.embed-shell--light .embed-fdd-fault-bar-legend-item--major { color: #b45309; }
.embed-shell--light .embed-fdd-fault-bar-legend-item--minor { color: #c2410c; }
.embed-shell--light .embed-fdd-fault-bar-legend-item--crit i { background: #dc2626; }
.embed-shell--light .embed-fdd-fault-bar-legend-item--major i { background: #d97706; }
.embed-shell--light .embed-fdd-fault-bar-legend-item--minor i { background: #ea580c; }

.embed-shell--light .embed-fdd-fault-chip .embed-fdd-fault-resolved {
    color: #64748b;
    background: rgba(100, 116, 139, 0.10);
    border-color: rgba(100, 116, 139, 0.25);
}

.embed-shell--light .embed-fdd-fault-chip .embed-fdd-fault-resolved.has-resolved {
    color: #15803d;
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
}

/* Hub KPIs, pie captions */
.embed-shell--light .embed-fdd-kpi {
    border-color: rgba(2, 132, 199, 0.18);
    background: rgba(255, 255, 255, 0.85);
}

.embed-shell--light .embed-fdd-hub-pie-caption {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.embed-shell--light .embed-fdd-hub-pie-caption:hover:not(:disabled) {
    border-color: rgba(2, 132, 199, 0.4);
}

.embed-shell--light .embed-fdd-hub-pie-caption-split,
.embed-shell--light .embed-fdd-hub-pie-caption-meta span { color: #64748b; }
.embed-shell--light .embed-fdd-hub-pie-caption-meta strong { color: #0369a1; }
.embed-shell--light .embed-fdd-hub-pie-caption--crit { border-color: rgba(220, 38, 38, 0.3); }
.embed-shell--light .embed-fdd-hub-pie-caption--major { border-color: rgba(217, 119, 6, 0.3); }
.embed-shell--light .embed-fdd-hub-pie-caption--minor { border-color: rgba(234, 88, 12, 0.3); }

/* Dashboard panels */
.embed-shell--light .embed-fdd-panel {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.18);
}

.embed-shell--light .embed-fdd-panel-head {
    color: #be185d;
    background: rgba(219, 39, 119, 0.07);
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

.embed-shell--light .embed-fdd-fault-line { color: #334155; }

.embed-shell--light .embed-fdd-fault-line:hover {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.25);
}

.embed-shell--light .embed-fdd-fault-line--on {
    background: rgba(2, 132, 199, 0.10);
    border-color: rgba(2, 132, 199, 0.4);
    color: #0f172a;
}

.embed-shell--light .embed-fdd-defect-primary { color: #0f172a; }
.embed-shell--light .embed-fdd-defect-meta { color: #64748b; }

.embed-shell--light .embed-fdd-defect-rec {
    color: #166534;
    background: rgba(5, 150, 105, 0.08);
    border-left-color: #059669;
}

.embed-shell--light .embed-fdd-cause-chart { border-bottom-color: rgba(15, 23, 42, 0.08); }

.embed-shell--light .embed-fdd-dist-block {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

.embed-shell--light .embed-fdd-dist-title--asset { color: #0369a1; }
.embed-shell--light .embed-fdd-dist-title--cause { color: #be123c; }
.embed-shell--light .embed-fdd-dist-title--remedy { color: #047857; }
.embed-shell--light .embed-fdd-dist-label { color: #334155; }
.embed-shell--light .embed-fdd-dist-badge { color: #64748b; }
.embed-shell--light .embed-fdd-dist-bar-wrap { background: rgba(100, 116, 139, 0.18); }

.embed-shell--light .embed-fdd-table-wrap { border-color: rgba(2, 132, 199, 0.18); }

.embed-shell--light .embed-fdd-table th {
    color: #0369a1;
    background: rgba(2, 132, 199, 0.07);
    border-bottom-color: rgba(2, 132, 199, 0.15);
}

.embed-shell--light .embed-fdd-table td {
    color: #334155;
    border-bottom-color: rgba(15, 23, 42, 0.05);
}

.embed-shell--light .embed-fdd-rec-group { border-bottom-color: rgba(15, 23, 42, 0.06); }
.embed-shell--light .embed-fdd-rec-title { color: #b45309; }
.embed-shell--light .embed-fdd-rec-steps { color: #475569; }

/* Library */
.embed-shell--light .embed-fdd-lib-card {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.18);
}

.embed-shell--light .embed-fdd-lib-card:hover {
    background: rgba(2, 132, 199, 0.05);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

.embed-shell--light .embed-fdd-lib-asset {
    color: #475569;
    border-color: rgba(100, 116, 139, 0.35);
    background: rgba(100, 116, 139, 0.08);
}

.embed-shell--light .embed-fdd-lib-rule { color: #0f172a; }

.embed-shell--light .embed-fdd-lib-rec {
    color: #166534;
    border-left-color: rgba(22, 163, 74, 0.5);
}

.embed-shell--light .embed-fdd-lib-chevron,
.embed-shell--light .embed-fdd-lib-chevron .mud-icon-root { color: #94a3b8 !important; }

/* Work order cards and detail */
.embed-shell--light .ops-wo-card {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.16);
}

.embed-shell--light .ops-wo-card:hover {
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.15);
}

.embed-shell--light .ops-wo-detail {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.2);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.embed-shell--light .ops-wo-detail-hero {
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.10) 0%, rgba(124, 58, 237, 0.05) 55%, transparent 100%);
    border-bottom-color: rgba(2, 132, 199, 0.15);
}

.embed-shell--light .ops-wo-detail-icon {
    color: #ffffff;
    box-shadow: none;
}

.embed-shell--light .ops-wo-detail-section {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

.embed-shell--light .ops-wo-detail-section-head {
    background: rgba(2, 132, 199, 0.07);
    border-bottom-color: rgba(15, 23, 42, 0.06);
}

.embed-shell--light .ops-wo-detail-row { border-bottom-color: rgba(15, 23, 42, 0.05); }
.embed-shell--light .ops-inv-row { border-bottom-color: rgba(15, 23, 42, 0.06); }

/* Badges */
.embed-shell--light .ops-badge--type-corrective { color: #92400e; background: rgba(217, 119, 6, 0.12); border-color: rgba(217, 119, 6, 0.3); }
.embed-shell--light .ops-badge--type-preventive { color: #075985; background: rgba(2, 132, 199, 0.12); border-color: rgba(2, 132, 199, 0.3); }
.embed-shell--light .ops-badge--type-fdd { color: #5b21b6; background: rgba(124, 58, 237, 0.12); border-color: rgba(124, 58, 237, 0.3); }
.embed-shell--light .ops-badge--status-pending { color: #b91c1c; background: rgba(220, 38, 38, 0.10); border-color: rgba(220, 38, 38, 0.3); }
.embed-shell--light .ops-badge--status-progress { color: #075985; background: rgba(2, 132, 199, 0.12); border-color: rgba(2, 132, 199, 0.3); }
.embed-shell--light .ops-badge--status-hold { color: #5b21b6; background: rgba(124, 58, 237, 0.12); border-color: rgba(124, 58, 237, 0.3); }
.embed-shell--light .ops-badge--status-done { color: #166534; background: rgba(22, 163, 74, 0.12); border-color: rgba(22, 163, 74, 0.3); }
.embed-shell--light .ops-badge--status-open { color: #c2410c; background: rgba(234, 88, 12, 0.12); border-color: rgba(234, 88, 12, 0.3); }
.embed-shell--light .ops-badge--prio-high { color: #b91c1c; background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.32); }
.embed-shell--light .ops-badge--prio-med { color: #5b21b6; background: rgba(124, 58, 237, 0.12); border-color: rgba(124, 58, 237, 0.3); }
.embed-shell--light .ops-badge--prio-low,
.embed-shell--light .ops-badge--neutral { color: #475569; background: rgba(100, 116, 139, 0.12); border-color: rgba(100, 116, 139, 0.28); }

/* Operations panel only: gauges, metric rows, inventory rows and the pending / active pills */
.embed-shell--light .ops-gauge-track { stroke: rgba(2, 132, 199, 0.15); }
.embed-shell--light .ops-metric-row--click:hover {
    border-color: rgba(2, 132, 199, 0.3);
    background: rgba(2, 132, 199, 0.06);
}
.embed-shell--light .ops-metric-val { color: #0369a1; }
.embed-shell--light .ops-metric-val--bad { color: #dc2626; }
.embed-shell--light .ops-metric-val--good { color: #15803d; }
.embed-shell--light .ops-metric-val--warn { color: #b45309; }
.embed-shell--light .ops-inv-val--cyan { color: #0369a1; }

.embed-shell--light .ops-wo-pill--pending {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: none;
}
.embed-shell--light .ops-wo-pill--pending .ops-wo-pill-icon { background: rgba(220, 38, 38, 0.14); color: #b91c1c; }
.embed-shell--light .ops-wo-pill--pending .ops-wo-pill-text strong { color: #b91c1c; }
.embed-shell--light .ops-wo-pill--active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-color: rgba(2, 132, 199, 0.3);
    box-shadow: none;
}
.embed-shell--light .ops-wo-pill--active .ops-wo-pill-icon { background: rgba(2, 132, 199, 0.14); color: #0369a1; }
.embed-shell--light .ops-wo-pill--active .ops-wo-pill-text strong { color: #0369a1; }
.embed-shell--light .ops-wo-pill--pending:hover { box-shadow: 0 4px 14px rgba(220, 38, 38, 0.15); }
.embed-shell--light .ops-wo-pill--active:hover { box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15); }
.embed-shell--light .ops-drill-hero--pending {
    border-color: rgba(220, 38, 38, 0.28);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.10), rgba(255, 255, 255, 0.75));
}
.embed-shell--light .ops-drill-hero--pending .ops-drill-hero-icon { background: rgba(220, 38, 38, 0.14); color: #b91c1c; box-shadow: none; }
.embed-shell--light .ops-drill-hero--active {
    border-color: rgba(2, 132, 199, 0.28);
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.10), rgba(255, 255, 255, 0.75));
}
