/*
 * Monolabs Monitor - panel theme.
 *
 * Plain CSS on top of Filament's prebuilt stylesheet, linked from
 * AdminPanelProvider (HEAD_END). No Tailwind build: the production image is
 * built without node, and everything here targets Filament's stable `fi-`
 * classes or our own `mon-` ones.
 *
 * Idea: a control room. An ink topbar that is always the same, with a live
 * status pill; quiet surfaces below so that the only loud colour on a page is
 * a status that needs attention. Numbers are set in a monospace face.
 */

:root {
    --mon-ink: #0b0f19;
    --mon-ink-2: #111827;
    --mon-ink-line: #1e2638;
    --mon-blue: #2563eb;
    --mon-blue-soft: #93c5fd;
    --mon-ok: #10b981;
    --mon-warning: #f59e0b;
    --mon-failed: #ef4444;
    --mon-unknown: #94a3b8;
    --mon-surface: #f4f6f9;
    --mon-card: #ffffff;
    --mon-line: rgba(11, 15, 25, 0.08);
    --mon-text: #0b0f19;
    --mon-muted: #5b6478;
    --mon-mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

.dark {
    --mon-surface: #0b0f19;
    --mon-card: #111827;
    --mon-line: rgba(255, 255, 255, 0.08);
    --mon-text: #f1f5f9;
    --mon-muted: #94a3b8;
}

/* --- Status dots (shared) ------------------------------------------------ */

.mon-dot {
    display: inline-block;
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--mon-unknown);
}

.mon-dot-ok { background: var(--mon-ok); }
.mon-dot-warning { background: var(--mon-warning); }
.mon-dot-failed {
    background: var(--mon-failed);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55);
    animation: mon-alarm 1.6s ease-out infinite;
}

@keyframes mon-alarm {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
    70%, 100% { box-shadow: 0 0 0 0.45rem rgba(239, 68, 68, 0); }
}

/* --- Surfaces and type --------------------------------------------------- */

.fi-body {
    background-color: var(--mon-surface);
}

.fi-header-heading {
    letter-spacing: -0.02em;
}

/* Numbers line up and read as data. */
.fi-ta-text-item,
.fi-in-text-item,
.fi-badge {
    font-variant-numeric: tabular-nums;
}

/* --- Topbar: ink in both themes ------------------------------------------ */

.fi-topbar {
    background-color: var(--mon-ink);
    box-shadow: inset 0 -1px 0 var(--mon-ink-line);
    color: #e2e8f0;
}

.fi-topbar .fi-icon-btn {
    color: rgba(226, 232, 240, 0.72);
}

.fi-topbar .fi-icon-btn:hover,
.fi-topbar .fi-icon-btn:focus-visible {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.fi-topbar .fi-topbar-item-label,
.fi-topbar .fi-topbar-item-btn {
    color: rgba(226, 232, 240, 0.8);
}

.fi-topbar .fi-global-search-field .fi-input-wrp {
    background-color: rgba(255, 255, 255, 0.06);
    --tw-ring-color: rgba(255, 255, 255, 0.12);
}

.fi-topbar .fi-global-search-field .fi-input {
    color: #f1f5f9;
}

.fi-topbar .fi-user-avatar {
    box-shadow: 0 0 0 2px var(--mon-ink), 0 0 0 3px rgba(255, 255, 255, 0.18);
}

/* --- Brand --------------------------------------------------------------- */

.mon-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.mon-brand-mark {
    width: auto;
    height: 1.375rem;
}

.mon-brand-name {
    font-size: 1.0625rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    color: var(--mon-text);
}

.mon-brand-mark-white { display: none; }
.dark .mon-brand-mark-ink { display: none; }
.dark .mon-brand-mark-white { display: block; }

.fi-topbar .mon-brand-mark-ink { display: none; }
.fi-topbar .mon-brand-mark-white { display: block; }
.fi-topbar .mon-brand-name { color: #ffffff; }

/* --- Status pill in the topbar ------------------------------------------ */

.mon-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2rem;
    padding: 0 0.75rem;
    margin-inline-end: 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 150ms ease;
}

.mon-pulse:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mon-pulse:focus-visible {
    outline: 2px solid var(--mon-blue-soft);
    outline-offset: 2px;
}

.mon-pulse-failed {
    background: rgba(239, 68, 68, 0.16);
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.45);
}

