:root {
  --bg: #12161c; --panel: #171d25; --line: #232c38; --text: #dfe6ee;
  --dim: #8b98a8; --accent: #4da3ff;
  --ok: #3ecf8e; --warn: #e8b339; --bad: #ef5f5f; --crit: #ff4d4d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* hidden 속성은 브라우저 기본 스타일의 display:none 으로 동작하는데,
   아래에서 .summary 에 display:flex 를 주면 그게 더 구체적이라 이겨 버린다.
   그래서 hidden 을 걸어도 계속 보인다. 명시적으로 못박는다. */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 13px; }
.app { display: flex; flex-direction: column; height: 100vh; }

.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 15px; letter-spacing: .14em; margin: 0; font-weight: 700; }
.brand h1 span { color: var(--accent); }
.ver { color: var(--dim); font-size: 11px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.dot.busy { background: var(--accent); }
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }

/* 형제 제품에서 링크로 들어왔을 때 그 줄을 잠깐 짚어 준다. */
tbody tr.linked { outline: 2px solid var(--accent); outline-offset: -2px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.plan { color: var(--dim); font-size: 12px; margin-right: 4px; }

button { font: inherit; border-radius: 6px; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--line); background: #1e2733; color: var(--text); }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); border-color: var(--accent); color: #04121f; font-weight: 600; }
button.ghost { background: transparent; }
button.small { padding: 5px 10px; }
button.link { background: none; border: none; color: var(--dim); padding: 0; }
button.link:hover { color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }

.summary { display: flex; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.stat { flex: 1; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.stat .n { font-size: 18px; font-weight: 700; }
.stat .l { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.stat.bad .n { color: var(--bad); } .stat.warn .n { color: var(--warn); } .stat.ok .n { color: var(--ok); }

.progress { height: 2px; background: var(--line); }
.progress .bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.body { flex: 1; display: flex; min-height: 0; }
.side { width: 280px; border-right: 1px solid var(--line); padding: 12px;
  display: flex; flex-direction: column; min-height: 0; }
.side h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--dim); margin: 0 0 8px; }
.add { display: grid; grid-template-columns: 1fr 56px auto; gap: 6px; }
input { font: inherit; background: #0e1319; border: 1px solid var(--line);
  color: var(--text); border-radius: 6px; padding: 6px 8px; min-width: 0; }
input:focus { outline: none; border-color: var(--accent); }
.hint { color: var(--dim); font-size: 11px; margin: 6px 0 10px; }
.hint.error { color: var(--bad); }

.targets { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.targets li { display: flex; align-items: center; gap: 6px; padding: 5px 6px;
  border-radius: 6px; }
.targets li:hover { background: var(--panel); }
.targets .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.targets .rm { color: var(--dim); border: none; background: none; padding: 0 4px; }
.targets .rm:hover { color: var(--bad); }

.results { flex: 1; overflow: auto; min-width: 0; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; background: var(--panel); text-align: left;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim);
  padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 7px 10px; border-bottom: 1px solid #1b222c; vertical-align: top; }
th.num, td.num { text-align: right; }
th.risk, td.risk { width: 52px; text-align: center; }

.pill { display: inline-block; min-width: 30px; padding: 2px 6px; border-radius: 10px;
  font-weight: 700; font-size: 11px; background: #223; color: var(--dim); }
.pill.ok { background: rgba(62,207,142,.16); color: var(--ok); }
.pill.warning { background: rgba(232,179,57,.16); color: var(--warn); }
.pill.error { background: rgba(239,95,95,.16); color: var(--bad); }
.pill.critical { background: rgba(255,77,77,.22); color: var(--crit); }
.pill.dead { background: #262b33; color: var(--dim); }

.finding { display: inline-block; margin: 0 4px 3px 0; padding: 1px 6px;
  border-radius: 4px; font-size: 11px; background: #202836; color: var(--dim); }
.finding.warning { color: var(--warn); } .finding.error { color: var(--bad); }
.finding.critical { color: var(--crit); }
.muted { color: var(--dim); }
.empty { color: var(--dim); text-align: center; padding: 40px 20px; }

.statusbar { display: flex; align-items: center; gap: 10px; padding: 6px 16px;
  border-top: 1px solid var(--line); background: var(--panel); color: var(--dim); font-size: 12px; }
.spacer { flex: 1; }

.alerts-head { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.side > input { width: 100%; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 6px; color: var(--dim);
  font-size: 12px; margin-bottom: 8px; }
.check input { width: auto; }
.alert-actions { display: flex; gap: 6px; }

/* 체험 만료 예고. 7일 전부터 뜨고, 마지막 3일은 눈에 띄게 바뀐다. */
.trial-note {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; font-size: 12.5px;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
  color: var(--text);
}
.trial-note span { flex: 1; }
.trial-note.urgent {
  background: color-mix(in srgb, var(--bad) 14%, transparent);
  border-bottom-color: color-mix(in srgb, var(--bad) 45%, transparent);
}

.hint.ok { color: var(--add); }
