:root {
  --navy: #082957;
  --navy-dark: #062044;
  --line: #bfc7d1;
  --soft-blue: #eef6ff;
  --submitted: #087b2d;
  --submitted-deep: #02671f;
  --expected: #0759b9;
  --expected-deep: #034a9d;
  --undecided: #ee8100;
  --undecided-deep: #d96e00;
  --unavailable: #df1f1f;
  --unavailable-deep: #c91414;
  --text: #0d1d35;
  --muted: #56657a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f2f5f9;
  color: var(--text);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-shell {
  width: min(1520px, calc(100% - 32px));
  margin: 20px auto 34px;
}

.control-panel,
.export-bar {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #d6dde7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(8, 41, 87, 0.08);
}

.control-header,
.input-card-head,
.export-bar,
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #557094;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: 22px;
}

.control-actions,
.export-bar {
  display: flex;
  gap: 10px;
}

.primary-button,
.ghost-button,
.export-bar button {
  min-width: 112px;
  min-height: 40px;
  border-radius: 6px;
  font-weight: 800;
}

.primary-button,
.export-bar button {
  background: var(--navy);
  color: #fff;
}

.ghost-button {
  background: #edf2f8;
  color: var(--navy);
}

.paste-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
  margin-top: 14px;
}

.paste-card,
.input-card {
  padding: 13px;
  border: 1px solid #d5dde8;
  border-radius: 8px;
  background: #fbfdff;
}

.paste-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-weight: 900;
}

textarea {
  width: 100%;
  height: 158px;
  resize: vertical;
  border: 1px solid #c3ccda;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  color: #182840;
  line-height: 1.55;
}

.input-card-head {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.input-card-head span:first-child {
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.manual-table {
  display: grid;
  grid-template-columns: 72px repeat(4, 1fr);
  gap: 8px;
}

.manual-table .head,
.manual-table .group-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 6px;
  background: #edf4fc;
  color: var(--navy);
  font-weight: 900;
}

.manual-table input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #c3ccda;
  border-radius: 6px;
  padding: 8px;
  text-align: right;
  background: #fff;
}

.report-sheet {
  width: 1480px;
  margin: 0 auto;
  padding: 16px 24px 22px;
  border-radius: 2px;
  background:
    radial-gradient(circle at 45% 18%, rgba(8, 41, 87, 0.06), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
  box-shadow: 0 16px 44px rgba(8, 41, 87, 0.14);
}

.report-header {
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 4px solid var(--navy);
}

.report-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.16;
}

.base-date {
  color: #111;
  font-size: 20px;
  white-space: nowrap;
}

.base-date input {
  width: 142px;
  border: 0;
  background: transparent;
  color: #111;
  font-weight: 500;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  min-height: 146px;
  padding: 14px 16px;
  border: 1px solid #b9c1cc;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 26px rgba(8, 41, 87, 0.05);
  text-align: center;
}

.kpi-card span,
.kpi-card em,
.kpi-card small,
.kpi-card strong {
  display: block;
}

.kpi-card span {
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
}

.kpi-card em {
  margin-top: -2px;
  color: inherit;
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
}

.kpi-card strong {
  margin-top: 10px;
  color: var(--navy);
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.kpi-card small {
  margin-top: 5px;
  color: #111;
  font-size: 20px;
}

.kpi-card.submitted span,
.kpi-card.submitted strong {
  color: var(--submitted-deep);
}

.kpi-card.obtainable span,
.kpi-card.obtainable em,
.kpi-card.obtainable strong {
  color: var(--expected);
}

.kpi-card.risk span,
.kpi-card.risk em,
.kpi-card.risk strong {
  color: var(--undecided);
}

.kpi-card.rate strong {
  color: var(--unavailable);
}

.target-line {
  display: block;
  margin-top: 7px !important;
  padding-top: 7px;
  border-top: 1px solid #c4c8cf;
  font-size: 18px !important;
}

.kpi-icon {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto;
}

.svg-icon {
  color: var(--navy);
}

.svg-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
  overflow: visible;
}

.kpi-card.submitted .svg-icon {
  color: var(--submitted);
}

.kpi-card.obtainable .svg-icon {
  color: var(--expected);
}

.kpi-card.risk .svg-icon {
  color: var(--undecided);
}

.kpi-card.rate .svg-icon {
  color: var(--unavailable);
}

.people-icon::before,
.people-icon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--navy);
}

.people-icon::before {
  left: 18px;
  top: 6px;
  width: 22px;
  height: 22px;
  box-shadow: -20px 13px 0 -6px var(--navy), 20px 13px 0 -6px var(--navy);
}

.people-icon::after {
  left: 8px;
  bottom: 7px;
  width: 42px;
  height: 23px;
  border-radius: 22px 22px 8px 8px;
  box-shadow: -20px 4px 0 -7px var(--navy), 20px 4px 0 -7px var(--navy);
}

.doc-icon {
  border: 7px solid var(--submitted);
  border-radius: 4px;
}