.mon-pulse-warning {
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.4);
}

.mon-pulse-detail {
    padding-inline-start: 0.5rem;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(226, 232, 240, 0.6);
    font-family: var(--mon-mono);
    font-size: 0.75rem;
}

@media (max-width: 639px) {
    .mon-pulse-detail { display: none; }
    .mon-pulse-label { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
}

/* --- Sidebar ------------------------------------------------------------- */

@media (min-width: 64rem) {
    .fi-sidebar {
        box-shadow: inset -1px 0 0 var(--mon-line);
    }
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    position: relative;
    background-color: rgba(37, 99, 235, 0.08);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn::before {
    content: '';
    position: absolute;
    inset-block: 0.5rem;
    inset-inline-start: -0.75rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--mon-blue);
}

.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: rgba(96, 165, 250, 0.1);
}

/* --- Sections and tables: flat cards on hairlines ------------------------ */

.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn {
    box-shadow: 0 0 0 1px var(--mon-line);
}

.fi-ta-header-cell {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* --- Dashboard: status board -------------------------------------------- */

.mon-board {
    display: grid;
    gap: 1.25rem;
}

.mon-board-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 0.875rem;
    background: var(--mon-card);
    box-shadow: 0 0 0 1px var(--mon-line);
    overflow: hidden;
}

@media (min-width: 48rem) {
    .mon-board-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* The board has a fifth stat (vulnerabilities); the dependencies page keeps four. */
@media (min-width: 64rem) {
    .mon-board-summary:has(> :nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

a.mon-board-stat:hover .mon-board-stat-caption { color: var(--mon-text); }

.mon-board-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    box-shadow: inset -1px -1px 0 var(--mon-line);
}

.mon-board-stat-value {
    font-family: var(--mon-mono);
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--mon-text);
}

.mon-board-stat-failed .mon-board-stat-value { color: var(--mon-failed); }
.mon-board-stat-warning .mon-board-stat-value { color: #d97706; }
.dark .mon-board-stat-warning .mon-board-stat-value { color: var(--mon-warning); }

.mon-board-stat-caption {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--mon-muted);
}

.mon-board-stat-caption .mon-dot { animation: none; }

.mon-board-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
}

.mon-board-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.5rem;
    border-radius: 0.875rem;
    background: var(--mon-card);
    box-shadow: 0 0 0 1px var(--mon-line);
    color: var(--mon-muted);
}

.mon-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    height: 100%;
    padding: 1rem 1rem 0.875rem;
    border-radius: 0.875rem;
    background: var(--mon-card);
    box-shadow: 0 0 0 1px var(--mon-line);
    color: var(--mon-text);
    transition: box-shadow 150ms ease, transform 150ms ease;
}

.mon-tile:hover {
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.45), 0 6px 18px -10px rgba(11, 15, 25, 0.35);
}

.mon-tile:focus-visible {
    outline: 2px solid var(--mon-blue);
    outline-offset: 2px;
}

/* A failing web gets a red edge, so it is found without reading. */
.mon-tile-failed {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.55);
}

.mon-tile-failed::before,
.mon-tile-warning::before {
    content: '';
    position: absolute;
    inset-block: 0.875rem;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--mon-failed);
}

.mon-tile-warning::before {
    background: var(--mon-warning);
}

.mon-tile-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 0.5rem;
}

