:root {
  --bg: #07100f;
  --bg-soft: #0a1513;
  --panel: rgba(13, 27, 24, .82);
  --panel-solid: #0d1b18;
  --line: rgba(163, 196, 183, .14);
  --line-strong: rgba(163, 196, 183, .28);
  --text: #e7eee9;
  --muted: #859790;
  --faint: #566660;
  --signal: #9ae06f;
  --cyan: #5bd5c3;
  --amber: #e3c462;
  --danger: #f07167;
  --black: #030706;
  --shadow: 0 22px 80px rgba(0, 0, 0, .36);
  color-scheme: dark;
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 12% 0%, rgba(91, 213, 195, .07), transparent 28%), radial-gradient(circle at 88% 10%, rgba(154, 224, 111, .05), transparent 30%), var(--bg); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.is-hidden { display: none !important; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 100; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }

/* Login */
.login-screen { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; background: #050a09; }
.login-screen::before { content: ""; position: absolute; width: 720px; height: 720px; border: 1px solid rgba(154, 224, 111, .1); border-radius: 50%; box-shadow: 0 0 120px rgba(91, 213, 195, .06), inset 0 0 120px rgba(91, 213, 195, .03); }
.login-screen::after { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid rgba(154, 224, 111, .12); border-radius: 50%; animation: loginPulse 4s ease-in-out infinite; }
.login-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(154, 224, 111, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(154, 224, 111, .035) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle, black, transparent 70%); }
.login-panel { z-index: 1; width: min(430px, calc(100vw - 40px)); padding: 46px; border: 1px solid var(--line-strong); background: rgba(7, 16, 15, .9); box-shadow: var(--shadow); backdrop-filter: blur(18px); position: relative; }
.login-panel::before, .login-panel::after { content: ""; position: absolute; width: 22px; height: 22px; border-color: var(--signal); opacity: .7; }
.login-panel::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.login-panel::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.brand-mark { width: 32px; height: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; transform: skew(-8deg); }
.brand-mark span { background: var(--signal); }
.brand-mark span:nth-child(2) { opacity: .58; }
.brand-mark span:nth-child(3) { opacity: .22; }
.brand-mark.large { width: 42px; height: 42px; margin-bottom: 42px; }
.eyebrow, .kicker { margin: 0; color: var(--signal); font-size: 10px; letter-spacing: .2em; font-weight: 700; }
.login-panel h1 { margin: 8px 0 0; font-size: clamp(42px, 8vw, 58px); line-height: .95; letter-spacing: -.04em; font-weight: 780; }
.login-copy { color: var(--muted); margin: 14px 0 38px; font-size: 14px; }
.login-form label { display: block; color: var(--faint); font-size: 10px; letter-spacing: .18em; margin-bottom: 9px; font-weight: 700; }
.password-row { display: grid; grid-template-columns: 1fr auto; }
.password-row input { min-width: 0; border: 1px solid var(--line-strong); border-right: 0; background: #091310; color: var(--text); padding: 14px; }
.password-row button, .tool-form button, .refresh-button { border: 1px solid var(--signal); background: var(--signal); color: #07100f; font-weight: 750; cursor: pointer; padding: 0 20px; transition: .2s ease; }
.password-row button:hover, .tool-form button:hover, .refresh-button:hover { background: #b4ee8f; }
.form-error { height: 18px; color: var(--danger); font-size: 12px; margin: 9px 0 0; }
.login-meta { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 14px; color: var(--faint); font-family: Consolas, monospace; font-size: 9px; letter-spacing: .1em; }
.live-dot { color: var(--signal); }
.live-dot::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); margin-right: 6px; box-shadow: 0 0 10px var(--signal); }
@keyframes loginPulse { 50% { transform: scale(1.05); opacity: .4; } }

/* Shell */
.app-shell { min-height: 100vh; }
.topbar { height: 74px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(7, 16, 15, .9); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .08em; line-height: 1; }
.brand small { display: block; margin-top: 7px; color: var(--faint); font-family: Consolas, monospace; font-size: 8px; letter-spacing: .17em; }
.primary-nav { display: flex; height: 100%; }
.nav-item { min-width: 140px; padding: 0 25px; border: 0; border-left: 1px solid transparent; border-right: 1px solid transparent; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; transition: .2s ease; }
.nav-item span { font-family: Consolas, monospace; font-size: 9px; margin-right: 10px; color: var(--faint); }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.015); }
.nav-item.is-active { color: var(--signal); border-left-color: var(--line); border-right-color: var(--line); border-bottom-color: var(--signal); background: rgba(154, 224, 111, .035); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 13px; }
.system-clock { display: grid; grid-template-columns: auto auto auto; align-items: baseline; gap: 8px; padding-right: 15px; border-right: 1px solid var(--line); font-family: Consolas, monospace; }
.system-clock span, .system-clock small { color: var(--faint); font-size: 9px; }
.system-clock strong { font-size: 13px; font-weight: 500; }
.icon-button, .logout-button { height: 34px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; color: var(--muted); }
.icon-button { width: 34px; font-size: 20px; }
.logout-button { padding: 0 12px; color: var(--faint); font-family: Consolas, monospace; font-size: 9px; letter-spacing: .14em; }
.icon-button:hover, .logout-button:hover { border-color: var(--signal); color: var(--signal); }
.status-strip { height: 28px; padding: 0 28px; display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--line); background: #08120f; color: var(--faint); font-family: Consolas, monospace; font-size: 9px; letter-spacing: .08em; }
.status-right { margin-left: auto; }
.pulse { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); margin-right: 8px; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .28; } }
main { width: min(1540px, calc(100% - 56px)); margin: 0 auto; padding: 28px 0 52px; }
.tab-panel { display: none; animation: panelIn .28s ease; }
.tab-panel.is-active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(6px); } }
.panel { background: linear-gradient(145deg, rgba(14, 29, 25, .94), rgba(9, 20, 18, .88)); border: 1px solid var(--line); box-shadow: 0 16px 60px rgba(0, 0, 0, .18); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 21px 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .panel-heading h3 { margin: 6px 0 0; font-size: 17px; letter-spacing: -.02em; }
.tag { padding: 6px 8px; border: 1px solid rgba(91, 213, 195, .25); color: var(--cyan); font-family: Consolas, monospace; font-size: 8px; letter-spacing: .12em; }
.tag.danger { border-color: rgba(240, 113, 103, .32); color: var(--danger); background: rgba(240, 113, 103, .05); }

/* North */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .72fr); gap: 18px; }
.threat-visual { min-height: 360px; }
.radar-wrap { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(190px, .46fr); min-height: 286px; }
.radar { width: 258px; height: 258px; position: relative; margin: 14px auto; border: 1px solid rgba(154, 224, 111, .22); border-radius: 50%; overflow: hidden; background: radial-gradient(circle, rgba(154, 224, 111, .035) 0 2%, transparent 2%), rgba(2, 9, 7, .38); box-shadow: inset 0 0 50px rgba(91, 213, 195, .04); }
.radar-ring { position: absolute; border: 1px solid rgba(154, 224, 111, .13); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.radar-ring.r1 { width: 25%; height: 25%; }.radar-ring.r2 { width: 50%; height: 50%; }.radar-ring.r3 { width: 75%; height: 75%; }
.radar-cross { position: absolute; background: rgba(154, 224, 111, .11); }.radar-cross.x { height: 1px; width: 100%; top: 50%; }.radar-cross.y { width: 1px; height: 100%; left: 50%; }
.sweep { position: absolute; inset: 50% 0 0 50%; transform-origin: 0 0; background: conic-gradient(from 270deg, rgba(154, 224, 111, .24), transparent 32deg); animation: sweep 5s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.blip { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); animation: blip 2s ease-out infinite; }
.b1 { left: 38%; top: 30%; }.b2 { left: 60%; top: 23%; animation-delay: .6s; }.b3 { left: 69%; top: 51%; animation-delay: 1.1s; }.b4 { left: 30%; top: 65%; background: var(--amber); box-shadow: 0 0 8px var(--amber); animation-delay: 1.4s; }
@keyframes blip { 60%, 100% { box-shadow: 0 0 0 12px transparent; } }
.radar-label { position: absolute; font-family: Consolas, monospace; font-size: 8px; letter-spacing: .12em; color: var(--muted); }.north-label { left: 42%; top: 18%; }.south-label { left: 48%; top: 67%; }
.signal-list { border-left: 1px solid var(--line); padding: 23px 22px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.signal-list div { padding: 13px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-family: Consolas, monospace; font-size: 10px; }
.signal-list span { color: var(--muted); }.signal-list strong { color: var(--signal); font-size: 8px; letter-spacing: .08em; font-weight: 600; }
.metric-stack { display: grid; gap: 18px; }
.metric-card { min-height: 108px; padding: 20px 22px; border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border: 1px solid var(--line); transform: rotate(45deg); }
.metric-card span { display: block; color: var(--muted); font-size: 11px; }.metric-card strong { display: block; margin-top: 4px; font-family: Consolas, monospace; font-size: 31px; line-height: 1.1; }.metric-card small { color: var(--faint); font-size: 9px; letter-spacing: .07em; }.metric-card.accent strong { color: var(--signal); }
.section-header { margin: 40px 0 18px; display: flex; justify-content: space-between; align-items: end; }
.section-header.compact { margin-top: 48px; }
.section-header h2, .tools-intro h2 { font-size: 23px; letter-spacing: -.035em; margin: 7px 0 0; }
.toolbar { display: flex; gap: 8px; }
.toolbar input { width: 220px; border: 1px solid var(--line-strong); background: rgba(4, 10, 9, .45); color: var(--text); padding: 10px 12px; }
.refresh-button { min-height: 38px; padding: 0 15px; font-size: 11px; }
.feed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feed-card { min-height: 210px; padding: 19px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(14, 29, 25, .82), rgba(8, 18, 16, .72)); position: relative; transition: .2s ease; overflow: hidden; }
.feed-card::before { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--cyan); opacity: .5; }
.feed-card[data-accent="danger"]::before { background: var(--danger); }.feed-card[data-accent="amber"]::before { background: var(--amber); }.feed-card[data-accent="signal"]::before { background: var(--signal); }
.feed-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: linear-gradient(145deg, rgba(18, 36, 31, .9), rgba(9, 21, 18, .82)); }
.feed-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 17px; color: var(--faint); font-family: Consolas, monospace; font-size: 9px; letter-spacing: .06em; }
.feed-source { color: var(--signal); }
.feed-card h3 { font-size: 15px; line-height: 1.5; margin: 0; letter-spacing: -.015em; }
.feed-card p { margin: 11px 0 38px; color: var(--muted); font-size: 12px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feed-card a { position: absolute; left: 19px; bottom: 17px; color: var(--text); text-decoration: none; font-family: Consolas, monospace; font-size: 9px; letter-spacing: .09em; }
.feed-card a::after { content: " ↗"; color: var(--signal); }
.feed-grid-compact .feed-card { min-height: 180px; }.feed-grid-compact .feed-card p { -webkit-line-clamp: 2; }
.loading-block, .empty-state { grid-column: 1 / -1; min-height: 140px; border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--faint); font-family: Consolas, monospace; font-size: 10px; letter-spacing: .08em; }

