/* 신규입사자관리 HR 화면 프로토타입 — HR Platform 공통 디자인 + 모듈 강조색 Dusty Rose #B85C7A */
:root {
  --bg: #f4f7fc; --sf: #fff; --sf2: #f7f9fc; --bd: #e3e8f0; --bd2: #cdd6e3;
  --ink: #1b2a4a; --ink2: #5b6472; --ink3: #8a93a2;
  --brand: #1f6fe5; --brand-h: #1a5fd0; --brand-soft: #eaf1fd;
  --acc: #b85c7a; --acc-h: #9f4a67; --acc-soft: #f7e9ee; --acc-soft2: #fbf4f6;
  --danger: #c8382e; --danger-soft: #fdecea; --warn: #b7791f; --warn-soft: #fdf3e2; --ok: #1f9d6a; --ok-soft: #e3f5ed;
  --violet: #6d55c7; --violet-soft: #f1edfb; --teal: #167d70; --teal-soft: #e5f3f1;
  --th: #eef2f8; --row: #e8edf4; --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --shadow: 0 1px 2px rgba(27,42,74,.05), 0 6px 18px -14px rgba(184,92,122,.28);
  --pop: 0 20px 44px -18px rgba(15,23,42,.38);
  --font: "Noto Sans KR", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 13.5px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.app { display: flex; min-height: 100vh; }
.sb { width: 240px; flex: none; background: var(--sf); border-right: 1px solid var(--bd); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; border-bottom: 1px solid var(--bd); margin-bottom: 12px; }
.logo { font-weight: 800; font-size: 18px; letter-spacing: .02em; color: #24408e; } .logo i { font-style: normal; color: #8fb0e6; }
.mod { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--acc-soft); color: var(--acc); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 2px 0; border-radius: 8px; color: var(--ink2); font-weight: 500; position: relative; }
.nav a:hover { background: var(--acc-soft2); color: var(--ink); }
.nav a.on { background: var(--acc-soft); color: var(--acc); font-weight: 700; }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acc); }
.nav .cnt { margin-left: auto; font-size: 11px; background: var(--th); color: var(--ink2); border-radius: 999px; padding: 1px 7px; }
.nav .cnt.alert { background: var(--acc-soft); color: var(--acc); font-weight: 700; }
.sb-user { font-size: 12px; color: var(--ink2); padding: 8px 12px; border-top: 1px solid var(--bd); margin-top: 6px; }
.sb-user b { color: var(--ink); }
.sb-foot { margin-top: auto; border-top: 1px solid var(--bd); padding-top: 10px; }
.sb-foot a.home { background: var(--brand); color: #fff; justify-content: center; font-weight: 600; } .sb-foot a.home:hover { background: var(--brand-h); color: #fff; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 64px; flex: none; background: var(--sf); border-bottom: 1px solid var(--bd); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.top h1 { font-size: 18px; margin: 0; } .top .sub { color: var(--ink3); font-size: 12.5px; }
.top .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ham { display: none; width: 40px; height: 40px; border: 1px solid var(--bd2); border-radius: 8px; background: #fff; align-items: center; justify-content: center; }
.content { padding: 22px 28px 60px; display: flex; flex-direction: column; gap: 16px; }
.demo-banner { background: #fffbea; border: 1px solid #f1dfa1; color: #7a5b0c; border-radius: var(--r); padding: 8px 12px; font-size: 12.5px; }
.screen { display: none; flex-direction: column; gap: 16px; } .screen.on { display: flex; }
.card { background: var(--sf); border: 1px solid var(--bd); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.pad { padding: 16px 18px; }
.h2 { font-size: 15px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.h2 .aside { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--ink3); }
.muted { color: var(--ink3); }
.btn { height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--bd2); background: #fff; color: var(--ink); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--sf2); border-color: #b4c0d3; }
.btn.acc { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 600; } .btn.acc:hover { background: var(--acc-h); }
.btn.ok { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.btn.warn { color: var(--warn); border-color: #ecc98a; background: #fff; font-weight: 600; } .btn.warn:hover { background: var(--warn-soft); }
.btn.dg { color: var(--danger); border-color: #f2b8b2; } .btn.dg:hover { background: var(--danger-soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.tag-new { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--violet-soft); color: var(--violet); vertical-align: 1px; white-space: nowrap; }
.tag-now { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); vertical-align: 1px; white-space: nowrap; }
.demo { font-size: 10.5px; font-weight: 700; color: #8a6d12; background: #fff4cc; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
select, input[type=text], input[type=date], input[type=search], input[type=email], textarea { font: inherit; font-size: 13px; color: var(--ink); background: #fff; border: 1px solid var(--bd2); border-radius: var(--r); min-height: 36px; padding: 6px 10px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px rgba(184,92,122,.16); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink2); font-weight: 500; }
label.f b.req { color: var(--acc); }

/* 상태 배지 — 기존 구현 상태 이름 그대로 */
.st { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; display: inline-block; }
.st-in_progress { background: #e0f2fe; color: #075985; }
.st-submitted { background: #ede9fe; color: #5b21b6; }
.st-reviewing { background: #fef3c7; color: #92400e; }
.st-changes_requested { background: #fee2e2; color: #991b1b; }
.st-revised { background: #fae8ff; color: #86198f; }
.st-approved { background: #dcfce7; color: #166534; }
.st-registered { background: #1c2f4a; color: #fff; }
.st-link-ok { background: var(--ok-soft); color: var(--ok); } .st-link-exp { background: #eef1f6; color: var(--ink2); } .st-link-rev { background: var(--danger-soft); color: var(--danger); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi { padding: 14px 16px; cursor: pointer; transition: border-color .12s, transform .12s; }
.kpi:hover { border-color: #e4b6c5; transform: translateY(-1px); }
.kpi .l { font-size: 12px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 26px; font-weight: 700; line-height: 1.1; margin-top: 6px; } .kpi .v small { font-size: 13px; color: var(--ink2); font-weight: 500; margin-left: 2px; }
.kpi .d { font-size: 11px; color: var(--ink3); margin-top: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dash { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }
.todo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.todo .it { border: 1px solid var(--bd); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; background: #fff; }
.todo .it:hover { border-color: #e4b6c5; background: var(--acc-soft2); }
.todo .it .n { font-size: 24px; font-weight: 800; min-width: 34px; text-align: center; }
.todo .it .t b { display: block; font-size: 13.5px; } .todo .it .t span { font-size: 11.5px; color: var(--ink3); }
.todo .it.hot { border-color: #ecc0cf; background: var(--acc-soft2); } .todo .it.hot .n { color: var(--acc); }
.stack { display: flex; height: 22px; border-radius: 8px; overflow: hidden; margin: 6px 0 10px; }
.stack span { display: block; height: 100%; }
.leg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 12px; color: var(--ink2); }
.leg div { display: flex; align-items: center; gap: 6px; } .leg b { margin-left: auto; color: var(--ink); }

/* 프로세스 */
.proc { display: flex; align-items: flex-start; overflow-x: auto; padding: 4px 0 2px; }
.proc .s { flex: 1; min-width: 96px; text-align: center; position: relative; font-size: 11.5px; color: var(--ink2); padding: 0 4px; }
.proc .s .c { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--th); color: var(--ink2); position: relative; z-index: 1; }
.proc .s b { display: block; color: var(--ink); font-size: 12.5px; }
.proc .s:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--bd2); }
.proc .s.done .c { background: var(--ok-soft); color: var(--ok); } .proc .s.done::after { background: #9fd9bf; }
.proc .s.cur .c { background: var(--acc); color: #fff; box-shadow: 0 0 0 4px var(--acc-soft); }
.proc .s.branch .c { background: var(--warn-soft); color: var(--warn); }
.proc .s .who { font-size: 10.5px; color: var(--ink3); display: block; }

/* 표 */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th { background: var(--th); text-align: left; padding: 10px; font-weight: 700; white-space: nowrap; font-size: 12px; }
table.t td { padding: 10px; border-bottom: 1px solid var(--row); vertical-align: middle; }
table.t tbody tr:hover { background: var(--acc-soft2); }
table.t td.nm { font-weight: 700; } table.t td.act { white-space: nowrap; }
.dday { font-size: 11px; font-weight: 700; color: var(--acc); margin-left: 4px; }
.mono { font-family: Consolas, "D2Coding", monospace; }

/* 상세 / 검토 */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.qlist .q { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--row); cursor: pointer; align-items: center; }
.qlist .q:first-of-type { border-top: none; }
.qlist .q.on { background: var(--acc-soft2); box-shadow: inset 3px 0 0 var(--acc); }
.qlist .q .info { flex: 1; min-width: 0; } .qlist .q .info b { font-size: 13.5px; } .qlist .q .info div { font-size: 11.5px; color: var(--ink3); }
.av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #d28aa3, #9f4a67); font-size: 14px; }
.av.lg { width: 84px; height: 108px; border-radius: 8px; font-size: 26px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--bd); overflow-x: auto; }
.tabs button { border: none; background: none; padding: 10px 14px; font-size: 13px; color: var(--ink2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--acc); }
.tabp { display: none; padding-top: 14px; } .tabp.on { display: block; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; font-size: 13px; }
.kv > div > span:first-child { display: block; font-size: 11.5px; color: var(--ink3); }
.check { display: flex; flex-direction: column; gap: 8px; }
.chk { border: 1px solid var(--bd); border-radius: 10px; padding: 10px 12px; display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; }
.chk .lab { font-weight: 700; font-size: 13px; } .chk .lab small { display: block; font-weight: 400; color: var(--ink3); font-size: 11.5px; }
.chk .val { font-size: 12.5px; color: var(--ink2); min-width: 0; }
.chk .ops { display: flex; gap: 6px; }
.chk.ok { border-color: #b7e3cf; background: #f6fcf9; } .chk.req { border-color: #ecc98a; background: #fffaf0; }
.chk .note { grid-column: 1 / -1; display: none; } .chk.req .note { display: block; }
.seg { display: inline-flex; border: 1px solid var(--bd2); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: #fff; height: 30px; padding: 0 10px; font-size: 12px; color: var(--ink2); }
.seg button.on-ok { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.seg button.on-req { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.decision { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dec { border-radius: 12px; padding: 14px; border: 1px solid var(--bd); }
.dec h4 { margin: 0 0 4px; font-size: 14px; } .dec p { margin: 0 0 10px; font-size: 12px; color: var(--ink2); }
.dec.req { border-color: #ecc98a; background: #fffaf0; } .dec.apv { border-color: #b7e3cf; background: #f6fcf9; }
.timeline { border-left: 2px solid var(--bd); margin-left: 6px; padding-left: 16px; }
.tl { position: relative; padding-bottom: 12px; }
.tl::before { content: ""; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--acc); }
.tl .w { font-size: 11.5px; color: var(--ink3); } .tl .a { font-weight: 700; } .tl .d { font-size: 12.5px; color: var(--ink2); }
.photo-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--bd); border-radius: 10px; padding: 10px 12px; flex: 1; min-width: 240px; }
.file .ic { width: 34px; height: 40px; border-radius: 5px; background: var(--danger-soft); color: var(--danger); font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.file .ic.img { background: var(--acc-soft); color: var(--acc); }
.note-box { border-left: 3px solid var(--acc); background: var(--acc-soft2); border-radius: 0 8px 8px 0; padding: 10px 12px; font-size: 12.5px; }
.gate { border: 1px dashed #e4b6c5; background: var(--acc-soft2); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 > *, .split > *, .dash > *, .decision > * { min-width: 0; }
.linkbox .row { flex-wrap: wrap; }
.linkbox { border: 1px solid var(--bd); border-radius: 10px; padding: 12px; background: var(--sf2); display: flex; flex-direction: column; gap: 8px; }
.linkbox .row { display: flex; gap: 8px; align-items: center; }
.linkbox .row .v { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--bd2); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code { font-family: Consolas, monospace; font-size: 22px; letter-spacing: .3em; font-weight: 800; color: var(--acc); }
.set-item { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--row); }
.set-item:first-of-type { border-top: none; }
.set-item .t b { display: block; font-size: 13.5px; } .set-item .t span { font-size: 11.5px; color: var(--ink3); }
.lock { opacity: .6; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #0f2a40; color: #fff; border-radius: 10px; padding: 10px 16px; font-size: 13px; display: none; z-index: 70; box-shadow: var(--pop); }
.toast.on { display: block; }

@media (max-width: 1240px) { .kpis { grid-template-columns: repeat(3, 1fr); } .dash { grid-template-columns: 1fr; } .split { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .sb { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 8px 0 24px -12px rgba(0,0,0,.4); }
  body.menu-open .sb { transform: none; } body.menu-open .scrim { display: block; }
  .ham { display: inline-flex; }
  .top { padding: 0 14px; height: 56px; } .top .sub, .top .hide-m { display: none; } .top h1 { font-size: 16px; }
  .content { padding: 14px 12px 80px; }
  .kpis { grid-template-columns: 1fr 1fr; } .kpi .v { font-size: 22px; }
  .todo { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; }
  .chk { grid-template-columns: 1fr; } .chk .ops { justify-content: flex-start; }
  .decision, .grid2 { grid-template-columns: 1fr; }
  .set-item { grid-template-columns: 1fr; }
  .btn, select, input[type=text], input[type=date], input[type=search] { min-height: 40px; }
  .btn.sm { height: 34px; }
  /* 표 → 카드형 */
  table.t.cardify thead { display: none; }
  table.t.cardify, table.t.cardify tbody, table.t.cardify tr, table.t.cardify td { display: block; width: 100%; }
  table.t.cardify tr { border: 1px solid var(--bd); border-radius: 10px; margin: 10px 0; padding: 8px 10px; background: #fff; }
  table.t.cardify td { border: none; padding: 4px 0; display: flex; gap: 10px; }
  table.t.cardify td::before { content: attr(data-l); width: 86px; flex: none; color: var(--ink3); font-size: 11.5px; }
  table.t.cardify td.nm { font-size: 15px; } table.t.cardify td.nm::before { content: ""; width: 0; }
  .tbl-wrap.cardwrap { overflow: visible; } .tbl-wrap.cardwrap.card { background: none; border: none; box-shadow: none; }
}