.mon-tile-name {
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mon-tile-host {
    grid-column: 2;
    overflow: hidden;
    font-family: var(--mon-mono);
    font-size: 0.75rem;
    color: var(--mon-muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mon-tile-signals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: 0.5rem;
    background: var(--mon-line);
    box-shadow: 0 0 0 1px var(--mon-line);
}

.mon-signal {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.4rem 0.5rem 0.45rem;
    background: var(--mon-card);
    box-shadow: inset 0 2px 0 var(--mon-signal, transparent);
}

.mon-signal-ok { --mon-signal: var(--mon-ok); }
.mon-signal-warning { --mon-signal: var(--mon-warning); }
.mon-signal-failed { --mon-signal: var(--mon-failed); }
.mon-signal-unknown { --mon-signal: var(--mon-unknown); }

.mon-signal-name {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mon-muted);
}

.mon-signal-value {
    overflow: hidden;
    font-family: var(--mon-mono);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mon-signal-failed .mon-signal-value { color: var(--mon-failed); font-weight: 600; }
.mon-signal-none .mon-signal-value { color: var(--mon-muted); }

.mon-tile-incident {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: -0.25rem;
    font-size: 0.8125rem;
    color: #b91c1c;
}

.dark .mon-tile-incident { color: #fca5a5; }

.mon-tile-incident-type { font-weight: 600; }

.mon-tile-incident-time {
    font-family: var(--mon-mono);
    font-size: 0.75rem;
}

/* --- Profile: passkeys locked behind a fresh password -------------------- */

.mon-locked {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: var(--mon-muted);
}

.mon-locked p { max-width: 36rem; }

/* --- Sign-in: split layout ----------------------------------------------- */

/* SimplePage would centre a narrow card; on the auth pages it steps aside. */
.fi-simple-layout:has(.mon-auth) { padding: 0; }
.fi-simple-layout:has(.mon-auth) .fi-simple-layout-header { display: none; }

.fi-simple-layout:has(.mon-auth) .fi-simple-main-ctn,
.fi-simple-layout:has(.mon-auth) .fi-simple-main {
    max-width: none;
    width: 100%;
    min-width: 0;
    /* The margin carries the gap below the hidden header, padding is not enough. */
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
}

.fi-simple-layout:has(.mon-auth) .fi-simple-header { display: none; }

.mon-auth {
    display: flex;
    min-height: 100dvh;
    background: var(--mon-card);
}

.mon-auth-form-side {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem 5rem;
}

.mon-auth-form {
    width: 100%;
    max-width: 23rem;
}

.mon-auth-form-header {
    margin-bottom: 2rem;
}

.mon-auth-form-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 2.25rem;
    font-size: 1.0625rem;
    font-weight: 650;
    letter-spacing: -0.015em;
    color: var(--mon-text);
}

.mon-auth-form-brand img { height: 1.5rem; width: auto; }

.mon-mark-dark { display: none; }
.dark .mon-mark-light { display: none; }
.dark .mon-mark-dark { display: block; }

.mon-auth-heading {
    font-size: 1.875rem;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--mon-text);
}

.mon-auth-subheading {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--mon-muted);
}

/* Passkey first, password below a divider. */
.mon-passkey {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.mon-passkey-btn { width: 100%; }

.mon-passkey-error {
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.08);
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #b91c1c;
}

.dark .mon-passkey-error { color: #fca5a5; background: rgba(239, 68, 68, 0.14); }

.mon-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0 0.5rem;
    font-size: 0.75rem;
    color: var(--mon-muted);
}

.mon-divider::before,
.mon-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mon-line);
}

