.report-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.report-page-heading { flex-wrap: wrap; }
.report-page-intro { flex: 1 1 280px; min-width: 0; }
.report-page-right { display: flex; align-items: center; justify-content: flex-end; gap: clamp(24px, 4vw, 64px); min-width: 0; margin-left: auto; }
.report-saved-heading { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.report-saved-heading h2 { margin: 0; color: var(--brand); font-size: clamp(26px, 2.4vw, 38px); line-height: 1.15; overflow-wrap: anywhere; }
.report-saved-year { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: var(--brand); font-size: clamp(21px, 1.9vw, 29px); font-weight: 700; line-height: 1.2; }
.report-saved-number { flex: none; min-width: 3ch; color: #483ef6; font-size: 60px; font-weight: 700; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.report-draft-badge { padding: 3px 10px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: var(--font-size-description); font-weight: 700; }
.report-first-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 16px; margin-top: -8px; }
.report-first-actions span { color: var(--muted); font-size: var(--font-size-description); }
.report-section { padding: 13px 26px; }
.report-section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 11px; }
.report-section-head > span { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px; color: var(--brand); background: var(--brand-soft); font-weight: 700; }
.report-section-head h2 { margin: 0 0 2px; color: var(--ink); font-size: var(--font-size-h3); }
.report-section-head p { margin: 0; color: var(--muted); font-size: var(--font-size-description); }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.report-production-details { grid-template-columns: 128px minmax(0, 1fr); }
.report-production-details [data-moisture][hidden] + .field { grid-column: 1 / -1; }
.report-production-section .report-metrics tbody th,
.report-production-section .report-production-details > .field > label,
.report-production-section .report-production-details > fieldset > legend { font-weight: 400; }
.report-production-section .report-production-details > .field > label { padding-left: 18px; }
.report-production-section .report-production-details > [data-moisture] input { width: 128px; max-width: 100%; }
.report-production-section .report-production-details { --production-input-indent: calc(18px + 3ch); }
.report-production-section .report-production-details label,
.report-production-section .report-production-details legend,
.report-production-section .report-production-details .report-radio-option span,
.report-production-section .report-production-details input { font-weight: 400; }
.report-production-section .report-production-details > .field > input { margin-left: var(--production-input-indent); width: calc(100% - var(--production-input-indent)); }
.report-production-section .report-production-details > [data-moisture] input { width: 128px; max-width: calc(100% - var(--production-input-indent)); }
.report-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-row-start { grid-column: 1; }
.report-grid-gap { margin-top: 11px; }
.report-span { grid-column: 1 / -1; }
.report-summary-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) repeat(2, minmax(0, .9fr)); gap: 16px 20px; }
.report-summary-row > div, .report-respondent-row > div { min-width: 0; }
.report-summary-row .field > label { display: flex; align-items: flex-end; min-height: 2.8em; }
.report-crop-year-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, var(--report-short-field-width, 140px)); gap: 16px 12px; }
.report-location-row { display: grid; grid-template-columns: minmax(340px, 1.4fr) minmax(80px, .45fr) minmax(140px, .75fr) minmax(250px, 1.2fr); align-items: end; gap: 16px 14px; }
.report-location-row > *, .report-crop-year-row > *, .report-surveyor-row > * { min-width: 0; }
.report-respondent-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr) minmax(280px, 1.15fr); align-items: end; gap: 16px 20px; }
.report-surveyor-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.report-respondent-other, .report-planting-other { flex: 1 1 220px; min-width: min(100%, 220px); }
.report-respondent-other input, .report-planting-other input { width: 100%; }
.report-radio-choices { min-width: 0; margin: 0; padding: 7px 12px 10px; border: 1px solid var(--line); border-radius: 10px; }
.report-radio-choices legend { padding: 0 5px; color: var(--ink); font-weight: 700; }
.report-radio-options { display: flex; flex-wrap: wrap; gap: 8px; }
.report-radio-option { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.report-radio-option:has(input:checked) { color: var(--brand); border-color: var(--blue); background: var(--brand-soft); }
.report-radio-option input { flex: none; width: auto; min-height: 0; margin: 0; accent-color: var(--blue); }
.report-address-row { display: grid; grid-template-columns: minmax(90px, .45fr) minmax(0, 1fr) minmax(250px, 1.4fr); gap: 16px 20px; }
.report-address-row > .field { min-width: 0; }
.report-area-lookup { position: relative; min-width: 0; }
.report-province-lookup { position: relative; min-width: 0; }
.report-area-results { position: absolute; z-index: 20; top: 100%; left: 0; right: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(28, 57, 93, .14); }
.report-area-results button { display: block; width: 100%; padding: 8px 12px; border: 0; background: #fff; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.report-area-results button:hover, .report-area-results button:focus { background: var(--brand-soft); }
.report-area-results p { margin: 0; padding: 8px 12px; color: var(--muted); }
.report-hint { margin: 0 0 8px; color: var(--muted); font-size: var(--font-size-description); }
.report-hint a { color: var(--brand); text-decoration: underline; }
.report-point-choices { width: 100%; min-width: 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 12px; }
.report-point-choices legend { padding: 0 6px; color: var(--ink); font-weight: 600; }
.report-point-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.report-point-option { display: inline-flex; align-items: center; flex: 0 1 auto; gap: 8px; max-width: 100%; min-height: 44px; padding: 4.5px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.report-point-option:has(input:checked) { border-color: var(--blue); background: var(--brand-soft); }
.report-point-option input { flex: none; accent-color: var(--blue); }
.report-point-option span { overflow-wrap: anywhere; }
.report-point-new { max-width: 420px; margin-top: 7px; }
.report-coordinates { min-width: 0; margin: 0; padding: 0; border: 0; }
.report-coordinates legend { margin-bottom: 4px; padding: 0; color: var(--ink); font-weight: 700; }
.report-coordinate-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.report-coordinate-field { flex: 0 1 230px; min-width: min(100%, 180px); }
.report-location-row .report-coordinate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-location-row .report-coordinate-field { min-width: 0; }
.report-coordinate-input { position: relative; }
.report-coordinate-input span { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: var(--brand); font-weight: 700; pointer-events: none; }
.report-coordinate-input input { padding-left: 35px; }
.report-form .field textarea { width: 100%; padding: 5px 13px; border: 1px solid #cbd7e5; border-radius: 10px; resize: vertical; }
.report-form .field textarea:focus { border-color: var(--blue); outline: 3px solid rgba(37,99,235,.12); }
.report-metrics th:first-child { min-width: 190px; }
.report-metrics td { min-width: 150px; }
.report-metrics td input { width: 100%; min-height: 42px; padding: 4px 10px; border: 1px solid #cbd7e5; border-radius: 8px; }
.report-production-section input[type="number"], .report-period-section input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
/* Account for the number inputs' padding, border and native stepper gutter. */
.report-metrics td[data-production] { text-align: right; padding-right: 44px; font-variant-numeric: tabular-nums; }
.report-form input[name="crop_year_start"], .report-form input[name="crop_year_end"], .report-form input[data-start-year], .report-form .month-picker input[type="number"] { text-align: center; padding-left: 28px; }
.report-metrics td:last-child { font-variant-numeric: tabular-nums; }
.report-metrics th small { display: inline; font-weight: 400; }
.report-reason, .report-period { min-width: 0; margin: 9px 0 0; padding: 8.5px 17px; border: 1px solid var(--line); border-radius: 12px; }
.report-reason legend, .report-period legend { padding: 0 6px; color: var(--ink); font-weight: 600; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.choice-row label, .reason-option { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.choice-row input, .reason-option input { accent-color: var(--blue); }
.reason-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 20px; margin-top: 8.5px; padding: 8px 16px; background: var(--surface-soft); border-radius: 10px; }
.reason-detail { grid-column: 1 / -1; width: min(460px, 100%); min-height: 42px; padding: 4px 11px; border: 1px solid #cbd7e5; border-radius: 8px; }
.reason-item { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-width: 0; }
.reason-item .reason-option { align-items: flex-start; max-width: 100%; }
.reason-item .reason-option input { flex: none; margin-top: 4px; }
.reason-inline-detail { flex: 1 1 140px; min-width: 120px; max-width: 100%; }
.reason-inline-detail .reason-detail { width: 100%; min-width: 0; }
.month-picker { display: flex; gap: 8px; }
.month-picker select { min-width: 0; flex: 2; }
.month-picker input { min-width: 0; flex: 1; }
.report-start-fields { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 150px); gap: 12px; }
.monthly-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 8.5px; }
.report-monthly-input { display: flex; align-items: center; min-width: 0; min-height: 46px; border: 1px solid #cbd7e5; border-radius: 10px; background: #fff; }
.report-monthly-input:focus-within { border-color: var(--blue); outline: 3px solid rgba(37,99,235,.12); }
.monthly-grid .report-monthly-input label { flex: none; padding-left: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; cursor: text; }
.monthly-grid .report-monthly-input input { flex: 1; min-width: 0; width: 100%; min-height: 44px; padding: 4px; border: 0; background: transparent; }
.monthly-grid .report-monthly-input input:focus { border: 0; outline: none; }
.report-monthly-unit { flex: none; padding-right: 12px; color: var(--muted); white-space: nowrap; }
.report-total { margin: 9px 0 0; color: var(--ink); font-size: calc(var(--font-size-body) + 2px); }
.report-total strong { font-variant-numeric: tabular-nums; }
.report-form .report-number-positive { color: #0f172a; }
.report-reason .choice-row label:has(input:disabled) { color: var(--muted); cursor: default; }
.report-reason .choice-row label:has(input:checked) { color: var(--ink); font-weight: 600; }
.report-month-balance { margin: 5px 0 0; font-size: calc(var(--font-size-description) + 2px); }
.report-balance-valid { color: #166534; }
.report-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin: 0 0 15px; }
.report-search-heading { padding: 10px 24px 0; }
.report-search-heading h2 { margin: 0; color: var(--ink); font-size: var(--font-size-h5); }
.report-search-form { padding: 9px 24px 11px; }
.report-search-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.report-search-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 11px; }
.report-search-error { margin: 7px 0 0; }
.report-results-actions { display: flex; justify-content: flex-end; margin: 13px 0 10px; }
.report-results-heading { border-top: 0; }
.report-results-table td { white-space: nowrap; }
.report-results-table .report-sequence-column { width: 68px; min-width: 68px; padding-left: 12px; padding-right: 12px; text-align: center; }
.report-results-table .report-crop-column { width: 30%; min-width: 260px; }
[hidden] { display: none !important; }
@media (max-width: 1300px) { .report-location-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-location-row .report-coordinates, .report-location-row .report-area-lookup { grid-column: 1 / -1; } }
@media (max-width: 1200px) { .report-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .report-summary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 621px) and (max-width: 1100px) { .report-crop-year-row { grid-template-columns: var(--report-short-field-width, 140px) minmax(0, 1fr); } .report-crop-year-row > :first-child { grid-column: 1 / -1; } }
@media (max-width: 980px) { .monthly-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .report-grid-3 { grid-template-columns: 1fr; } .report-respondent-row, .reason-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-respondent-row .report-radio-choices { grid-column: 1 / -1; } }
@media (max-width: 760px) { .report-crop-year-row { grid-template-columns: var(--report-short-field-width, 140px) minmax(0, 1fr); } .report-crop-year-row > :first-child { grid-column: 1 / -1; } .report-address-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-address-row .report-area-lookup { grid-column: 1 / -1; } }
@media (max-width: 620px) { .report-section { padding: 9.5px 19px; } .report-grid, .report-search-grid, .report-address-row, .report-summary-row, .report-crop-year-row, .report-respondent-row, .report-surveyor-row, .report-location-row, .reason-options { grid-template-columns: 1fr; } .report-location-row .report-coordinates, .report-location-row .report-area-lookup, .report-address-row .report-area-lookup, .report-respondent-row .report-radio-choices { grid-column: auto; } .report-start-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-summary-row .field > label { min-height: 0; } .monthly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .report-actions { flex-wrap: wrap; } .report-search-heading { padding: 9px 18px 0; } .report-search-form { padding: 8px 18px 10px; } }
@media (max-width: 620px) { .report-page-intro { flex-basis: auto; } .report-page-right { width: 100%; justify-content: space-between; gap: 16px; margin-left: 0; } .report-saved-heading h2 { font-size: 24px; } .report-saved-year { font-size: 19px; } .report-saved-number { font-size: 60px; } }
@media (max-width: 420px) { .report-start-fields, .monthly-grid { grid-template-columns: 1fr; } }

.report-form { --report-short-field-width: 140px; }
@media (min-width: 621px) {
    .report-crop-year-row > .field:not(:first-child) { width: var(--report-short-field-width); max-width: 100%; }
    .report-crop-year-row input[name="crop_year_start"],
    .report-crop-year-row input[name="crop_year_end"],
    .report-location-row #observation-village-no { width: var(--report-short-field-width); max-width: 100%; }
}
@media (min-width: 1301px) {
    .report-location-row { grid-template-columns: minmax(340px, 1.4fr) var(--report-short-field-width) minmax(140px, .75fr) minmax(250px, 1.2fr); }
}
