/* Sales Rep Scorecard (/WebOpsRepScorecard): one global sheet because the page, its view component
   and the rep dialog share marks. The house look from Late Loaners (ll-*), rs-prefixed. */

.rs-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 90ch;
}

.rs-title__overline {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--mud-palette-text-secondary);
}

.rs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.rs-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.rs-tenant { flex: 0 1 15rem; }
.rs-date { flex: 0 1 13rem; }
.rs-procedure { flex: 0 1 18rem; min-width: 12rem; }

.rs-caption {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: #5B6878;
}

.rs-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
    margin: 0 0 1rem;
}

.rs-tile {
    padding: 0.875rem 1.125rem;
    background: #fff;
    border: 1px solid #E4E9F2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 32, 64, 0.04), 0 4px 16px rgba(16, 32, 64, 0.05);
}

.rs-tile dt {
    margin: 0 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #5B6878;
}

.rs-tile dd {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-dark);
    font-variant-numeric: tabular-nums;
}

.rs-tile dd.rs-tile__note {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: #5B6878;
}

.rs-note {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: #5B6878;
}

/* Charts one above the other on a phone, three across from 1280px. */
.rs-charts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 1280px) {
    .rs-charts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.rs-panel {
    background: #fff;
    border: 1px solid #E4E9F2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 32, 64, 0.04), 0 4px 16px rgba(16, 32, 64, 0.05);
}

.rs-panel__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 1rem 1.25rem 0.875rem;
    border-bottom: 1px solid #E4E9F2;
}

.rs-panel__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-text-dark);
}

.rs-panel__subtitle {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #5B6878;
    font-variant-numeric: tabular-nums;
}

.rs-panel__body { padding: 0.75rem 1rem 0.5rem; }

.rs-search { flex: 0 1 18rem; }

.rs-empty {
    margin: 0.5rem 0.25rem 1rem;
    font-size: 0.875rem;
    color: #8592A3;
}

.rs-table .rs-row { cursor: pointer; }

.rs-num {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rs-rep { font-weight: 600; }

.rs-sub {
    display: block;
    font-size: 0.75rem;
    color: #5B6878;
}

.rs-late {
    display: inline-block;
    min-width: 1.75rem;
    padding: 0.0625rem 0.5rem;
    border-radius: 999px;
    background: #FDECEC;
    color: #A61B1B;
    font-weight: 700;
    text-align: center;
}

/* The rep dialog: identity large, then a facts strip. */
.rs-dlg-title__name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

.rs-dlg-title__meta {
    margin: 0.125rem 0 0;
    font-size: 0.8125rem;
    color: #5B6878;
}

.rs-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem 1.5rem;
    margin: 0 0 1rem;
    padding: 0.875rem 1rem;
    background: #F6F8FC;
    border-radius: 12px;
}

.rs-facts dt {
    font-size: 0.75rem;
    font-weight: 600;
    color: #5B6878;
}

.rs-facts dd {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-dark);
    font-variant-numeric: tabular-nums;
}

.rs-facts dd.rs-facts__note {
    font-size: 0.75rem;
    font-weight: 400;
    color: #5B6878;
}

.rs-dlg-head {
    margin: 1rem 0 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

/* ---- tabs and email schedules (the Late Loaners schedule form and detail, for this page) ---- */
.rs-tile dd.rs-tile__target { font-weight: 600; }
.rs-tile dd.rs-tile__target--met { color: #1B7F5C; }
.rs-tile dd.rs-tile__target--off { color: #B3261E; }

/* The Targets dialog: a label column, this view's box, the default's box. Stacks on a phone. */
.rst-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem 1rem; align-items: center; }
.rst-head { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-dark); }
.rst-label { font-size: 0.875rem; font-weight: 600; color: var(--color-text-dark); }
.rst-label span { display: block; font-size: 0.75rem; font-weight: 400; color: #5B6878; }
@media (min-width: 600px) {
    .rst-grid { grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 599.98px) {
    .rst-grid > div:first-child, .rst-head { display: none; }
    .rst-label { margin-top: 0.5rem; }
}

.rs-tab { padding-top: 1rem; }
.rss-note { margin: 0; max-width: 70ch; font-size: 0.8125rem; line-height: 1.45; color: #5B6878; }
.rss-form { display: flex; flex-direction: column; }
.rss-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; padding-block: 1.25rem; border-bottom: 1px solid #E4E9F2; }
.rss-section:first-child { padding-top: 0.25rem; }
.rss-section:last-child { border-bottom: 0; }
@media (min-width: 960px) {
    .rss-section { grid-template-columns: 13rem minmax(0, 1fr); gap: 1.5rem; }
}
.rss-intro__title { margin: 0 0 0.25rem; font-size: 0.9375rem; font-weight: 600; color: var(--color-text-dark); }
.rss-intro__hint { margin: 0; max-width: 34ch; font-size: 0.8125rem; line-height: 1.45; color: #5B6878; }
.rss-fields { display: flex; flex-direction: column; gap: 0.75rem; max-width: 40rem; }
.rss-days { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.rss-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; width: 100%; padding: 0.5rem 0.75rem; }
.rss-needed { font-size: 0.8125rem; font-weight: 600; color: var(--color-secondary-800); }

.rssd-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.rssd-identity__name { font-size: 1.25rem; font-weight: 600; color: var(--color-text-dark); }
.rssd-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem 1.5rem; margin: 0 0 0.75rem;
    padding: 0.875rem 1rem; background: #F6F8FC; border: 1px solid #E4E9F2; border-radius: 10px; }
.rssd-facts dt, .rssd-label { margin: 0 0 0.125rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: #5B6878; }
.rssd-facts dd { margin: 0; font-size: 0.875rem; color: var(--color-text-dark); }
.rssd-view { margin: 0 0 1rem; font-size: 0.875rem; color: var(--color-text-dark); }
.rssd-label { margin-right: 0.375rem; }
.rssd-heading { margin: 1rem 0 0.5rem; font-size: 0.9375rem; font-weight: 600; color: var(--color-text-dark); }
.rssd-ok { color: var(--color-success); font-weight: 600; }
.rssd-failed { color: var(--color-error); font-weight: 600; }
