:root {
  --bg: #0f1521; --card: #182233; --line: #263247; --text: #e8edf5;
  --muted: #8a98ad; --accent: #4f8cff;
  --green: #2fbf6b; --red: #ef4d4d; --yellow: #f0b429; --gray: #6b7689;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* 로그인 */
.login-bg { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card {
  background: var(--card); padding: 36px; border-radius: 16px; width: min(360px, 92vw);
  border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0,0,0,.4); text-align: center;
}
.login-card h1 { margin: 0 0 6px; }
.login-card input, .login-card button {
  width: 100%; padding: 12px 14px; margin-top: 12px; border-radius: 10px;
  border: 1px solid var(--line); font-size: 15px;
}
.login-card input { background: #0d1320; color: var(--text); }
.login-card button { background: var(--accent); color: #fff; border: none; cursor: pointer; font-weight: 600; }
.login-card button:hover { filter: brightness(1.08); }
.error { color: var(--red); margin-top: 14px; }

/* 레이아웃 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: #121a28;
  position: sticky; top: 0; z-index: 5; flex-wrap: wrap; gap: 10px;
}
.brand { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  padding: 7px 12px; border-radius: 9px; cursor: pointer; text-decoration: none; font-size: 13px;
}
.btn-ghost:hover { background: #1d2840; }

.alert { background: rgba(239,77,77,.15); color: #ffb3b3; border: 1px solid var(--red);
  padding: 12px 20px; margin: 14px 20px 0; border-radius: 10px; font-weight: 600; }

.grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px 20px;
  max-width: 1100px; margin: 0 auto;
}
.span2 { grid-column: 1 / -1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card h2 { margin: 0 0 14px; font-size: 16px; }
.loading { color: var(--muted); padding: 8px 0; }

/* 행 */
.rows { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot.green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot.yellow { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.dot.gray { background: var(--gray); }
.row .label { flex: 1; }
.row .meta { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* 용량 막대 */
.cap { display: flex; flex-direction: column; gap: 5px; }
.cap-top { display: flex; justify-content: space-between; align-items: baseline; }
.cap-name { font-weight: 600; }
.cap-num { color: var(--muted); font-size: 13px; }
.barwrap { background: #0d1320; border-radius: 7px; height: 12px; overflow: hidden; border: 1px solid var(--line); }
.bar { height: 100%; background: linear-gradient(90deg, var(--green), #58d68d); }
.bar.warn { background: linear-gradient(90deg, var(--yellow), #f7c948); }
.bar.crit { background: linear-gradient(90deg, var(--red), #ff7676); }
.cap-fail { color: var(--yellow); font-size: 13px; }
.cap-info { color: var(--muted); font-size: 13px; }

/* 바로가기 */
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shortcut {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px;
  background: #0f1828; border: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.shortcut:hover { background: #18233a; border-color: var(--accent); }
.shortcut .ico { font-size: 20px; }
.shortcut .nm { font-size: 14px; }

/* ④ SENTINEL 검사 카드 */
.snt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.snt-badge { font-weight: 700; font-size: 13px; padding: 4px 11px; border-radius: 999px; }
.snt-badge.run { background: rgba(240,180,41,.16); color: var(--yellow); border: 1px solid var(--yellow); }
.snt-badge.pass { background: rgba(47,191,107,.16); color: var(--green); border: 1px solid var(--green); }
.snt-badge.fail { background: rgba(239,77,77,.16); color: #ffb3b3; border: 1px solid var(--red); }
.snt-counts { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.snt-counts b { color: var(--text); }
.snt-counts b.bad { color: var(--red); }
.snt-fails { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; max-height: 200px; overflow: auto; }
.snt-fail { font-size: 13px; color: #ffb3b3; background: rgba(239,77,77,.08); border: 1px solid rgba(239,77,77,.25);
  border-radius: 8px; padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.snt-fsuite { color: var(--yellow); font-weight: 600; margin-right: 4px; }
.snt-hist { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.snt-hist-h { margin-bottom: 7px; }
.snt-hrow { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; }
.snt-hcount { min-width: 120px; }
.snt-htime { margin-left: auto; white-space: nowrap; }

.foot { text-align: center; padding: 18px; }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; padding: 14px; }
  .span2 { grid-column: auto; }
}
