/* Operations embed — fluid iframe layout (container-query responsive) */
:root {
    --ops-bg: #0a0e14;
    --ops-panel: rgba(12, 20, 36, 0.92);
    --ops-border: rgba(0, 212, 255, 0.18);
    --ops-cyan: #00d4ff;
    --ops-cyan-dim: #7dd3fc;
    --ops-green: #4ade80;
    --ops-red: #f87171;
    --ops-amber: #fbbf24;
    --ops-text: #f1f5f9;
    --ops-muted: #94a3b8;
}

.embed-shell--ops {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    container-type: inline-size;
    container-name: ops-shell;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0, 212, 255, 0.12), transparent 55%),
        linear-gradient(180deg, #070b12 0%, #0a0e14 100%);
}

.embed-shell-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 20%, transparent 75%);
}

.embed-shell--ops .embed-shell-grid {
    opacity: 0.25;
    background-size: 40px 40px;
}

.ops-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: clamp(0.45rem, 2cqw, 0.75rem);
    box-sizing: border-box;
}

.ops-panel-title {
    font-size: clamp(0.62rem, 2.5cqw, 0.68rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ops-cyan-dim);
    text-align: center;
    margin: 0 0 clamp(0.45rem, 1.5cqw, 0.65rem);
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--ops-border);
}

/* Always single column — vertical stack for any iframe width */
.ops-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.45rem, 1.5cqw, 0.65rem);
    align-items: stretch;
    width: 100%;
}

.ops-grid--display-only button,
.ops-grid--display-only .ops-card--link {
    pointer-events: none;
    cursor: default;
}

.ops-grid--display-only button:disabled {
    opacity: 1;
}

.ops-grid--display-only .ops-card--link:hover {
    transform: none;
    border-color: var(--ops-border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ops-grid--display-only .ops-card--link:hover .ops-card-link-arrow {
    opacity: 0.7;
    transform: none;
}

.ops-grid--display-only .ops-metric-row--click:hover,
.ops-grid--display-only .ops-fault-cell--click:hover,
.ops-grid--display-only .ops-wo-pill:hover,
.ops-grid--display-only .ops-viz-icon--click:hover {
    transform: none;
    box-shadow: none;
    border-color: inherit;
    background: inherit;
}

.ops-grid .ops-card {
    margin-bottom: 0;
    height: 100%;
    min-width: 0;
    padding: clamp(0.55rem, 2cqw, 0.75rem);
}

.ops-card {
    border-radius: 12px;
    border: 1px solid var(--ops-border);
    background: var(--ops-panel);
    backdrop-filter: blur(12px);
    padding: clamp(0.55rem, 2cqw, 0.75rem);
    margin-bottom: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    container-type: inline-size;
    container-name: ops-card;
    overflow: hidden;
}

.ops-card--link {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ops-card--link:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 212, 255, 0.38);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(0, 212, 255, 0.1);
}

.ops-card--link:active {
    transform: translateY(0);
}

.ops-card--link .ops-card-head {
    position: relative;
}

.ops-card-link-arrow {
    margin-left: auto;
    color: var(--ops-cyan) !important;
    opacity: 0.7;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ops-card--link:hover .ops-card-link-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.ops-card-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
    width: 100%;
}

.ops-card-head .mud-icon-root {
    color: var(--ops-cyan) !important;
    font-size: 1.1rem !important;
}

.ops-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ops-text);
    margin: 0;
    line-height: 1.25;
}

