/* Operations Center — unified UX shell (Phase 2.5) */

.ops-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    overflow: hidden;
    background: var(--fo-bg, #0f172a);
}

.ops-shell .dispatch-board {
    height: auto;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ── Toolbar ─────────────────────────────────────────────────── */
.ops-toolbar {
    flex-shrink: 0;
    border-bottom: 1px solid var(--fo-border, #334155);
    background: var(--fo-card, #172033);
}

.ops-toolbar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    flex-wrap: wrap;
}

.ops-toolbar-row--primary {
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.ops-toolbar-row--controls {
    padding-top: 8px;
    padding-bottom: 8px;
}

.ops-toolbar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--fo-text-primary, #f1f5f9);
    white-space: nowrap;
}

.ops-tab-bar {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.ops-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ops-tab:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #e2e8f0;
}

.ops-tab--active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.35);
    color: #93c5fd;
}

.ops-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ops-health-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #334155;
    background: #1e293b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.ops-health-chip--ok   { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.ops-health-chip--warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); }
.ops-health-chip--crit { color: #f87171; border-color: rgba(248, 113, 113, 0.35); }

.ops-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ops-icon-btn:hover { background: #334155; color: #f1f5f9; }

.ops-date-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 4px 8px;
}

.ops-today-btn {
    padding: 4px 10px;
    border-radius: 8px;
    border: none;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.ops-date-input {
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 0.85rem;
}

.ops-view-toggle {
    display: flex;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 2px;
}

.ops-view-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.ops-view-btn.active {
    background: #334155;
    color: #f1f5f9;
}

.ops-search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 160px;
    max-width: 320px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 4px 10px;
}

.ops-search-global {
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 0;
}

.ops-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 0.85rem;
    min-width: 0;
}

.ops-quick-actions-inline {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.ops-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.ops-btn--accent {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
}

.ops-btn--ghost {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

.ops-crew-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 10px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.ops-crew-filter-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ops-crew-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #cbd5e1;
    font-size: 0.78rem;
    cursor: pointer;
}

.ops-crew-chip.selected {
    background: rgba(59, 130, 246, 0.12);
    color: #e2e8f0;
}

.ops-crew-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ops-crew-clear {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: underline;
}

/* ── Summary strip ───────────────────────────────────────────── */
.ops-summary-strip {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    overflow-x: auto;
    flex-shrink: 0;
    border-bottom: 1px solid var(--fo-border, #334155);
    background: rgba(15, 23, 42, 0.85);
    scrollbar-width: thin;
}

.ops-kpi-card {
    flex: 0 0 auto;
    min-width: 168px;
    max-width: 200px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: linear-gradient(145deg, #1e293b 0%, #172033 100%);
}

.ops-kpi-card--pulse {
    animation: opsPulse 2s ease-in-out infinite;
}

@keyframes opsPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
    50%      { box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15); }
}

.ops-fade-in {
    animation: opsFadeIn 0.35s ease backwards;
}

@keyframes opsFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ops-kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ops-kpi-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.ops-kpi-status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
}

.ops-kpi-status--ok    { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.ops-kpi-status--warn  { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.ops-kpi-status--crit  { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.ops-kpi-status--muted { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

.ops-kpi-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1.1;
}

.ops-kpi-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}

.ops-kpi-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.ops-kpi-action {
    border: none;
    background: transparent;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.ops-kpi-action--primary  { color: #60a5fa; }
.ops-kpi-action--secondary { color: #64748b; }

.ops-kpi-updated {
    margin-left: auto;
    font-size: 0.65rem;
    color: #475569;
}

/* ── Body + quick dock ───────────────────────────────────────── */
.ops-body-with-dock {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ops-main {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ops-quick-dock {
    width: 72px;
    flex-shrink: 0;
    border-left: 1px solid var(--fo-border, #334155);
    background: var(--fo-card, #172033);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
}

.ops-quick-dock-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-bottom: 8px;
}

.ops-quick-dock-scroll {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex: 1;
}

.ops-quick-btn {
    width: 56px;
    padding: 8px 4px;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.55rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.ops-quick-btn i { font-size: 1.1rem; }

.ops-quick-btn:hover:not(:disabled) {
    background: #334155;
    color: #e2e8f0;
}

.ops-quick-btn--primary {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
}

.ops-quick-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Card language ───────────────────────────────────────────── */
.ops-card {
    border: 1px solid #334155;
    border-radius: 14px;
    background: var(--fo-card, #172033);
    overflow: hidden;
}

.ops-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 14px 8px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.ops-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: #f1f5f9;
}

.ops-card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ops-card-status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.ops-card-status--muted { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }

.ops-card-body { padding: 12px 14px; }

.ops-card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 12px;
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

.ops-card-action {
    border: none;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}

.ops-card-action--primary   { color: #60a5fa; }
.ops-card-action--secondary { color: #64748b; }

.ops-card-updated {
    margin-left: auto;
    font-size: 0.68rem;
    color: #475569;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ops-shell { height: auto; min-height: calc(100vh - 48px); }

    .ops-tab-bar { justify-content: flex-start; }

    .ops-tab span { display: none; }

    .ops-btn-label { display: none; }

    .ops-quick-dock {
        width: 100%;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--fo-border, #334155);
        padding: 6px 8px;
        overflow-x: auto;
    }

    .ops-quick-dock-label { display: none; }

    .ops-quick-dock-scroll {
        flex-direction: row;
        width: 100%;
    }

    .ops-quick-btn {
        width: auto;
        min-width: 64px;
        flex-shrink: 0;
    }

    .ops-body-with-dock {
        flex-direction: column;
    }

    .ops-summary-strip {
        padding: 8px 12px;
    }

    .ops-kpi-card {
        min-width: 140px;
    }
}
