/* Pay Docly — Singapore CPF calculator: results panel, editable rate table,
   and the printable A4 summary sheet. Loaded after base.css + tool.css. */

.field-inline{display:flex;align-items:center;gap:8px;margin-bottom:11px}
.field-inline input[type=checkbox]{width:auto;margin:0}
.field-inline label{margin:0;font-weight:700}

/* Headline result tiles */
.result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.result{border:1px solid var(--line);border-radius:14px;padding:15px 16px;background:#fff;box-shadow:var(--shadow-sm)}
.result.take-home{background:var(--success-soft);border-color:#abefc6}
.result .r-label{font-size:11px;font-weight:800;color:var(--muted)}
.result .r-value{font-size:22px;font-weight:900;letter-spacing:-.03em;margin-top:4px}
.result.take-home .r-value{color:#027a48}

.calc-row{display:flex;justify-content:space-between;gap:14px;font-size:12.5px;padding:7px 0;color:var(--muted)}
.calc-row span:last-child{color:var(--ink);font-weight:700;white-space:nowrap}
.calc-row.muted span{color:var(--muted-2);font-weight:600}
.calc-row.sep{border-top:1px solid var(--line);margin-top:5px;padding-top:11px}
.calc-row.grand{border-top:1px solid var(--line);margin-top:5px;padding-top:11px;font-size:14px}
.calc-row.grand span{color:var(--ink);font-weight:900}

/* Editable rate table */
.rates-notice{
  background:var(--warning-soft);border:1px solid #fed7aa;border-radius:12px;padding:14px 16px;margin-bottom:14px
}
.rates-notice p{margin:0;font-size:12.5px;line-height:1.65;color:#9a3412}
.rates-notice strong{color:#7c2d12}
.rates-notice a{color:#9a3412;font-weight:800}
.rates-badge{
  display:inline-block;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;
  background:#f2f4f7;color:var(--muted);border-radius:999px;padding:3px 9px;margin-left:8px;vertical-align:middle
}
.rates-badge.custom{background:var(--brand-soft);color:var(--brand)}
.rate-head,.rate-row{display:grid;grid-template-columns:minmax(0,1fr) 82px 82px 56px;gap:7px;align-items:center}
.rate-head{
  font-size:9px;text-transform:uppercase;letter-spacing:.07em;font-weight:900;color:var(--muted-2);
  padding:0 2px 6px;border-bottom:1px solid var(--line);margin-bottom:8px
}
.rate-head span:not(:first-child){text-align:right}
.rate-row{margin-bottom:6px}
.rate-row input[type=number]{text-align:right}
.rate-total{font-size:12px;font-weight:850;text-align:right;color:var(--muted)}

/* Printable summary sheet */
.cpf-sheet .cpf-period{font-size:16px;font-weight:850;margin-top:4px}
.cpf-sheet .cpf-head{width:auto;min-width:280px;margin:26px 0 20px}
.cpf-sheet .cpf-table{width:100%;border-collapse:collapse;font-size:12px}
.cpf-sheet .cpf-table th{
  background:#f4f6f8;text-align:left;padding:9px 12px;border-bottom:1px solid #e4e7ec;
  font-size:10px;text-transform:uppercase;letter-spacing:.05em;font-weight:850
}
.cpf-sheet .cpf-table th:last-child,.cpf-sheet .cpf-table td:last-child{text-align:right;white-space:nowrap}
.cpf-sheet .cpf-table td{padding:8px 12px;border-bottom:1px solid #edf0f4}
.cpf-sheet .cpf-table tr.sub td{background:#fbfcfe;font-weight:850}
.cpf-sheet .cpf-table tfoot tr.grand td{background:#ecfdf3;font-weight:900;font-size:13px;border-bottom:0}
.cpf-sheet .cpf-basis{
  margin-top:22px;font-size:10px;line-height:1.6;color:#667085;
  border:1px dashed #e4e7ec;border-radius:10px;padding:11px 13px
}

@media(max-width:640px){
  .result-grid{grid-template-columns:1fr}
  .rate-head{display:none}
  .rate-row{grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:12px;padding:10px;margin-bottom:9px}
  .rate-row input:first-child{grid-column:1/-1}
  .rate-total{grid-column:1/-1;text-align:left}
}
@media print{
  .cpf-sheet .cpf-table tr{page-break-inside:avoid}
}
