/* A.R.G.U.S. TRACE — desktop alert & sys monitor (flat, site style) */

:root {
    --at-red: #e8192c;
    --at-red-dim: #8b0f18;
    --at-gold: #ffc857;
    --at-cyan: #4ee6ff;
    --at-bg: #0a0406;
    --at-panel: #120608;
    --at-border: rgba(232, 25, 44, 0.28);
    --at-text: #f4e8ea;
    --at-muted: #8a6b70;
}

/* Desktop trace widget */
.argus-trace-widget {
    --at-level: var(--at-gold);
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 32px));
    z-index: 1200;
    border: 1px solid var(--at-border);
    background: var(--at-bg);
    font-family: 'JetBrains Mono', 'Ubuntu Mono', monospace;
    font-size: 11px;
    color: var(--at-text);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    display: none;
    flex-direction: column;
}

.argus-trace-widget.is-visible {
    display: flex;
}

.argus-trace-widget__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    padding: 0 10px 0 12px;
    background: #1a0508;
    border-bottom: 1px solid var(--at-border);
    user-select: none;
}

.argus-trace-widget__code {
    font: 700 10px/1 'Orbitron', sans-serif;
    letter-spacing: 0.14em;
    color: var(--at-red);
    text-transform: uppercase;
}

.argus-trace-widget__status {
    margin-left: auto;
    padding: 2px 8px;
    font: 700 9px/1 'Orbitron', sans-serif;
    letter-spacing: 0.08em;
    color: var(--at-level);
    border: 1px solid color-mix(in srgb, var(--at-level) 40%, transparent);
    background: color-mix(in srgb, var(--at-level) 8%, transparent);
}

.argus-trace-widget__dismiss {
    width: 26px;
    height: 26px;
    border: 1px solid var(--at-border);
    background: transparent;
    color: var(--at-muted);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.argus-trace-widget__dismiss:hover {
    color: var(--at-text);
    border-color: var(--at-red);
}

.argus-trace-widget__body {
    padding: 10px 12px 12px;
    display: grid;
    gap: 8px;
}

.argus-trace-widget__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.argus-trace-widget__label {
    color: var(--at-muted);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.argus-trace-widget__value {
    font: 700 18px/1 'Orbitron', sans-serif;
    color: var(--at-level);
}

.argus-trace-widget__bar {
    height: 6px;
    background: #1a0a0c;
    border: 1px solid var(--at-border);
}

.argus-trace-widget__bar > i {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--at-level);
    transition: width 0.45s ease;
}

.argus-trace-widget__hint {
    margin: 0;
    color: var(--at-muted);
    font-size: 10px;
    line-height: 1.45;
}

/* Severity levels */
.argus-trace-widget--watch {
    --at-level: var(--at-gold);
}

.argus-trace-widget--elevated {
    --at-level: #ff8c42;
}

.argus-trace-widget--critical {
    --at-level: var(--at-red);
}

.argus-trace-widget--critical .argus-trace-widget__bar > i {
    animation: atBarPulse 1.8s ease-in-out infinite;
}

@keyframes atBarPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

/* Sys monitor panel (win-sys) */
.argus-trace-panel {
    border: 1px solid var(--at-border);
    background: var(--at-panel);
    padding: 10px;
}

.argus-trace-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font: 700 10px/1 'Orbitron', sans-serif;
    letter-spacing: 0.1em;
    color: var(--at-red);
    text-transform: uppercase;
}

.argus-trace-panel__val {
    color: var(--at-gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.argus-trace-panel__bar {
    height: 6px;
    background: #1a0a0c;
    border: 1px solid var(--at-border);
    overflow: hidden;
}

.argus-trace-panel__bar > i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--at-red-dim), var(--at-red));
    transition: width 0.5s ease;
}

/* Toast variant */
.toast-argus {
    --toast-color: var(--at-red);
    --toast-color-rgb: 232, 25, 44;
    border-left: 3px solid var(--at-red);
}

.toast-argus .toast-title {
    color: var(--at-red);
    text-shadow: none;
}

.toast-argus .toast-desc {
    color: #ddd;
}

.toast-argus .toast-icon {
    color: var(--at-gold);
    font-size: 14px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}