/* Vulnerabilities */
.security-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.overview-card { min-height: 132px; padding: 19px; border: 1px solid var(--line); background: var(--panel); position: relative; }
.overview-card::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--muted); opacity: .6; }
.overview-card.critical::after { background: var(--danger); }.overview-card.high::after { background: var(--amber); }.overview-card.good::after { background: var(--signal); }
.overview-card span { color: var(--muted); font-family: Consolas, monospace; font-size: 9px; letter-spacing: .1em; }.overview-card strong { display: block; font-family: Consolas, monospace; font-size: 29px; margin: 13px 0 4px; }.overview-card.critical strong { color: var(--danger); }.overview-card.high strong { color: var(--amber); }.overview-card.good strong { color: var(--signal); }.overview-card small { color: var(--faint); font-size: 10px; }
.vuln-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vuln-panel { min-width: 0; }
.vuln-list { max-height: 580px; overflow: auto; scrollbar-color: var(--line-strong) transparent; }
.vuln-item { padding: 17px 20px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: start; }
.vuln-item:last-child { border-bottom: 0; }.vuln-item:hover { background: rgba(255,255,255,.015); }
.severity { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(240,113,103,.3); color: var(--danger); font-family: Consolas, monospace; font-size: 12px; font-weight: 700; }
.severity.high { color: var(--amber); border-color: rgba(227,196,98,.3); }.severity.kev { color: var(--danger); font-size: 8px; letter-spacing: .06em; }
.vuln-body a { color: var(--text); font-family: Consolas, monospace; font-size: 11px; text-decoration: none; }.vuln-body a:hover { color: var(--signal); }.vuln-body h4 { margin: 5px 0; font-size: 12px; line-height: 1.45; }.vuln-body p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vuln-date { color: var(--faint); font-family: Consolas, monospace; font-size: 8px; white-space: nowrap; }