.ops-card-sub {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--ops-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ops-card-body {
    display: grid;
    grid-template-columns: minmax(72px, 28%) 1fr;
    gap: clamp(0.35rem, 2cqw, 0.55rem);
    align-items: center;
    min-width: 0;
}

.ops-card-body--stack {
    display: block;
    min-width: 0;
}

/* Narrow card: stack gauge above metrics */
@container ops-card (max-width: 260px) {
    .ops-card-body {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .ops-metrics {
        width: 100%;
    }

    .ops-metric-row {
        font-size: 0.62rem;
    }

    .ops-metric-status {
        max-width: 100% !important;
        text-align: right;
    }

    .ops-card-body--fdd {
        grid-template-columns: 1fr;
    }

    .ops-card-body--fdd .ops-viz-icon {
        display: none;
    }
}

/* Gauge */
.ops-gauge-wrap {
    position: relative;
    width: 100%;
    max-width: 88px;
    height: 52px;
    margin: 0 auto;
}

.ops-gauge-svg {
    width: 100%;
    height: auto;
    display: block;
}

.ops-gauge-track {
    fill: none;
    stroke: rgba(0, 212, 255, 0.12);
    stroke-width: 8;
    stroke-linecap: round;
}

.ops-gauge-fill {
    fill: none;
    stroke: url(#opsGaugeGrad);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

.ops-gauge-fill--green {
    stroke: url(#opsGaugeGradGreen);
}

.ops-gauge-value {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ops-text);
    line-height: 1;
}

.ops-gauge-value small {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--ops-muted);
}

.ops-gauge-label {
    text-align: center;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ops-cyan-dim);
    margin-top: 0.15rem;
}

/* Metric rows */
.ops-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.ops-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.35rem;
    font-size: clamp(0.58rem, 2.2cqw, 0.66rem);
    min-width: 0;
}

.ops-metric-row--click {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    padding: 0.2rem 0.25rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ops-metric-row--click:hover {
    border-color: rgba(0, 212, 255, 0.25);
    background: rgba(0, 212, 255, 0.05);
}

.ops-metric-row--disabled,
.ops-metric-row--click:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

.ops-metric-row--disabled .ops-metric-val,
.ops-metric-row--click:disabled .ops-metric-val {
    color: var(--ops-muted);
}

.ops-metric-key {
    color: var(--ops-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.ops-metric-val {
    font-weight: 700;
    color: var(--ops-cyan-dim);
    text-align: right;
    min-width: 0;
    word-break: break-word;
}

.ops-metric-val--bad { color: var(--ops-red); }
.ops-metric-val--good { color: var(--ops-green); }
.ops-metric-val--warn { color: var(--ops-amber); }

.ops-metric-status {
    font-size: clamp(0.55rem, 2cqw, 0.62rem) !important;
    max-width: 100%;
    line-height: 1.3;
    text-align: right;
}

/* FDD fault table */
.ops-fault-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.ops-fault-cell {
    text-align: center;
    padding: 0.3rem 0.2rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.ops-fault-cell--crit {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.16) 0%, rgba(15, 23, 42, 0.88) 100%);
    border-color: rgba(248, 113, 113, 0.32);
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.08);
}

.ops-fault-cell--major {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(15, 23, 42, 0.88) 100%);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.07);
}

.ops-fault-cell--minor {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12) 0%, rgba(15, 23, 42, 0.88) 100%);
    border-color: rgba(251, 146, 60, 0.28);
    box-shadow: 0 0 14px rgba(251, 146, 60, 0.06);
}

.ops-fault-num {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
}

.ops-fault-lbl {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.15rem;
}

