/* ============================================ */
/*        OVERVIEW V6 â€” PROFESSIONAL UI         */
/* ============================================ */

.ov-v6 {
    --ov6-brand: #0071bc;
    --ov6-brand-dark: #005a96;
    --ov6-brand-soft: #e8f4fc;
    --ov6-surface: #ffffff;
    --ov6-bg: #eef2f7;
    --ov6-border: #dde4ee;
    --ov6-border-soft: #e8edf3;
    --ov6-text: #0f172a;
    --ov6-text-secondary: #64748b;
    --ov6-text-muted: #94a3b8;
    --ov6-success: #059669;
    --ov6-success-soft: #ecfdf5;
    --ov6-danger: #dc2626;
    --ov6-danger-soft: #fef2f2;
    --ov6-warning: #d97706;
    --ov6-warning-soft: #fffbeb;
    --ov6-violet: #6366f1;
    --ov6-violet-soft: #eef2ff;
    --ov6-radius: 14px;
    --ov6-radius-lg: 18px;
    --ov6-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.04);
    --ov6-shadow-hover: 0 4px 24px rgba(15, 23, 42, 0.08);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--ov6-bg);
    margin: -12px -12px 0;
    padding: 14px;
    border-radius: 0;
}

@media (min-width: 768px) {
    .ov-v6 {
        margin: -32px -32px 0;
        padding: 18px 20px 20px;
    }
}

/* ---- Hero ---- */
.ov-v6 .ov6-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 24px;
    margin-bottom: 16px;
    background: var(--ov6-surface);
    border: 1px solid var(--ov6-border-soft);
    border-radius: var(--ov6-radius-lg);
    box-shadow: var(--ov6-shadow);
    position: relative;
    overflow: hidden;
}

.ov-v6 .ov6-hero::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--ov6-brand), #38bdf8);
    border-radius: var(--ov6-radius-lg) 0 0 var(--ov6-radius-lg);
}

.ov-v6 .ov6-hero-main {
    flex: 1;
    min-width: 0;
    padding-left: 12px;
}

.ov-v6 .ov6-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ov-v6 .ov6-role-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--ov6-brand-soft);
    color: var(--ov6-brand-dark);
    border: 1px solid rgba(0, 113, 188, 0.12);
}

.ov-v6 .ov6-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--ov6-success);
    letter-spacing: 0.02em;
}

.ov-v6 .ov6-live-badge .ov-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: ov-live-pulse 2s ease-in-out infinite;
}

.ov-v6 .ov6-hero-title {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 800;
    color: var(--ov6-text);
    line-height: 1.2;
    margin: 0 0 6px;
    letter-spacing: -0.025em;
}

.ov-v6 .ov6-hero-sub {
    font-size: 13px;
    color: var(--ov6-text-secondary);
    margin: 0;
    font-weight: 500;
}

.ov-v6 .ov6-hero-aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--ov6-bg);
    border-radius: var(--ov6-radius);
    border: 1px solid var(--ov6-border-soft);
}

.ov-v6 .ov6-health-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin-bottom: 6px;
    background: conic-gradient(
        var(--ov5-gauge-color, var(--ov6-success)) calc(var(--ov-pct, 0) * 1%),
        #e2e8f0 0
    );
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.6s ease;
}

.ov-v6 .ov6-health-ring-inner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--ov6-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px var(--ov6-border-soft);
}

.ov-v6 .ov6-health-value {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--ov5-gauge-color, var(--ov6-success));
    line-height: 1;
    letter-spacing: -0.02em;
}

.ov-v6 .ov6-health-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ov6-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

/* ---- KPI Strip ---- */
.ov-v6 .ov6-kpi-strip {
    margin-bottom: 16px;
}

.ov-v6 .ov6-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
    margin-bottom: 0 !important;
}