/* Monolabs signature, also visible on phones. */
.mon-signature {
    position: absolute;
    bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mon-signature-by {
    font-size: 0.75rem;
    color: #9ca3af;
    transition: color 150ms ease;
}

.mon-signature:hover .mon-signature-by { color: #6b7280; }

.mon-signature-code {
    display: inline-flex;
    align-items: baseline;
    gap: 0.125rem;
    font-family: var(--mon-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.mon-signature-bracket {
    color: var(--mon-blue);
    transition: color 150ms ease;
}

.mon-signature:hover .mon-signature-bracket { color: #60a5fa; }

.mon-signature-name {
    position: relative;
    color: var(--mon-text);
}

.mon-signature-name::after {
    content: '';
    position: absolute;
    bottom: -0.125rem;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--mon-blue);
    transition: width 300ms ease;
}

.mon-signature:hover .mon-signature-name::after { width: 100%; }

/* Brand panel: ink in dark mode, paper in light mode (overrides further below). */
.mon-auth-brand-side {
    position: relative;
    display: none;
    flex: 1.15 1 0;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem 3rem;
    overflow: hidden;
    background:
        radial-gradient(60% 45% at 62% 58%, rgba(37, 99, 235, 0.22), transparent 70%),
        var(--mon-ink);
    color: #e2e8f0;
    box-shadow: inset 1px 0 0 var(--mon-ink-line);
    isolation: isolate;
}

@media (min-width: 1024px) {
    .mon-auth-brand-side { display: flex; }

    /* Must beat `.dark .mon-mark-dark`, or the mark stays above the form in dark mode. */
    .mon-auth .mon-auth-form-brand,
    .dark .mon-auth .mon-auth-form-brand { display: none; }
}

.mon-auth-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.mon-auth-grid-v,
.mon-auth-grid-h {
    position: absolute;
    background: rgba(255, 255, 255, 0.06);
}

.mon-auth-grid-v { top: 0; bottom: 0; width: 1px; }
.mon-auth-grid-h { left: 0; right: 0; height: 1px; }

/* The mark as a mask, larger than the panel (cover, not contain), so it reads as texture, not a second logo. */
.mon-auth-watermark {
    position: absolute;
    left: -30%;
    top: -18%;
    z-index: -1;
    width: 175%;
    height: 135%;
    transform: rotate(-12deg);
    background-color: #ffffff;
    -webkit-mask-image: var(--mon-auth-mark);
    mask-image: var(--mon-auth-mark);
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    opacity: 0.035;
    pointer-events: none;
    user-select: none;
}

.mon-auth-top-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.5rem;
    font-weight: 650;
    letter-spacing: -0.025em;
    color: #ffffff;
}

.mon-auth-top-brand img { height: 1.75rem; width: auto; }

/* The trace: the M of the mark as a heartbeat, drawn once, then the dot breathes. */
.mon-trace {
    position: absolute;
    left: 0;
    right: 0;
    top: 31%;
    height: 38%;
}

.mon-trace-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.mon-trace-line {
    filter: drop-shadow(0 0 6px rgba(147, 197, 253, 0.45));
}

/* Revealed left to right by a clip, not a dash offset: dashes and
   non-scaling strokes do not mix in Chrome. */
.mon-trace-svg {
    animation: mon-trace-draw 2.2s cubic-bezier(0.65, 0, 0.35, 1) both;
}

@keyframes mon-trace-draw {
    from { clip-path: inset(-20% 100% -20% 0); }
    to { clip-path: inset(-20% 0 -20% 0); }
}

.mon-trace-dot {
    position: absolute;
    left: 90.8%;
    top: 63.33%;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 999px;
    background: var(--mon-blue);
    box-shadow: 0 0 24px rgba(37, 99, 235, 0.85);
    transform: translate(-50%, -50%);
    animation: mon-dot-in 400ms 2s ease-out both;
}

.mon-trace-ring {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid var(--mon-blue-soft);
    animation: mon-ring 2.4s 2.4s ease-out infinite;
    opacity: 0;
}

@keyframes mon-dot-in {
    from { transform: translate(-50%, -50%) scale(0); }
    to { transform: translate(-50%, -50%) scale(1); }
}

@keyframes mon-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.2); opacity: 0; }
}

