/* =========================================================
   SEEKER SOURCES - MONTHLY / CUMULATIVE PERFORMANCE
   Shared stylesheet for both Aware result panels
   ========================================================= */


/* =========================================================
   REPORT HEADER
   ========================================================= */

.bpm-report-toolbar {
    width: 100%;
    box-sizing: border-box;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 16px 18px;
    margin-bottom: 14px;

    background: #ffffff;

    border: 1px solid #dce5ed;
    border-radius: 12px;

    font-family: "Segoe UI", Arial, sans-serif;

    box-shadow: 0 4px 14px rgba(20, 55, 90, 0.05);
}


.bpm-report-heading {
    display: flex;
    align-items: center;
    gap: 11px;

    min-width: 0;
}


.bpm-report-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eaf2f8;
    color: #145386;

    border-radius: 9px;

    font-size: 15px;
}


.bpm-report-title {
    color: #173a60;

    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}


.bpm-report-subtitle {
    margin-top: 3px;

    color: #738496;

    font-size: 9px;
    line-height: 1.35;
}


/* =========================================================
   LEGEND
   ========================================================= */

.bpm-chart-legend {
    display: flex;
    align-items: center;

    gap: 14px;

    flex-shrink: 0;

    color: #627487;

    font-size: 8px;
    font-weight: 600;
}


.bpm-legend-item {
    display: flex;
    align-items: center;

    gap: 6px;

    white-space: nowrap;
}


.bpm-legend-actual {
    width: 12px;
    height: 8px;

    display: inline-block;

    background: #145386;

    border-radius: 2px;
}


.bpm-legend-plan {
    width: 18px;
    height: 0;

    display: inline-block;

    border-top: 2px dashed #5497dc;
}


/* =========================================================
   AWARE / KENDO RESULT WRAPPER

   Cards intentionally remain full width.
   No grid.
   No flex wrapping.
   No two-column layout.
   ========================================================= */

.k-listview-content > .bpm-card.k-listview-item {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    height: auto !important;

    float: none !important;
    clear: both !important;

    margin: 0 0 14px 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;
}


/* =========================================================
   CARD
   ========================================================= */

.bpm-card {
    width: 100%;

    box-sizing: border-box;

    background: #ffffff;

    border: 1px solid #dce5ed;
    border-radius: 12px;

    overflow: hidden;

    font-family: "Segoe UI", Arial, sans-serif;

    box-shadow:
        0 4px 14px rgba(20, 55, 90, 0.05);
}


/* =========================================================
   CARD HEADER
   ========================================================= */

.bpm-card-header {
    padding: 13px 16px 7px;
}


.bpm-source-wrap {
    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 0;
}


.bpm-source-number {
    width: 31px;
    height: 31px;

    min-width: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #3274be;
    border-radius: 50%;

    color: #145386;

    font-size: 11px;
    font-weight: 800;
}


.bpm-source-name {
    color: #173a60;

    font-size: 13px;
    font-weight: 700;

    line-height: 1.25;
}


.bpm-monthly-plan {
    margin-top: 2px;

    color: #3274be;

    font-size: 9px;
}


.bpm-monthly-plan strong {
    font-weight: 700;
}


/* =========================================================
   CARD BODY

   Chart takes most of the width.
   Summary remains fixed on the right.
   ========================================================= */

.bpm-card-body {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        150px;

    width: 100%;

    padding: 5px 15px 14px;

    box-sizing: border-box;

    min-width: 0;
}


/* =========================================================
   CHART WRAPPER
   ========================================================= */

.bpm-chart {
    min-width: 0;
    max-width: 100%;

    padding-right: 16px;

    box-sizing: border-box;

    border-right: 1px solid #e5ebf0;
}


/* =========================================================
   PLOT

   SQL pixel helpers are based on a 145px plotting height.
   Keep .bpm-bars at exactly 145px.
   ========================================================= */

.bpm-plot {
    position: relative;

    width: 100%;
    height: 160px;

    min-width: 0;
    max-width: 100%;

    box-sizing: border-box;

    border-bottom: 1px solid #cfd9e2;

    background-image:
        linear-gradient(
            to top,
            rgba(224, 231, 238, 0.55) 1px,
            transparent 1px
        );

    background-size: 100% 36px;
}


/* =========================================================
   MONTHLY PLAN LINE

   Used by the Monthly result.
   Position comes from {MonthlyPlanLinePx}
   ========================================================= */