.doc-icon::before,
.doc-icon::after {
  content: "";
  position: absolute;
  left: 11px;
  height: 6px;
  border-radius: 4px;
  background: var(--submitted);
}

.doc-icon::before {
  top: 15px;
  width: 28px;
  box-shadow: 0 13px 0 var(--submitted), 0 26px 0 var(--submitted);
}

.doc-icon::after {
  right: -8px;
  bottom: -5px;
  left: auto;
  width: 28px;
  height: 14px;
  border-right: 6px solid var(--submitted);
  border-bottom: 6px solid var(--submitted);
  transform: rotate(35deg);
  background: transparent;
}

.calendar-icon {
  border: 6px solid var(--expected);
  border-radius: 5px;
}

.calendar-icon::before {
  content: "";
  position: absolute;
  top: 10px;
  left: -6px;
  right: -6px;
  height: 8px;
  background: var(--expected);
}

.calendar-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 28px;
  width: 8px;
  height: 8px;
  background: var(--expected);
  box-shadow: 16px 0 0 var(--expected), 0 14px 0 var(--expected), 16px 14px 0 var(--expected);
}

.warning-icon {
  width: 0;
  height: 0;
  border-left: 29px solid transparent;
  border-right: 29px solid transparent;
  border-bottom: 51px solid var(--undecided);
}

.warning-icon::before {
  content: "!";
  position: absolute;
  left: -5px;
  top: 15px;
  color: #fff;
  font-size: 29px;
  font-weight: 900;
}

.pie-icon {
  border-radius: 50%;
  background: conic-gradient(var(--unavailable) 0 75%, transparent 75% 100%);
  border: 1px solid var(--unavailable);
}

.pie-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent 49%, #fff 49% 51%, transparent 51%);
}

.analysis-section {
  margin-bottom: 22px;
}

.table-wrap {
  overflow: hidden;
  border: 1px solid #aeb7c3;
  border-radius: 8px;
}

.analysis-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.analysis-table th,
.analysis-table td {
  border-right: 1px solid #c0c8d2;
  border-bottom: 1px solid #c0c8d2;
  text-align: center;
}

.analysis-table th:last-child,
.analysis-table td:last-child {
  border-right: 0;
}