/* Trace colours, overridden for the light panel. */
.mon-trace-stop-start { stop-color: #93c5fd; stop-opacity: 0; }
.mon-trace-stop-mid { stop-color: #93c5fd; stop-opacity: 0.55; }
.mon-trace-stop-end { stop-color: #ffffff; stop-opacity: 1; }

/* The four signals along the bottom of the panel. */
.mon-auth-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    margin-top: auto;
    font-family: var(--mon-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.62);
}

.mon-auth-signals li {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mon-auth-signals .mon-dot { animation: none; }

/* --- Light brand panel (the default theme) --------------------------------- */

html:not(.dark) .mon-auth-brand-side {
    background:
        radial-gradient(55% 42% at 64% 58%, rgba(37, 99, 235, 0.13), transparent 72%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--mon-text);
    box-shadow: inset 1px 0 0 var(--mon-line);
}

html:not(.dark) .mon-auth-grid-v,
html:not(.dark) .mon-auth-grid-h { background: rgba(11, 15, 25, 0.055); }

html:not(.dark) .mon-auth-watermark {
    background-color: var(--mon-ink);
    opacity: 0.03;
}

html:not(.dark) .mon-auth-top-brand { color: var(--mon-ink); }

html:not(.dark) .mon-trace-stop-start { stop-color: #93c5fd; stop-opacity: 0; }
html:not(.dark) .mon-trace-stop-mid { stop-color: #60a5fa; stop-opacity: 0.6; }
html:not(.dark) .mon-trace-stop-end { stop-color: var(--mon-ink); stop-opacity: 1; }

html:not(.dark) .mon-trace-line { filter: drop-shadow(0 6px 10px rgba(37, 99, 235, 0.18)); }

html:not(.dark) .mon-trace-dot { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12), 0 6px 18px rgba(37, 99, 235, 0.45); }

html:not(.dark) .mon-trace-ring { border-color: var(--mon-blue); }

html:not(.dark) .mon-auth-signals { color: var(--mon-muted); }

@media (prefers-reduced-motion: reduce) {
    .mon-dot-failed,
    .mon-trace-svg,
    .mon-trace-dot,
    .mon-trace-ring {
        animation: none;
    }

    .mon-trace-ring { display: none; }
}

/* ------------------------------------------------------------------ */
/* Dependencies: severity chips, also used on the board tiles          */
/* ------------------------------------------------------------------ */

.mon-sev-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
}

.mon-sev {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    line-height: 1.25rem;
    white-space: nowrap;
    color: var(--mon-muted);
    box-shadow: inset 0 0 0 1px var(--mon-line);
}

.mon-sev-count {
    font-family: var(--mon-mono);
    font-weight: 600;
    color: var(--mon-text);
}

.mon-sev-critical {
    background: var(--mon-failed);
    color: #fff;
    box-shadow: none;
}

.mon-sev-critical .mon-sev-count { color: #fff; }

.mon-sev-high {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.35);
}

.mon-sev-high .mon-sev-count { color: #b91c1c; }

.mon-sev-medium {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.mon-sev-medium .mon-sev-count { color: #b45309; }

.dark .mon-sev-high,
.dark .mon-sev-high .mon-sev-count { color: #fca5a5; }

.dark .mon-sev-medium,
.dark .mon-sev-medium .mon-sev-count { color: #fcd34d; }

.mon-sev-clean {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.dark .mon-sev-clean { color: #6ee7b7; }

.mon-sev-none {
    font-size: 0.8125rem;
    color: var(--mon-muted);
}

.mon-dependencies-note {
    font-size: 0.8125rem;
    color: var(--mon-muted);
}

.mon-dependencies-note code {
    font-family: var(--mon-mono);
    font-size: 0.75rem;
}

/* Board tile: one row with the open vulnerabilities under the signals. */
.mon-tile-deps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--mon-muted);
}

.mon-tile-deps-label {
    margin-right: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.6875rem;
}

/* Project detail: compact table of key and vulnerable packages. */
.mon-pkg-wrap {
    overflow-x: auto;
    border-radius: 0.75rem;
    box-shadow: 0 0 0 1px var(--mon-line);
}

.mon-pkg {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.mon-pkg th {
    padding: 0.5rem 0.875rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mon-muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--mon-line);
}

.mon-pkg td {
    padding: 0.5rem 0.875rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--mon-line);
    color: var(--mon-text);
}

.mon-pkg tbody tr:last-child td { border-bottom: 0; }

.mon-pkg-vulnerable td:first-child { box-shadow: inset 3px 0 0 var(--mon-failed); }

.mon-pkg-name {
    margin-right: 0.5rem;
    font-weight: 500;
}

.mon-pkg-ver {
    font-family: var(--mon-mono);
    white-space: nowrap;
}

.mon-pkg-fix { font-weight: 600; }

.mon-pkg-empty { color: var(--mon-muted); }
