/* ============================================================
   Components — Alert badges, satellite status tags, mini charts
   ============================================================ */

/* ── Satellite Source Tag ─────────────────────────────────── */
.sat-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
}

.sat-tag.s2 {
    background: rgba(120,190,120,0.10);
    border: 1px solid rgba(120,190,120,0.22);
    color: rgb(120,190,120);
}

.sat-tag.s1 {
    background: rgba(215,175,95,0.10);
    border: 1px solid rgba(215,175,95,0.22);
    color: rgb(215,175,95);
}

/* ── Alert severity badge ─────────────────────────────────── */
.alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.alert-badge.suppression  { background: rgba(231,76,60,0.15);  border: 1px solid rgba(231,76,60,0.3);  color: rgb(231,76,60); }
.alert-badge.degradation  { background: rgba(230,126,34,0.15); border: 1px solid rgba(230,126,34,0.3); color: rgb(230,126,34); }
.alert-badge.stress       { background: rgba(215,175,95,0.15); border: 1px solid rgba(215,175,95,0.3); color: rgb(215,175,95); }
.alert-badge.anomaly      { background: rgba(160,130,220,0.15);border: 1px solid rgba(160,130,220,0.3);color: rgb(160,130,220); }

/* ── Progress bar (for SMA fractions) ────────────────────── */
.sma-bar-container {
    width: 100%;
    margin-top: 3px;
}

.sma-bar-track {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.sma-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.sma-bar-fill.gv    { background: rgb(120,190,120); }
.sma-bar-fill.shade { background: rgb(110,160,230); }
.sma-bar-fill.soil  { background: rgba(255,255,255,0.3); }
.sma-bar-fill.npv   { background: rgba(255,255,255,0.15); }

/* ── Divider ──────────────────────────────────────────────── */
.panel-divider {
    height: 1px;
    background: var(--border);
    margin: 0;
}

/* ── Tooltip (custom) ─────────────────────────────────────── */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 9999;
}

/* ── Skeleton loading ─────────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── Navbar User Section & Links ─────────────────────────── */
.navbar-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 12px;
    font-size: 11px;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
}

.navbar-user-info .user-name {
    color: var(--text-primary);
    font-weight: 500;
}

.navbar-user-info .user-role {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.navbar-user-info .user-role.admin { color: #e74c3c; }
.navbar-user-info .user-role.tech { color: rgb(215,175,95); }
.navbar-user-info .user-role.viewer { color: rgb(110,160,230); }

.nav-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    color: var(--text-primary);
    transition: var(--transition);
    margin-right: 10px;
}

.nav-action-link:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}

.nav-action-link.logout {
    color: #e74c3c;
    border-color: rgba(231,76,60,0.15);
    background: rgba(231,76,60,0.05);
}

.nav-action-link.logout:hover {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.3);
}