/* XON JOBS 통합관리자 — layout on top of weep.css tokens */
:root {
  --a-nav: #1a1410;
  --a-nav-2: #2b201a;
  --a-lnb: #ffffff;
  --a-h: 56px;
  --a-lnb-w: 216px;
}

body.admin { background: var(--canvas); font-size: 14px; }

/* top bar */
.a-top {
  position: fixed; top: 0; left: 0; right: 0; height: var(--a-h); z-index: 500;
  background: var(--a-nav); display: flex; align-items: center; padding: 0 20px; gap: 22px;
}
.a-top .logo img { height: 30px; }
.a-top .env { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: #7f88a6; border: 1px solid #333c5c; border-radius: 4px; padding: 2px 6px; }
.a-gnb { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.a-gnb::-webkit-scrollbar { display: none; }
.a-gnb a { padding: 7px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: #a9b1c9; white-space: nowrap; }
.a-gnb a:hover { background: var(--a-nav-2); color: #fff; }
.a-gnb a.on { background: var(--brand); color: #fff; }
.a-me { display: flex; align-items: center; gap: 12px; color: #a9b1c9; font-size: 13px; white-space: nowrap; }
.a-me a { color: #a9b1c9; }
.a-me a:hover { color: #fff; }

/* frame */
.a-body { display: flex; padding-top: var(--a-h); min-height: 100vh; }
.a-lnb {
  width: var(--a-lnb-w); flex: none; background: var(--a-lnb); border-right: 1px solid var(--line);
  position: fixed; top: var(--a-h); bottom: 0; overflow-y: auto; padding-bottom: 40px;
}
.a-lnb h2 { padding: 20px 18px 12px; font-size: 15px; letter-spacing: -.03em; }
.a-lnb li a { display: block; padding: 9px 18px; font-size: 13.5px; color: var(--ink-2); border-left: 3px solid transparent; }
.a-lnb li a:hover { background: var(--canvas); }
.a-lnb li a.on { border-left-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.a-lnb .grp { padding: 16px 18px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted-2); text-transform: uppercase; }
.a-main { flex: 1; margin-left: var(--a-lnb-w); padding: 22px 26px 60px; min-width: 0; }

.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.a-head h1 { font-size: 21px; letter-spacing: -.03em; }
.a-head .code { font-family: var(--font-mono); font-size: 11px; color: var(--muted-2); letter-spacing: .06em; }
.a-head .path { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* search panel */
.a-search { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; }
.a-search table { font-size: 13px; }
.a-search th { width: 108px; background: var(--canvas); border: 1px solid var(--line-2); padding: 9px 12px; text-align: left; font-weight: 700; color: var(--ink-2); }
.a-search td { border: 1px solid var(--line-2); padding: 8px 12px; }
.a-search .inp { height: 34px; font-size: 13px; }
.a-search .inp.w-s { width: 130px; } .a-search .inp.w-m { width: 200px; } .a-search .inp.w-l { width: 320px; }
.a-search-f { display: flex; justify-content: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button { padding: 6px 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); background: var(--paper); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; }

/* toolbar + table */
.a-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; flex-wrap: wrap; }
.a-bar .cnt { font-size: 13px; color: var(--muted); }
.a-bar .cnt b { color: var(--ink); font-family: var(--font-mono); }
.a-bar .acts { display: flex; gap: 6px; align-items: center; }
.a-tbl-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
.a-tbl { font-size: 13px; min-width: 100%; }
.a-tbl th, .a-tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); text-align: center; white-space: nowrap; }
.a-tbl thead th { background: var(--canvas); font-weight: 700; color: var(--ink-2); position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); }
.a-tbl tbody tr:hover { background: #fafbff; }
.a-tbl td.l { text-align: left; white-space: normal; min-width: 220px; }
.a-tbl td.r { text-align: right; font-family: var(--font-mono); }
.a-tbl a { font-weight: 600; }
.a-tbl a:hover { color: var(--brand); text-decoration: underline; }

.stat { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 700; }
.s-wait { background: #fff6e5; color: #a06400; }
.s-go { background: var(--brand-soft); color: var(--brand-ink); }
.s-ok { background: var(--signal-soft); color: #00755a; }
.s-no { background: #fdecea; color: #a4201a; }
.s-end { background: var(--canvas-2); color: var(--muted); }

/* dashboard */
.a-kpi { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.a-kpi .card-pad { padding: 16px 18px; }
.a-kpi .k { font-size: 12.5px; color: var(--muted); }
.a-kpi .v { font-family: var(--font-display); font-size: 25px; letter-spacing: -.04em; margin-top: 4px; }
.a-kpi .v em { font-style: normal; font-size: 13px; color: var(--muted); margin-left: 2px; }
.a-kpi .d { font-size: 12px; font-weight: 700; margin-top: 3px; }
.a-kpi .up { color: var(--signal); } .a-kpi .down { color: var(--danger); }
.a-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.a-panel-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14.5px; }
.a-panel-h a { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.a-panel-b { padding: 16px; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; }
.bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bars i { display: block; width: 100%; min-height: 3px; background: linear-gradient(180deg, var(--brand) 0%, #ff8a4c 100%); border-radius: 4px 4px 0 0; }
.bars > div > span { flex: none; }
.bars i.alt { background: linear-gradient(180deg, var(--signal) 0%, #45cfae 100%); }
.bars span { font-size: 11px; color: var(--muted); }

/* login */
.a-login { min-height: 100vh; display: grid; place-items: center; background: var(--a-nav); padding: 24px; }
.a-login-box { width: 100%; max-width: 400px; background: var(--paper); border-radius: var(--r-xl); padding: 36px; box-shadow: var(--shadow-3); }

@media (max-width: 1200px) { .a-kpi { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .a-lnb { display: none; }
  .a-main { margin-left: 0; padding: 16px; }
  .a-kpi { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- 상세(뷰) 화면 ---------------- */
.a-view { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.a-view-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.a-view-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--a-h) + 16px); }
.dl { display: grid; grid-template-columns: 132px 1fr; border-top: 1px solid var(--line); font-size: 13.5px; }
.dl > dt { padding: 11px 14px; background: var(--canvas); color: var(--ink-2); font-weight: 600; border-bottom: 1px solid var(--line-2); }
.dl > dd { padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.dl.two { grid-template-columns: 132px 1fr 132px 1fr; }
.dl .full { grid-column: 2 / -1; }
.a-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 16px; background: var(--paper); border-radius: var(--r) var(--r) 0 0; }
.a-tabs button { padding: 12px 14px; font-size: 13.5px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.a-tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.pane { display: none; }
.pane.on { display: block; }
.a-actbar { position: sticky; bottom: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; display: flex; gap: 8px; justify-content: flex-end; box-shadow: 0 -6px 18px -12px rgba(23,19,16,.35); }
.a-actbar .l { margin-right: auto; display: flex; gap: 8px; }
.sidebox { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: 13px; }
.sidebox h4 { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; letter-spacing: .02em; }
.sidebox .row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.sidebox .row > span { color: var(--muted); flex: none; }
.tline { position: relative; padding-left: 18px; }
.tline li { position: relative; padding: 0 0 14px 0; font-size: 13px; line-height: 1.6; }
.tline li::before { content: ""; position: absolute; left: -18px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.tline li::after { content: ""; position: absolute; left: -14px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.tline li:last-child::after { display: none; }
.tline li em { font-style: normal; display: block; font-size: 11.5px; color: var(--muted-2); font-family: var(--font-mono); }
.ms { display: grid; gap: 8px; }
.ms > div { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13.5px; }
.ms .no { width: 26px; height: 26px; border-radius: 50%; background: var(--canvas-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.ms .done .no, .ms > div.done .no { background: var(--signal); color: #fff; }
@media (max-width: 1100px) { .a-view { grid-template-columns: 1fr; } .a-view-side { position: static; } .dl.two { grid-template-columns: 120px 1fr; } }
.a-search textarea.inp { height: auto; padding: 10px 12px; resize: vertical; }
.a-search td > label { white-space: nowrap; }