.ops-panel .ops-fault-cell--crit .ops-fault-num { color: #f87171; }
.ops-panel .ops-fault-cell--major .ops-fault-num { color: #fbbf24; }
.ops-panel .ops-fault-cell--minor .ops-fault-num { color: #fb923c; }

.ops-panel .ops-fault-cell--crit .ops-fault-lbl { color: #fca5a5; }
.ops-panel .ops-fault-cell--major .ops-fault-lbl { color: #fcd34d; }
.ops-panel .ops-fault-cell--minor .ops-fault-lbl { color: #fdba74; }

.ops-fault-cell--click {
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    color: var(--ops-text);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.ops-fault-cell--click:hover {
    transform: translateY(-1px);
}

.ops-fault-cell--crit.ops-fault-cell--click:hover {
    border-color: rgba(248, 113, 113, 0.45);
    box-shadow: 0 4px 16px rgba(248, 113, 113, 0.12);
}

.ops-fault-cell--major.ops-fault-cell--click:hover {
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.12);
}

.ops-fault-cell--minor.ops-fault-cell--click:hover {
    border-color: rgba(251, 146, 60, 0.45);
    box-shadow: 0 4px 16px rgba(251, 146, 60, 0.12);
}

.ops-fault-cell--click:active {
    transform: scale(0.98);
}

.ops-fault-cell--disabled,
.ops-fault-cell--click:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    box-shadow: none !important;
}

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

.ops-grid--display-only .ops-fault-cell--crit .ops-fault-num { color: #f87171 !important; }
.ops-grid--display-only .ops-fault-cell--major .ops-fault-num { color: #fbbf24 !important; }
.ops-grid--display-only .ops-fault-cell--minor .ops-fault-num { color: #fb923c !important; }

.ops-grid--display-only .ops-fault-cell--crit .ops-fault-lbl { color: #fca5a5 !important; }
.ops-grid--display-only .ops-fault-cell--major .ops-fault-lbl { color: #fcd34d !important; }
.ops-grid--display-only .ops-fault-cell--minor .ops-fault-lbl { color: #fdba74 !important; }

.ops-grid--display-only .ops-fault-cell--crit {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.16) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
    border-color: rgba(248, 113, 113, 0.32) !important;
}

.ops-grid--display-only .ops-fault-cell--major {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.14) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
}

.ops-grid--display-only .ops-fault-cell--minor {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
    border-color: rgba(251, 146, 60, 0.28) !important;
}

.ops-fault-cell--disabled:hover,
.ops-fault-cell--click:disabled:hover {
    transform: none;
    box-shadow: none;
}

.ops-drill-hero--fdd-crit {
    border-color: rgba(248, 113, 113, 0.22);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.08), rgba(15, 23, 42, 0.6));
}

.ops-drill-hero--fdd-crit .ops-drill-hero-icon {
    background: linear-gradient(145deg, rgba(248, 113, 113, 0.25), rgba(220, 38, 38, 0.12));
    color: #fca5a5;
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.12);
}

.ops-drill-hero--fdd-major {
    border-color: rgba(251, 191, 36, 0.22);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(15, 23, 42, 0.6));
}

.ops-drill-hero--fdd-major .ops-drill-hero-icon {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.22), rgba(217, 119, 6, 0.12));
    color: #fcd34d;
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.12);
}

.ops-drill-hero--fdd-minor {
    border-color: rgba(251, 146, 60, 0.22);
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.08), rgba(15, 23, 42, 0.6));
}

.ops-drill-hero--fdd-minor .ops-drill-hero-icon {
    background: linear-gradient(145deg, rgba(251, 146, 60, 0.22), rgba(234, 88, 12, 0.12));
    color: #fdba74;
    box-shadow: 0 0 18px rgba(251, 146, 60, 0.12);
}

.ops-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    font-size: 0.68rem;
    line-height: 1.45;
    color: #fde68a;
    margin-top: 0.5rem;
}

.ops-alert .mud-icon-root {
    color: #fbbf24 !important;
    font-size: 1rem !important;
    flex-shrink: 0;
    margin-top: 1px;
}

.ops-opportunity {
    font-size: 0.62rem;
    color: var(--ops-red);
    font-weight: 600;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(248, 113, 113, 0.15);
    line-height: 1.35;
}

/* Decorative icon block */
.ops-viz-icon {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.1), rgba(124, 58, 237, 0.08));
    border: 1px solid rgba(0, 212, 255, 0.2);
    margin: 0 auto 0.65rem;
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.08);
}

.ops-viz-icon .mud-icon-root {
    font-size: 1.5rem !important;
    color: var(--ops-cyan) !important;
    opacity: 0.9;
}

.ops-card-body--fdd {
    grid-template-columns: 1fr auto;
}

.ops-card-body--fdd .ops-viz-icon {
    margin: 0;
    width: clamp(44px, 12cqw, 56px);
    height: clamp(44px, 12cqw, 56px);
    border-radius: 10px;
    flex-shrink: 0;
}

