/* MIS app — mobile-first on top of Bootstrap 5. Test at 360 / 768 / 1280. */

body { background: #f6f7fb; }

.mis-kpi {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: .75rem;
    padding: .75rem 1rem;
    height: 100%;
}
.mis-kpi .mis-kpi-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    margin-bottom: .15rem;
}
.mis-kpi .mis-kpi-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}
.mis-kpi .mis-kpi-sub { font-size: .75rem; color: #6b7280; }
.mis-kpi.mis-kpi-bad .mis-kpi-value { color: #b91c1c; }
.mis-kpi .mis-kpi-value.mis-kpi-danger { color: #b91c1c; }
/* KPI cards that drill into a detail report */
a.mis-kpi { color: inherit; transition: box-shadow .15s ease; }
a.mis-kpi:hover { box-shadow: 0 0 0 2px #0d6efd33; }
a.mis-kpi .mis-kpi-value { color: #111827; }

/* CSS trend chart (no chart library — dependency-light) */
.mis-trend {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 140px;
    padding: .25rem 0;
}
.mis-trend .mis-bar {
    flex: 1 1 0;
    min-width: 2px;
    background: #6366f1;
    border-radius: 2px 2px 0 0;
    opacity: .85;
}
.mis-trend .mis-bar:hover { opacity: 1; }

/* CSS funnel */
.mis-funnel .mis-stage { margin-bottom: .4rem; }
.mis-funnel .mis-stage-label {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: #374151;
}
.mis-funnel .mis-stage-bar {
    height: 26px;
    border-radius: .35rem;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    min-width: 2%;
    transition: width .4s ease;
}

/* payment split */
.mis-split .progress { height: 10px; }
.mis-split .mis-split-row { font-size: .8rem; margin-bottom: .35rem; }

/* sortable table headers */
th.mis-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.mis-sortable::after { content: "\2195"; opacity: .35; margin-left: .25rem; }
th.mis-sortable.sort-asc::after { content: "\2191"; opacity: 1; }
th.mis-sortable.sort-desc::after { content: "\2193"; opacity: 1; }

.mis-busy { opacity: .5; pointer-events: none; }

.mis-filter-bar .form-label { font-size: .72rem; margin-bottom: .1rem; color: #6b7280; }

@media (min-width: 768px) {
    .mis-kpi .mis-kpi-value { font-size: 1.35rem; }
}
