:root {
  --navy: #0c1b33;
  --navy-2: #13284a;
  --blue: #2f6fed;
  --blue-soft: #e8f0ff;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #e5edf6;
  --ink: #142033;
  --muted: #6d7d92;
  --green: #159947;
  --green-bg: #e8f8ee;
  --orange: #e07a14;
  --orange-bg: #fff4e8;
  --red: #e11d48;
  --red-bg: #ffecef;
  --shadow: 0 10px 30px rgba(20, 40, 70, 0.06);
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 420px 1fr;
}
.login-brand {
  background: var(--navy);
  color: white;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.brand-mark { display: flex; gap: 12px; align-items: center; }
.mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--blue); display: grid; place-items: center;
  font-weight: 800; font-size: 20px;
}
.brand-mark strong { display: block; font-size: 20px; }
.brand-mark span { color: #b7c5da; font-size: 13px; }
.login-brand h1 { font-size: 32px; line-height: 1.35; letter-spacing: -0.03em; }
.login-brand p { color: #b7c5da; margin-top: 12px; line-height: 1.6; }
.login-panel { display: grid; place-items: center; padding: 32px; }
.login-card { width: min(440px, 100%); background: white; border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.login-card h2 { font-size: 24px; }
.login-card .hint { color: var(--muted); margin: 8px 0 22px; line-height: 1.5; }
.login-split { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.pc-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 12px; }
.pc-note a { color: var(--blue); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; margin-bottom: 14px; }
input, select, textarea {
  border: 1px solid #d7e1ee; border-radius: 10px; padding: 11px 12px; background: white; font-weight: 500;
}
textarea { min-height: 90px; resize: vertical; }
.primary, .ghost, .danger {
  border-radius: 10px; min-height: 40px; padding: 0 14px; border: 1px solid transparent; font-weight: 700;
}
.primary { background: var(--blue); color: white; }
.ghost { background: white; border-color: #d7e1ee; }
.danger { background: white; color: var(--red); border-color: #ffc2ce; }
.wide { width: 100%; }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.side { background: var(--navy); color: #d5dfec; padding: 22px 14px; }
.side nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.side button {
  text-align: left; background: transparent; border: 0; color: inherit;
  border-radius: 12px; padding: 12px 14px; font-weight: 650;
}
.side button.active { background: var(--blue); color: white; }
.main { min-width: 0; }
.top {
  height: 72px; display: flex; align-items: center; gap: 16px;
  padding: 0 28px; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
}
.crumb { color: var(--muted); font-size: 13px; white-space: nowrap; }
.top input { flex: 1; background: #f7f9fc; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #dbe7ff; color: var(--blue); display: grid; place-items: center; }
.content { padding: 28px; }
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.page-head h1 { font-size: 30px; letter-spacing: -0.04em; }
.page-head p { color: var(--muted); margin-top: 6px; }
.head-actions { display: flex; gap: 8px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.stat { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.stat b { display: block; font-size: 32px; letter-spacing: -0.04em; margin-top: 4px; }
.stat span { color: var(--muted); font-weight: 700; }
.icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; }
.icon.blue { background: var(--blue-soft); }
.icon.green { background: var(--green-bg); }
.icon.red { background: var(--red-bg); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; }
.card h2 { font-size: 16px; padding: 16px 18px 0; }
.filters { display: flex; gap: 8px; padding: 12px 18px; flex-wrap: wrap; }
.filters button { border: 0; background: transparent; color: var(--muted); font-weight: 700; border-radius: 999px; padding: 7px 12px; }
.filters button.on { background: var(--blue-soft); color: var(--blue); }
.filters input, .filters select { min-width: 140px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 700; }
tr.active-row { background: #f3f7ff; }
.linkish { background: none; border: 0; color: var(--blue); font-weight: 700; padding: 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 800; }
.pill.ok { background: var(--green-bg); color: var(--green); }
.pill.wait { background: var(--orange-bg); color: var(--orange); }
.pill.stop { background: #fff1f2; color: var(--red); }
.pill.muted { background: #eef2f7; color: #526277; }
.detail { padding: 16px 18px 18px; }
.detail header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: 108px 1fr; gap: 8px 10px; font-size: 14px; margin: 12px 0; }
.kv span { color: var(--muted); }
.mono { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.section-title { padding: 8px 18px 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.empty { padding: 28px 18px; color: var(--muted); }
.note { color: var(--muted); font-size: 12px; padding: 0 18px 16px; }
.checks { display: grid; gap: 8px; margin: 8px 0 16px; }
.checks label { flex-direction: row; align-items: center; font-weight: 650; margin: 0; }
.modal-back { position: fixed; inset: 0; background: rgba(12, 27, 51, .45); display: grid; place-items: center; z-index: 5; }
.modal { width: min(460px, calc(100% - 32px)); background: white; border-radius: 18px; padding: 22px; }
.modal h3 { margin-bottom: 8px; }
.modal p { color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.key-box { background: #f4f7fb; border-radius: 12px; padding: 12px; font-family: Consolas, monospace; font-size: 18px; margin: 10px 0 14px; }
.row-2 { display: flex; justify-content: flex-end; gap: 8px; }
.footer-note { color: var(--muted); font-size: 12px; margin-top: 14px; }

@media (max-width: 1100px) {
  .layout, .stats { grid-template-columns: 1fr; }
}
