input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.report-table th,
.report-table td {
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
  text-align: center;
}

.report-table th {
  background-color: #f3f4f6;
  font-weight: 600;
}

.report-table td:first-child {
  text-align: center;
  font-weight: 400;
  background-color: transparent;
}

.report-table td.indicator-cell {
  text-align: left;
  font-weight: 600;
  background-color: #f9fafb;
}

.report-table td.total-cell {
  background-color: #f9fafb;
  font-weight: 700;
}

body {
  padding-bottom: 90px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.icon {
  display: inline-block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body {
    padding-bottom: 0;
    background: #fff;
  }

  nav,
  .no-print,
  #view-setup,
  #view-form,
  #view-line-list {
    display: none !important;
  }

  #view-reports {
    display: block !important;
  }

  #monthly-report-panel {
    box-shadow: none !important;
    border: none !important;
    padding: 0.35rem !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Fit-to-one-page: compact + slight scale */
  .print-area {
    transform: scale(0.92);
    transform-origin: top left;
    width: 108.7%;
  }

  .monthly-report-meta {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
    padding: 0.35rem;
    margin-bottom: 0.35rem;
  }

  .monthly-meta-row {
    grid-template-columns: 140px 1fr;
    gap: 0.5rem;
    padding-bottom: 0.25rem;
  }

  .monthly-table th,
  .monthly-table td {
    padding: 0.15rem;
    font-size: 8px;
    line-height: 1.05;
  }

  /* Override Tailwind space-y spacing in print */
  #monthly-report-tables > * + * {
    margin-top: 0.35rem !important;
  }

  .monthly-bottom-grid {
    gap: 0.5rem;
  }

  .monthly-signature {
    padding: 0.5rem;
  }
}

.nav-active {
  color: #b91c1c !important;
}

.nav-inactive {
  color: #9ca3af !important;
}

.tap-option {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25rem;
  background: #fff;
  color: #374151;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.tap-option:active {
  transform: translateY(1px);
}

.tap-selected {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.monthly-table {
  table-layout: fixed;
}

.monthly-table th,
.monthly-table td {
  padding: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.1;
  word-break: break-word;
}

.monthly-bottom-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.monthly-signature {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  height: 100%;
}

.monthly-report-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f9fafb;
  margin-bottom: 1rem;
}

.monthly-meta-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.75rem;
  align-items: baseline;
  border-bottom: 1px dashed #e5e7eb;
  padding-bottom: 0.35rem;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.meta-value {
  font-size: 0.85rem;
  font-weight: 800;
  color: #111827;
  text-align: left;
}

.monthly-report-table-wrap {
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .monthly-meta-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