.ops-viz-icon--click {
    cursor: pointer;
    font: inherit;
    padding: 0;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.ops-viz-icon--click:hover {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 0 28px rgba(0, 212, 255, 0.18);
    transform: translateY(-1px);
}

.ops-viz-icon--click:active {
    transform: translateY(0);
}

.ops-viz-icon--disabled,
.ops-viz-icon--click:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

.ops-viz-icon--disabled:hover,
.ops-viz-icon--click:disabled:hover {
    transform: none;
    box-shadow: none;
}

.ops-drill-hero--fdd-lib {
    border-color: rgba(0, 212, 255, 0.22);
}

.embed-fdd-lib-search {
    margin-bottom: 0.55rem;
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.embed-fdd-lib-search-field {
    flex: 1;
}

.embed-fdd-lib-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.embed-fdd-lib-card {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.55rem 0.65rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.14);
    background: linear-gradient(165deg, rgba(20, 27, 45, 0.92), rgba(7, 11, 18, 0.96));
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.embed-fdd-lib-card:hover {
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(0, 212, 255, 0.06);
    box-shadow: 0 4px 18px rgba(0, 212, 255, 0.08);
}

.embed-fdd-lib-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.embed-fdd-lib-head {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.45rem;
    min-width: 0;
}

.embed-fdd-lib-edit {
    margin-left: auto;
    flex-shrink: 0;
}

.embed-fdd-lib-fault-id {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--ops-cyan, #00d4ff);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.embed-fdd-lib-asset {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    padding: 0.14rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.08);
}

.embed-fdd-lib-rule {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.embed-fdd-lib-rec {
    margin: 0;
    padding: 0.35rem 0 0 0.45rem;
    border-left: 2px solid rgba(52, 211, 153, 0.45);
    font-size: 0.55rem;
    font-weight: 500;
    color: #86efac;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.embed-fdd-lib-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    color: #64748b;
}

.embed-fdd-lib-chevron .mud-icon-root {
    font-size: 1.1rem !important;
    color: #64748b !important;
}

.ops-inv-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: clamp(0.58rem, 2.2cqw, 0.66rem);
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    min-width: 0;
}

.ops-inv-val {
    font-weight: 700;
    text-align: right;
    flex-shrink: 1;
    min-width: 0;
    word-break: break-word;
}

.ops-inv-row:last-child {
    border-bottom: none;
}

.ops-inv-label {
    color: var(--ops-muted);
    flex-shrink: 0;
}

.ops-inv-val--good { color: var(--ops-green); }
.ops-inv-val--bad { color: var(--ops-red); }
.ops-inv-val--cyan { color: var(--ops-cyan); }

.ops-wo-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.ops-wo-pill {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.45rem 0.5rem;
    border-radius: 10px;
    font-size: 0.62rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: var(--ops-text);
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ops-wo-pill-icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ops-wo-pill-icon .mud-icon-root {
    font-size: 0.95rem !important;
}

.ops-wo-pill-text {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
    line-height: 1.2;
}

.ops-wo-pill-text strong {
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.ops-wo-pill-text > span:last-child {
    color: var(--ops-muted);
    font-weight: 600;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ops-wo-pill-arrow {
    flex-shrink: 0;
    opacity: 0.35;
    font-size: 1rem !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ops-wo-pill--pending {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.14) 0%, rgba(15, 23, 42, 0.85) 100%);
    border-color: rgba(248, 113, 113, 0.28);
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.08);
}

.ops-wo-pill--pending .ops-wo-pill-icon {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
}

.ops-wo-pill--pending .ops-wo-pill-text strong {
    color: #f87171;
}

.ops-wo-pill--active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
    border-color: rgba(0, 212, 255, 0.28);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.08);
}

.ops-wo-pill--active .ops-wo-pill-icon {
    background: rgba(0, 212, 255, 0.16);
    color: var(--ops-cyan);
}

.ops-wo-pill--active .ops-wo-pill-text strong {
    color: var(--ops-cyan);
}

.ops-wo-pill:hover {
    transform: translateY(-1px);
}

.ops-wo-pill--pending:hover {
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: 0 4px 20px rgba(248, 113, 113, 0.15);
}

.ops-wo-pill--active:hover {
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15);
}

