:root {
    --nx-bg: #050b14;
    --nx-bg-2: #07111f;
    --nx-panel: rgba(9, 23, 40, .86);
    --nx-panel-2: rgba(11, 31, 53, .72);
    --nx-line: rgba(103, 232, 249, .14);
    --nx-line-strong: rgba(103, 232, 249, .3);
    --nx-text: #e6f2ff;
    --nx-muted: #8aa4be;
    --nx-cyan: #22d3ee;
    --nx-cyan-soft: #67e8f9;
    --nx-green: #22c55e;
    --nx-amber: #f59e0b;
    --nx-orange: #fb923c;
    --nx-red: #ef4444;
    --nx-violet: #a78bfa;
    --nx-radius: 16px;
    --nx-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
.nx-body {
    margin: 0;
    background:
        radial-gradient(1100px 620px at 78% -10%, rgba(34, 211, 238, .12), transparent 60%),
        radial-gradient(900px 600px at -10% 30%, rgba(167, 139, 250, .08), transparent 55%),
        linear-gradient(180deg, #050b14, #06101d 55%, #050b14);
    color: var(--nx-text);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.nx-shell { max-width: 1560px; margin: 0 auto; padding: 0 20px; }

.nx-topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 14px 0; margin-bottom: 10px;
    background: rgba(5, 11, 20, .8);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--nx-line);
}
.nx-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nx-brand img { filter: drop-shadow(0 0 14px rgba(34, 211, 238, .35)); }
.nx-wordmark { font-weight: 900; letter-spacing: .22em; font-size: 15px; color: #f5fbff; }
.nx-demo-pill {
    font-size: 9px; font-weight: 900; letter-spacing: .14em; padding: 3px 7px;
    border-radius: 999px; color: #04121f; background: var(--nx-amber);
}
.nx-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: 10px; }
.nx-nav a {
    padding: 8px 11px; border-radius: 999px; text-decoration: none;
    color: #a9c3db; font-size: 12px; font-weight: 700;
    border: 1px solid transparent;
}
.nx-nav a:hover { color: #eaf8ff; background: rgba(34, 211, 238, .07); }
.nx-nav a.active { color: #04121f; background: linear-gradient(135deg, #67e8f9, #22d3ee); }
.nx-top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 12px; }
.nx-workspace { color: #c7e5f5; font-weight: 700; }
.nx-user { color: var(--nx-muted); }
.nx-ghost-link { color: var(--nx-muted); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.nx-ghost-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.nx-main { padding: 18px 0 34px; }
.nx-footer {
    display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between;
    padding: 18px 0 26px; color: #5f7892; font-size: 11px;
    border-top: 1px solid var(--nx-line);
}

.nx-hero {
    display: flex; justify-content: space-between; gap: 24px; align-items: flex-end;
    padding: 28px 28px 24px; margin: 6px 0 18px;
    border: 1px solid var(--nx-line); border-radius: 22px;
    background:
        radial-gradient(700px 260px at 82% 10%, rgba(34, 211, 238, .16), transparent 60%),
        linear-gradient(160deg, rgba(10, 28, 48, .95), rgba(6, 16, 30, .92));
    box-shadow: var(--nx-shadow);
    overflow: hidden; position: relative;
}
.nx-hero:after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(90deg, transparent 0 39px, rgba(103, 232, 249, .025) 39px 40px);
}
.nx-hero-compact { padding: 22px 24px; }
.nx-hero-copy { max-width: 820px; position: relative; z-index: 1; }
.nx-kicker { color: var(--nx-cyan-soft); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nx-hero h1 { margin: 8px 0 8px; font-size: clamp(30px, 4vw, 54px); line-height: 1.02; letter-spacing: -.035em; }
.nx-hero-compact h1 { font-size: clamp(26px, 3vw, 38px); }
.nx-hero p { margin: 0; color: #a7c1d9; max-width: 760px; line-height: 1.55; }
.nx-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.nx-demo-note { color: #7f9bb5; font-size: 11px; }

.nx-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 14px; border-radius: 10px; border: 1px solid var(--nx-line-strong);
    background: rgba(8, 26, 44, .9); color: #e9f9ff; font-weight: 800; font-size: 12px;
    cursor: pointer; text-decoration: none;
}
.nx-button:hover { border-color: var(--nx-cyan); background: rgba(34, 211, 238, .12); }
.nx-button-primary { background: linear-gradient(135deg, #67e8f9, #22d3ee); color: #04121f; border-color: transparent; }
.nx-button-primary:hover { filter: brightness(1.05); background: linear-gradient(135deg, #67e8f9, #22d3ee); }
.nx-button-ghost { background: rgba(255, 255, 255, .03); }

.nx-metrics {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px;
    margin-bottom: 16px;
}
.nx-metric {
    border: 1px solid var(--nx-line); border-radius: 14px; padding: 13px 14px;
    background: linear-gradient(180deg, rgba(10, 28, 48, .72), rgba(6, 16, 30, .6));
}
.nx-metric span { display: block; color: var(--nx-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.nx-metric strong { display: block; font-size: 26px; line-height: 1.1; margin: 6px 0 2px; }
.nx-metric em { color: #6f8aa4; font-size: 10px; font-style: normal; }

.nx-toolbar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 10px; margin-bottom: 16px;
    border: 1px solid var(--nx-line); border-radius: 14px;
    background: rgba(7, 19, 34, .72);
}
.nx-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .03); }
.nx-tabs button {
    border: 0; background: transparent; color: #8faac4; font-weight: 800; font-size: 11px;
    padding: 8px 12px; border-radius: 999px; cursor: pointer;
}
.nx-tabs button.active { color: #04121f; background: linear-gradient(135deg, #67e8f9, #22d3ee); }
.nx-toolbar-right { display: flex; gap: 8px; margin-left: auto; }
.nx-input {
    padding: 9px 11px; border-radius: 9px; border: 1px solid var(--nx-line-strong);
    background: #071426; color: var(--nx-text); font-size: 12px; outline: none;
}
.nx-input:focus { border-color: var(--nx-cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }
.nx-select { min-width: 140px; }

.nx-radar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.nx-panel {
    border: 1px solid var(--nx-line); border-radius: var(--nx-radius);
    background: linear-gradient(180deg, rgba(10, 28, 48, .8), rgba(6, 16, 30, .72));
    box-shadow: var(--nx-shadow); padding: 16px; min-width: 0;
}
.nx-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.nx-panel-head h2 { margin: 2px 0 0; font-size: 18px; letter-spacing: -.02em; }
.nx-eyebrow { color: var(--nx-cyan-soft); text-transform: uppercase; letter-spacing: .15em; font-size: 9px; font-weight: 900; }
.nx-count { color: #6f8aa4; font-size: 11px; }
.nx-radar-panel { overflow: hidden; }
.nx-radar-wrap { position: relative; display: flex; justify-content: center; padding: 4px 0; }
#nx-radar { width: 100%; max-width: 760px; height: auto; display: block; }
.nx-radar-tooltip {
    position: absolute; z-index: 5; pointer-events: none; max-width: 240px;
    background: #071426; border: 1px solid var(--nx-line-strong); border-radius: 9px;
    padding: 8px 10px; font-size: 11px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.nx-radar-tooltip strong { display: block; color: #fff; }
.nx-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; color: #7f9bb5; font-size: 10px; }
.nx-legend span { display: inline-flex; align-items: center; gap: 5px; }
.nx-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.nx-top-panel { min-height: 420px; }
.nx-top-risks { display: grid; gap: 6px; }
.nx-risk-row {
    display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 9px;
    padding: 9px 8px; border-radius: 9px; text-decoration: none; color: inherit;
    border: 1px solid transparent;
}
.nx-risk-row:hover { background: rgba(34, 211, 238, .06); border-color: var(--nx-line); }
.nx-risk-row strong { display: block; font-size: 12px; }
.nx-risk-row small { display: block; color: #7590aa; font-size: 10px; margin-top: 2px; }
.nx-risk-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.nx-badge {
    display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px;
    font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em;
}
.nx-badge-low { background: rgba(34, 197, 94, .16); color: #86efac; }
.nx-badge-moderate { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.nx-badge-high { background: rgba(251, 146, 60, .16); color: #fdba74; }
.nx-badge-critical { background: rgba(239, 68, 68, .18); color: #fca5a5; }

.nx-view-panel { margin-top: 16px; }
.nx-table-wrap { overflow: auto; border-radius: 10px; border: 1px solid var(--nx-line); }
.nx-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.nx-table th {
    position: sticky; top: 0; z-index: 1; text-align: left; padding: 9px 10px;
    color: #7f9bb5; background: #081a2d; text-transform: uppercase; letter-spacing: .08em; font-size: 9px;
}
.nx-table td { padding: 9px 10px; border-top: 1px solid rgba(103, 232, 249, .08); vertical-align: middle; }
.nx-table tr:hover td { background: rgba(34, 211, 238, .035); }
.nx-table a { color: #b9ecf8; text-decoration: none; }
.nx-table a:hover { text-decoration: underline; }
.nx-cell { border-radius: 6px; text-align: center; font-weight: 800; }
.nx-status { display: inline-flex; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.nx-status.ok { background: rgba(34, 197, 94, .14); color: #86efac; }
.nx-status.bad { background: rgba(239, 68, 68, .14); color: #fca5a5; }
.nx-status.warn { background: rgba(245, 158, 11, .14); color: #fcd34d; }

.nx-orbit-wrap { position: relative; min-height: 560px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, .08), transparent 60%), #040b15; }
#nx-orbit { width: 100%; height: 560px; }
.nx-orbit-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--nx-muted); }

.nx-drawer { position: fixed; inset: 0; z-index: 60; }
.nx-drawer[hidden] { display: none; }
.nx-drawer-backdrop { position: absolute; inset: 0; background: rgba(1, 6, 12, .72); backdrop-filter: blur(4px); }
.nx-drawer-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%);
    overflow: auto; padding: 22px; background: #071426; border-left: 1px solid var(--nx-line-strong);
    box-shadow: -30px 0 80px rgba(0, 0, 0, .5);
}
.nx-drawer-close {
    position: sticky; top: 0; float: right; border: 1px solid var(--nx-line); background: #0a1d33;
    color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer;
}
.nx-drawer h2 { margin: 4px 0 4px; font-size: 24px; letter-spacing: -.03em; }
.nx-drawer .nx-muted { line-height: 1.5; }
.nx-drawer-section { margin-top: 18px; }
.nx-drawer-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #7f9bb5; margin: 0 0 8px; }
.nx-finding { padding: 9px 0; border-top: 1px solid var(--nx-line); }
.nx-finding strong { display: block; font-size: 12px; }
.nx-finding span { color: #7f9bb5; font-size: 11px; }
.nx-domain-bars { display: grid; gap: 7px; }
.nx-domain-bar { height: 6px; background: rgba(255, 255, 255, .06); border-radius: 999px; overflow: hidden; }
.nx-domain-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #a78bfa); border-radius: inherit; }

.nx-two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; margin-bottom: 16px; }
.nx-domain-list { display: grid; gap: 10px; }
.nx-domain-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 28px; gap: 10px; align-items: center; font-size: 11px; color: #a7c1d9; }
.nx-domain-row b { color: #dff8ff; text-align: right; }
.nx-note-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nx-note-grid > div { padding: 12px; border: 1px solid var(--nx-line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.nx-note-grid strong { display: block; font-size: 24px; }
.nx-note-grid span { color: var(--nx-muted); font-size: 10px; }
.nx-muted { color: var(--nx-muted); }
.nx-text-critical { color: #fca5a5 !important; }
.nx-text-high { color: #fdba74 !important; }
.nx-text-warn { color: #fcd34d !important; }
.nx-text-low { color: #86efac !important; }

.nx-login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.nx-login-wrap { width: min(440px, 100%); }
.nx-login-card { padding: 28px; border: 1px solid var(--nx-line); border-radius: 20px; background: linear-gradient(180deg, rgba(10, 28, 48, .95), rgba(6, 16, 30, .95)); box-shadow: var(--nx-shadow); }
.nx-login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.nx-login-brand strong { display: block; letter-spacing: .2em; font-size: 14px; }
.nx-login-brand span { display: block; color: var(--nx-muted); font-size: 11px; }
.nx-login-card h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.03em; }
.nx-login-card label { display: block; margin: 12px 0; color: #a7c1d9; font-size: 11px; font-weight: 700; }
.nx-login-card input {
    display: block; width: 100%; margin-top: 5px; padding: 10px 11px; border-radius: 9px;
    border: 1px solid var(--nx-line-strong); background: #061221; color: #fff; outline: none;
}
.nx-login-card input:focus { border-color: var(--nx-cyan); }
.nx-login-card .nx-button { width: 100%; margin-top: 8px; }
.nx-login-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: 11px; }
.nx-login-links a { color: #7f9bb5; }
.nx-alert { padding: 9px 11px; border-radius: 9px; background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .3); color: #fca5a5; font-size: 12px; margin: 10px 0; }

/* Radar SVG */
.nx-ring { fill: none; stroke: rgba(103, 232, 249, .12); stroke-width: 1; }
.nx-ring-label { fill: #5f7892; font-size: 10px; font-weight: 700; }
.nx-sector { stroke: rgba(103, 232, 249, .08); stroke-width: 1; }
.nx-sector-label { fill: #7f9bb5; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.nx-axis { stroke: rgba(103, 232, 249, .1); stroke-width: 1; }
.nx-sweep { transform-origin: 360px 360px; animation: nxSweep 9s linear infinite; }
.nx-sweep-line { stroke: url(#nxSweepGradient); stroke-width: 2; }
.nx-center { fill: rgba(5, 11, 20, .9); stroke: rgba(103, 232, 249, .5); stroke-width: 1.5; }
.nx-center-text { fill: #e6f2ff; font-size: 30px; font-weight: 900; text-anchor: middle; }
.nx-center-sub { fill: #7f9bb5; font-size: 9px; text-anchor: middle; letter-spacing: .12em; }
.nx-blip { cursor: pointer; outline: none; }
.nx-blip circle { transition: r .2s ease, opacity .2s ease; }
.nx-blip:hover circle, .nx-blip:focus circle { r: 12; opacity: 1; }
.nx-blip-label { fill: #bcd9eb; font-size: 9px; font-weight: 700; pointer-events: none; }
.nx-blip-pulse { fill: none; stroke-width: 1.5; opacity: .65; animation: nxPulse 2.2s ease-out infinite; transform-origin: center; }
@keyframes nxSweep { to { transform: rotate(360deg); } }
@keyframes nxPulse { 0% { r: 8; opacity: .65; } 100% { r: 22; opacity: 0; } }

@media (max-width: 1180px) {
    .nx-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .nx-radar-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
    .nx-radar-layout, .nx-two-col { grid-template-columns: 1fr; }
    .nx-note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nx-top-panel { min-height: 0; }
    .nx-hero { align-items: flex-start; flex-direction: column; }
    .nx-toolbar-right { width: 100%; margin-left: 0; }
    .nx-input { flex: 1; }
}
@media (max-width: 620px) {
    .nx-shell { padding: 0 12px; }
    .nx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nx-topbar { gap: 10px; }
    .nx-nav { order: 3; width: 100%; margin-left: 0; }
    .nx-top-actions { margin-left: auto; }
    .nx-hero { padding: 20px 18px; }
    .nx-hero h1 { font-size: 32px; }
    .nx-domain-row { grid-template-columns: 110px minmax(0, 1fr) 24px; }
    #nx-orbit { height: 420px; }
    .nx-orbit-wrap { min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) {
    .nx-sweep, .nx-blip-pulse { animation: none; }
    .nx-blip circle { transition: none; }
}
