/* Digias — System overview v2
   Scoped to the System overview so no other dashboard or bot page is affected. */
#tab-overview #systemOverviewPanel.ov2-dashboard {
    --ov2-accent: #547e72;
    --ov2-accent-rgb: 84, 126, 114;
    --ov2-mint: #8fb8aa;
    --ov2-bg: #050706;
    --ov2-card: #0a0f0d;
    --ov2-card-2: #0d1512;
    --ov2-border: rgba(143, 184, 170, 0.16);
    --ov2-border-strong: rgba(143, 184, 170, 0.28);
    --ov2-text: #f4f7f6;
    --ov2-muted: #83908c;
    width: 100%;
    min-width: 0;
    color: var(--ov2-text);
}

#tab-overview #systemOverviewPanel .ov2-page-header {
    position: relative;
    display: flex !important;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 4px 2px 22px !important;
    margin: 0 0 18px !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#tab-overview #systemOverviewPanel .ov2-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--ov2-mint);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
}

#tab-overview #systemOverviewPanel .ov2-eyebrow > span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--ov2-accent);
}

#tab-overview #systemOverviewPanel .ov2-page-header .sys-stats-hero-text h2 {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(28px, 3vw, 43px) !important;
    font-weight: 900 !important;
    line-height: 1.15;
    letter-spacing: -.035em;
}

#tab-overview #systemOverviewPanel .ov2-page-header .sys-stats-hero-text p {
    margin: 9px 0 0 !important;
    color: var(--ov2-muted) !important;
    font-size: 13px !important;
    line-height: 1.8;
}

#tab-overview #systemOverviewPanel .ov2-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

#tab-overview #systemOverviewPanel .ov2-refresh-btn,
#tab-overview #systemOverviewPanel .sys-period-trigger {
    height: 48px;
    border: 1px solid var(--ov2-border) !important;
    background: rgba(10, 16, 14, .92) !important;
    color: #dce6e2 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

#tab-overview #systemOverviewPanel .ov2-refresh-btn {
    width: 48px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    cursor: pointer;
    font-size: 14px;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

#tab-overview #systemOverviewPanel .ov2-refresh-btn:hover {
    transform: translateY(-1px);
    border-color: var(--ov2-border-strong) !important;
    background: rgba(var(--ov2-accent-rgb), .12) !important;
}

#tab-overview #systemOverviewPanel .sys-period-trigger {
    min-width: 148px;
    border-radius: 14px !important;
    padding: 0 15px !important;
}

#tab-overview #systemOverviewPanel .sys-period-menu {
    inset-inline-start: auto;
    inset-inline-end: 0;
    background: #0b110f !important;
    border-color: var(--ov2-border-strong) !important;
}

#tab-overview #systemOverviewPanel .ov2-insight-card {
    position: relative;
    isolation: isolate;
    min-height: 156px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px;
    padding: 24px 30px;
    overflow: hidden;
    border: 1px solid var(--ov2-border-strong);
    border-radius: 23px;
    background:
        radial-gradient(circle at 8% 100%, rgba(var(--ov2-accent-rgb), .24), transparent 33%),
        linear-gradient(112deg, rgba(15, 29, 24, .98), rgba(7, 11, 10, .98) 68%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .025);
}

#tab-overview #systemOverviewPanel .ov2-insight-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 270px;
    height: 270px;
    inset-inline-start: -90px;
    top: -150px;
    border: 38px solid rgba(var(--ov2-accent-rgb), .055);
    border-radius: 50%;
}

#tab-overview #systemOverviewPanel .ov2-insight-copy {
    flex: 1;
    min-width: 0;
}

#tab-overview #systemOverviewPanel .ov2-insight-kicker,
#tab-overview #systemOverviewPanel .ov2-section-kicker {
    color: var(--ov2-mint);
    font-size: 11px;
    font-weight: 800;
}

#tab-overview #systemOverviewPanel .ov2-insight-copy h3 {
    margin: 8px 0 6px;
    color: #fff !important;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 900;
    line-height: 1.45;
}

#tab-overview #systemOverviewPanel .ov2-insight-copy p {
    margin: 0;
    color: #8e9b97;
    font-size: 13px;
    line-height: 1.75;
}