.ops-wo-pill:hover .ops-wo-pill-arrow {
    opacity: 0.85;
    transform: translateX(2px);
}

.ops-wo-pill:active {
    transform: scale(0.98);
}

.ops-wo-pill--disabled,
.ops-wo-pill:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    pointer-events: none;
}

.ops-wo-pill--disabled .ops-wo-pill-text strong,
.ops-wo-pill:disabled .ops-wo-pill-text strong {
    color: var(--ops-muted) !important;
}

.ops-wo-pill--disabled:hover,
.ops-wo-pill:disabled:hover {
    transform: none;
    box-shadow: none;
}

.ops-wo-pill--disabled .ops-wo-pill-arrow,
.ops-wo-pill:disabled .ops-wo-pill-arrow {
    opacity: 0.15;
}

/* ── Drill-down: list hero ── */
.ops-drill {
    width: 100%;
}

.ops-drill-hero {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.65rem;
    border-radius: 12px;
    border: 1px solid var(--ops-border);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(124, 58, 237, 0.04));
}

.ops-drill-hero--pending {
    border-color: rgba(248, 113, 113, 0.22);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.08), rgba(15, 23, 42, 0.6));
}

.ops-drill-hero--active {
    border-color: rgba(0, 212, 255, 0.22);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(15, 23, 42, 0.6));
}

.ops-drill-hero-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.15));
    color: var(--ops-cyan);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.12);
}

.ops-drill-hero--pending .ops-drill-hero-icon {
    background: linear-gradient(145deg, rgba(248, 113, 113, 0.25), rgba(217, 119, 6, 0.12));
    color: #fca5a5;
    box-shadow: 0 0 18px rgba(248, 113, 113, 0.12);
}

.ops-drill-title {
    margin: 0;
    font-size: clamp(0.82rem, 3.2cqw, 0.95rem);
    font-weight: 700;
    color: var(--ops-text);
    line-height: 1.25;
}

.ops-drill-sub {
    margin: 0.15rem 0 0;
    font-size: 0.58rem;
    color: var(--ops-muted);
}

/* ── WO list cards ── */
.ops-wo-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ops-wo-card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0.65rem 2rem 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.12);
    background: linear-gradient(145deg, rgba(12, 20, 36, 0.95), rgba(7, 11, 18, 0.98));
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.ops-wo-card:hover {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 6px 24px rgba(0, 212, 255, 0.1);
    transform: translateY(-1px);
}

.ops-wo-card:active {
    transform: scale(0.99);
}

.ops-wo-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.ops-wo-card-id {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--ops-cyan);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.ops-wo-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
}

.ops-wo-card-title {
    font-size: clamp(0.72rem, 2.8cqw, 0.82rem);
    font-weight: 700;
    color: var(--ops-text);
    line-height: 1.35;
    margin-bottom: 0.4rem;
    padding-right: 0.5rem;
}

.ops-wo-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    font-size: 0.58rem;
    color: var(--ops-muted);
}

.ops-wo-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.ops-wo-card-meta .mud-icon-root {
    font-size: 0.75rem !important;
    opacity: 0.75;
}

.ops-wo-card-arrow {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ops-cyan) !important;
    opacity: 0.4;
    font-size: 1.1rem !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.ops-wo-card:hover .ops-wo-card-arrow {
    opacity: 0.9;
    transform: translate(2px, -50%);
}

/* ── Badges ── */
.ops-badge {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.52rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    line-height: 1.35;
}

.ops-badge--type-corrective {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.28);
}

.ops-badge--type-preventive {
    color: #67e8f9;
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.28);
}

