/* Month In Review — current-month snapshot across Jobs, Inspections, Services,
   Service Quotes and Quotes. Rides on the shared .stat-card / .overview-section /
   .leaderboard styling; only the month banner and the delta chips are new here. */

/* ========================================
   Month banner
   ======================================== */
/* Light band, not a dark slab — it sits above a page of white cards, so a heavy
   header reads as a different application. The emerald wash keeps it branded. */
.mir-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
    border: 1px solid #d1fae5;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.mir-banner-main {
    min-width: 0;
}

.mir-month-pager {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mir-banner-month {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1.2;
    /* Holds its width so the arrows don't shuffle between "May" and "September". */
    min-width: 230px;
}

.mir-pager-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1fae5;
    background: #ffffff;
    color: #059669;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.mir-pager-btn:hover:not(:disabled) {
    background: #ecfdf5;
    border-color: #059669;
}

.mir-pager-btn:disabled {
    color: #cbd5e1;
    border-color: #e2e8f0;
    cursor: default;
}

.mir-pager-today {
    border: 1px solid #d1fae5;
    background: #ffffff;
    color: #059669;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    margin-left: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.mir-pager-today:hover {
    background: #ecfdf5;
    border-color: #059669;
}

.mir-banner-sub {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

.mir-banner-progress {
    flex: 0 0 300px;
    max-width: 300px;
}

.mir-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.mir-progress-track {
    height: 8px;
    background: #d7e3dd;
    border-radius: 4px;
    overflow: hidden;
}

.mir-progress-fill {
    height: 100%;
    background: #059669;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.mir-progress-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

/* ========================================
   Comparison chips
   ======================================== */

/* Sits opposite the section title where other sections put a "View Details" link. */
.mir-compare-note {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* A card header here can carry an icon, an explanation icon AND a delta chip. The
   shared space-between would strand the chip in the middle, so lay the header out
   left-to-right and push the chip to the right edge on its own. */
.mir-page .stat-header {
    justify-content: flex-start;
    gap: 8px;
}

.mir-page .stat-trend {
    margin-left: auto;
}

/* Neutral state: last month's same-days slice was zero, so a percentage would be
   noise. The chip says so instead of claiming an infinite gain. */
.stat-trend.flat {
    background: #f1f5f9;
    color: #64748b;
}

/* The shared .stat-icon colour set has no red variant; overdue and lost need one. */
.stat-icon.danger-icon {
    background: #fee2e2;
    color: #dc2626;
}

/* ========================================
   Live cards on a past month
   ======================================== */

/* These five cards measure right now, not the month on screen. Paging back leaves them
   readable but visibly set apart, so nobody mistakes today's backlog for June's. */
.mir-live-badge {
    display: none;
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0369a1;
}

.mir-page .stat-card.mir-is-live {
    background: #fbfcfd;
    border-style: dashed;
}

/* No drill target while a past month is showing, so kill the click affordance too. */
.mir-page .stat-card.mir-is-live:hover {
    box-shadow: none;
    border-color: #e1e8ef;
}

/* ========================================
   Leaderboard
   ======================================== */

/* One card, not the three-across row the quoting dashboard uses — and full width,
   so it lines up with the stat rows above instead of stopping a third of the way. */
.mir-leaderboard-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 32px;
}

.mir-empty {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
    .mir-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .mir-banner-progress {
        flex: 1 1 auto;
        max-width: none;
    }
}