@media (min-width: 768px) {
    .ov-v6 .ov6-kpi-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (min-width: 1200px) {
    .ov-v6 .ov6-kpi-grid { grid-template-columns: repeat(6, 1fr) !important; }
}

.ov-v6 .ov-kpi-card {
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    background: var(--ov6-surface) !important;
    border-radius: var(--ov6-radius) !important;
    border: 1px solid var(--ov6-border-soft) !important;
    box-shadow: var(--ov6-shadow) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ov-v6 .ov-kpi-card:hover {
    box-shadow: var(--ov6-shadow-hover);
    transform: translateY(-1px);
}

.ov-v6 .ov-kpi-card-alert {
    border-color: #fecaca !important;
    background: linear-gradient(135deg, #fff 0%, var(--ov6-danger-soft) 100%) !important;
}

.ov-v6 .ov-kpi-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
    flex-shrink: 0;
}

.ov-v6 .ov-kpi-content { flex: 1; min-width: 0; }

.ov-v6 .ov-kpi-value {
    font-size: 1.2rem !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.03em !important;
}

.ov-v6 .ov-kpi-value-name {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

.ov-v6 .ov-kpi-label {
    font-size: 9px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: var(--ov6-text-muted) !important;
    margin-top: 3px !important;
    font-weight: 700 !important;
}

.ov-v6 .ov-kpi-sub {
    display: block !important;
    font-size: 9px !important;
    color: var(--ov6-text-muted) !important;
    margin-top: 2px !important;
    font-weight: 600 !important;
}

.ov-v6 .ov-kpi-value-row { justify-content: flex-start !important; }

.ov-v6 .ov-kpi-live-tag {
    font-size: 8px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    background: var(--ov6-danger) !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
}

.ov-v6 .ov-kpi-total {
    font-size: 1rem !important;
    color: var(--ov6-text-muted) !important;
    font-weight: 700 !important;
}

.ov-v6 .ov6-kpi-mvp-label,
.ov-v6 .ov5-kpi-mvp-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--ov6-violet);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Workspace Grid (mosaic: beds trÃ¡i | widgets pháº£i) ---- */
.ov-v6 .ov6-workspace,
.ov-v6 .ov6-workspace-mosaic {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (min-width: 1100px) {
    .ov-v6 .ov6-workspace-mosaic {
        align-items: stretch;
        gap: 20px;
    }

    .ov-v6 .ov6-ws-priority { flex-shrink: 0; }

    /* Compact: trÃ¡i = giÆ°á»ng + MVP/metrics, pháº£i = nhÃ¢n viÃªn + chart */
    .ov-v6 .ov6-layout-compact.ov6-workspace-mosaic {
        grid-template-columns: minmax(0, 2fr) minmax(300px, 1.25fr);
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-main {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-self: stretch;
        min-width: 0;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-side {
        position: static;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-side > #ov-staff-panel {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-side > #ov-staff-panel > .ov5-card-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-side > #ov-staff-panel .ov-staff-list {
        flex: 1 1 auto;
        max-height: none;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-bottom {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        grid-template-rows: auto auto;
        gap: 16px 20px;
        align-items: stretch;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-bottom > #ov-hourly-chart-card {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        min-height: 150px;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-bottom > #ov-hourly-chart-card .ov5-chart-area {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        max-height: none;
        position: relative;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-bottom > #ov-mvp-card {
        grid-column: 1;
        grid-row: 2;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-bottom > .ov5-metrics-grid {
        grid-column: 2;
        grid-row: 1 / 3;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-beds {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-compact .ov5-beds-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-compact .ov5-beds-card .ov5-card-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-compact .ov5-beds-card .ov-bed-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)) !important;
    }

    .ov-v6 .ov6-layout-compact .ov6-ws-bottom .ov5-bottom-mvp {
        min-height: 0;
    }

    /* Expanded: giÆ°á»ng dÃ i, má»i widget chÃ¨n cá»™t pháº£i */
    .ov-v6 .ov6-layout-expanded.ov6-workspace-mosaic {
        grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
    }

    .ov-v6 .ov6-layout-expanded .ov6-ws-main {
        display: flex;
        flex-direction: column;
        align-self: stretch;
        min-width: 0;
    }

    .ov-v6 .ov6-layout-expanded .ov6-ws-beds {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-expanded .ov5-beds-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-expanded .ov5-beds-card .ov5-card-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .ov-v6 .ov6-layout-expanded .ov5-beds-card .ov-bed-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)) !important;
    }

    .ov-v6 .ov6-layout-expanded .ov6-ws-side {
        position: sticky;
        top: 12px;
    }

    .ov-v6 .ov6-layout-expanded .ov6-ws-bottom {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .ov-v6 .ov6-ws-side {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-self: stretch;
    }
}

.ov-v6 .ov6-ws-side > .ov5-card,
.ov-v6 .ov6-ws-side > .ov5-metrics-grid,
.ov-v6 .ov6-ws-bottom > .ov5-card,
.ov-v6 .ov6-ws-bottom > .ov5-metrics-grid {
    flex-shrink: 0;
}

.ov-v6 .ov5-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    min-height: 0;
}

/* ---- Cards ---- */
.ov-v6 .ov5-card {
    background: var(--ov6-surface);
    border: 1px solid var(--ov6-border-soft);
    border-radius: var(--ov6-radius);
    box-shadow: var(--ov6-shadow);
    overflow: hidden;
}

.ov-v6 .ov5-card-head {
    padding: 14px 20px;
    background: #fafbfd;
    border-bottom: 1px solid #f1f5f9;
}

.ov-v6 .ov5-card-head h3 {
    font-size: 13px;
    font-weight: 800;
    color: var(--ov6-text);
    letter-spacing: -0.01em;
}

.ov-v6 .ov5-card-head h3 i {
    color: var(--ov6-brand);
    font-size: 13px;
}

.ov-v6 .ov5-card-body { padding: 16px 20px; }

.ov-v6 .ov5-card-foot {
    padding: 12px 20px 16px;
    border-top: 1px solid #f8fafc;
    background: #fafbfd;
}

.ov-v6 .ov5-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--ov6-brand);
}

.ov-v6 .ov5-empty {
    padding: 32px 20px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
}

/* ---- Priority ---- */
.ov-v6 .ov5-priority-card { border-color: #fecaca !important; }

.ov-v6 .ov5-priority-head {
    background: linear-gradient(135deg, #fef2f2 0%, #fff 100%) !important;
    border-bottom-color: #fecaca !important;
}

.ov-v6 .ov5-priority-head h3 { color: #991b1b !important; }
.ov-v6 .ov5-priority-head h3 i { color: var(--ov6-danger) !important; }

.ov-v6 .ov5-count-badge {
    background: var(--ov6-danger);
    font-size: 11px;
    font-weight: 900;
    min-width: 26px;
    height: 26px;
    border-radius: 8px;
}

.ov-v6 .ov5-priority-card.ov-priority-empty .ov5-priority-head {
    background: #fafbfd !important;
    border-bottom-color: #f1f5f9 !important;
}

.ov-v6 .ov5-priority-card.ov-priority-empty .ov5-priority-head h3 { color: var(--ov6-text-secondary) !important; }
.ov-v6 .ov5-priority-card.ov-priority-empty .ov5-count-badge { background: #e2e8f0; color: #64748b; }

.ov-v6 .ov5-priority-list {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ov-v6 .ov5-priority-row,
.ov-v6 .ov6-priority-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #fecaca;
    border-left: 3px solid var(--ov6-danger);
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.ov-v6 .ov5-priority-row:hover,
.ov-v6 .ov6-priority-row:hover {
    background: var(--ov6-danger-soft);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.ov-v6 .ov5-priority-bed,
.ov-v6 .ov6-priority-bed {
    font-size: 12px;
    font-weight: 800;
    color: var(--ov6-text);
}

.ov-v6 .ov5-priority-type,
.ov-v6 .ov6-priority-type {
    font-size: 10px;
    font-weight: 600;
    color: var(--ov6-danger);
    margin-top: 1px;
}

.ov-v6 .ov5-priority-time,
.ov-v6 .ov6-priority-time {
    font-size: 10px;
    font-weight: 700;
    color: var(--ov6-text-muted);
    font-family: ui-monospace, monospace;
    flex-shrink: 0;
    background: #f8fafc;
    padding: 3px 6px;
    border-radius: 5px;
}

/* ---- Bed Filters ---- */
.ov-v6 .ov5-filters { gap: 6px; }

.ov-v6 .ov5-filters .ov-bed-filter-btn {
    font-size: 10px !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    background: #fff !important;
    border: 1px solid var(--ov6-border) !important;
    color: var(--ov6-text-secondary) !important;
    font-weight: 700 !important;
    transition: all 0.15s ease;
}

.ov-v6 .ov5-filters .ov-bed-filter-btn:hover {
    border-color: var(--ov6-brand) !important;
    color: var(--ov6-brand) !important;
}

.ov-v6 .ov5-filters .ov-bed-filter-btn.active {
    background: var(--ov6-brand) !important;
    border-color: var(--ov6-brand) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 113, 188, 0.25);
}

/* ---- Bed Grid ---- */
.ov-v6 .ov5-beds-card .ov-bed-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
}

@media (min-width: 640px) {
    .ov-v6 .ov5-beds-card .ov-bed-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (min-width: 1100px) {
    .ov-v6 .ov5-beds-card .ov-bed-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (min-width: 1400px) {
    .ov-v6 .ov5-beds-card .ov-bed-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

.ov-v6 .ov-bed-card {
    border-radius: 8px !important;
    padding: 10px 8px !important;
    min-height: 84px !important;
    border-width: 1.5px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ov-v6 .ov-bed-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ov6-shadow-hover);
}

.ov-v6 .ov-bed-card-normal {
    border-color: #a7f3d0 !important;
    background: var(--ov6-surface) !important;
}

.ov-v6 .ov-bed-card-alert {
    border-color: #fca5a5 !important;
    background: var(--ov6-danger-soft) !important;
    animation: ov6-alert-glow 2.5s ease-in-out infinite;
}

@keyframes ov6-alert-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.12); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.ov-v6 .ov-bed-card-offline {
    border-color: var(--ov6-border) !important;
    background: #f8fafc !important;
    opacity: 0.85 !important;
}

.ov-v6 .ov-bed-card-inactive {
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
    opacity: 0.9 !important;
}

.ov-v6 .ov-bed-pill-inactive {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.ov-v6 .ov-bed-pill {
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 3px 6px !important;
    border-radius: 5px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    max-width: 100%;
    line-height: 1.2 !important;
    text-align: center;
    word-break: break-word;
}

.ov-v6 .ov-bed-pill-normal { background: var(--ov6-success-soft) !important; color: #047857 !important; }
.ov-v6 .ov-bed-pill-alert { background: #fee2e2 !important; color: #991b1b !important; }
.ov-v6 .ov-bed-pill-offline { background: #f1f5f9 !important; color: var(--ov6-text-secondary) !important; }

.ov-v6 .ov5-bed-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 4px;
}

.ov-v6 .ov5-bed-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--ov6-text);
}

.ov-v6 .ov5-bed-foot {
    margin-top: 4px;
    font-size: 9px;
    font-weight: 600;
    color: var(--ov6-text-muted);
}

.ov-v6 .ov5-bed-dot { width: 6px; height: 6px; }

/* ---- Event Feed Timeline ---- */
.ov-v6 .ov5-feed-card .ov-feed-scroll {
    overflow-y: auto;
    padding: 12px 16px 16px;
    position: relative;
}

.ov-v6 .ov5-live-pill {
    font-size: 10px;
    font-weight: 800;
    color: var(--ov6-success);
    letter-spacing: 0.03em;
}

.ov-v6 .ov5-live-pill .ov-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: ov-live-pulse 2s infinite;
}

.ov-v6 .ov-feed-item,
.ov-v6 .ov6-feed-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 0 0 16px 0;
    margin-left: 8px;
    border-left: 2px solid #e2e8f0;
    padding-left: 20px;
    position: relative;
}

.ov-v6 .ov-feed-item:last-child,
.ov-v6 .ov6-feed-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.ov-v6 .ov-feed-item::before,
.ov-v6 .ov6-feed-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.ov-v6 .ov-feed-item-alert::before,
.ov-v6 .ov6-feed-item-alert::before { background: var(--ov6-danger); box-shadow: 0 0 0 1px #fecaca; }
.ov-v6 .ov-feed-item-ok::before,
.ov-v6 .ov6-feed-item-ok::before { background: var(--ov6-success); box-shadow: 0 0 0 1px #a7f3d0; }
.ov-v6 .ov-feed-item-pause::before,
.ov-v6 .ov6-feed-item-pause::before { background: var(--ov6-warning); box-shadow: 0 0 0 1px #fde68a; }
.ov-v6 .ov-feed-item-system::before,
.ov-v6 .ov6-feed-item-system::before { background: var(--ov6-violet); box-shadow: 0 0 0 1px #c7d2fe; }

.ov-v6 .ov-feed-icon {
    display: none;
}

.ov-v6 .ov-feed-body { flex: 1; min-width: 0; }

.ov-v6 .ov-feed-time {
    font-size: 10px;
    font-weight: 700;
    color: var(--ov6-text-muted);
    font-family: ui-monospace, monospace;
    letter-spacing: 0.02em;
}

.ov-v6 .ov-feed-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--ov6-text);
    margin-top: 2px;
    line-height: 1.4;
}

.ov-v6 .ov-feed-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.ov-v6 .ov-feed-tag {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

/* ---- Staff Panel ---- */
.ov-v6 .ov-staff-list {
    padding: 10px 12px 12px;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ov-v6 .ov-staff-row,
.ov-v6 .ov6-staff-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fafbfd;
    border: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.ov-v6 .ov-staff-row:hover,
.ov-v6 .ov6-staff-row:hover { background: #f8fafc; }

.ov-v6 .ov6-staff-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, var(--ov6-brand-soft), #dbeafe) !important;
    color: var(--ov6-brand-dark) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 113, 188, 0.1);
}

.ov-v6 .ov-staff-name,
.ov-v6 .ov6-staff-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--ov6-text);
}

.ov-v6 .ov-staff-role,
.ov-v6 .ov6-staff-role {
    font-size: 9px;
    color: var(--ov6-text-muted);
    margin-top: 1px;
    font-weight: 600;
}

.ov-v6 .ov-staff-status,
.ov-v6 .ov6-staff-status {
    font-size: 8px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.ov-v6 .ov6-staff-status-busy { background: var(--ov6-danger-soft) !important; color: #991b1b !important; }
.ov-v6 .ov6-staff-status-on { background: var(--ov6-success-soft) !important; color: #047857 !important; }
.ov-v6 .ov6-staff-status-idle,
.ov-v6 .ov-staff-status-off { background: #f1f5f9 !important; color: var(--ov6-text-secondary) !important; }

/* ---- Chart ---- */
.ov-v6 .ov5-chart-area {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    flex: none;
    padding: 10px 14px 16px;
    position: relative;
}

/* ---- Bottom / side metrics ---- */
.ov-v6 .ov6-side-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 600px) {
    .ov-v6 .ov6-side-metrics { grid-template-columns: repeat(2, 1fr); }
}

.ov-v6 .ov6-ws-side .ov5-bottom-mvp {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ov-v6 .ov6-ws-side .ov5-mvp-body {
    flex: 0 0 auto;
    padding: 14px 18px 18px !important;
}

.ov-v6 .ov6-ws-side .ov5-metric-card {
    padding: 16px;
    min-height: 100px;
}

.ov-v6 .ov6-ws-side .ov5-metric-value {
    font-size: 15px;
}

.ov-v6 .ov6-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 960px) {
    .ov-v6 .ov6-bottom {
        grid-template-columns: minmax(280px, 320px) 1fr;
        gap: 18px;
        align-items: stretch;
    }
}

.ov-v6 .ov5-bottom-mvp {
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.ov-v6 .ov5-mvp-body {
    flex: 1;
    padding: 18px 20px 22px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ov-v6 .ov-rank-row,
.ov-v6 .ov6-rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.ov-v6 .ov-rank-row:last-child,
.ov-v6 .ov6-rank-row:last-child { margin-bottom: 0; }

.ov-v6 .ov-rank-medal,
.ov-v6 .ov6-rank-medal {
    font-size: 18px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.ov-v6 .ov-rank-bar-bg {
    height: 6px;
    border-radius: 999px;
    background: #f1f5f9;
    overflow: hidden;
}

.ov-v6 .ov-rank-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ov-v6 .ov5-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 600px) {
    .ov-v6 .ov5-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

.ov-v6 .ov5-metric-card {
    background: var(--ov6-surface);
    border: 1px solid var(--ov6-border-soft);
    border-radius: var(--ov6-radius);
    padding: 12px 16px;
    min-height: 80px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: var(--ov6-shadow);
    transition: box-shadow 0.2s ease;
}

.ov-v6 .ov5-metric-card:hover { box-shadow: var(--ov6-shadow-hover); }

.ov-v6 .ov5-metric-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 14px;
}

.ov-v6 .ov5-metric-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ov6-text-muted);
    margin-bottom: 4px;
}

.ov-v6 .ov5-metric-value {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--ov6-text);
    letter-spacing: -0.02em;
}

.ov-v6 .ov5-metric-value-indigo { color: var(--ov6-violet); }

.ov-v6 .ov5-metric-sub {
    font-size: 10px;
    color: var(--ov6-text-muted);
    margin-top: 2px;
    font-weight: 500;
}

.ov-v6 .ov6-beds-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ov-v6 .ov6-history-link {
    white-space: nowrap;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.ov-v6 .ov6-history-link:hover {
    text-decoration: underline;
}

/* ---- Column balance (legacy + mosaic) ---- */
.ov-v6 .ov6-ws-priority,
.ov-v6 .ov5-col-side #ov-staff-panel { flex-shrink: 0; }

.ov-v6 .ov6-ws-beds .ov5-beds-card,
.ov-v6 .ov5-col-main .ov5-beds-card {
    display: flex;
    flex-direction: column;
}

.ov-v6 .ov6-ws-beds .ov5-beds-card .ov5-card-body {
    flex: none;
}

.ov-v6 .ov5-col-side .ov5-chart-card,
.ov-v6 .ov6-ws-side .ov5-chart-card,
.ov-v6 #ov-hourly-chart-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

.ov-v6 .ov5-beds-card .ov5-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ov-v6 .ov5-col-side .ov5-chart-card .ov5-chart-area {
    flex: none;
    height: 220px;
    min-height: 220px;
    max-height: 220px;
}

.ov-v6 .ov5-col-side .ov5-chart-card .ov5-chart-area,
.ov-v6 .ov6-ws-side .ov5-chart-card .ov5-chart-area,
.ov-v6 #ov-hourly-chart-card .ov5-chart-area {
    flex: none;
    height: 220px;
    min-height: 220px;
    max-height: 220px;
}

.ov-v6 #ov-staff-panel .ov-staff-list {
    max-height: 220px;
    overflow-y: auto;
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
    .ov-v6 .ov6-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
        gap: 20px;
    }

    .ov-v6 .ov6-hero-aside {
        align-self: stretch;
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        padding: 14px;
    }

    .ov-v6 .ov6-health-ring { margin-bottom: 0; }

    .ov-v6 .ov-kpi-card {
        padding: 14px !important;
    }

    .ov-v6 .ov5-card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ov-v6 .ov5-filters { width: 100%; }
}

/* ---- Demo mode (preview virtual data) ---- */
.demo-mode-banner {
    position: sticky;
    top: 0;
    z-index: 200;
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border-bottom: 1px solid #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.demo-mode-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    max-width: 100%;
    flex-wrap: wrap;
}

.demo-mode-banner-inner i { margin-right: 6px; }

.demo-mode-banner-off {
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid #d97706;
    background: #fff;
    color: #b45309;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.demo-mode-banner-off:hover { background: #fffbeb; }

.demo-mode-toggle-btn.demo-mode-toggle-on {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #b45309 !important;
}

.global-sound-mute-btn.global-sound-muted {
    background: #fef2f2 !important;
    border-color: #f87171 !important;
    color: #b91c1c !important;
}

/* Premium Staff Status Pill Buttons */
.status-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 9999px;
    cursor: pointer;
    background: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: visible;
}

.status-pill-btn:disabled {
    cursor: default;
    pointer-events: none;
    opacity: 0.95;
}

.status-pill-btn--mobile {
    padding: 4px 10px;
    font-size: 9.5px;
    gap: 6px;
}

/* Available State styling */
.status-pill-btn--available {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.14) 100%);
    border: 1px solid rgba(16, 185, 129, 0.24);
    color: #065f46;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.status-pill-btn--available:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.22) 100%);
    border-color: rgba(16, 185, 129, 0.4);
    color: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.status-pill-btn--available:active {
    transform: translateY(0) scale(0.96);
}

/* Busy State styling */
.status-pill-btn--busy {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(225, 29, 72, 0.14) 100%);
    border: 1px solid rgba(244, 63, 94, 0.24);
    color: #9f1239;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.status-pill-btn--busy:hover {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.14) 0%, rgba(225, 29, 72, 0.22) 100%);
    border-color: rgba(244, 63, 94, 0.4);
    color: #be123c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.status-pill-btn--busy:active {
    transform: translateY(0) scale(0.96);
}

/* Dot Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    transition: all 0.25s ease;
}

.status-dot--mobile {
    width: 6px;
    height: 6px;
}

.status-dot--available {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-dot--busy {
    background-color: #f43f5e;
    box-shadow: 0 0 8px #f43f5e;
}

.status-dot--busy::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    border: 1.5px solid #f43f5e;
    animation: status-pulse-ring 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

.status-dot--mobile.status-dot--busy::after {
    top: -1.5px; left: -1.5px; right: -1.5px; bottom: -1.5px;
    border-width: 1px;
}

@keyframes status-pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    70%, 100% {
        transform: scale(2.4);
        opacity: 0;
    }
}


