/* ==================================================================================================
   ADMIN → VENDORS

   The vendor console's own styles: the four summary counts and the details panel. Deliberately a
   separate file from the agent screens' CSS — vendors and agents are separate record types, and
   sharing a stylesheet is how two screens quietly drift into looking like one.
   ================================================================================================== */

.wr-vend__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: .85rem;
    margin: 0 0 1.25rem;
}

.wr-vend__card {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: 1rem 1.15rem;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #94a3b8;
    border-radius: 12px;
    background: #fff;
}

.wr-vend__card.is-ok   { border-top-color: #16a34a; }
.wr-vend__card.is-info { border-top-color: #2563eb; }
.wr-vend__card.is-warn { border-top-color: #d97706; }

.wr-vend__num {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.wr-vend__lbl {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #475569;
}

.wr-vend__sub {
    font-size: .76rem;
    line-height: 1.4;
    color: #64748b;
}

/* ---- the details panel ---- */

.wr-vend__backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, .5);
}

.wr-vend__modal {
    position: fixed;
    z-index: 1050;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    width: min(680px, calc(100vw - 32px));
    max-height: min(82vh, 760px);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    overflow: hidden;
}

.wr-vend__modal > header,
.wr-vend__modal > footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
}

.wr-vend__modal > header { border-bottom: 1px solid #e2e8f0; }
.wr-vend__modal > footer { border-top: 1px solid #e2e8f0; justify-content: flex-end; }

.wr-vend__modal h2 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.wr-vend__close {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
}

.wr-vend__close:hover { background: #f1f5f9; }

.wr-vend__modalbody {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.15rem 1.25rem;
}

.wr-vend__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}

.wr-vend__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .75rem 1.5rem;
    margin: 0;
}

.wr-vend__facts > div { min-width: 0; }

.wr-vend__facts dt {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
}

.wr-vend__facts dd {
    margin: .1rem 0 0;
    font-size: .92rem;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.wr-vend__modalbody h3 {
    margin: 1.25rem 0 .4rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #475569;
}

.wr-vend__about {
    margin: 0;
    font-size: .92rem;
    line-height: 1.6;
    color: #334155;
    white-space: pre-wrap;
}

@media (max-width: 575.98px) {
    .wr-vend__num { font-size: 1.55rem; }
    .wr-vend__modal { max-height: calc(100vh - 32px); }
}
