/* ============================================ */
/*        OVERVIEW V4 PROFESSIONAL STYLES       */
/* ============================================ */

/* Hero Header */
.ov-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.25rem 1.5rem;
}
.ov-hero-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.ov-hero-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.ov-role-badge {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
}
.ov-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #059669;
}
.ov-hero-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
}
.ov-hero-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}
.ov-system-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    padding: 10px 16px;
}
.ov-system-pill-label {
    font-size: 10px;
    font-weight: 700;
    color: #059669;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ov-system-pill-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: #047857;
    line-height: 1.1;
}

/* Audience Cards */
.ov-audience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .ov-audience-grid { grid-template-columns: repeat(3, 1fr); }
}
.ov-audience-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}
.ov-audience-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}
.ov-audience-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.ov-audience-investor .ov-audience-icon { background: #eff6ff; color: #2563eb; }
.ov-audience-manager .ov-audience-icon { background: #f5f3ff; color: #7c3aed; }
.ov-audience-staff .ov-audience-icon { background: #ecfdf5; color: #059669; }
.ov-audience-body h3 {
    font-size: 12px;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 2px;
}
.ov-audience-body p {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.4;
}
.ov-audience-metric {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    margin-top: 6px;
}

/* KPI Grid */
.ov-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .ov-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
    .ov-kpi-grid { grid-template-columns: repeat(6, 1fr); }
}
.ov-kpi-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ov-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
.ov-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    position: relative;
}
.ov-kpi-icon-indigo { background: #eef2ff; color: #4f46e5; }
.ov-kpi-icon-rose { background: #fff1f2; color: #e11d48; }
.ov-kpi-icon-emerald { background: #ecfdf5; color: #059669; }
.ov-kpi-icon-teal { background: #f0fdfa; color: #0d9488; }
.ov-kpi-icon-amber { background: #fffbeb; color: #d97706; }
.ov-kpi-icon-violet { background: #f5f3ff; color: #7c3aed; }
.ov-kpi-alert-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #fff;
    display: none;
}
.ov-kpi-content { flex: 1; min-width: 0; }
.ov-kpi-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}
.ov-kpi-value-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ov-kpi-value-alert { color: #e11d48; }
.ov-kpi-value-emerald { color: #059669; }
.ov-kpi-value-teal { color: #0d9488; }
.ov-kpi-value-amber { color: #d97706; }
.ov-kpi-value-violet { color: #7c3aed; }
.ov-kpi-value-indigo { color: #4f46e5; }
.ov-kpi-value-name { font-size: 1.1rem; }
.ov-kpi-live-tag {
    font-size: 8px;
    font-weight: 900;
    background: #ef4444;
    color: #fff;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}
.ov-kpi-total {
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
}
.ov-kpi-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}
.ov-kpi-sub {
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ov-kpi-sub-success { color: #059669; }
.ov-kpi-sub-alert { color: #e11d48; }

/* Main Layout */
.ov-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 1280px) {
    .ov-main-grid {
        grid-template-columns: 7fr 5fr;
    }
}
.ov-main-left, .ov-main-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Panels */
.ov-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.ov-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}
.ov-panel-header h3 {
    font-size: 13px;
    font-weight: 900;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ov-panel-header-sm { padding: 10px 14px; }
.ov-panel-header-sm h3 { font-size: 11px; }
.ov-panel-body { padding: 14px 16px; }
.ov-panel-body-sm { padding: 12px 14px; }
.ov-panel-footer {
    padding: 10px 16px;
    border-top: 1px solid #f8fafc;
}
.ov-panel-badge {
    font-size: 11px;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 999px;
}
.ov-badge-danger { background: #fee2e2; color: #b91c1c; }
.ov-link-btn {
    font-size: 11px;
    font-weight: 700;
    color: #4f46e5;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.ov-link-btn:hover { color: #3730a3; }

/* Filter buttons */
.ov-filter-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.ov-bed-filter-btn {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #f1f5f9;
    color: #64748b;
    transition: all 0.18s ease;
}
.ov-bed-filter-btn:hover { background: #e2e8f0; }
.ov-bed-filter-btn.active {
    background: #4f46e5;
    color: #fff;
}

/* Bed grid */
.ov-bed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 640px) { .ov-bed-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .ov-bed-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .ov-bed-grid { grid-template-columns: repeat(5, 1fr); } }

/* Priority list */
.ov-priority-list {
    padding: 8px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
}
.ov-priority-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    cursor: pointer;
    transition: background 0.15s;
}
.ov-priority-item:hover { background: #fee2e2; }
.ov-priority-rank {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ov-priority-info { flex: 1; min-width: 0; }
.ov-priority-bed {
    font-size: 12px;
    font-weight: 900;
    color: #1e293b;
}
.ov-priority-type {
    font-size: 10px;
    color: #b91c1c;
    font-weight: 600;
}
.ov-priority-time {
    font-size: 10px;
    color: #94a3b8;
    font-family: ui-monospace, monospace;
    flex-shrink: 0;
}

/* Staff list */
.ov-staff-list {
    padding: 8px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
}
.ov-staff-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}
.ov-staff-name {
    font-size: 11px;
    font-weight: 800;
    color: #334155;
}
.ov-staff-status {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.ov-staff-status-on { background: #d1fae5; color: #065f46; }
.ov-staff-status-busy { background: #fef3c7; color: #92400e; }
.ov-staff-status-off { background: #f1f5f9; color: #64748b; }

/* Feed */
.ov-feed-panel { display: flex; flex-direction: column; }
.ov-feed-scroll {
    flex: 1;
    overflow-y: auto;
    max-height: 280px;
}

/* Side grid */
.ov-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.ov-chart-wrap {
    height: 100px;
    padding: 8px 12px 12px;
    position: relative;
}

/* Analytics bar */
.ov-analytics-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #eef2ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 14px;
    overflow: hidden;
}
@media (min-width: 768px) {
    .ov-analytics-bar { grid-template-columns: repeat(4, 1fr); }
}
.ov-analytics-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #dbeafe;
}
@media (min-width: 768px) {
    .ov-analytics-item {
        border-bottom: none;
        border-right: 1px solid #dbeafe;
    }
    .ov-analytics-item:last-child { border-right: none; }
}
.ov-analytics-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.ov-analytics-icon-rose { background: #ffe4e6; color: #e11d48; }
.ov-analytics-icon-emerald { background: #d1fae5; color: #059669; }
.ov-analytics-icon-indigo { background: #e0e7ff; color: #4f46e5; }
.ov-analytics-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ov-analytics-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: #0f172a;
    margin: 2px 0;
    line-height: 1.2;
}
.ov-analytics-value-sm { font-size: 0.85rem; }
.ov-analytics-value-indigo { color: #4f46e5; }
.ov-analytics-sub {
    font-size: 10px;
    color: #94a3b8;
}

/* Empty / loading states */
.ov-empty-state {
    text-align: center;
    padding: 20px 12px;
    font-size: 11px;
    color: #cbd5e1;
}
.ov-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
}
.ov-loading i { font-size: 1.25rem; }

/* KPI Cards (legacy compat) */
.ov-kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Live pulsing dot */
.ov-live-dot {
    animation: ov-live-pulse 2s ease-in-out infinite;
}
@keyframes ov-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* Bed cards in V3 grid */
.ov-bed-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    position: relative;
    min-height: 100px;
}
.ov-bed-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.ov-bed-card-normal {
    border-color: #d1fae5;
}
.ov-bed-card-normal:hover {
    border-color: #6ee7b7;
    box-shadow: 0 4px 16px rgba(16,185,129,0.12);
}
.ov-bed-card-alert {
    border-color: #fca5a5;
    background: #fff5f5;
    animation: ov-alert-glow 2s ease-in-out infinite;
}
@keyframes ov-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.12); }
}
.ov-bed-card-offline {
    border-color: #e2e8f0;
    background: #f8fafc;
    opacity: 0.65;
}

/* Status bar top of bed card */
.ov-bed-status-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 14px 14px 0 0;
}
.ov-bed-status-bar-normal { background: #10b981; }
.ov-bed-status-bar-alert  { background: #ef4444; }
.ov-bed-status-bar-offline { background: #94a3b8; }

/* Status pill inside bed card */
.ov-bed-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 4px;
    max-width: 100%;
    line-height: 1.25;
    text-align: center;
    word-break: break-word;
}
.ov-bed-pill-normal  { background: #d1fae5; color: #065f46; }
.ov-bed-pill-alert   { background: #fee2e2; color: #991b1b; }
.ov-bed-pill-offline { background: #e2e8f0; color: #64748b; }

/* Activity feed items */
.ov-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 16px;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.ov-feed-item:hover { background: #fafafa; }
.ov-feed-item-alert  { border-left-color: #ef4444; }
.ov-feed-item-ok     { border-left-color: #10b981; }
.ov-feed-item-pause  { border-left-color: #f59e0b; }
.ov-feed-item-system { border-left-color: #6366f1; }
.ov-feed-item-info   { border-left-color: #94a3b8; }

/* Bed filter tab buttons */
.ov-bed-filter-btn { transition: all 0.18s ease; }

/* Leaderboard rows */
.ov-rank-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ov-rank-bar-bg {
    flex: 1;
    height: 4px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}
.ov-rank-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

