.input-field {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  padding: 0.625rem 0.75rem;
  color: #0f172a;
  transition: box-shadow 0.15s ease;
}

.input-field:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.result-card {
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  min-width: 0;
}

.result-card-amount {
  font-size: clamp(1rem, 2.8vw, 1.375rem);
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.segmented-control {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  overflow: hidden;
}

.schedule-tabs .segment-option {
  font-size: 0.75rem;
  padding: 0.625rem 0.5rem;
  line-height: 1.25;
}

@media (min-width: 480px) {
  .schedule-tabs .segment-option {
    font-size: 0.8125rem;
    padding: 0.625rem 0.75rem;
  }
}

.segment-option {
  flex: 1;
  text-align: center;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  background: #f8fafc;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.segment-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment-option.segment-active {
  background: #15803d;
  color: #fff;
}

.weekly-hours-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.weekly-hours-option {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.weekly-hours-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekly-hours-option span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.weekly-hours-option:hover span {
  background: #f1f5f9;
}

.weekly-hours-option input:checked + span {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.btn-primary {
  background: #15803d;
  color: #fff;
  font-weight: 600;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background: #166534;
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  transition: background-color 0.15s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #fecaca;
  transition: background-color 0.15s ease;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-sm {
  font-size: 0.75rem;
}

.breakdown-panel {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.breakdown-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  color: #0f172a;
  user-select: none;
  transition: background-color 0.15s ease;
  list-style: none;
}

.breakdown-summary:hover {
  background-color: #f8fafc;
}

.breakdown-summary::-webkit-details-marker {
  display: none;
}

.breakdown-summary::before {
  content: '▸';
  margin-right: 0.5rem;
  transition: transform 0.15s ease;
  display: inline-block;
  color: #94a3b8;
}

details[open] > .breakdown-summary::before {
  transform: rotate(90deg);
}

.breakdown-content {
  padding: 0 1.25rem 1rem;
  border-top: 1px solid #f1f5f9;
}

.breakdown-table {
  width: 100%;
  font-size: 0.875rem;
}

.breakdown-table td,
.breakdown-table th {
  padding: 0.375rem 0;
}

.breakdown-table td:last-child,
.breakdown-table th:last-child {
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.extra-breakdown-table {
  table-layout: fixed;
}

.extra-breakdown-table th:nth-child(1),
.extra-breakdown-table td:nth-child(1) {
  width: 28%;
  text-align: left;
}

.extra-breakdown-table th:nth-child(2),
.extra-breakdown-table td:nth-child(2),
.extra-breakdown-table th:nth-child(3),
.extra-breakdown-table td:nth-child(3) {
  width: 36%;
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding-left: 0.75rem;
}

.extra-breakdown-table th {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.breakdown-table tr.credit td {
  color: #16a34a;
}

.breakdown-table tr.deduction td:last-child {
  color: #dc2626;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
}

@media (min-width: 640px) {
  .history-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.history-item-label {
  font-weight: 600;
  color: #0f172a;
}

.history-item-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.history-item-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.summary-table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: collapse;
}

.summary-table th,
.summary-table td {
  padding: 0.625rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
}

.summary-table th:first-child,
.summary-table td:first-child {
  text-align: left;
}

.summary-table th {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.summary-table tr.summary-highlight td {
  font-weight: 700;
  color: #15803d;
  border-top: 2px solid #e2e8f0;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  opacity: 1;
}

@media print {
  header,
  footer,
  #calculator-form,
  #history-panel {
    display: none;
  }

  .breakdown-panel {
    break-inside: avoid;
  }
}

.footer-info-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  text-align: left;
  overflow: hidden;
}

.footer-info-summary {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  user-select: none;
  list-style: none;
  transition: background-color 0.15s ease;
}

.footer-info-summary:hover {
  background-color: #f8fafc;
}

.footer-info-summary::-webkit-details-marker {
  display: none;
}

.footer-info-summary::before {
  content: '▸';
  margin-right: 0.5rem;
  color: #94a3b8;
  transition: transform 0.15s ease;
  display: inline-block;
}

.footer-info-panel[open] > .footer-info-summary::before {
  transform: rotate(90deg);
}

.footer-info-content {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #475569;
}

.footer-info-lead {
  margin: 1rem 0 1.25rem;
  color: #64748b;
}

.footer-info-section + .footer-info-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
}

.footer-info-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.footer-info-section p {
  margin-bottom: 0.75rem;
}

.footer-info-note {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

.footer-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin: 0.75rem 0;
}

.footer-info-table th,
.footer-info-table td {
  padding: 0.5rem 0.625rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.footer-info-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.footer-info-example {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  margin-top: 0.75rem;
}

.footer-info-example-title {
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.footer-info-steps {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.footer-info-steps li {
  padding-left: 0.25rem;
}

.footer-info-muted {
  color: #94a3b8;
  font-weight: 400;
}

.footer-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}
