@font-face { font-family: Pretendard; src: url(/fonts/PretendardVariable.woff2) format("woff2-variations"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #f2f4f7; --panel: #fff; --line: #dde2ea; --line-2: #edf0f4; --text: #18202c; --muted: #6b7585; --soft: #f7f8fa;
  --navy: #142033; --navy-2: #1f2e45; --navy-3: #2a3c58; --pri: #c8261c; --pri-2: #a91e15; --pri-3: #fdeceb;
  --blue: #1f5fd6; --blue-3: #e8effd; --ok: #1d8a55; --ok-3: #e2f4ea; --warn: #c57a0a; --warn-3: #fcf1de; --gray-3: #eceff3;
  --font: Pretendard, "Noto Sans KR", system-ui, sans-serif; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #f3a43b; outline-offset: 1px; }
.tnum, td.n, .n { font-variant-numeric: tabular-nums; }
svg.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 틀 */
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--navy); color: #c9d2e0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 900; font-size: 18px; letter-spacing: -.4px; }
.side .brand i { width: 30px; height: 30px; border-radius: 8px; background: var(--pri); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 16px; }
.side .grp { font-size: 12px; color: #7d8aa0; font-weight: 700; padding: 14px 20px 6px; letter-spacing: .5px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 0 14px; margin: 1px 8px; height: 38px; border-radius: 8px; font-size: 14.5px; font-weight: 600; }
.side a:hover { background: var(--navy-2); color: #fff; }
.side a.on { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--pri); }
.side a svg { font-size: 17px; opacity: .85; }
.side a .c { margin-left: auto; background: var(--pri); color: #fff; font-size: 12px; padding: 0 7px; border-radius: 999px; line-height: 19px; }
.side .foot { margin-top: auto; padding: 14px 20px 18px; font-size: 12.5px; color: #7d8aa0; line-height: 1.6; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 58px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.top .burger { display: none; font-size: 22px; }
.top .search { flex: 0 1 360px; position: relative; }
.top .search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px 0 36px; background: var(--soft); }
.top .search svg { position: absolute; left: 11px; top: 11px; color: var(--muted); }
.top .search .res { position: absolute; top: 42px; left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.12); max-height: 360px; overflow: auto; z-index: 30; }
.top .search .res a { display: block; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
.top .search .res a:hover { background: var(--soft); }
.top .search .res small { color: var(--muted); margin-left: 6px; }
.top .r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top .who { font-size: 14px; font-weight: 700; }
.top .who small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.mode { font-size: 12px; font-weight: 800; background: var(--warn-3); color: var(--warn); border-radius: 999px; padding: 3px 10px; }
.page { padding: 22px 24px 60px; max-width: 1500px; width: 100%; }
.ph { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ph h1 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.ph .sub { color: var(--muted); font-size: 14px; }
.ph .r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumb a:hover { text-decoration: underline; }

/* 버튼 · 입력 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 8px; font-weight: 700; font-size: 14px; white-space: nowrap; border: 1px solid transparent; }
.btn.pri { background: var(--pri); color: #fff; } .btn.pri:hover:not(:disabled) { background: var(--pri-2); }
.btn.navy { background: var(--navy-2); color: #fff; }
.btn.blue { background: var(--blue); color: #fff; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.line { background: #fff; border-color: var(--line); } .btn.line:hover:not(:disabled) { background: var(--soft); }
.btn.ghost { color: var(--muted); } .btn.ghost:hover { background: var(--soft); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 10px; }
.btn.danger { background: #fff; border-color: #f0c4c1; color: var(--pri-2); }
.inp, select.inp, textarea.inp { height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; background: #fff; min-width: 0; }
textarea.inp { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.inp:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-3); }
.inp.n { text-align: right; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: #3c4757; }
label.f > small { font-weight: 500; color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fgrid .full { grid-column: 1 / -1; }
.fgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; cursor: pointer; }
.chk input { width: 17px; height: 17px; accent-color: var(--pri); }

/* 카드 · 통계 */
.cards { display: grid; gap: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.card > .h { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); font-weight: 800; font-size: 15.5px; }
.card > .h .r { margin-left: auto; display: flex; gap: 6px; font-weight: 600; }
.card > .b { padding: 14px 16px; }
.card > .b.p0 { padding: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; }
.kpi span { font-size: 13px; color: var(--muted); font-weight: 700; }
.kpi b { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.6px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.kpi em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.kpi.red { border-color: #f1c7c4; background: linear-gradient(#fff, #fff8f7); } .kpi.red b { color: var(--pri-2); }
.kpi.blue b { color: var(--blue); }
.kpi a.go { position: absolute; inset: 0; }
.g2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.g3 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }

/* 표 */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.t th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; }
table.t td.c, table.t th.c { text-align: center; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: #f8fafd; }
table.t tr.sel td { background: var(--blue-3); }
table.t tr.dim td { color: #9aa3b1; }
table.t tfoot td { font-weight: 800; background: var(--soft); border-top: 1px solid var(--line); }
table.t td .sub { display: block; font-size: 12.5px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--gray-3); color: #5b6575; }
.pill.ok { background: var(--ok-3); color: var(--ok); } .pill.warn { background: var(--warn-3); color: var(--warn); } .pill.red { background: var(--pri-3); color: var(--pri-2); } .pill.blue { background: var(--blue-3); color: var(--blue); } .pill.navy { background: var(--navy-2); color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters .inp { height: 36px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { height: 42px; padding: 0 16px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--pri); }
.tabs button .c { margin-left: 4px; font-size: 12px; background: var(--gray-3); border-radius: 999px; padding: 1px 7px; }
.seg { display: inline-flex; background: var(--gray-3); border-radius: 9px; padding: 3px; }
.seg button { height: 30px; padding: 0 12px; border-radius: 7px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* 흐름 표시 (거래처 통합) */
.flow { display: flex; align-items: stretch; gap: 0; margin-bottom: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.flow > div { flex: 1; min-width: 120px; padding: 12px 14px; border-right: 1px solid var(--line-2); position: relative; }
.flow > div:last-child { border-right: 0; }
.flow > div span { font-size: 12px; color: var(--muted); font-weight: 700; display: block; }
.flow > div b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.flow > div::after { content: "›"; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); color: #b8c0cc; font-size: 18px; background: #fff; z-index: 1; }
.flow > div:last-child::after { display: none; }
.flow > div.red b { color: var(--pri-2); }

/* 모달 · 시트 */
.ov { position: fixed; inset: 0; background: rgba(15,22,34,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: pop .15s; }
.modal.wide { max-width: 980px; } .modal.mid { max-width: 780px; }
.modal > .h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); font-weight: 800; font-size: 17px; }
.modal > .h .x { margin-left: auto; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--muted); }
.modal > .h .x:hover { background: var(--soft); }
.modal > .b { padding: 18px 20px; }
.modal > .f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--soft); border-radius: 0 0 14px 14px; }
.err { background: var(--pri-3); color: var(--pri-2); border-radius: 8px; padding: 9px 12px; font-weight: 700; font-size: 14px; margin-top: 10px; }
.note { background: var(--soft); border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 12px; font-size: 13.5px; color: #4b5565; line-height: 1.6; }
.note.warn { background: var(--warn-3); border-color: #f1dcb4; color: #7a4d06; }
.toast { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); background: rgba(16,22,32,.92); color: #fff; padding: 12px 22px; border-radius: 10px; font-weight: 700; z-index: 200; animation: tst 2.6s forwards; max-width: calc(100% - 32px); }
@keyframes tst { 0% { opacity: 0; transform: translate(-50%, 8px); } 8% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--pri); border-radius: 50%; animation: sp .8s linear infinite; margin: 60px auto; }
@keyframes sp { to { transform: rotate(360deg); } }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 14px; }
.kv > span { color: var(--muted); font-weight: 700; }
.bar { height: 8px; border-radius: 4px; background: var(--gray-3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--pri); }

/* 차트 (막대) */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding: 10px 6px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; gap: 4px; align-items: flex-end; height: 150px; }
.chart .bars i { width: 16px; border-radius: 4px 4px 0 0; display: block; min-height: 2px; }
.chart small { font-size: 12px; color: var(--muted); font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* 공사 단계 보드 */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; }
.kanban .colk { background: var(--gray-3); border-radius: 10px; padding: 8px; min-height: 120px; }
.kanban .colk > b { display: block; font-size: 13px; padding: 4px 4px 8px; color: #485365; }
.kanban .it { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; margin-bottom: 8px; cursor: pointer; font-size: 13.5px; }
.kanban .it b { display: block; font-size: 14px; } .kanban .it small { color: var(--muted); display: block; }

/* 점검보고서 입력 */
.rp-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; }
.rp-nav { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 100px); overflow: auto; }
.rp-nav a { padding: 7px 10px; border-radius: 7px; font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 6px; }
.rp-nav a:hover { background: #fff; }
.rp-nav a em { font-style: normal; font-size: 12px; color: var(--muted); }
.rp-nav a.bad em { color: var(--pri-2); font-weight: 800; }
.rp-nav a.full em { color: var(--ok); }
.rp-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.eq { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; scroll-margin-top: 72px; }
.eq > .h { padding: 11px 16px; border-bottom: 1px solid var(--line-2); font-weight: 800; display: flex; gap: 8px; align-items: center; }
.eq > .h small { color: var(--muted); font-weight: 600; }
.eq .row { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line-2); }
.eq .row:last-child { border-bottom: 0; }
.eq .row .lb { font-size: 14.5px; font-weight: 600; }
.okg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.okg button { height: 38px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: 14px; color: #5b6575; }
.okg button.on.g { background: var(--ok); border-color: var(--ok); color: #fff; }
.okg button.on.b { background: var(--pri); border-color: var(--pri); color: #fff; }
.okg button.on.n { background: #8b95a5; border-color: #8b95a5; color: #fff; }
.unit { position: relative; } .unit span { position: absolute; right: 10px; top: 9px; color: var(--muted); font-size: 13px; }
.saved { font-size: 12.5px; color: var(--muted); }

/* 결재선 */
.aline { display: flex; gap: 6px; flex-wrap: wrap; }
.aline > div { border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; min-width: 100px; text-align: center; font-size: 13px; }
.aline > div b { display: block; font-size: 14px; }
.aline > div.approved { border-color: #a9d9bf; background: var(--ok-3); } .aline > div.rejected { border-color: #f1c7c4; background: var(--pri-3); }

/* 로그인 */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: linear-gradient(150deg, #142033, #2a1a1a); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; }
.login .art h1 { font-size: 40px; line-height: 1.25; letter-spacing: -1.2px; margin: 12px 0 16px; }
.login .art p { color: #b9c3d3; font-size: 17px; line-height: 1.7; margin: 0; max-width: 520px; }
.login .art .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.login .art .chips span { border: 1px solid #3a4a64; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; color: #d6deea; }
.login form { align-self: center; justify-self: center; width: 100%; max-width: 380px; padding: 24px; }
.login form h2 { font-size: 24px; margin: 0 0 20px; }
.login form .btn { width: 100%; height: 46px; font-size: 16px; margin-top: 8px; }
.demo { margin-top: 18px; }
.demo button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: #fff; font-size: 14px; }
.demo button:hover { border-color: var(--blue); }
.demo button small { color: var(--muted); margin-left: 6px; }

/* 내 업무 (점검자) */
.punch { display: flex; gap: 10px; align-items: center; }
.punch .btn { height: 56px; font-size: 18px; flex: 1; border-radius: 12px; }
.bigtime { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; }

@media (max-width: 1100px) { .g2, .g3 { grid-template-columns: 1fr; } .rp-head { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .side { position: fixed; left: -260px; z-index: 90; transition: left .2s; box-shadow: 10px 0 30px rgba(0,0,0,.3); }
  .side.open { left: 0; }
  .top .burger { display: inline-flex; }
  .top .search { display: none; }
  .page { padding: 16px 14px 60px; }
  .fgrid, .fgrid.c3 { grid-template-columns: 1fr; }
  .rp-wrap { grid-template-columns: 1fr; } .rp-nav { display: none; }
  .eq .row { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; } .login .art { display: none; }
  table.t { font-size: 13.5px; }
}
@media print { .side, .top, .ph .r, .filters { display: none !important; } .page { padding: 0; } }