#tab-overview #systemOverviewPanel .ov2-score-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

#tab-overview #systemOverviewPanel .ov2-score-ring {
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--ov2-mint) calc(var(--ov2-score) * 1%), rgba(255, 255, 255, .07) 0);
    box-shadow: 0 0 32px rgba(var(--ov2-accent-rgb), .1);
    transition: background .5s ease;
}

#tab-overview #systemOverviewPanel .ov2-score-inner {
    width: 74px;
    height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0a100e;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}

#tab-overview #systemOverviewPanel .ov2-score-inner strong {
    color: #fff;
    font-family: Inter, Tajawal, sans-serif;
    font-size: 23px;
    line-height: 1;
}

#tab-overview #systemOverviewPanel .ov2-score-inner span,
#tab-overview #systemOverviewPanel .ov2-score-caption span {
    margin-top: 5px;
    color: #77837f;
    font-size: 8px;
    font-weight: 700;
}

#tab-overview #systemOverviewPanel .ov2-score-caption {
    display: flex;
    flex-direction: column;
    min-width: 86px;
}

#tab-overview #systemOverviewPanel .ov2-score-caption strong {
    margin-top: 4px;
    color: #d7e5e0;
    font-size: 13px;
    font-weight: 800;
}

#tab-overview #systemOverviewPanel .ov2-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: 0 0 18px !important;
}

#tab-overview #systemOverviewPanel .ov2-kpi-card {
    position: relative;
    min-height: 132px;
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 14px !important;
    padding: 20px !important;
    overflow: hidden;
    border: 1px solid var(--ov2-border) !important;
    border-radius: 19px !important;
    background: linear-gradient(145deg, rgba(13, 21, 18, .96), rgba(6, 9, 8, .98)) !important;
    box-shadow: none !important;
}

#tab-overview #systemOverviewPanel .ov2-kpi-card::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    inset-inline-start: -42px;
    bottom: -44px;
    border-radius: 50%;
    background: rgba(var(--ov2-accent-rgb), .08);
}

#tab-overview #systemOverviewPanel .ov2-kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--ov2-border-strong) !important;
}

#tab-overview #systemOverviewPanel .ov2-kpi-card .sys-stat-icon {
    width: 42px;
    height: 42px;
    order: -1;
    border-color: rgba(var(--ov2-accent-rgb), .25) !important;
    border-radius: 12px;
    background: rgba(var(--ov2-accent-rgb), .12) !important;
    color: var(--ov2-mint) !important;
}

#tab-overview #systemOverviewPanel .ov2-kpi-card .sys-stat-label {
    margin: 0 0 8px;
    color: #8d9995;
    font-size: 11px;
    font-weight: 700;
}

#tab-overview #systemOverviewPanel .ov2-kpi-card .sys-stat-value {
    color: #fff;
    font-family: Inter, Tajawal, sans-serif;
    font-size: clamp(25px, 2.1vw, 34px) !important;
    font-weight: 800;
    letter-spacing: -.035em;
}

#tab-overview #systemOverviewPanel .ov2-kpi-note {
    margin-top: 8px;
    color: #64706c;
    font-size: 9px;
    font-weight: 600;
}

#tab-overview #systemOverviewPanel #sysOverviewSubscriptionCard {
    border: 1px solid var(--ov2-border) !important;
    border-radius: 18px !important;
    background: rgba(10, 15, 13, .92) !important;
    box-shadow: none !important;
}

#tab-overview #systemOverviewPanel .ov2-primary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(285px, .34fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 20px;
}

#tab-overview #systemOverviewPanel .ov2-primary-content {
    display: grid;
    gap: 16px;
    min-width: 0;
}

#tab-overview #systemOverviewPanel .ov2-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(280px, .84fr);
    gap: 16px;
    min-width: 0;
}

#tab-overview #systemOverviewPanel .sys-chart-card,
#tab-overview #systemOverviewPanel .sys-health-card,
#tab-overview #systemOverviewPanel .sys-heatmap-card {
    border: 1px solid var(--ov2-border) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(circle at 100% 0, rgba(var(--ov2-accent-rgb), .06), transparent 32%),
        linear-gradient(145deg, rgba(11, 17, 15, .98), rgba(5, 8, 7, .99)) !important;
    box-shadow: none !important;
}

