/* 인사 포털 공용 — 메뉴 · 문서 페이지 · 차단 안내. main.css 다음에 읽는다(main.css 는 손대지 않는다). */
:root {
  --brand: #0054a9;
  --navy: #002f5e;
  --action: #006fdd;
  --mist: #e5f2ff;
  --signal: #ec714e;
  --canvas: #f7f9fa;
  --line: #e4e6ea;
  --cell: #f2f2f2;
  --ink-2: #636363;
  --ink-3: #8f8f8f;
  --focus: #8cc4fb;
}

/* ───────── 메뉴 (헤더 오른쪽 · 모바일은 헤더 아래 한 줄) ───────── */
.portal-nav {
  display: flex;
  align-self: stretch;
  gap: 2.25rem;
  margin-left: auto;
}

.portal-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: rgba(228, 230, 234, 0.78);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.portal-nav a:hover {
  color: #fff;
}

.portal-nav a[aria-current="page"] {
  color: #fff;
  font-weight: 600;
}

.portal-nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #fff;
  content: "";
}

.portal-nav a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 652px) {
  .portal-nav {
    position: fixed;
    top: 3.75rem;
    right: 0;
    left: 0;
    z-index: 11;
    height: 2.75rem;
    gap: 1.5rem;
    margin: 0;
    padding: 0 1.5rem;
    background: #00488f;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .portal-nav::-webkit-scrollbar {
    display: none;
  }

  .portal-nav a {
    font-size: 0.875rem;
  }

  /* 기존 인사기록부 모바일 본문이 메뉴 줄만큼 내려오게 */
  .hr_wrap_mobile {
    padding-top: calc(3.75rem + 2.75rem + 1.25rem) !important;
  }
}

/* ───────── 문서 페이지 ───────── */
body.portal {
  background: var(--canvas);
  word-break: keep-all;
}

.doc-page {
  width: 100%;
  max-width: 57.3125rem;
  margin: 150px auto 4.5rem;
}

@media (max-width: 80rem) {
  .doc-page {
    padding: 0 1.5rem;
  }
}

@media (max-width: 652px) {
  .doc-page {
    margin-top: calc(3.75rem + 2.75rem + 1.25rem);
    margin-bottom: 2rem;
    padding: 0 1.25rem;
  }
}

.doc-card {
  padding: 2.5rem 2.5rem 2.75rem;
  border-radius: 0.3125rem;
  background: #fff;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
}

.doc-card + .doc-card {
  margin-top: 1.5rem;
}

@media (max-width: 652px) {
  .doc-card {
    padding: 1.75rem 1.25rem 1.75rem;
  }
}

/* 문서 머리 — 제목 + 보안 등급 */
.doc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.doc-title {
  margin: 0;
  color: var(--navy);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.875rem;
  letter-spacing: -0.03rem;
}

