/* 통합 LCC 트래커 — 애플 스타일 간결함 · 네이비 계열 */
:root {
  --navy: #16325c; --navy-deep: #0d2141; --navy-soft: #3b5b8c;
  --bg: #f5f6f8; --card: #ffffff; --line: #e3e7ee; --hairline: #eceff4;
  --text: #1d1d1f; --muted: #6e7480;
  --ok: #2e7d4f; --warn: #c2410c; --danger: #b91c1c;
  --st-none: #eef0f3; --st-prog: #e3edf9; --st-done: #e2f3e8; --st-na: #f4f4f5;
  --r: 16px;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.65;
  letter-spacing: -0.005em;
  font-feature-settings: "case" 1, "ss01" 1;
  word-break: keep-all; overflow-wrap: anywhere;
}
/* 숫자·날짜·코드는 폭 고정 */
.dday b, .hero-d span, .tile b, .pct, .gm, .miles b, .stream-meta,
.ring-t, .tl-slip, input.date, td:has(> b.warn), td:has(> b.good) {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 헤더 ── */
header {
  background: rgba(13, 33, 65, 0.96); backdrop-filter: blur(14px);
  color: #fff; padding: 0 24px; display: flex; align-items: center; gap: 22px;
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
header .brand { font-weight: 700; font-size: 16.5px; padding: 14px 18px 14px 0; white-space: nowrap; letter-spacing: -0.02em; border-right: 1px solid rgba(255,255,255,.14); }
header .brand small { font-weight: 400; opacity: .6; margin-left: 8px; font-size: 12.5px; }
nav { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; margin-left: 6px; }
nav a {
  color: rgba(255,255,255,.78); padding: 8px 14px; font-size: 14px;
  font-weight: 600; border-radius: 10px; letter-spacing: -0.01em; white-space: nowrap;
  transition: background .15s, color .15s;
}
nav a:hover { color: #fff; background: rgba(255,255,255,.11); text-decoration: none; }
nav a.active { color: #0d2141; background: #fff; font-weight: 700; }
header .spacer { flex: 1; }
header .dday {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 6px 16px; font-size: 12.5px; margin: 9px 0; white-space: nowrap;
}
header .dday b { color: #ffd166; font-size: 15px; margin-left: 8px; font-variant-numeric: tabular-nums; }

main { max-width: 1200px; margin: 0 auto; padding: 34px 24px 72px; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; color: var(--navy-deep); margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }

/* ── 카드 ── */
.card {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r);
  padding: 22px 24px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(13,33,65,.04), 0 8px 24px rgba(13,33,65,.04);
}
.card h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; color: var(--navy-deep); margin-bottom: 10px; }

/* ── 히어로 ── */
.hero { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-d span {
  font-size: 56px; font-weight: 800; letter-spacing: -0.04em; color: var(--navy-deep);
  font-variant-numeric: tabular-nums; display: block; line-height: 1.05;
}
.hero-d small { color: var(--muted); font-size: 13.5px; }
.hero-chips { display: flex; flex-direction: column; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; font-weight: 600; background: var(--st-none); color: var(--muted);
}
.chip.legal { background: #fff4e8; color: var(--warn); border: 1px solid #f5dcc3; }
.chip.legal b { font-variant-numeric: tabular-nums; }
.chip.s1 { background: #e8eef7; color: var(--navy); }
.chip.s2 { background: #e5f0ea; color: var(--ok); }
.chip.s3 { background: #f3e8f7; color: #7c3aed; }
.chip.s4 { background: #fdf0e4; color: var(--warn); }

/* ── 4-스트림 파이프라인 ── */
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stream {
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r);
  padding: 20px 18px 16px; text-align: center; position: relative;
  box-shadow: 0 1px 2px rgba(13,33,65,.04); transition: transform .15s, box-shadow .15s;
}
.stream:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13,33,65,.10); text-decoration: none; }
.stream-no {
  position: absolute; top: 14px; left: 16px; width: 24px; height: 24px; border-radius: 8px;
  background: var(--navy-deep); color: #fff; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.stream h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin-top: 10px; }
.stream p { font-size: 12.5px; color: var(--muted); }
.stream-meta { font-size: 12px; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.ring { display: block; margin: 4px auto 0; }
.ring-t { font-size: 15px; font-weight: 700; fill: var(--navy-deep); font-variant-numeric: tabular-nums; }

/* ── 듀오 카드 ── */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.duo .card { margin: 0; }
.miles { list-style: none; }
.miles li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; }
.miles li:last-child { border: 0; }
.miles b { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.risks { list-style: none; }
.risks li { padding: 8px 0 8px 20px; border-bottom: 1px solid var(--hairline); font-size: 13.5px; position: relative; }
.risks li::before { content: "!"; position: absolute; left: 2px; top: 8px; color: var(--warn); font-weight: 800; }
.risks li:last-child { border: 0; }
.more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; }
.warn { color: var(--warn); } .good { color: var(--ok); }

/* ── 표 ── */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-weight: 600; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .02em;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
td { padding: 10px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafbfc; }
td .meta, .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ── 진행률 ── */
.bar { background: var(--st-none); border-radius: 6px; height: 8px; overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; background: var(--navy); border-radius: 6px; transition: width .3s; }
.pct { font-size: 12px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }

/* ── 상태 셀렉트 ── */
select.status {
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 12.5px;
  font-family: inherit; appearance: none; -webkit-appearance: none; cursor: pointer;
}
select.status[data-v="미착수"] { background: var(--st-none); color: var(--muted); }
select.status[data-v="진행 중"] { background: var(--st-prog); color: var(--navy); font-weight: 600; }
select.status[data-v="완료"] { background: var(--st-done); color: var(--ok); font-weight: 700; }
select.status[data-v="해당 없음"] { background: var(--st-na); color: #a1a1aa; }

.badge { display: inline-block; border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.badge.legal { background: #fff4e8; color: var(--warn); }

.notebox {
  background: #f7f3ea; border: 1px solid #eadfc8; color: #6d5a2e;
  border-radius: 12px; padding: 12px 16px; font-size: 13px; margin-bottom: 18px;
}

.toolbar { display: flex; gap: 8px; margin: 18px 0; }
.toolbar button {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; font-weight: 600; color: var(--navy-deep);
  cursor: pointer; font-family: inherit;
}
.toolbar button:hover { background: #eef1f6; }

/* ── 타임라인 ── */
.tl-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 14px 18px; box-shadow: 0 1px 2px rgba(13,33,65,.04);
}
.tile small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.tile b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
input.date {
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 12.5px;
  font-family: inherit; background: var(--st-prog); color: var(--navy-deep); width: 100%;
}

/* 간트 */
.gantt { overflow-x: auto; }
.gantt-grid { min-width: 900px; }
.gantt-months { display: flex; border-bottom: 1.5px solid var(--line); }
.gm {
  flex: 1; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted);
  padding: 6px 0; border-left: 1px solid var(--hairline); font-variant-numeric: tabular-nums;
}
.gantt-row { display: flex; align-items: center; height: 42px; border-bottom: 1px solid var(--hairline); }
.gantt-row:last-child { border-bottom: 0; }
.gantt-label { width: 220px; min-width: 220px; font-size: 13px; padding-right: 12px; }
.gantt-track { position: relative; flex: 1; height: 100%; }
.gantt-marker { position: absolute; top: 4px; bottom: 4px; width: 2px; border-radius: 2px; }
.gantt-today { background: var(--ok); opacity: .7; }
.tl-dot {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%;
  transform: translate(-50%, -50%); z-index: 2;
}
.tl-dot.plan { background: #fff; border: 2.5px dashed #9aa8bd; }
.tl-dot.plan.legal { border-color: var(--warn); }
.tl-dot.actual { background: var(--navy); border: 2.5px solid var(--navy); }
.tl-dot.actual.late { background: var(--warn); border-color: var(--warn); }
.tl-link { position: absolute; top: 50%; height: 3px; transform: translateY(-50%); background: #e8cdb6; border-radius: 2px; }
.tl-slip { position: absolute; top: 4px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lg { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; }
.lg.plan { background: #fff; border: 2px dashed #9aa8bd; }
.lg.actual { background: var(--navy); }
.lg.late { background: var(--warn); }

/* ── 로그인 ── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy-deep); }
.login-box { background: #fff; border-radius: 20px; padding: 40px 36px; width: 340px; text-align: center; }
.login-box h1 { margin-bottom: 4px; font-size: 22px; }
.login-box p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-box input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; margin-bottom: 12px; font-family: inherit;
}
.login-box button {
  width: 100%; padding: 12px; background: var(--navy-deep); color: #fff; border: 0;
  border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.login-box .err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }

@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; }
  .hero-d span { font-size: 42px; }
  header { padding: 0 14px; }
  nav a { padding: 7px 10px; font-size: 13px; }
  header .brand { border-right: 0; padding-right: 0; }
  .gantt-label { width: 140px; min-width: 140px; font-size: 12px; }
}

/* ── 첨부 ── */
.attach { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att-btn {
  border: 1px solid var(--line); background: var(--card); border-radius: 8px;
  padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--navy-deep);
  cursor: pointer; font-family: inherit;
}
.att-btn:hover { background: #eef1f6; }
.att-name { font-size: 12.5px; font-weight: 600; max-width: 110px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.att-x { border: 0; background: none; color: var(--danger); font-size: 15px; cursor: pointer; padding: 0 2px; }

/* ── 시행착오 ── */
.hist { list-style: none; }
.hist li { display: flex; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--hairline); font-size: 13.5px; }
.hist li:last-child { border: 0; }
.hist b { flex: 0 0 84px; color: var(--navy); font-variant-numeric: tabular-nums; font-size: 13px; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.lesson { margin: 0; }
.lesson-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.lesson-head h3 { margin: 0; font-size: 14.5px; line-height: 1.4; }
.sev { flex: 0 0 auto; border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 700; margin-top: 1px; }
.sev.high { background: #fde8e8; color: var(--danger); }
.sev.mid { background: #fff4e8; color: var(--warn); }
.l-what { font-size: 13px; color: var(--text); margin-bottom: 8px; }
.l-cost { font-size: 12.5px; color: var(--warn); margin-bottom: 6px; }
.l-cost b, .l-apply b { display: inline-block; min-width: 74px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; }
.l-apply { font-size: 12.5px; color: var(--ok); background: #f2f8f4; border-radius: 8px; padding: 8px 10px; }

/* ── 3-트랙 흐름도 ── */
.flowmap { margin-bottom: 22px; }
.flow-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.track {
  display: block; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r);
  padding: 18px 20px; box-shadow: 0 1px 2px rgba(13,33,65,.04);
  transition: transform .15s, box-shadow .15s; color: var(--text);
}
.track:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(13,33,65,.10); text-decoration: none; }
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.track-head h3 { display: inline; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin-left: 8px; }
.track > p { font-size: 12.5px; color: var(--muted); margin: 6px 0 8px; }
.track ul { list-style: none; }
.track li { font-size: 12.5px; padding: 3px 0 3px 16px; position: relative; color: var(--text); }
.track li::before { content: "·"; position: absolute; left: 4px; font-weight: 800; color: var(--muted); }
.track.lj { border-top: 3px solid #3b6cb4; }
.track.bx { border-top: 3px solid #2e7d4f; }
.track.mg { border-top: 3px solid #7c3aed; margin-top: 0; }
.flow-join { text-align: center; padding: 4px 0 8px; position: relative; }
.flow-line { width: 2px; height: 16px; background: var(--line); margin: 0 auto; }
.flow-label { font-size: 12.5px; color: var(--muted); padding: 2px 0 6px; }
.flow-label b { color: var(--warn); }
.chip.lj { background: #e8eef7; color: #2b5697; }
.chip.bx { background: #e5f0ea; color: var(--ok); }
.chip.mg { background: #f3e8f7; color: #7c3aed; }
.trk-h { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--navy-deep); margin: 26px 0 12px; }

/* ── 약어 툴팁 ── */
abbr.gl { text-decoration: none; border-bottom: 1px dotted #9aa8bd; cursor: help; }
abbr.gl:hover { border-bottom-color: var(--navy); background: #eef3fa; border-radius: 2px; }

/* ── 관리자 잠금 ── */
.unlock { max-width: 420px; margin: 40px auto; text-align: center; }
.unlock-in {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; margin: 8px 0 10px; font-family: inherit;
}
.unlock-btn { width: 100%; padding: 10px; font-size: 14px; }

/* ── 승계 방식 뱃지 ── */
.mode { display: inline-block; border-radius: 6px; padding: 2px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mode-이전 { background: #e8eef7; color: #2b5697; }
.mode-재발급 { background: #fdf0e4; color: var(--warn); }
.mode-종료 { background: #f2f2f4; color: #6b7280; }
b.mode-이전, b.mode-재발급, b.mode-종료 { background: none; padding: 0; }
b.mode-이전 { color: #2b5697; } b.mode-재발급 { color: var(--warn); } b.mode-종료 { color: #6b7280; }
.tile-sub { margin-top: 2px; font-size: 11.5px; }
.seqline { font-size: 14px; color: var(--navy-deep); margin: 0 0 16px; }
.seqline b { background: #e8eef7; color: #2b5697; border-radius: 7px; padding: 3px 10px; font-weight: 700; }

/* ── 브랜드 ── */
header .brand b {
  font-size: 21px; font-weight: 800; letter-spacing: 0.06em; color: #fff;
}
header .brand small {
  display: inline-block; letter-spacing: 0.02em; font-size: 11.5px;
  text-transform: uppercase; opacity: .55; margin-left: 10px;
}
.login-brand { font-size: 34px !important; font-weight: 800; letter-spacing: 0.08em; color: var(--navy-deep); }

/* ── 목록형 표: 짧은 항목이 옆으로 퍼지지 않도록 폭 제한 ── */
table.list { max-width: 760px; }
table.list td:first-child, table.list th:first-child { padding-right: 20px; }
@media (max-width: 800px) { table.list { max-width: 100%; } }