.analysis-table thead th {
  height: 74px;
  background: linear-gradient(180deg, #073b77 0%, var(--navy-dark) 100%);
  color: #fff;
  font-size: 29px;
  font-weight: 900;
}

.analysis-table thead th small {
  font-size: 18px;
  font-weight: 800;
}

.analysis-table thead .submitted-head {
  background: linear-gradient(180deg, #079638 0%, #006e26 100%);
}

.analysis-table thead .expected-head {
  background: linear-gradient(180deg, #086ed4 0%, #024e9d 100%);
}

.analysis-table thead .undecided-head {
  background: linear-gradient(180deg, #ff9700 0%, #eb7900 100%);
}

.analysis-table thead .unavailable-head {
  background: linear-gradient(180deg, #f03232 0%, #d71919 100%);
}

.analysis-table tbody th,
.analysis-table tbody td {
  height: 82px;
  background: #f6fbff;
}

.analysis-table tbody th {
  color: var(--navy);
  font-size: 28px;
  font-weight: 900;
}

.analysis-table td strong,
.analysis-table td small {
  display: block;
}

.analysis-table td strong {
  margin-bottom: 4px;
  font-size: 28px;
  line-height: 1;
}

.analysis-table td small {
  font-size: 20px;
}

.submitted-cell {
  background: linear-gradient(90deg, rgba(8, 123, 45, 0.11), rgba(255, 255, 255, 0.78)) !important;
  color: var(--submitted-deep);
}

.expected-cell {
  background: linear-gradient(90deg, rgba(7, 89, 185, 0.11), rgba(255, 255, 255, 0.78)) !important;
  color: var(--expected-deep);
}

.undecided-cell {
  background: linear-gradient(90deg, rgba(238, 129, 0, 0.13), rgba(255, 255, 255, 0.78)) !important;
  color: var(--undecided-deep);
}

.unavailable-cell {
  background: linear-gradient(90deg, rgba(223, 31, 31, 0.13), rgba(255, 255, 255, 0.78)) !important;
  color: var(--unavailable-deep);
}

.total-cell {
  color: var(--navy);
}

.obtainable-cell {
  color: var(--expected-deep);
}

.analysis-table tfoot th,
.analysis-table tfoot td {
  height: 86px;
  background: linear-gradient(180deg, #073b77 0%, var(--navy-dark) 100%) !important;
  color: #fff;
  font-weight: 900;
}

.analysis-table tfoot .submitted-cell {
  background: linear-gradient(180deg, #079638 0%, #006e26 100%) !important;
}

.analysis-table tfoot .expected-cell,
.analysis-table tfoot .obtainable-cell {
  background: linear-gradient(180deg, #086ed4 0%, #024e9d 100%) !important;
}

.analysis-table tfoot .undecided-cell {
  color: #ff9700;
}

.analysis-table tfoot .unavailable-cell {
  color: #ff5a5a;
}

.analysis-table tfoot th {
  font-size: 28px;
}

.analysis-table tfoot td strong {
  font-size: 32px;
}

.row-icon {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 34px;
  margin-right: 20px;
  vertical-align: middle;
}

.row-icon::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
}

.row-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 26px;
  height: 17px;
  border-radius: 16px 16px 5px 5px;
  background: currentColor;
}

.row-본인 {
  color: var(--expected);
}

.row-대리 {
  color: #129496;
}

.row-미정 {
  color: var(--undecided);
}

.row-불참 {
  color: #5730b5;
}

.row-불참::before {
  box-shadow: -15px 3px 0 -2px currentColor, 15px 3px 0 -2px currentColor;
}

.row-불참::after {
  box-shadow: -15px 3px 0 -4px currentColor, 15px 3px 0 -4px currentColor;
}

.mini-check,
.mini-calendar,
.mini-question,
.mini-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fff;
  color: currentColor;
  font-size: 25px;
  font-weight: 900;
  vertical-align: middle;
}

.mini-check { color: var(--submitted); }
.mini-calendar { color: var(--expected); font-size: 24px; }
.mini-question { color: var(--undecided); }
.mini-x { color: var(--unavailable); }

.note-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 20px;
}

.status-note,
.summary-note {
  min-height: 132px;
  border: 1px solid #bfc7d1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.status-note h3,
.summary-note h3 {
  display: inline-block;
  min-width: 132px;
  margin: 0 0 0 -1px;
  padding: 11px 20px;
  border-right: 1px solid #c7ced7;
  border-bottom: 1px solid #c7ced7;
  color: #111;
  font-size: 21px;
  font-weight: 900;
  text-align: center;
}

.note-items {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 24px 14px;
}

.note-items p {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}

.note-items strong {
  position: relative;
  display: inline-block;
  min-width: 54px;
  padding-left: 18px;
  font-weight: 900;
}

.note-items strong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: currentColor;
}

.submitted-dot { color: var(--submitted); }
.expected-dot { color: var(--expected); }
.undecided-dot { color: var(--undecided); }
.unavailable-dot { color: var(--unavailable); }

.summary-note ul {
  margin: 8px 24px 16px;
  padding-left: 18px;
  font-size: 18px;
  line-height: 1.65;
}

.export-bar {
  position: sticky;
  bottom: 16px;
  width: 1480px;
  margin: 18px auto 0;
  justify-content: center;
}

.capture-mode,
.capture-mode * {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}

@media (max-width: 1510px) {
  .report-sheet,
  .export-bar {
    width: 100%;
  }

  .kpi-grid {
    gap: 12px;
  }

  .kpi-card {
    grid-template-columns: 54px 1fr;
    padding: 18px 14px;
  }

  .kpi-card strong {
    font-size: 42px;
  }
}

@media (max-width: 1100px) {
  .paste-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 6mm;
  }

  html,
  body {
    width: 297mm;
    background: #fff;
  }

  .no-print,
  .export-bar {
    display: none !important;
  }

  .page-shell {
    width: auto;
    margin: 0;
  }

  .report-sheet {
    width: 100%;
    padding: 5mm;
    box-shadow: none;
  }

  .report-header h2 {
    font-size: 29px;
  }

  .base-date {
    font-size: 14px;
  }

  .kpi-grid {
    gap: 6px;
    margin-bottom: 10px;
  }

  .kpi-card {
    min-height: 92px;
    grid-template-columns: 32px 1fr;
    padding: 7px 6px;
  }

  .kpi-icon {
    width: 34px;
    height: 34px;
    transform: scale(0.62);
    transform-origin: center;
  }

  .kpi-card span {
    margin-bottom: 2px;
    font-size: 13px;
  }

  .kpi-card em {
    font-size: 10px;
  }

  .kpi-card strong {
    margin-top: 4px;
    font-size: 24px;
  }

  .kpi-card small,
  .target-line {
    margin-top: 3px !important;
    padding-top: 3px;
    font-size: 10px !important;
  }

  .analysis-table thead th {
    height: 38px;
    font-size: 15px;
  }

  .analysis-table tbody th,
  .analysis-table tbody td {
    height: 40px;
  }

  .analysis-table tbody th,
  .analysis-table tfoot th {
    font-size: 14px;
  }

  .analysis-table td strong,
  .analysis-table tfoot td strong {
    font-size: 16px;
  }

  .analysis-table td small {
    font-size: 12px;
  }

  .analysis-section {
    margin-bottom: 10px;
  }

  .note-grid {
    gap: 8px;
  }

  .note-items,
  .summary-note ul {
    font-size: 11px;
  }

  .status-note h3,
  .summary-note h3 {
    padding: 7px 14px;
    font-size: 13px;
  }

  .status-note,
  .summary-note,
  .table-wrap,
  .kpi-card {
    break-inside: avoid;
  }
}
