:root {
  --navy: #12345b;
  --navy-deep: #0d2746;
  --blue: #2b6de8;
  --blue-soft: #eef4ff;
  --ink: #172b45;
  --muted: #708098;
  --muted-dark: #52647c;
  --line: #dfe6ef;
  --bg: #f5f8fc;
  --white: #fff;
  --green: #1f9d68;
  --shadow: 0 12px 30px rgba(28, 60, 101, .07);
  font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.site-header { background: var(--navy); color: var(--white); }
.header-inner { max-width: 1220px; margin: 0 auto; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.45); border-radius: 10px; display: grid; place-items: center; font-size: 19px; font-weight: 800; background: rgba(255,255,255,.12); }
.brand-kicker { margin: 0; color: #a9c5e9; font-size: 9px; line-height: 1; letter-spacing: .12em; font-weight: 800; }
.brand h1 { margin: 4px 0 0; font-size: 15px; letter-spacing: -.03em; }
.privacy-pill { display: flex; align-items: center; gap: 8px; color: #dceafe; font-size: 12px; border: 1px solid rgba(255,255,255,.22); padding: 8px 12px; border-radius: 99px; }
.status-dot { width: 7px; height: 7px; background: #6be3a9; border-radius: 50%; box-shadow: 0 0 0 3px rgba(107,227,169,.14); }

.page-shell { max-width: 1220px; margin: 0 auto; padding: 42px 28px 80px; }
.hero-section { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 28px; }
.eyebrow, .section-label { margin: 0 0 8px; color: var(--blue); font-size: 11px; letter-spacing: .14em; font-weight: 900; }
.hero-section h2 { margin: 0; color: var(--navy-deep); font-size: clamp(29px, 4vw, 45px); line-height: 1.18; letter-spacing: -.06em; }
.hero-section h2 span { color: var(--blue); }
.hero-copy { max-width: 570px; margin: 17px 0 0; color: var(--muted-dark); font-size: 15px; }
.hero-note { width: 330px; padding: 17px 18px; display: flex; gap: 12px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.note-icon { flex: 0 0 auto; width: 29px; height: 29px; display: grid; place-items: center; color: var(--blue); border-radius: 8px; background: var(--blue-soft); font-size: 20px; font-weight: 900; }
.hero-note strong { display: block; font-size: 13px; }
.hero-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.upload-card, .workspace-card, .guide-section { background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.upload-card { padding: 35px 26px 25px; text-align: center; border-style: dashed; border-width: 1.5px; transition: .2s ease; }
.upload-card.is-dragging { border-color: var(--blue); background: #f5f9ff; transform: translateY(-2px); }
.upload-icon { margin: 0 auto 10px; width: 45px; height: 45px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 50%; font-size: 25px; font-weight: 800; }
.upload-card h2 { margin: 0; color: var(--navy-deep); font-size: 21px; letter-spacing: -.04em; }
.upload-card > p { color: var(--muted); font-size: 13px; margin: 7px 0 17px; }
.upload-actions { display: flex; justify-content: center; gap: 9px; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 10px 17px; font-size: 12px; font-weight: 800; transition: .18s ease; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: var(--blue); color: var(--white); box-shadow: 0 5px 12px rgba(43,109,232,.18); }
.button-primary:hover:not(:disabled) { background: #1e5ccf; transform: translateY(-1px); }
.button-ghost { color: var(--muted-dark); background: var(--white); border-color: var(--line); }
.button-ghost:hover { color: var(--navy); border-color: #b9c9dc; background: #f8fafc; }
.danger-button { color: #bd5460; }
.upload-hint { margin-top: 18px !important; color: #9aa8bb !important; font-size: 11px !important; }
.file-chip { max-width: 420px; margin: 18px auto 0; display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 11px; border-radius: 9px; color: var(--navy); background: #f3f7fc; font-size: 12px; }
.file-chip-icon { color: var(--blue); }
.file-chip-status { margin-left: auto; color: var(--green); font-size: 11px; font-weight: 800; }

.workspace-card { margin-top: 18px; padding: 28px; }
.section-heading, .result-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 18px; }
.section-heading h2, .result-toolbar h2, .guide-title h2 { margin: 0; font-size: 19px; letter-spacing: -.04em; }
.source-summary, .result-hint { color: var(--muted); font-size: 11px; text-align: right; }
.search-row { display: flex; align-items: center; gap: 16px; margin: 20px 0 10px; }
.search-field { min-width: 0; flex: 1; display: flex; align-items: center; height: 44px; padding: 0 13px; border: 1px solid #cad7e6; border-radius: 9px; background: #fbfdff; transition: .18s; }
.search-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,109,232,.10); background: var(--white); }
.search-icon { color: var(--blue); font-size: 23px; line-height: 1; transform: rotate(-20deg); margin-right: 9px; }
.search-field input { min-width: 0; flex: 1; outline: 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-field input::placeholder { color: #a3afbf; }
.clear-search { border: 0; background: transparent; color: #9aa8bb; font-size: 21px; line-height: 1; }
.check-control { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--muted-dark); font-size: 12px; cursor: pointer; white-space: nowrap; }
.check-control input { position: absolute; opacity: 0; }
.check-box { width: 17px; height: 17px; border: 1px solid #b8c7d8; border-radius: 4px; background: var(--white); position: relative; }
.check-control input:checked + .check-box { background: var(--blue); border-color: var(--blue); }
.check-control input:checked + .check-box:after { content: "✓"; color: #fff; position: absolute; left: 3px; top: -2px; font-size: 13px; font-weight: 900; }
.quick-searches { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: #a0adbd; font-size: 11px; margin-bottom: 29px; }
.quick-searches button { border: 0; background: var(--blue-soft); color: #4772ba; padding: 5px 9px; border-radius: 6px; font-size: 11px; }
.quick-searches button:hover { background: #dbe9ff; }
.series-filter-section { margin: 4px 0 28px; padding-top: 20px; border-top: 1px solid #edf1f5; }
.filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filter-heading h3 { margin: 0; color: var(--navy); font-size: 15px; letter-spacing: -.03em; }
.series-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.grade-filter-heading { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #e5ebf3; }
.grade-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.series-chip, .grade-chip { padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted-dark); background: var(--white); font-size: 11px; font-weight: 800; transition: .18s ease; }
.series-chip:hover, .grade-chip:hover { border-color: #a9c4ee; color: var(--blue); }
.series-chip.is-active, .grade-chip.is-active { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.series-chip b, .grade-chip b { margin-left: 4px; color: #8b9ab0; font-size: 10px; }
.series-chip.is-active b, .grade-chip.is-active b { color: var(--blue); }
.series-empty { color: #9aa8b7; font-size: 11px; }
.result-heading { align-items: center; border-top: 1px solid #edf1f5; padding-top: 24px; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.mode-card { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 15px; text-align: left; color: var(--muted-dark); border: 1px solid var(--line); border-radius: 10px; background: var(--white); transition: .18s; }
.mode-card:hover { border-color: #a9c4ee; }
.mode-card.is-active { color: var(--navy); border-color: var(--blue); background: #f8fbff; box-shadow: inset 0 0 0 1px var(--blue); }
.mode-radio { flex: 0 0 auto; width: 17px; height: 17px; border: 1px solid #b6c4d5; border-radius: 50%; position: relative; }
.mode-card.is-active .mode-radio { border-color: var(--blue); }
.mode-card.is-active .mode-radio:after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--blue); }
.mode-card > span:nth-child(2) { min-width: 0; flex: 1; }
.mode-card strong, .mode-card small { display: block; }
.mode-card strong { font-size: 12px; }
.mode-card small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mode-card b { color: var(--blue); font-size: 22px; font-weight: 800; }
.result-toolbar { margin-top: 30px; align-items: center; }
.result-title { display: flex; align-items: baseline; gap: 12px; }
.result-title .section-label { margin: 0; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.small-status { color: var(--muted); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 18px 0 11px; }
.stat-card { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.stat-card span, .stat-card small { display: block; color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; margin: 3px 0 1px; color: var(--navy); font-size: 24px; line-height: 1.15; }
.stat-blue strong { color: var(--blue); }.stat-purple strong { color: #7358c9; }.stat-green strong { color: var(--green); }
.movement-summary { min-height: 26px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 9px 0 11px; }
.movement-item { padding: 4px 8px; border-radius: 99px; color: var(--muted-dark); background: #f1f4f8; font-size: 10px; }
.movement-item b { margin-left: 4px; color: var(--navy); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 11px; }
th { padding: 10px 12px; color: #7c8da4; background: #f8fafc; border-bottom: 1px solid var(--line); text-align: left; font-weight: 800; white-space: nowrap; }
td { max-width: 280px; padding: 11px 12px; border-bottom: 1px solid #edf1f5; color: var(--muted-dark); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { width: 50px; color: #9aa8b7; }.person-name { color: var(--navy); font-weight: 800; white-space: nowrap; }.sheet-name { color: #8797aa; white-space: nowrap; }
.cell-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.tag-entry { color: #1769aa; background: #e9f5ff; }.tag-exit { color: #a05038; background: #fff0e9; }.tag-internal { color: #5e43a4; background: #f0ebff; }.tag-promotion { color: #19744c; background: #e9f8ef; }.tag-leave { color: #8a6e1a; background: #fff8df; }.tag-other { color: #5d6d81; background: #edf1f5; }
.empty-row td { padding: 0; }.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); }.empty-state > span { display: block; margin-bottom: 8px; color: #b4c2d2; font-size: 25px; }.empty-state strong { display: block; color: var(--muted-dark); font-size: 13px; }.empty-state p { margin: 4px 0 0; font-size: 11px; }
.table-footnote { margin: 11px 2px 0; color: #9aa8b7; font-size: 10px; }

.guide-section { margin-top: 18px; padding: 25px 28px 22px; }
.guide-title { display: flex; align-items: center; gap: 11px; }.guide-icon { width: 27px; height: 27px; display: grid; place-items: center; color: var(--blue); border-radius: 50%; background: var(--blue-soft); font-weight: 900; font-style: italic; }.guide-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 24px 0 20px; }.guide-grid > div { position: relative; padding-left: 29px; }.guide-grid b { position: absolute; left: 0; top: 1px; color: #a6b6c9; font-size: 11px; }.guide-grid strong { font-size: 12px; }.guide-grid p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }.privacy-detail { display: flex; gap: 8px; align-items: center; padding-top: 13px; border-top: 1px solid #edf1f5; color: var(--muted); font-size: 10px; }.privacy-detail > span { color: var(--green); font-weight: 900; }.privacy-detail p { margin: 0; }.privacy-detail strong { color: var(--muted-dark); }
.toast { position: fixed; left: 50%; bottom: 27px; z-index: 20; max-width: min(90vw, 520px); padding: 11px 15px; transform: translate(-50%, 120px); border-radius: 9px; color: #fff; background: #183858; box-shadow: 0 10px 25px rgba(0,0,0,.18); font-size: 12px; opacity: 0; transition: .25s ease; pointer-events: none; }.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 800px) {
  .page-shell { padding: 28px 16px 50px; }.header-inner { padding: 15px 16px; }.hero-section { display: block; }.hero-note { width: 100%; margin-top: 22px; }.mode-grid, .stats-grid { grid-template-columns: 1fr 1fr; }.guide-grid { grid-template-columns: 1fr 1fr; }.workspace-card, .guide-section { padding: 21px 17px; }.section-heading, .result-toolbar { align-items: flex-start; flex-direction: column; gap: 7px; }.filter-heading { align-items: flex-start; flex-direction: column; gap: 4px; }.source-summary, .result-hint { text-align: left; }.search-row { display: block; }.check-control { margin-top: 12px; }.toolbar-actions { width: 100%; flex-wrap: wrap; }.result-title { margin-bottom: 2px; }
}
@media (max-width: 500px) {
  .privacy-pill { padding: 7px; font-size: 0; }.privacy-pill .status-dot { margin: 0 3px; }.hero-section h2 { font-size: 32px; }.upload-card { padding: 28px 15px 20px; }.upload-actions { flex-direction: column; }.upload-actions .button { width: 100%; }.mode-grid, .stats-grid, .guide-grid { grid-template-columns: 1fr; }.mode-card { padding: 12px; }.result-title { gap: 7px; }.result-title h2 { font-size: 18px; }.toolbar-actions .button { flex: 1; }.small-status { width: 100%; }.quick-searches { margin-bottom: 22px; }
}
