/* ── Status pills and tags (revamp X4, G6, G2) ──────────────────────────────
   A status pill keeps its text and a shape per state, so it never relies
   on colour alone (DESIGN.md §2):
     dot      healthy / ok                       (green)
     diamond  needs action                       (orange)
     dash     broken, missing, lost              (red)
     ring     neutral or unknown                 (grey)
     split    sources disagree                   (conflict)
   Sources and platforms are neutral chips (G6): colour is kept for state. */

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border: 0;
    border-radius: var(--radius-pill);
    font-family: var(--sans);
    font-size: var(--fs-12);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1;
    white-space: nowrap;
    color: var(--ghost);
    background: var(--ghost-dim);
}
.pill::before {
    content: '';
    flex: none;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: transparent;
    box-shadow: inset 0 0 0 1.5px currentColor;   /* ring: the neutral default */
}

/* dot */
.pill.ok, .pill.is-ok { color: var(--success); background: var(--success-dim); }
.pill.ok::before, .pill.is-ok::before { background: currentColor; box-shadow: none; }

/* diamond: needs action */
.pill.outdated_info, .pill.missing_mdm, .pill.okta-medium, .pill.is-warn { color: var(--warn); background: var(--warn-dim); }
.pill.outdated_info::before, .pill.missing_mdm::before, .pill.okta-medium::before, .pill.is-warn::before {
    border-radius: 1px; background: currentColor; box-shadow: none; transform: rotate(45deg);
}

/* dash: broken */
.pill.unmanaged, .pill.missing_agent, .pill.okta-high, .pill.is-error { color: var(--error); background: var(--error-dim); }
.pill.unmanaged::before, .pill.missing_agent::before, .pill.okta-high::before, .pill.okta-critical::before, .pill.is-error::before {
    width: 8px; height: 2px; border-radius: 1px; background: currentColor; box-shadow: none;
}
/* The most urgent Okta state (Not in Okta) keeps the pair (error on its
   -dim fill, the dash) and adds an outline, never a solid fill. */
.pill.okta-critical { color: var(--error); background: var(--error-dim); box-shadow: inset 0 0 0 1px currentColor; font-weight: 600; }

/* ring: neutral */
.pill.unused, .pill.phantom, .pill.is-neutral { color: var(--ghost); background: var(--ghost-dim); }
.pill.okta-active { color: var(--text-3); background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.pill.okta-active::before { display: none; }

/* split: the sources disagree (its own hue, never warn). */
.pill.discrepancy { color: var(--conflict); background: var(--conflict-dim); }
.pill.discrepancy::before {
    width: 7px; height: 7px;
    background: linear-gradient(90deg, currentColor 50%, transparent 50%);
    box-shadow: inset 0 0 0 1.5px currentColor;
}

/* Sources and platforms: neutral chips, sentence case, sans (G6, G2). */
.s-tag, .p-tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border: 0;
    border-radius: var(--radius-xs);
    font-family: var(--sans);
    font-size: var(--fs-12);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    color: var(--text-2);
    background: var(--sunken);
    box-shadow: inset 0 0 0 1px var(--border);
}

/* Pulse panel source health. */
.src-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-12);
    font-weight: 500;
    white-space: nowrap;
}
.src-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.src-badge.ok { color: var(--success); background: var(--success-dim); }
.src-badge.error { color: var(--error); background: var(--error-dim); }
.src-badge.error::before { width: 8px; height: 2px; border-radius: 1px; }
.src-badge.not_configured, .src-badge.running { color: var(--text-3); background: var(--ghost-dim); }
.src-badge.not_configured::before, .src-badge.running::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* Issue lines: a small orange diamond instead of a glyph (G11). */
.issue-item { display: flex; align-items: baseline; gap: 7px; font-family: var(--sans); font-size: var(--fs-13); line-height: 1.5; color: var(--warn); }
.issue-item::before {
    content: '';
    flex: none;
    width: 6px; height: 6px;
    border-radius: 1px;
    background: currentColor;
    transform: translateY(-1px) rotate(45deg);
}

/* Yes / no marks in tables: an icon with a label, coloured by meaning. */
.ok-mark { color: var(--success); }
.no-mark { color: var(--error); }

/* Marks: the same shapes as the pills, alone (strips, action lists,
   legends). <i class="mk mk-warn" aria-hidden="true"></i> next to text. */
.mk { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.mk-all { background: var(--text-2); }
.mk-ok { background: var(--success); }
.mk-ready { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-warn { background: var(--warn); border-radius: 1px; transform: rotate(45deg); }
.mk-error { width: 9px; height: 2.5px; border-radius: 1px; background: var(--error); }
.mk-conflict { background: linear-gradient(90deg, var(--conflict) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--conflict); }
.mk-info { background: var(--info); border-radius: 2px; }
.mk-neutral { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }

/* A device with no valid serial (lib/serial-display.js): what the source
   reported and its tag or hostname, muted, in place of the sync's internal
   key. Words in the sans face, values in mono, even inside a mono cell. */
.serial-key { color: var(--text-2); font-family: var(--sans); font-weight: 400; letter-spacing: normal; }
.serial-key .mono { font-family: var(--mono); }
