:root {
  --bg: #eef0f3; --panel: #ffffff; --line: #d5d9df; --line2: #e6e9ed;
  --text: #22262b; --muted: #6b737d; --accent: #2a6fdb; --accent-soft: #e3edfc;
  --sel: #cfe0fb; --done: #2e9b4f; --err: #d33a3a; --run: #2a6fdb; --warn: #d98a00;
  --font: "Segoe UI", "Malgun Gothic", -apple-system, "Apple SD Gothic Neo", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.4 var(--font); color: var(--text); background: var(--bg); overflow: hidden; }
button { font: inherit; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.spacer { flex: 1; }

#app { display: flex; flex-direction: column; height: 100vh; }
.titlebar { display: flex; align-items: center; gap: 8px; padding: 5px 12px; background: #fff; border-bottom: 1px solid var(--line2); font-size: 13px; }
.titlebar .logo { color: var(--accent); font-size: 16px; }
.menubar { display: flex; background: #fff; border-bottom: 1px solid var(--line); padding: 0 6px; }
.mb-item { padding: 4px 10px; cursor: default; border-radius: 3px; }
.mb-item:hover, .mb-item.open { background: var(--accent-soft); }

/* ---------- module toolbar (OmicsBox style) ---------- */
.toolbar { display: flex; gap: 2px; padding: 6px 8px 4px; background: linear-gradient(#fafbfc, #eef0f3); border-bottom: 1px solid var(--line); overflow-x: auto; }
.mod { display: flex; align-items: flex-start; padding: 4px 6px 2px; border-radius: 4px; cursor: pointer; user-select: none; position: relative; }
.mod:hover, .mod.open { background: #e2e7ee; }
.mod .ic { display: flex; flex-direction: column; align-items: center; width: 74px; }
.mod .ring { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #7d858f; display: flex; align-items: center; justify-content: center; background: #fff; }
.mod .dot { width: 14px; height: 14px; border-radius: 50%; }
.mod .lbl { font-size: 11.5px; color: #555; text-align: center; line-height: 1.1; margin-top: 3px; }
.mod .caret { font-size: 9px; color: #666; margin-top: 12px; }
.mod .newb { position: absolute; top: 0; right: 4px; font-size: 9px; background: #2fa36b; color: #fff; border-radius: 6px; padding: 0 4px; }

/* ---------- cascading menus ---------- */
.menu { position: fixed; z-index: 50; background: #fff; border: 1px solid #b9c0c9; box-shadow: 2px 3px 10px rgba(0,0,0,.18); min-width: 240px; padding: 3px 0; }
.mi { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 14px; white-space: nowrap; cursor: default; }
.mi:hover, .mi.open { background: var(--sel); }
.mi .t { flex: 1; }
.mi .arrow { color: #666; font-size: 10px; }
.mi.planned .t { color: #9aa1aa; }
.badge { font-size: 10px; padding: 0 5px; border-radius: 7px; line-height: 15px; }
.b-ready { background: #e2f3e7; color: #23753c; }
.b-server { background: #e6eefb; color: #2a5db0; }
.b-planned { background: #f0f1f3; color: #8a929c; }
.b-new { background: #2fa36b; color: #fff; }
.menu .sep { border-top: 1px solid var(--line2); margin: 3px 0; }

/* ---------- workbench tabs ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-height: 120px; background: #fff; margin: 4px 4px 0; border: 1px solid var(--line); }
.tabs { display: flex; background: #f3f5f7; border-bottom: 1px solid var(--line); overflow-x: auto; min-height: 29px; }
.tab { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-right: 1px solid var(--line); cursor: pointer; white-space: nowrap; color: #444; max-width: 280px; }
.tab .tt { overflow: hidden; text-overflow: ellipsis; }
.tab.active { background: #fff; color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
.tab .x { color: #999; padding: 0 2px; border-radius: 2px; }
.tab .x:hover { background: #ddd; color: #333; }
.tab .tdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.tabcontent { flex: 1; overflow: auto; position: relative; }
.view { padding: 14px 18px; }

.splitter { height: 5px; cursor: row-resize; background: var(--bg); }
.bottom { height: 250px; display: flex; gap: 4px; padding: 0 4px 4px; }
.panel { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.panel.left { flex: 1.35; }
.panel.right { flex: 1; }
.ptabs { display: flex; background: #f3f5f7; border-bottom: 1px solid var(--line); }
.ptab { border: 0; background: none; padding: 5px 12px; color: #555; border-right: 1px solid var(--line2); }
.ptab.active { background: #fff; color: var(--text); box-shadow: inset 0 2px 0 var(--accent); }
.pbody { flex: 1; overflow: auto; padding: 6px 10px; }

/* progress */
.prog { padding: 6px 0; border-bottom: 1px solid var(--line2); }
.prog .row { display: flex; align-items: center; gap: 8px; }
.bar { flex: 1; height: 9px; background: #e9ecef; border-radius: 2px; overflow: hidden; }
.bar > div { height: 100%; background: #4caf50; transition: width .4s; }
.bar.err > div { background: var(--err); }

/* status chips */
.st { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; padding: 1px 6px; border-radius: 2px; min-width: 56px; text-align: center; }
.st.DONE { background: var(--done); }
.st.ERROR { background: var(--err); }
.st.RUNNING { background: var(--run); }
.st.QUEUED { background: #8a929c; }

/* generic tables */
table.grid { border-collapse: collapse; width: 100%; font-size: 12px; }
table.grid th, table.grid td { border: 1px solid var(--line2); padding: 3px 7px; text-align: left; white-space: nowrap; }
table.grid th { background: #f3f5f7; position: sticky; top: 0; font-weight: 600; cursor: pointer; z-index: 1; }
table.grid th.sorted::after { content: " ▾"; color: var(--accent); }
table.grid th.sorted.asc::after { content: " ▴"; }
table.grid tr:hover td { background: #f6f9ff; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.hist td, .hist th { border-left: 0; border-right: 0; }
.iconbtn { border: 0; background: none; color: #556; padding: 1px 4px; border-radius: 3px; }
.iconbtn:hover { background: #e7ebf0; color: #111; }
a.link { color: var(--accent); cursor: pointer; text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* files panel */
.ftools { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.btn { border: 1px solid #b9c0c9; background: #fff; padding: 4px 11px; border-radius: 3px; color: var(--text); }
.btn:hover { background: #f1f4f8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1f5fc4; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.drop { border: 2px dashed #b9c0c9; border-radius: 6px; padding: 10px; text-align: center; color: var(--muted); margin-bottom: 6px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.kind { font-size: 10px; padding: 0 5px; border-radius: 6px; background: #eef1f5; color: #667; }

/* messages */
.msg { font-family: Consolas, Menlo, monospace; font-size: 11.5px; padding: 1px 0; white-space: pre-wrap; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--done); }

/* welcome */
.welcome { max-width: 980px; }
.welcome h1 { font-size: 22px; margin: 4px 0 2px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 14px 0; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: #fafbfc; }
.card h3 { margin: 0 0 4px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.card .n { font-size: 22px; font-weight: 700; }
.legend span { margin-right: 10px; }
.steps li { margin: 4px 0; }

/* results */
.rhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rhead h2 { margin: 0; font-size: 16px; }
.params { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.rcard { border: 1px solid var(--line); border-radius: 6px; margin: 12px 0; overflow: hidden; }
.rcard > .rh { display: flex; align-items: center; gap: 8px; background: #f6f7f9; padding: 6px 10px; border-bottom: 1px solid var(--line2); }
.rcard > .rh b { flex: 1; }
.rcard .rb { padding: 10px; overflow: auto; }
.rcard img { max-width: min(100%, 900px); max-height: 560px; display: block; margin: 0 auto; }
.rcard pre { margin: 0; font-family: Consolas, Menlo, monospace; font-size: 12px; white-space: pre-wrap; }
.tablewrap { max-height: 420px; overflow: auto; border: 1px solid var(--line2); }
.tbar { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.tbar input { border: 1px solid #c4cad2; border-radius: 3px; padding: 3px 7px; width: 200px; }
.note { font-size: 11.5px; color: var(--muted); }
.logbox { background: #1f2329; color: #d6dde6; font: 11.5px/1.45 Consolas, Menlo, monospace; padding: 10px; border-radius: 4px; max-height: 360px; overflow: auto; white-space: pre-wrap; }

/* modal dialog */
.modal { position: fixed; inset: 0; background: rgba(20,25,35,.35); z-index: 100; display: flex; align-items: center; justify-content: center; }
.dialog { background: #fff; width: 620px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.dh { padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.dh h2 { margin: 0; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.dh .path { font-size: 11px; color: var(--muted); margin-top: 2px; }
.db { padding: 12px 16px; overflow: auto; flex: 1; }
.df { padding: 10px 16px; border-top: 1px solid var(--line2); display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
.desc { background: #f6f8fb; border-left: 3px solid var(--accent); padding: 7px 10px; margin-bottom: 12px; font-size: 12.5px; }
.desc.warn { border-left-color: var(--warn); background: #fff8ea; }
fieldset { border: 1px solid var(--line2); border-radius: 5px; padding: 8px 12px 10px; margin: 0 0 12px; }
legend { font-weight: 600; padding: 0 4px; font-size: 12px; color: #444; }
.frow { display: grid; grid-template-columns: 190px 1fr; gap: 10px; align-items: center; margin: 6px 0; }
.frow label { color: #333; }
.frow .help { grid-column: 2; font-size: 11px; color: var(--muted); margin-top: -4px; }
.frow input[type=text], .frow input[type=number], .frow select { width: 100%; border: 1px solid #c4cad2; border-radius: 3px; padding: 4px 7px; font: inherit; }
.flist { border: 1px solid #c4cad2; border-radius: 3px; max-height: 150px; overflow: auto; padding: 3px 6px; }
.flist label { display: flex; gap: 6px; align-items: center; padding: 1px 0; white-space: nowrap; }
.flist .empty { color: var(--muted); font-size: 12px; padding: 4px 0; }
.groups { display: grid; grid-template-columns: 1fr 160px; gap: 4px 10px; align-items: center; max-height: 260px; overflow: auto; border: 1px solid var(--line2); border-radius: 4px; padding: 6px 8px; }
.groups input { border: 1px solid #c4cad2; border-radius: 3px; padding: 3px 6px; font: inherit; }
.groups .sname { font-family: Consolas, Menlo, monospace; font-size: 12px; }

#toast { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 6px; }
.toast { background: #23272e; color: #fff; padding: 8px 14px; border-radius: 5px; box-shadow: 0 4px 14px rgba(0,0,0,.25); font-size: 12.5px; max-width: 380px; }
.toast.err { background: #b52f2f; }

/* ---------- login ---------- */
.loginwrap { position: fixed; inset: 0; z-index: 300; background: linear-gradient(135deg, #e9eef6, #f7f9fc); display: flex; align-items: center; justify-content: center; }
.loginbox { background: #fff; width: 360px; padding: 30px 32px; border-radius: 10px; box-shadow: 0 10px 40px rgba(20,40,80,.15); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.loginbox h1 { margin: 0; font-size: 22px; }
.loginbox input { border: 1px solid #c4cad2; border-radius: 5px; padding: 9px 11px; font: inherit; }
.loginbox .btn { padding: 9px; font-size: 14px; }
.logo-big { font-size: 34px; color: var(--accent); }
.lerr { color: var(--err); min-height: 18px; font-size: 12.5px; }
/* ---------- wizard ---------- */
.wizard { max-width: 1100px; }
.wizard fieldset { padding: 10px 14px 12px; }
.wizard legend { font-size: 13px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 4px 0; }
.choice { border: 1px solid var(--line); border-radius: 16px; padding: 4px 12px; cursor: pointer; background: #fafbfc; }
.choice.on, .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.wizard table.grid input, .wizard table.grid select { border: 1px solid #c4cad2; border-radius: 3px; padding: 2px 5px; font: inherit; max-width: 260px; }
.optgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 0 20px; margin-top: 6px; }
.optgrid .frow { grid-template-columns: 170px 1fr; }

/* upload progress panel */
#upPanel { position: fixed; right: 16px; bottom: 16px; width: 380px; max-width: calc(100vw - 32px); max-height: 50vh; overflow: auto;
  background: #fff; border: 1px solid #c4cad2; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.18); z-index: 900; font-size: 12px; }
#upPanel .uph { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; font-weight: 600; background: #f3f5f8; border-bottom: 1px solid #e1e5ea; }
#upPanel .uprow { padding: 7px 10px; border-bottom: 1px solid #eef0f3; }
#upPanel .upname { display: flex; justify-content: space-between; gap: 6px; word-break: break-all; }
#upPanel .bar { height: 6px; background: #e8ebef; border-radius: 3px; margin: 5px 0 3px; overflow: hidden; }
#upPanel .bar i { display: block; height: 100%; width: 0; background: #2a6fdb; transition: width .3s; }
#upPanel .uprow.done .bar i { background: #2fa36b; width: 100% !important; }
#upPanel .uprow.fail .bar i { background: #d6404e; }
#upPanel .uprow.fail .upinfo { color: #c43c5c; }
.rgstep { padding: 2px 8px; border-radius: 10px; }
.rgstep.on { background: #e8892b; color: #fff; font-weight: 600; }

#upPanel .uph { cursor: pointer; gap: 4px; }
#upPanel .uph .spacer { flex: 1; }
#upPanel .upsum { font-weight: normal; font-size: 11px; }
#upPanel .upall { height: 3px; background: #e8ebef; }
#upPanel .upall i { display: block; height: 100%; width: 0; background: #2a6fdb; transition: width .3s; }
#upPanel.min { max-height: none; overflow: hidden; }
#upPanel.min .upb { display: none; }

/* security / 2FA */
.warnbox { background: #fff6e0; border: 1px solid #f0c060; border-radius: 6px; padding: 10px 12px; margin: 6px 0 12px; line-height: 1.5; }
.steps { margin: 6px 0 10px 18px; line-height: 1.7; }
.qr { text-align: center; margin: 8px 0; }
.qr svg { width: 200px; height: 200px; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.codes code { font-size: 16px; padding: 6px 10px; background: #f3f5f8; border-radius: 4px; text-align: center; letter-spacing: 1px; }
#lotp { letter-spacing: 2px; }

/* v0.6 job management */
.proghead { display: flex; align-items: center; padding: 2px 6px 6px; border-bottom: 1px solid #eee; margin-bottom: 4px; }
.stage { font-size: 12px; color: #2a5db0; margin-top: 3px; }
.stage.big { font-size: 13.5px; font-weight: 600; margin: 4px 0 8px; }
.bar.stop > div { background: #999 !important; }
.st.STOPPED { background: #888; color: #fff; }
.live { border: 1px solid #d8e2f2; background: #f7faff; border-radius: 6px; padding: 10px 12px; margin: 10px 0; }
.live .row { display: flex; align-items: center; }
table.steps { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.steps td { padding: 2px 6px; border-bottom: 1px dotted #e3e8f0; }
table.steps tr.cur td { font-weight: 600; color: #1d4fa0; }
.tail { margin-top: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; white-space: pre-wrap; background: #1f2430; color: #d6dbe6; padding: 6px 8px; border-radius: 4px; max-height: 120px; overflow: auto; }
.loghead { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.sysstat b.ok { color: #2a8a4a; } .sysstat b.warn { color: #d98200; } .sysstat b.bad { color: #d33; }
.rcard .rh .dlbtns { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.btn.sm { padding: 2px 8px; font-size: 11.5px; }
textarea[data-param] { box-sizing: border-box; }

/* 요청 15번 (1단계): 좁은 화면(핸드폰·세로 패드)에서도 쓸 수 있게 */
@media (max-width: 820px) {
  body { font-size: 14px; }
  #tabbar { overflow-x: auto; }
  .frow { display: block !important; }
  .frow > label { display: block; margin-bottom: 3px; }
  #dialog { width: 96vw !important; max-width: 96vw !important; max-height: 92vh; }
  table.grid { display: block; overflow-x: auto; white-space: nowrap; }
  .rcard img { max-width: 100%; height: auto; }
  #wsInfo { font-size: 11px; }
  .live table.steps td:nth-child(3) { display: none; }
}
.projin { width: 190px; border: 1px solid #c4cad2; border-radius: 3px; padding: 4px 7px; margin: 0 6px; }
.ptag { font-size: 11px; color: #6a7686; background: #f1f4f8; border-radius: 3px; padding: 0 5px; }
.histbar { padding: 4px 6px; }
details.pfold { margin: 2px 6px; } details.pfold summary { cursor: pointer; padding: 3px 0; }
.pjob { padding: 2px 0 2px 22px; font-size: 12.5px; }
.prog.up b { color: #2a5db0; }
.rtab { position: relative; padding-right: 22px !important; max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rtab .x { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); color: #888; font-size: 11px; }
.rpbar { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-bottom: 1px solid #eee; }
.rpframe { width: 100%; height: calc(100% - 38px); border: 0; background: #fff; }
#p-report { padding: 0 !important; overflow: hidden; }

/* 0.6.1: tab bar scrolls sideways, right-click menu */
#tabbar { overflow-x: auto; scrollbar-width: thin; }
.ctxmenu { background: #fff; border: 1px solid var(--line, #ccd); box-shadow: 0 4px 14px rgba(0,0,0,.15); border-radius: 5px; padding: 4px 0; min-width: 170px; font-size: 13px; }
.ctxmenu div { padding: 6px 14px; cursor: pointer; } .ctxmenu div:hover { background: #eef3fb; }


/* =====================================================================
   0.6.2 — B안: 왼쪽 분석 메뉴 + 위쪽 검색 + 오른쪽 진행 상황 (SeqQua 고유 화면)
   ===================================================================== */
:root {
  --bg: #f4f7f8; --panel: #ffffff; --line: #dfe7e9; --line2: #e9eff0;
  --text: #172126; --muted: #5a686e; --accent: #0f7c8c; --accent-soft: #e4f3f4; --accent-dark: #0a5c68;
  --sel: #dff0f2; --run: #0f7c8c;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", -apple-system, sans-serif;
  --r: 10px;
}
body { font: 13.5px/1.5 var(--font); background: var(--bg); }
#app { display: flex; flex-direction: row; height: 100vh; }
#app.noside .side { display: none; }

/* left sidebar */
.side { width: 256px; flex: none; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); overflow: hidden; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.side .brand b { display: block; font-size: 15px; }
.side .brand span { display: block; font-size: 11.5px; }
.side .brand img { border-radius: 8px; }
.sideclose, .sideopen { display: none; }
.sidelinks { padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.slink { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); cursor: pointer; text-decoration: none; }
.slink:hover { background: var(--accent-soft); }
.slink svg, .search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; flex: none; }
.sidehead { margin: 14px 20px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .3px; }
.modlist { flex: 1; overflow-y: auto; padding: 0 10px 10px; display: block; background: none; border: 0; }
.modlist .mod { display: block; padding: 0; border-radius: 8px; cursor: default; }
.modlist .mod:hover { background: none; }
.modhead { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: none; border-radius: 8px; color: #24333a; text-align: left; }
.modhead:hover { background: #f1f6f7; }
.modhead .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.modhead .ml { flex: 1; }
.modhead .caret { color: #8a989e; font-size: 10px; transition: transform .15s; }
.mod.open > .modhead { font-weight: 600; }
.mod.open > .modhead .caret { transform: rotate(90deg); }
.modbody { display: none; padding: 2px 0 8px 19px; border-left: 1px solid var(--line); margin-left: 14px; }
.mod.open > .modbody { display: block; }
.modbody .grp { font-size: 11px; color: var(--muted); font-weight: 600; margin: 8px 0 2px 8px; }
.tl { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; color: #2a383e; cursor: pointer; text-decoration: none; font-size: 12.8px; line-height: 1.35; }
.tl:hover { background: var(--accent-soft); color: var(--accent-dark); }
.tl .t { flex: 1; }
.tl.planned .t { color: #9aa6ab; }
.sysbox { margin: 8px 12px 14px; padding: 10px 12px; border-radius: var(--r); background: #f3f7f7; font-size: 12px; }
.sysbox .sysstat { display: block; cursor: pointer; color: var(--text); text-decoration: none; }
.sysbox .sr2 { display: flex; justify-content: space-between; margin-top: 4px; }
.mini { height: 5px; border-radius: 9px; background: #dde7e8; overflow: hidden; margin-top: 3px; }
.mini > div { height: 100%; border-radius: 9px; background: var(--accent); }
.mini > .warn { background: #d98a2b; } .mini > .bad { background: #d33a3a; }
.sysstat b.ok { color: #1f7a4a; }

/* center column */
.center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid #d3dee0; border-radius: var(--r); color: var(--muted); background: #fff; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15,124,140,.12); }
.search input { flex: 1; border: 0; outline: 0; font: inherit; background: transparent; color: var(--text); min-width: 0; }
.kbd { font-size: 11px; padding: 1px 6px; border: 1px solid #d3dee0; border-radius: 5px; }
.menubar { display: flex; gap: 2px; background: none; border: 0; padding: 0; }
.mb-item { padding: 6px 10px; border-radius: 8px; cursor: pointer; color: #34444b; }
.mb-item:hover, .mb-item.open { background: var(--accent-soft); }
#wsInfo { display: flex; align-items: center; gap: 8px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.searchres { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(16,40,48,.14); padding: 4px; max-height: 60vh; overflow: auto; }
.searchres .sr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.searchres .sr .t { flex: 1; }
.searchres .sr .dot { width: 8px; height: 8px; border-radius: 50%; }
.searchres .sr.on, .searchres .sr:hover { background: var(--accent-soft); }

.main { margin: 14px 18px 18px; border: 0; background: transparent; min-height: 0; }
.tabs { background: transparent; border: 0; gap: 6px; padding-bottom: 10px; min-height: 0; flex-wrap: nowrap; }
.tab { border: 0; border-radius: 999px; background: #e8eff0; padding: 6px 12px; color: #34444b; max-width: 260px; }
.tab:hover { background: #dde8ea; }
.tab.active { background: var(--text); color: #fff; box-shadow: none; }
.tab.active .x { color: #c9d4d7; }
.tab .x:hover { background: rgba(255,255,255,.15); color: #fff; }
.tabcontent { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.view { padding: 20px 24px; }

/* right rail (진행 상황 · 작업 기록) */
.splitter { width: 6px; height: auto; cursor: col-resize; background: transparent; flex: none; }
.splitter:hover { background: #e2ecee; }
.rail { width: 360px; height: auto; flex: none; display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 14px 0; min-width: 0; }
.rail .panel { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; min-height: 0; }
.rail .panel.left { flex: 1.1; } .rail .panel.right { flex: 1; }
.ptabs { background: #fff; border-bottom: 1px solid var(--line2); padding: 6px 6px 0; gap: 2px; overflow-x: auto; }
.ptab { border: 0; border-radius: 8px 8px 0 0; padding: 7px 12px; color: var(--muted); white-space: nowrap; }
.ptab.active { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); background: none; }
.bar { height: 7px; border-radius: 9px; background: #e4ecee; }
.bar > div { background: var(--accent); border-radius: 9px; }
.st { border-radius: 999px; padding: 1px 8px; min-width: 0; font-size: 10.5px; }
.st.RUNNING { background: var(--accent); }
.btn { border-radius: 8px; border-color: #cfdadd; padding: 6px 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-dark); }
a.link { color: var(--accent); }
.desc { border-left: 0; border-radius: 8px; background: #f2f8f9; }
.dialog { border-radius: 14px; }
fieldset { border-radius: 10px; border-color: var(--line); }
table.grid th { background: #f4f8f8; }

/* 홈 */
.home { max-width: 1100px; }
.homehead { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.homehead h1 { margin: 2px 0 0; font-size: 24px; letter-spacing: -.4px; }
.home h3 { margin: 22px 0 10px; font-size: 14.5px; }
.hbtns { display: flex; gap: 8px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.qcard { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--text); text-decoration: none; background: #fff; }
.qcard:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(15,124,140,.10); }
.qcard .qi { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 4px; }
.qcard .muted { font-size: 12px; }
.homecols { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.hcard { flex: 1 1 320px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 12px; }
.hcard h3 { margin: 12px 0 8px; }
.hjob { display: block; padding: 8px 0; border-top: 1px solid var(--line2); cursor: pointer; color: var(--text); text-decoration: none; }
.hjob:hover b, .hjob:hover span { color: var(--accent-dark); }
.hj1 { display: flex; justify-content: space-between; gap: 10px; }
.hjob .mini > .ok { background: var(--accent); }
.modcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.modcard { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #f6f9f9; cursor: pointer; color: var(--text); text-decoration: none; }
.modcard:hover { background: var(--accent-soft); }
.modcard .dot { width: 9px; height: 9px; border-radius: 50%; }
.modcard .muted { margin-left: auto; font-size: 11.5px; }

/* 좁은 화면: 왼쪽 메뉴는 ☰로 열고, 오른쪽 패널은 아래로 */
@media (max-width: 1100px) {
  .rail { width: 300px; }
}
@media (max-width: 820px) {
  #app { flex-direction: column; height: auto; min-height: 100vh; }
  body { overflow: auto; }
  .side { position: fixed; inset: 0 auto 0 0; width: 86vw; max-width: 320px; z-index: 80; transform: translateX(-102%); transition: transform .2s; box-shadow: 4px 0 24px rgba(0,0,0,.18); }
  .side.open { transform: none; }
  .sideclose, .sideopen { display: inline-block; font-size: 18px; }
  .sideclose { margin-left: auto; }
  .topbar { padding: 8px 10px; gap: 6px; }
  .search { order: 5; flex-basis: 100%; }
  .kbd { display: none; }
  .menubar { order: 4; }
  .main { margin: 10px; min-height: 70vh; }
  .splitter { display: none; }
  .rail { width: auto !important; padding: 0 10px 14px; }
  .rail .panel { min-height: 220px; }
}

.modhead .caret { margin-top: 0; font-size: 10px; }
.st.STOPPED { background: #8a959a; }