.ops-badge--type-fdd {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.14);
    border-color: rgba(167, 139, 250, 0.3);
}

.ops-badge--status-pending {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.28);
}

.ops-badge--status-progress {
    color: #67e8f9;
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.28);
}

.ops-badge--status-hold {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.28);
}

.ops-badge--status-done {
    color: #86efac;
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.28);
}

.ops-badge--status-open {
    color: #fdba74;
    background: rgba(251, 146, 60, 0.12);
    border-color: rgba(251, 146, 60, 0.28);
}

.ops-badge--prio-high {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.35);
}

.ops-badge--prio-med {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.28);
}

.ops-badge--prio-low {
    color: #94a3b8;
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.28);
}

.ops-badge--neutral {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.22);
}

/* ── WO detail panel ── */
.ops-wo-detail {
    border-radius: 14px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    background: linear-gradient(165deg, rgba(20, 27, 45, 0.94) 0%, rgba(7, 11, 18, 0.98) 100%);
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.ops-wo-detail-hero {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0.85rem 0.75rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.08) 0%, rgba(124, 58, 237, 0.04) 55%, transparent 100%);
}

.ops-wo-detail-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #00d4ff 0%, #7c3aed 100%);
    color: #0b0f1a;
    box-shadow: 0 0 22px rgba(0, 212, 255, 0.35);
}

.ops-wo-detail-icon .mud-icon-root {
    font-size: 1.25rem !important;
}

.ops-wo-detail-hero-body {
    min-width: 0;
    flex: 1;
}

.ops-wo-detail-id {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--ops-cyan);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.ops-wo-detail-title {
    margin: 0 0 0.45rem;
    font-size: clamp(0.82rem, 3.2cqw, 0.98rem);
    font-weight: 700;
    color: var(--ops-text);
    line-height: 1.35;
}

.ops-wo-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.ops-wo-detail-body {
    padding: 0.65rem 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ops-wo-detail-section {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.ops-wo-detail-section-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ops-cyan-dim);
    background: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ops-wo-detail-section-head .mud-icon-root {
    font-size: 0.85rem !important;
    opacity: 0.85;
}

.ops-wo-detail-grid {
    display: grid;
    gap: 0;
    padding: 0.15rem 0;
}

.ops-wo-detail-row {
    display: grid;
    grid-template-columns: minmax(5rem, 36%) 1fr;
    gap: 0.5rem;
    font-size: 0.62rem;
    padding: 0.38rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ops-wo-detail-row:last-child {
    border-bottom: none;
}

.ops-wo-detail-row--empty .ops-wo-detail-val {
    color: rgba(148, 163, 184, 0.45);
    font-style: italic;
}

.ops-wo-detail-key {
    color: var(--ops-muted);
    font-weight: 600;
}

.ops-wo-detail-val {
    color: var(--ops-text);
    word-break: break-word;
    line-height: 1.45;
}

.ops-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 0.75rem;
    color: var(--ops-muted);
}

.ops-loading--drill {
    min-height: 160px;
    padding: 1rem 0.5rem;
}

.ops-loading-bar,
.ops-drill-busy-bar {
    width: 100%;
    max-width: 280px;
}

.ops-drill-busy-bar {
    margin-bottom: 0.45rem;
}

.ops-drill-body {
    transition: opacity 0.22s ease;
}

.ops-drill-body--busy {
    opacity: 0.62;
    pointer-events: none;
}

@keyframes ops-view-enter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ops-view-enter {
    animation: ops-view-enter 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .ops-view-enter {
        animation: none;
    }

    .ops-drill-body,
    .ops-card--link,
    .ops-fault-cell--click,
    .ops-wo-card,
    .ops-wo-pill {
        transition: none !important;
    }
}

.ops-footer-link {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.65rem;
}

.ops-footer-link a {
    color: var(--ops-cyan-dim);
    text-decoration: none;
    opacity: 0.85;
}

.ops-footer-link a:hover {
    color: var(--ops-cyan);
    text-decoration: underline;
}