.doc-lead {
  margin-top: 0.375rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.doc-tag {
  flex: none;
  padding: 0.25rem 0.625rem;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.125rem;
  white-space: nowrap;
}

.doc-tag--secret {
  color: var(--signal);
}

.doc-tag--open {
  color: var(--brand);
}

/* 항목/값 칸 — 기존 직무 정보 표와 같은 모양 */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.meta-grid div {
  display: grid;
  grid-template-rows: auto 1fr;
}

.meta-grid dt,
.meta-grid dd {
  margin: 0;
  padding: 0.8125rem 0.75rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.meta-grid div:last-child dt,
.meta-grid div:last-child dd {
  border-right: none;
}

.meta-grid dt {
  background: var(--cell);
}

.meta-grid dd {
  color: var(--ink-2);
}

@media (max-width: 652px) {
  .meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .meta-grid div:nth-child(2n) dt,
  .meta-grid div:nth-child(2n) dd {
    border-right: none;
  }

  .meta-grid div:nth-child(2n + 1) dt,
  .meta-grid div:nth-child(2n + 1) dd {
    border-right: 1px solid var(--line);
  }
}

.sec-title {
  margin: 0 0 1rem;
  color: var(--brand);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5rem;
}

.num {
  font-variant-numeric: tabular-nums;
}

.fine-print {
  margin-top: 1.25rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  line-height: 1.25rem;
}

/* ───────── 급여명세서 ───────── */
.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 652px) {
  .pay-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.ledger th,
.ledger td {
  padding: 0.75rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  text-align: left;
}

.ledger thead th {
  padding-top: 0;
  border-bottom: 1px solid var(--ink-3);
  color: var(--brand);
  font-size: 1rem;
  font-weight: 600;
}

.ledger thead th.unit {
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 400;
  text-align: right;
}

.ledger td {
  color: var(--ink-2);
  text-align: right;
}

.ledger .note {
  margin-left: 0.375rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.ledger tfoot th,
.ledger tfoot td {
  border-top: 1px solid var(--ink-3);
  border-bottom: none;
  color: #000;
  font-weight: 600;
}

.net-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.375rem 1.75rem;
  border-radius: 0.3125rem;
  background: var(--mist);
}

.net-pay-label {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
}

.net-pay-label small {
  display: block;
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 400;
}

.net-pay-amount {
  color: var(--navy);
  font-size: 2rem;
  font-weight: 700;
  line-height: 2.5rem;
  letter-spacing: -0.04rem;
  white-space: nowrap;
}

.net-pay-amount span {
  margin-left: 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

@media (max-width: 652px) {
  .net-pay {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }

  .net-pay-amount {
    font-size: 1.625rem;
  }
}

/* ───────── 인사평가 ───────── */
.grade {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 0.3125rem;
}

.grade-mark {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 0.3125rem;
  background: var(--brand);
  color: #fff;
  font-size: 2.75rem;
  font-weight: 700;
}

.grade-body strong {
  display: block;
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.625rem;
}

.grade-body p {
  margin-top: 0.25rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.grade-scale {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.grade-scale li {
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
  font-weight: 600;
}

.grade-scale li[aria-current="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.score-table th,
.score-table td {
  padding: 0.8125rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.score-table thead th {
  border-top: 1px solid var(--line);
  background: var(--cell);
  font-weight: 400;
  text-align: center;
}

.score-table td {
  color: var(--ink-2);
}

.score-table td.score,
.score-table td.rating {
  text-align: center;
  white-space: nowrap;
}

.score-table td.score {
  color: #000;
  font-weight: 600;
}

.rating-dots {
  display: inline-flex;
  gap: 0.25rem;
  vertical-align: middle;
}

.rating-dots i {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.125rem;
  background: var(--line);
}

.rating-dots i.on {
  background: var(--brand);
}

@media (max-width: 652px) {
  .grade {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }

  .grade-mark {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
  }

  .score-table .col-desc {
    display: none;
  }
}

.review-note p {
  max-width: 44rem;
  color: #222;
  font-size: 0.9375rem;
  line-height: 1.625rem;
}

.review-note p + p {
  margin-top: 0.75rem;
}

.review-sign {
  margin-top: 1rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.goal-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #222;
  font-size: 0.9375rem;
  line-height: 1.625rem;
}

.goal-list li + li {
  margin-top: 0.375rem;
}

/* ───────── 사내 공지 ───────── */
.board {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.board th,
.board td {
  padding: 0.8125rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.board thead th {
  border-top: 1px solid var(--line);
  background: var(--cell);
  font-weight: 400;
}

.board td {
  color: var(--ink-2);
}

.board td.subject {
  width: 100%;
  color: #000;
  text-align: left;
  white-space: normal;
}

.board tr.pinned td {
  background: #fafcff;
}

.board tr.pinned td.subject {
  font-weight: 600;
}

.board .kind {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.0625rem 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  color: var(--ink-2);
  font-size: 0.8125rem;
}

.board tr.pinned .kind {
  border-color: var(--brand);
  color: var(--brand);
}

@media (max-width: 652px) {
  .board .col-writer,
  .board .col-views,
  .board .col-no {
    display: none;
  }
}

.notice-body {
  margin-top: 1.75rem;
}

.notice-body p {
  max-width: 46rem;
  color: #222;
  font-size: 0.9375rem;
  line-height: 1.625rem;
}

.notice-body p + p {
  margin-top: 0.75rem;
}

.notice-body .ledger {
  max-width: 40rem;
  margin: 1.25rem 0 0.25rem;
}

.notice-body .ledger thead th {
  color: var(--ink-2);
  font-size: 0.875rem;
}

.notice-body .ledger td {
  text-align: left;
}

/* ───────── 차단 안내 ───────── */
.blocked {
  display: grid;
  justify-items: center;
  gap: 2rem;
  padding: 3.5rem 2.5rem 3.25rem;
  text-align: center;
}

.blocked svg {
  width: min(26rem, 100%);
  height: auto;
}

.blocked h1 {
  margin: 0;
  color: var(--navy);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 2.375rem;
  letter-spacing: -0.04rem;
}

.blocked h1,
.blocked-text {
  text-wrap: balance;
}

.blocked-text {
  max-width: 34rem;
  margin-top: 0.75rem;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.625rem;
}

.blocked-hint {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.3125rem;
  background: var(--canvas);
  color: var(--navy);
  font-size: 0.9375rem;
  line-height: 1.375rem;
}

.blocked-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 9.5rem;
  padding: 0.8125rem 1.5rem;
  border: 1px solid var(--action);
  border-radius: 0.3125rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.375rem;
  text-decoration: none;
}

.btn[hidden] {
  display: none;
}

.btn-primary {
  background: var(--action);
  color: #fff;
}

.btn-primary:hover {
  background: #005ec0;
}

.btn-secondary {
  background: #fff;
  color: var(--action);
}

.btn-secondary:hover {
  background: var(--mist);
}

@media (max-width: 652px) {
  .blocked {
    padding: 2.5rem 1.25rem;
  }

  .blocked h1 {
    font-size: 1.375rem;
    line-height: 1.875rem;
  }
}