#tab-overview #systemOverviewPanel .sys-chart-card {
    padding: 21px 22px 16px !important;
}

#tab-overview #systemOverviewPanel .sys-chart-head {
    align-items: center;
    margin-bottom: 13px;
}

#tab-overview #systemOverviewPanel .sys-chart-head strong,
#tab-overview #systemOverviewPanel .sys-health-title strong {
    color: #f2f6f4 !important;
    font-size: 14px;
    font-weight: 800;
}

#tab-overview #systemOverviewPanel .sys-chart-head span,
#tab-overview #systemOverviewPanel .sys-health-title span {
    color: #6f7c78 !important;
    font-size: 10px;
}

#tab-overview #systemOverviewPanel .sys-chart-head-icon {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(var(--ov2-accent-rgb), .18);
    border-radius: 11px;
    background: rgba(var(--ov2-accent-rgb), .1);
    color: var(--ov2-mint);
}

#tab-overview #systemOverviewPanel .sys-chart-canvas-container {
    height: 220px;
    min-height: 220px;
}

#tab-overview #systemOverviewPanel .ov2-main-chart {
    height: 275px;
    min-height: 275px;
}

#tab-overview #systemOverviewPanel .sys-chart-foot {
    min-height: 20px;
    margin-top: 10px;
    color: #7f8b87;
    font-size: 10px;
}

#tab-overview #systemOverviewPanel .ov2-heatmap-card {
    min-width: 0;
    padding: 21px 20px;
}

#tab-overview #systemOverviewPanel .heatmap-container-wrapper {
    margin-top: 8px;
    padding: 9px 0 7px;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--ov2-accent-rgb), .4) transparent;
}

#tab-overview #systemOverviewPanel .heatmap-cell.level-0 { background: #111714; }
#tab-overview #systemOverviewPanel .heatmap-cell.level-1 { background: rgba(var(--ov2-accent-rgb), .25); }
#tab-overview #systemOverviewPanel .heatmap-cell.level-2 { background: rgba(var(--ov2-accent-rgb), .48); }
#tab-overview #systemOverviewPanel .heatmap-cell.level-3 { background: rgba(var(--ov2-accent-rgb), .75); }
#tab-overview #systemOverviewPanel .heatmap-cell.level-4 { background: var(--ov2-mint); }

#tab-overview #systemOverviewPanel .ov2-health-card {
    min-width: 0;
    padding: 22px 19px !important;
}

#tab-overview #systemOverviewPanel .ov2-health-card .sys-health-header {
    align-items: flex-start;
    gap: 10px;
}

#tab-overview #systemOverviewPanel .sys-health-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-color: rgba(var(--ov2-accent-rgb), .18);
    background: rgba(var(--ov2-accent-rgb), .07);
    font-size: 10px;
}

#tab-overview #systemOverviewPanel .sys-gauges-row {
    min-height: 124px;
    margin: 5px 0 2px;
    padding: 17px 8px;
    border: 1px solid rgba(255, 255, 255, .035);
    border-radius: 16px;
    background: rgba(255, 255, 255, .018);
}

#tab-overview #systemOverviewPanel .radial-gauge {
    width: 82px;
    height: 82px;
    box-shadow: none;
}

#tab-overview #systemOverviewPanel .radial-gauge-inner {
    width: 66px;
    height: 66px;
    background: #09100d;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}

#tab-overview #systemOverviewPanel .sys-health-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .04);
    border-radius: 15px;
    background: rgba(255, 255, 255, .04);
}

#tab-overview #systemOverviewPanel .sys-health-detail-item {
    min-width: 0;
    padding: 12px;
    background: #09100d;
}

#tab-overview #systemOverviewPanel .sys-health-detail-item span {
    color: #66726e;
    font-size: 9px;
}

#tab-overview #systemOverviewPanel .sys-health-detail-item strong {
    overflow-wrap: anywhere;
    color: #dce6e2;
    font-size: 11px;
}

