/* kazi-admin.css  badges + layout helpers for the security and user screens.
   Badge colours are mixed from the theme: a blend of the status colour and the text colour stays readable on white and on charcoal. */
.kz-badge {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    border: 1px solid currentColor;
    white-space: nowrap;
}

/* ".kz-badge.kz-x" is deliberately more specific than the plain ".kz-warn" text colour in kazi-reports.css, which has the same name */
.kz-badge.kz-ok,   .kz-ok   { color: color-mix(in srgb, var(--mud-palette-success) 60%, var(--mud-palette-text-primary)); }
.kz-badge.kz-warn            { color: color-mix(in srgb, var(--mud-palette-warning) 60%, var(--mud-palette-text-primary)); }
.kz-badge.kz-bad,  .kz-bad  { color: color-mix(in srgb, var(--mud-palette-error) 60%, var(--mud-palette-text-primary)); }
.kz-badge.kz-info, .kz-info { color: color-mix(in srgb, var(--mud-palette-primary) 65%, var(--mud-palette-text-primary)); }
.kz-badge.kz-off,  .kz-off  { color: var(--mud-palette-text-secondary); }

.kz-badge.kz-ok   { background: color-mix(in srgb, var(--mud-palette-success) 14%, transparent); }
.kz-badge.kz-warn { background: color-mix(in srgb, var(--mud-palette-warning) 16%, transparent); }
.kz-badge.kz-bad  { background: color-mix(in srgb, var(--mud-palette-error) 14%, transparent); }
.kz-badge.kz-info { background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent); }
.kz-badge.kz-off  { background: color-mix(in srgb, var(--mud-palette-text-secondary) 14%, transparent); }

.kz-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
    gap: 4px 16px;
}

    .kz-checks label, .kz-check {
        display: flex;
        gap: 8px;
        align-items: flex-start;
        cursor: pointer;
        font-size: .92rem;
        line-height: 1.3;
        padding: 2px 0;
    }

.kz-check-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.kz-group {
    margin: 12px 0 4px;
    font-weight: 600;
    text-transform: capitalize;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

    .kz-group button {
        font-size: .75rem;
        background: none;
        border: 0;
        color: var(--mud-palette-primary, #1565c0);
        cursor: pointer;
        padding: 4px 0;
    }

.kz-codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
    gap: 8px;
    font-family: ui-monospace, Consolas, monospace;
    margin: 8px 0;
}

    .kz-codes span {
        border: 1px dashed currentColor;
        border-radius: 6px;
        padding: 6px 8px;
        text-align: center;
    }

/* QR codes must stay black on white to scan, in both themes */
.kz-qr {
    width: 200px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    image-rendering: pixelated;
}

.kz-mono {
    font-family: ui-monospace, Consolas, monospace;
    letter-spacing: .1em;
    word-break: break-all;
}
