/* 연봉 실수령액 계산기 전용 스타일 */

nav { max-width: 820px; }
main { max-width: 820px; }

.subtitle {
  color: var(--text-sub);
  margin-bottom: 1.25rem;
}

/* 폼 */
.form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.field input {
  padding: 0.6rem 0.75rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  width: 100%;
  text-align: right;
  box-sizing: border-box;
}

.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.field input[type="number"] {
  text-align: center;
}

.hint-line {
  font-size: 0.72rem;
  color: var(--text-sub);
  font-weight: 500;
  text-align: right;
  min-height: 1em;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 0.7rem;
}

/* 결과 카드 */
.result-card {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.08));
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.25rem;
}

.result-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.result-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.result-amt {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.result-amt.sub {
  font-size: 1.15rem;
  color: var(--text);
}

/* 항목별 명세 */
.breakdown {
  margin-bottom: 1rem;
}

.bd-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
}

.bd-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.btn-copy {
  padding: 0.4rem 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.bd-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.bd-table th,
.bd-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
}

.bd-table thead th {
  background: var(--bg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-sub);
  text-align: right;
}
.bd-table thead th:first-child { text-align: left; }

.bd-table .col-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
}

.bd-table .col-amt {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: right;
  color: var(--text);
}

.bd-table .col-amt.sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sub);
}

.bd-table .col-rate {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--text-sub);
  text-align: center;
  width: 60px;
}

.bd-table tbody tr:last-child td {
  border-bottom: none;
}

.row-deduct .col-amt {
  color: var(--error, #dc2626);
}

.row-subtle {
  background: rgba(0, 0, 0, 0.02);
}

@media (prefers-color-scheme: dark) {
  .row-subtle {
    background: rgba(255, 255, 255, 0.03);
  }
}

.row-highlight {
  background: rgba(102, 126, 234, 0.08);
}

.row-highlight .col-name,
.row-highlight .col-amt {
  font-weight: 800 !important;
  color: var(--primary) !important;
  font-size: 0.95rem;
}

/* 안내 박스 */
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-sub);
  margin-bottom: 1.5rem;
}

.info-box strong {
  color: var(--text);
}

.info-box em {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .result-main { grid-template-columns: 1fr; gap: 0.7rem; }
  .result-amt { font-size: 1.4rem; }
  .result-amt.sub { font-size: 1rem; }
  .bd-table th, .bd-table td { padding: 0.45rem 0.6rem; }
  .bd-table .col-name { font-size: 0.78rem; }
  .bd-table .col-amt { font-size: 0.78rem; }
  .bd-table .col-amt.sub { font-size: 0.72rem; }
  .bd-table .col-rate { font-size: 0.68rem; width: 45px; }
}
