/* 관리자 화면. PC 먼저, 좁은 화면은 메뉴를 접는다(모바일 화면 고르기는 PC판 뒤에 정한다) */
:root {
  --bg: #f5f6f8; --panel: #fff; --line: #e1e4ea; --text: #1d2330; --muted: #667085;
  --accent: #2f6fde; --accent-soft: #e8f0fd; --ok: #18794e; --warn: #b54708; --bad: #c4320a;
  --side: #1e2533; --side-text: #c9d1e0; --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { display: flex; min-height: 100vh; }
.side { width: 220px; flex: none; background: var(--side); color: var(--side-text); padding: 12px 0; }
.brand a { display: block; color: #fff; font-weight: 600; padding: 4px 18px 14px; font-size: 15px; }
.brand small { display: block; font-weight: 400; color: var(--side-text); font-size: 12px; }
.side .group { padding: 14px 18px 4px; font-size: 12px; color: #8b95a8; }
.side .item { display: block; padding: 6px 18px 6px 26px; color: var(--side-text); }
.side .item:hover { background: #2a3345; text-decoration: none; }
.side .item.on { background: #2f3b52; color: #fff; border-left: 3px solid var(--accent); padding-left: 23px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; background: var(--panel); border-bottom: 1px solid var(--line); padding: 10px 20px; }
.top h1 { font-size: 17px; margin: 0; flex: 1; }
.me { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.me form { margin: 0; }
.menu-btn { display: none; border: 1px solid var(--line); background: none; border-radius: 6px; padding: 2px 8px; font-size: 16px; }
.content { padding: 20px; max-width: 1400px; width: 100%; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.panel { margin-bottom: 18px; overflow-x: auto; }
.panel h2 { font-size: 15px; margin: 0 0 10px; }
.card .label { color: var(--muted); font-size: 12px; }
.card .value { font-size: 22px; font-weight: 600; margin-top: 2px; }
.card .sub { color: var(--muted); font-size: 12px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.bar.warn > span { background: var(--warn); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.warning { background: #fff6ed; border: 1px solid #f9dbaf; color: var(--warn); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; }
.note { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; padding: 0 7px; border-radius: 10px; font-size: 12px; background: #eef0f4; color: var(--muted); }
.badge.running, .badge.waiting { background: var(--accent-soft); color: var(--accent); }
.badge.done { background: #e7f6ee; color: var(--ok); }
.badge.error, .badge.stopped { background: #fdeee9; color: var(--bad); }
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plain th { color: var(--muted); font-weight: 500; font-size: 12px; }
form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
label { display: block; font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=number], select, textarea {
  font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; min-width: 120px; }
textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
button, .button { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
button.ghost { background: #fff; color: var(--accent); }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
button.link { border: none; background: none; color: var(--accent); padding: 0; }
pre.body { white-space: pre-wrap; word-break: break-word; background: #fafbfc; border: 1px solid var(--line); border-radius: 6px; padding: 12px; font-size: 13px; max-height: 70vh; overflow: auto; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; }
.checks label { color: var(--text); font-size: 13px; display: flex; gap: 6px; align-items: baseline; }
.checks code { font-size: 12px; }
.toolbar { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.toolbar .grow { flex: 1; }
.mermaid { background: #fff; overflow: auto; }
.login-box { max-width: 360px; margin: 12vh auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.login-box h1 { font-size: 18px; margin: 0 0 18px; }
.login-box input { width: 100%; margin: 4px 0 12px; }
.login-box button { width: 100%; }
.error { color: var(--bad); margin-bottom: 10px; }
.tabulator { font-size: 13px; border-radius: 6px; }
.tabulator button { color: var(--text); background: #fff; border: 1px solid var(--line); padding: 2px 8px; }
.tabulator button.active { color: var(--accent); border-color: var(--accent); }
@media (max-width: 860px) {
  .side { position: fixed; z-index: 10; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .15s; }
  .side.open { transform: none; }
  .menu-btn { display: inline-block; }
  .grid2 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
}
@media (max-width: 640px) {
  .me span { display: none; }
  .cards { grid-template-columns: 1fr 1fr; }
}