.bpm-plan-line {
    position: absolute;

    left: 0;
    right: 0;

    height: 0;

    border-top: 2px dashed #5497dc;

    z-index: 2;
}


.bpm-plan-line span {
    position: absolute;

    right: 0;
    top: -16px;

    padding-left: 6px;

    background: #ffffff;

    color: #3274be;

    font-size: 8px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   BAR AREA

   IMPORTANT:
   Fixed at 145px because the SQL pixel helpers use 145.
   ========================================================= */

.bpm-bars {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 145px;

    display: flex;
    align-items: flex-end;

    z-index: 3;
}


/* =========================================================
   MONTH COLUMN
   ========================================================= */

.bpm-bar-column {
    position: relative;

    flex: 1 1 0;

    height: 145px;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    min-width: 0;
}


/* =========================================================
   ACTUAL BAR
   ========================================================= */

.bpm-bar {
    position: relative;

    width: 42%;

    min-width: 8px;
    max-width: 30px;

    background:
        linear-gradient(
            180deg,
            #2869ae 0%,
            #145386 100%
        );

    border-radius: 4px 4px 0 0;

    box-shadow:
        0 2px 4px rgba(20, 83, 134, 0.14);
}


/* =========================================================
   CUMULATIVE ACTUAL BAR
   ========================================================= */

.bpm-cumulative-bar {
    background:
        linear-gradient(
            180deg,
            #367fc3 0%,
            #145386 100%
        );
}


/* =========================================================
   VALUE ABOVE BAR
   ========================================================= */

.bpm-bar-value {
    position: absolute;

    left: 50%;
    top: -17px;

    transform: translateX(-50%);

    color: #243a50;

    font-size: 8px;
    font-weight: 700;

    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   ZERO HEIGHT BARS

   Keep them genuinely zero-height.
   Value can still appear at the baseline.
   ========================================================= */

.bpm-bar[style*="height:0px"],
.bpm-bar[style*="height: 0px"] {
    min-height: 0 !important;
}


/* =========================================================
   CUMULATIVE PLAN MARKER

   Used by Cumulative YTD result.
   Each month has its own dashed plan marker.
   ========================================================= */

.bpm-cumulative-plan-marker {
    position: absolute;

    left: 9%;
    right: 9%;

    height: 0;

    border-top: 2px dashed #5497dc;

    z-index: 5;
}


/* =========================================================
   MONTH LABELS
   ========================================================= */

.bpm-month-labels {
    display: grid;

    grid-template-columns:
        repeat(12, minmax(0, 1fr));

    padding-top: 6px;
}


.bpm-month-labels span {
    min-width: 0;

    color: #53687c;

    font-size: 7px;
    font-weight: 700;

    text-align: center;
}


/* =========================================================
   CUMULATIVE CHART NOTE
   ========================================================= */

.bpm-cumulative-note {
    margin-top: 8px;

    color: #8796a5;

    font-size: 8px;
    font-style: italic;

    text-align: center;
}


/* =========================================================
   SUMMARY PANEL
   ========================================================= */

.bpm-summary {
    padding:
        7px 3px 3px 15px;

    display: flex;
    flex-direction: column;

    align-items: stretch;
    justify-content: flex-start;

    min-width: 0;

    box-sizing: border-box;
}


/* =========================================================
   YTD
   ========================================================= */

.bpm-ytd {
    padding-bottom: 9px;

    text-align: center;
}


.bpm-ytd > span {
    display: block;

    margin-bottom: 2px;

    color: #718295;

    font-size: 8px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.25px;
}


.bpm-ytd strong {
    color: #173a60;

    font-size: 15px;
    font-weight: 700;
}


.bpm-ytd strong small {
    color: #52677b;

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   STATUS
   ========================================================= */

.bpm-status {
    padding: 8px 7px;

    border-radius: 7px;

    text-align: center;

    font-size: 8px;
    font-weight: 800;

    line-height: 1.3;

    text-transform: uppercase;
}


/* Behind Pace */

.bpm-status.status-behind {
    background: #fde5e5;
    color: #df252d;
}


/* Slightly Behind Pace */

.bpm-status.status-slightly-behind {
    background: #fff1d5;
    color: #b87300;
}


/* About on Pace */

.bpm-status.status-on-plan {
    background: #edf1f4;
    color: #667787;
}


/* Slightly Ahead of Pace */

.bpm-status.status-ahead {
    background: #e1f3e7;
    color: #218047;
}


/* Well Ahead of Pace */

.bpm-status.status-well-ahead {
    background: #ceeed9;
    color: #087b35;
}


/* =========================================================
   VARIANCE
   ========================================================= */

.bpm-variance {
    margin-top: 6px;

    padding:
        3px 4px 10px;

    border-bottom:
        1px solid #e5ebf0;

    text-align: center;

    font-size: 9px;
    font-weight: 600;
}


.bpm-variance.variance-negative {
    color: #df252d;
}


.bpm-variance.variance-positive {
    color: #148343;
}


.bpm-variance.variance-neutral {
    color: #718295;
}


/* =========================================================
   REQUIRED PACE
   ========================================================= */

.bpm-pace {
    padding-top: 10px;

    text-align: center;
}


.bpm-pace > span {
    display: block;

    margin-bottom: 3px;

    color: #8493a3;

    font-size: 7px;
    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.35px;
}


.bpm-pace strong {
    font-size: 13px;
    font-weight: 700;
}


.bpm-pace strong i {
    margin-left: 3px;

    font-size: 10px;
}


.bpm-pace small {
    display: block;

    margin-top: 2px;

    color: #99a6b3;

    font-size: 7px;
}


/* =========================================================
   PACE COLOURS

   If RequiredPlanPace rises, red = more work required.
   If it falls, green = ahead of required pace.
   ========================================================= */

.bpm-pace .pace-up {
    color: #e5262e;
}


.bpm-pace .pace-down {
    color: #159447;
}


.bpm-pace .pace-flat {
    color: #718090;
}


/* =========================================================
   OPTIONAL AWARE SHOW/HIDE BUTTONS

   Use these classes if you want your Monthly /
   Cumulative buttons to look consistent.
   Aware can handle the actual show/hide operation.
   ========================================================= */

.bpm-display-buttons {
    display: flex;
    align-items: center;

    gap: 6px;

    margin-bottom: 12px;
}


.bpm-display-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 30px;

    padding: 7px 12px;

    border: 1px solid #d4dfe8;
    border-radius: 7px;

    background: #ffffff;
    color: #53687c;

    font-family: "Segoe UI", Arial, sans-serif;

    font-size: 9px;
    font-weight: 700;

    cursor: pointer;
}


.bpm-display-button:hover {
    border-color: #145386;
    color: #145386;
}


.bpm-display-button.active {
    border-color: #145386;

    background: #145386;
    color: #ffffff;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 750px) {

    .bpm-report-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }


    .bpm-chart-legend {
        width: 100%;
    }


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


    .bpm-chart {
        padding-right: 0;
        padding-bottom: 12px;

        border-right: none;
        border-bottom:
            1px solid #e5ebf0;
    }


    .bpm-summary {
        padding:
            12px 6px 4px;
    }


    .bpm-display-buttons {
        width: 100%;
    }


    .bpm-display-button {
        flex: 1;
    }

}

.bpm-switch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 13px;

    background: #145386;
    color: #ffffff !important;

    border: 1px solid #145386;
    border-radius: 8px;

    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 9px;
    font-weight: 700;

    text-decoration: none !important;
    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 4px 10px rgba(20, 83, 134, 0.18);

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.bpm-switch-button:hover {
    background: #103f67;
    border-color: #103f67;

    color: #ffffff !important;
    text-decoration: none !important;

    transform: translateY(-1px);

    box-shadow:
        0 5px 13px rgba(20, 83, 134, 0.24);
}


.bpm-switch-button:focus {
    color: #ffffff !important;
    text-decoration: none !important;
}


.bpm-switch-button i {
    font-size: 10px;
}


/* =========================================================
   TREND CALLOUT
   ========================================================= */

.bpm-trend {
    min-height: 18px;

    margin-top: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    font-size: 8px;
    font-weight: 700;

    line-height: 1.2;
}


.bpm-trend i {
    font-size: 9px;
}


.bpm-trend.trend-positive {
    color: #158845;
}


.bpm-trend.trend-negative {
    color: #d9363e;
}


.bpm-trend.trend-warning {
    color: #b97912;
}


.bpm-trend.trend-neutral {
    color: #718090;
}

.bp-mini-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.bpm-as-of {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    color: #7f8fa0;
    font-size: 8px;
    line-height: 1.2;
}

.bpm-as-of i {
    color: #4DA57F;
    font-size: 11px;
}

.bpm-as-of div {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bpm-as-of span {
    color: #7f8fa0;
}

.bpm-as-of strong {
    color: #52677b;
    font-weight: 700;
}