#tab-overview #systemOverviewPanel .sys-health-checklist {
    gap: 7px;
}

#tab-overview #systemOverviewPanel .sys-health-check-item {
    border-color: rgba(255, 255, 255, .045);
    border-radius: 11px;
    background: rgba(255, 255, 255, .022);
}

#tab-overview #systemOverviewPanel .ov2-secondary-heading {
    margin: 26px 2px 13px;
}

#tab-overview #systemOverviewPanel .ov2-secondary-heading h3 {
    margin-top: 5px;
    font-size: 18px;
}

#tab-overview #systemOverviewPanel .ov2-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

@media (max-width: 1280px) {
    #tab-overview #systemOverviewPanel .ov2-primary-grid {
        grid-template-columns: minmax(0, 1fr) minmax(260px, .42fr);
    }

    #tab-overview #systemOverviewPanel .ov2-lower-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1040px) {
    #tab-overview #systemOverviewPanel .ov2-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #tab-overview #systemOverviewPanel .ov2-primary-grid {
        grid-template-columns: 1fr;
    }

    #tab-overview #systemOverviewPanel .ov2-health-card {
        grid-row: auto;
    }
}

@media (max-width: 700px) {
    #tab-overview #systemOverviewPanel .ov2-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        padding-bottom: 18px !important;
    }

    #tab-overview #systemOverviewPanel .ov2-header-actions {
        width: 100%;
    }

    #tab-overview #systemOverviewPanel .ov2-header-actions .sys-period {
        flex: 1;
    }

    #tab-overview #systemOverviewPanel .sys-period-trigger {
        width: 100%;
    }

    #tab-overview #systemOverviewPanel .ov2-insight-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        padding: 22px 19px;
    }

    #tab-overview #systemOverviewPanel .ov2-score-wrap {
        width: 100%;
        justify-content: flex-start;
    }

    #tab-overview #systemOverviewPanel .ov2-kpi-grid {
        gap: 10px !important;
    }

    #tab-overview #systemOverviewPanel .ov2-kpi-card {
        min-height: 126px;
        flex-direction: column;
        gap: 9px !important;
        padding: 16px !important;
    }

    #tab-overview #systemOverviewPanel .ov2-kpi-card .sys-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    #tab-overview #systemOverviewPanel .ov2-primary-grid,
    #tab-overview #systemOverviewPanel .ov2-primary-content,
    #tab-overview #systemOverviewPanel .ov2-lower-grid,
    #tab-overview #systemOverviewPanel .ov2-secondary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #tab-overview #systemOverviewPanel .sys-chart-card,
    #tab-overview #systemOverviewPanel .ov2-heatmap-card,
    #tab-overview #systemOverviewPanel .ov2-health-card {
        padding: 17px 14px !important;
    }

    #tab-overview #systemOverviewPanel .sys-chart-canvas-container,
    #tab-overview #systemOverviewPanel .ov2-main-chart {
        height: 220px;
        min-height: 220px;
    }
}

@media (max-width: 430px) {
    #tab-overview #systemOverviewPanel .ov2-page-header .sys-stats-hero-text h2 {
        font-size: 30px !important;
    }

    #tab-overview #systemOverviewPanel .ov2-page-header .sys-stats-hero-text p {
        font-size: 12px !important;
    }

    #tab-overview #systemOverviewPanel .ov2-insight-copy h3 {
        font-size: 19px;
    }

    #tab-overview #systemOverviewPanel .ov2-kpi-card .sys-stat-value {
        font-size: 24px !important;
    }

    #tab-overview #systemOverviewPanel .ov2-kpi-note {
        display: none;
    }

    #tab-overview #systemOverviewPanel .sys-health-header {
        align-items: flex-start;
        flex-direction: column;
    }

    #tab-overview #systemOverviewPanel .sys-health-details {
        grid-template-columns: 1fr;
    }

    #tab-overview #systemOverviewPanel .radial-gauge {
        width: 74px;
        height: 74px;
    }

    #tab-overview #systemOverviewPanel .radial-gauge-inner {
        width: 60px;
        height: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #tab-overview #systemOverviewPanel * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
