/* TERP - styles of mock-up group G5 (Oggi, Esemplari critici, Conta e inventario, Avvisi,
 * Distinte, Ricambio, Conta a due). Shared rules stay in app.css. */

/* --- Dashboard (U1) --------------------------------------------------------------------- */

.tp-kpi-off { opacity: .6; }
.tp-kpi-off .tp-badge { margin-top: .25rem; }
.tp-kpi small.tp-kpi-note { display: block; color: var(--tp-ink-3); font-size: .72rem; margin-top: .1rem; }

.tp-boundary-mini
{
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .85rem 1rem;
}

.tp-boundary-mini > i { font-size: 1.2rem; color: var(--tp-accent); margin-top: .15rem; }

/* --- Timeline (custody chain, Esemplari critici) ---------------------------------------- */

.tp-timeline { list-style: none; margin: 0; padding: .25rem 1rem 1rem; }

.tp-timeline li
{
    position: relative;
    padding: 0 0 1rem 1.4rem;
    border-left: 2px solid var(--tp-line);
}

.tp-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }

.tp-timeline li::before
{
    content: "";
    position: absolute;
    left: -5px;
    top: .25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tp-ink-4);
}

.tp-timeline li.tp-tl-custody::before { background: var(--tp-accent); }
.tp-timeline li.tp-tl-alarm::before { background: var(--tp-red); box-shadow: 0 0 0 3px var(--tp-red-l); }
.tp-timeline time { display: block; font-size: .74rem; color: var(--tp-ink-3); }
.tp-timeline b { display: block; }
.tp-timeline .tp-tl-note { color: var(--tp-ink-3); font-size: .85rem; }

/* --- Avvisi (U11): rule role + channel chips --------------------------------------------- */

.tp-chip
{
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .08rem .5rem;
    margin: 0 .2rem .2rem 0;
    border: 1px solid var(--tp-line);
    border-radius: 999px;
    background: var(--tp-line-2);
    color: var(--tp-ink-2);
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}

.tp-escalated
{
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--tp-red);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* --- Distinte placeholder (A4): illustrative tree ---------------------------------------- */

.tp-bom-tree { margin: 0; padding-left: 0; }
.tp-bom-tree, .tp-bom-tree ul { list-style: none; }
.tp-bom-tree ul { margin: .35rem 0 .35rem 1.3rem; padding-left: .9rem; border-left: 1px dashed var(--tp-line); }
.tp-bom-tree li { margin-bottom: .35rem; }

.tp-bom-node
{
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .65rem;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius-sm);
    background: #fff;
}

.tp-bom-node .code { font-weight: 600; }
.tp-bom-node small { color: var(--tp-ink-3); }
.tp-bom-root { border-color: var(--tp-accent-line); background: var(--tp-accent-l); }

/* --- Handheld (P6 Ricambio, P7 Conta a due): the operator switcher this mock-up adds so two
 *     different named people can be shown on the same device, without a real login (G5 choice,
 *     to confirm). --------------------------------------------------------------------------- */

.tp-opsel { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }

.tp-opsel button
{
    flex: 1 1 auto;
    min-height: 44px;
    padding: .4rem .6rem;
    border: 1px solid var(--tp-line);
    border-radius: var(--tp-radius-sm);
    background: #fff;
    color: var(--tp-ink-2);
    font-weight: 600;
    font-size: .85rem;
}

.tp-opsel button.active { border-color: var(--tp-accent); background: var(--tp-accent-l); color: var(--tp-accent-d); }
.tp-opsel button:disabled { opacity: .4; }

.tp-blind-note
{
    display: flex;
    gap: .55rem;
    align-items: flex-start;
    padding: .7rem .85rem;
    margin-bottom: .6rem;
    border: 1px solid var(--tp-amber-line);
    border-radius: var(--tp-radius);
    background: var(--tp-amber-l);
    color: #6d4605;
    font-size: .85rem;
}

.tp-blind-note i { margin-top: .15rem; }