/* Tools */
.tools-intro { display: flex; align-items: end; justify-content: space-between; padding: 10px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tools-intro p { color: var(--muted); margin: 8px 0 0; font-size: 12px; }.scope-badge { padding: 9px 11px; border: 1px solid rgba(154,224,111,.26); color: var(--signal); font-family: Consolas, monospace; font-size: 8px; letter-spacing: .09em; }.scope-badge i { display: inline-block; width: 5px; height: 5px; background: var(--signal); border-radius: 50%; margin-right: 7px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card { min-width: 0; padding: 21px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(14, 29, 25, .88), rgba(8, 18, 16, .8)); position: relative; }
.tool-card.guarded { border-color: rgba(227, 196, 98, .19); }.tool-card.monitor-card { grid-column: 1 / -1; }
.tool-number { position: absolute; top: 20px; right: 21px; color: rgba(154,224,111,.19); font-family: Consolas, monospace; font-size: 28px; }
.tool-title span { color: var(--signal); font-family: Consolas, monospace; font-size: 8px; letter-spacing: .14em; }.tool-title h3 { font-size: 17px; margin: 5px 0 20px; }
.tool-form { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.tool-form.stacked { display: flex; flex-direction: column; }
.tool-form input, .tool-form select, .tool-form textarea { min-width: 0; border: 1px solid var(--line-strong); background: rgba(3, 9, 7, .58); color: var(--text); padding: 11px 12px; }
.tool-form textarea { height: 62px; resize: vertical; }.tool-form select { color: var(--muted); }.tool-form button { min-height: 40px; font-size: 11px; }.tool-form button:disabled { cursor: wait; opacity: .5; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-check { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; line-height: 1.4; padding: 5px 0; }.auth-check input { accent-color: var(--signal); }
.toggle { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line-strong); padding: 0 12px; color: var(--muted); font-size: 10px; }.toggle input { position: absolute; opacity: 0; }.toggle span { width: 25px; height: 13px; border: 1px solid var(--line-strong); border-radius: 8px; position: relative; }.toggle span::after { content: ""; position: absolute; width: 7px; height: 7px; top: 2px; left: 2px; border-radius: 50%; background: var(--faint); transition: .2s; }.toggle input:checked + span::after { left: 14px; background: var(--signal); }
.tool-output { min-height: 132px; max-height: 300px; overflow: auto; margin: 12px 0 0; padding: 14px; border: 1px solid var(--line); background: #050c0a; color: #acc1b8; white-space: pre-wrap; word-break: break-word; font: 10px/1.65 Consolas, monospace; scrollbar-color: var(--line-strong) transparent; }.tool-output.tall { min-height: 166px; }
.monitor-list { margin-top: 15px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }.monitor-list .empty-state { min-height: 90px; }.monitor-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); background: rgba(3,9,7,.38); padding: 12px; }.monitor-led { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px rgba(240,113,103,.5); }.monitor-led.up { background: var(--signal); box-shadow: 0 0 8px rgba(154,224,111,.5); }.monitor-info strong { display: block; font-size: 11px; }.monitor-info span { display: block; margin-top: 4px; color: var(--faint); font: 9px Consolas, monospace; }.monitor-actions { display: flex; gap: 5px; }.monitor-actions button { width: 28px; height: 28px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }.monitor-actions button:hover { border-color: var(--signal); color: var(--signal); }

footer { min-height: 42px; padding: 0 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-family: Consolas, monospace; font-size: 8px; letter-spacing: .1em; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 380px; padding: 13px 16px; border: 1px solid var(--line-strong); background: #101d19; box-shadow: var(--shadow); color: var(--text); font-size: 11px; opacity: 0; transform: translateY(12px); pointer-events: none; z-index: 200; transition: .22s ease; }.toast.show { opacity: 1; transform: translateY(0); }.toast.error { border-color: rgba(240,113,103,.4); color: #ffaaa2; }

@media (max-width: 1080px) {
  .topbar { grid-template-columns: auto 1fr auto; }.brand small, .system-clock span, .system-clock small { display: none; }.nav-item { min-width: auto; padding: 0 16px; }.hero-grid { grid-template-columns: 1fr; }.metric-stack { grid-template-columns: repeat(3, 1fr); }.feed-grid { grid-template-columns: repeat(2, 1fr); }.security-overview { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar { height: auto; padding: 13px 16px 0; grid-template-columns: 1fr auto; }.primary-nav { grid-row: 2; grid-column: 1 / -1; width: 100%; margin-top: 12px; }.nav-item { flex: 1; height: 48px; padding: 0 8px; }.system-clock { display: none; }.status-strip { padding: 0 16px; gap: 14px; }.status-strip span:nth-child(3) { display: none; } main { width: calc(100% - 28px); padding-top: 18px; }.radar-wrap { grid-template-columns: 1fr; }.signal-list { border-left: 0; border-top: 1px solid var(--line); }.metric-stack, .feed-grid, .security-overview, .vuln-layout, .tool-grid { grid-template-columns: 1fr; }.monitor-card { grid-column: auto !important; }.section-header, .tools-intro { align-items: stretch; flex-direction: column; gap: 14px; }.toolbar { width: 100%; }.toolbar input { width: 100%; min-width: 0; }.monitor-list { grid-template-columns: 1fr; }.overview-card { min-height: 105px; }.vuln-date { display: none; }.login-panel { padding: 34px 28px; } footer { padding: 14px 18px; gap: 10px; flex-wrap: wrap; }
}
