.water-filter-actions,
.water-sample-actions { display: flex; align-items: end; gap: 6px; }
.water-tabs { margin-bottom: 10px; }
.water-loading { padding: 24px 4px; color: var(--muted); }
.water-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.water-overview-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr); gap: 10px; margin: 10px 0; }
.water-source-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.water-source-card { border: 1px solid var(--border); background: #f8fafc; padding: 14px; min-height: 82px; display: flex; flex-direction: column; justify-content: space-between; }
.water-source-card span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.water-source-card strong { font-size: 25px; color: var(--navy); }
.water-bars { display: grid; gap: 12px; }
.water-bar-row { display: grid; gap: 5px; }
.water-bar-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.water-bar-label strong { font-size: 12px; }
.water-bar-track { height: 9px; background: #edf1f5; border: 1px solid #e1e7ef; overflow: hidden; }
.water-bar-fill { height: 100%; min-width: 2px; background: #54739c; }
.water-tone-success { background: #4b8462; }
.water-tone-danger { background: #b75c55; }
.water-tone-info { background: #54739c; }
.water-tone-neutral { background: #8a94a3; }
.water-result { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.2; }
.water-result-success { color: #216139; background: #ecf7ef; border-color: #c9e7d1; }
.water-result-danger { color: #8d332b; background: #fdf0ef; border-color: #efccc8; }
.water-result-info { color: #315e92; background: #eef4fb; border-color: #cadcf1; }
.water-result-neutral { color: #5c6673; background: #f1f3f5; border-color: #d8dde3; }
.water-year-chart { height: 250px; display: flex; align-items: stretch; gap: 7px; overflow-x: auto; padding: 8px 4px 0; border-bottom: 1px solid var(--border); }
.water-year-column { min-width: 48px; flex: 1 0 48px; display: grid; grid-template-rows: 28px 1fr 26px; align-items: end; text-align: center; }
.water-year-value { font-size: 10px; color: var(--muted); white-space: nowrap; }
.water-year-bar-wrap { height: 180px; display: flex; align-items: end; justify-content: center; }
.water-year-bar { width: min(28px, 70%); min-height: 4px; background: var(--navy); opacity: .82; }
.water-year-label { font-size: 10px; color: var(--muted); padding-top: 5px; }
.water-integrity-note { margin-top: 10px; padding: 9px 11px; border-left: 3px solid #9aa8b8; background: #f8fafc; color: var(--muted); font-size: 11px; line-height: 1.5; }
.water-sample-filters { margin-bottom: 12px; }
.water-sample-table { max-height: clamp(300px, calc(100vh - 410px), 600px); overflow: auto; }
.water-sample-table td:nth-child(5) { min-width: 260px; max-width: 440px; }
.water-source-pill { display: inline-block; min-width: 38px; text-align: center; font-size: 10px; font-weight: 800; color: var(--navy); background: #edf3f8; border: 1px solid #cad7e4; padding: 3px 5px; }
.water-pagination > div { display: flex; align-items: center; gap: 7px; }
.water-page-indicator { color: var(--muted); font-size: 11px; }
.water-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.water-parameter-table td:first-child { min-width: 160px; }
.water-notes { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--border); padding: 10px; }

.water-entry-form { display: block; }
.water-entry-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .55fr); gap: 14px; align-items: start; }
.water-entry-main { display: grid; gap: 12px; min-width: 0; }
.water-form-section { border: 1px solid var(--border); background: #fff; padding: 14px; }
.water-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.water-form-heading > div > span, .water-preview-kicker, .water-edit-title > div > span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.water-form-heading h3, .water-edit-title h3 { margin: 3px 0 0; color: var(--navy); font-size: 16px; }
.water-form-tag { font-size: 9px; font-weight: 800; color: #315e92; background: #eef4fb; border: 1px solid #cadcf1; padding: 4px 6px; }
.water-required-note { font-size: 9px; font-weight: 800; color: #8d332b; background: #fdf0ef; border: 1px solid #efccc8; padding: 4px 6px; }
.water-parameter-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.water-parameter-entry { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border); background: #f8fafc; }
.water-parameter-entry > span { color: var(--text); font-size: 11px; font-weight: 800; }
.water-parameter-entry input { width: 100%; min-width: 0; border: 1px solid var(--border); background: #fff; padding: 8px; color: var(--text); }
.water-parameter-entry small { color: var(--muted); font-size: 8px; letter-spacing: .05em; }
.water-entry-preview { min-width: 0; }
.water-preview-sticky { position: sticky; top: 10px; border: 1px solid #cfd9e4; background: #f8fafc; padding: 16px; }
.water-preview-sticky h3 { margin: 5px 0 14px; color: var(--navy); font-size: 20px; overflow-wrap: anywhere; }
.water-preview-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.water-preview-grid > div, .water-preview-location { border: 1px solid var(--border); background: #fff; padding: 9px; }
.water-preview-grid span, .water-preview-location span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.water-preview-grid strong, .water-preview-location strong { display: block; font-size: 11px; overflow-wrap: anywhere; }
.water-preview-location { margin-top: 7px; }
.water-preview-note { margin-top: 10px; padding: 9px; border-left: 3px solid #9aa8b8; background: #fff; color: var(--muted); font-size: 10px; line-height: 1.45; }
.water-preview-actions { display: grid; gap: 7px; margin-top: 12px; }
.water-edit-search { margin-bottom: 12px; }
.water-edit-result-table { max-height: 340px; overflow: auto; }
.water-edit-workspace { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.water-edit-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.water-edit-reason { border-color: #dfc4c1; background: #fffafa; }
.water-change-history { margin-top: 14px; border: 1px solid var(--border); padding: 14px; background: #fff; }
.water-history-list { display: grid; gap: 7px; }
.water-history-item { border: 1px solid var(--border); background: #f8fafc; padding: 10px; }
.water-history-item > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.water-history-item strong { color: var(--navy); font-size: 11px; }
.water-history-item span { color: var(--muted); font-size: 9px; }
.water-history-item p { margin: 6px 0 0; color: var(--text); font-size: 10px; line-height: 1.45; }
@media (max-width: 1050px) {
  .water-entry-layout { grid-template-columns: 1fr; }
  .water-preview-sticky { position: static; }
  .water-parameter-entry-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .water-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .water-parameter-entry-grid, .water-preview-grid { grid-template-columns: 1fr; }
  .water-history-item > div { align-items: flex-start; flex-direction: column; }
  .water-summary,
  .water-source-cards,
  .water-detail-grid { grid-template-columns: 1fr; }
  .water-filter-actions,
  .water-sample-actions { align-items: stretch; flex-direction: column; }
}


/* PASSO 10D.4 — controles tipados e Visualização. A Visão Geral não é alterada. */
.water-parameter-entry select,
.water-form-section select { width: 100%; min-width: 0; border: 1px solid var(--border); background: #fff; padding: 8px; color: var(--text); }
.water-parameter-choice { background: #f7faf9; }
.water-parameter-number { background: #f8fafc; }

.water-visual-filters { margin-bottom: 14px; }
.water-visual-actions { display: flex; align-items: end; gap: 7px; }
.water-visual-meta { display: flex; justify-content: space-between; align-items: end; gap: 12px; padding: 8px 2px 12px; color: var(--muted); }
.water-visual-meta > div { display: flex; align-items: baseline; gap: 7px; }
.water-visual-meta strong { color: var(--navy); font-size: 24px; }
.water-visual-meta span { font-size: 10px; }

.water-collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.water-collection-card { border: 1px solid var(--border); background: #fff; padding: 14px; display: grid; gap: 12px; min-width: 0; box-shadow: 0 2px 8px rgba(20,38,62,.035); }
.water-collection-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.water-collection-head > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.water-collection-date { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.water-collection-title { min-width: 0; }
.water-collection-title h3 { margin: 0; color: var(--navy); font-size: 17px; overflow-wrap: anywhere; }
.water-collection-title p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.water-collection-params { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.water-visual-param { border: 1px solid #e2e8ef; background: #f8fafc; padding: 8px; min-width: 0; }
.water-visual-param span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.water-visual-param strong { display: block; color: var(--text); font-size: 11px; overflow-wrap: anywhere; }
.water-visual-param strong.is-empty { color: #a0a8b2; font-weight: 500; }
.water-collection-foot { display: flex; align-items: end; justify-content: space-between; gap: 10px; padding-top: 2px; border-top: 1px solid #edf1f5; }
.water-collection-foot > div { min-width: 0; display: grid; gap: 2px; }
.water-collection-foot span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.water-collection-foot strong { color: var(--text); font-size: 10px; overflow-wrap: anywhere; }
.water-visual-pagination { margin-top: 14px; }

@media (max-width: 1050px) {
  .water-collection-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .water-collection-params { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .water-visual-actions { align-items: stretch; flex-direction: column; }
  .water-visual-meta, .water-collection-foot { align-items: flex-start; flex-direction: column; }
}


/* PASSO 10D.5 — Matriz SAC/SAA/SAI. Visão Geral permanece congelada. */
.water-location-catalog-field small,
.water-lab-field small { display:block; margin-top:5px; color:var(--muted); font-size:9px; line-height:1.35; }
.water-check-options { display:flex; flex-wrap:wrap; gap:7px; min-height:32px; align-items:center; }
.water-check-options label { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--border); background:#f8fafc; padding:7px 9px; font-size:10px; font-weight:700; cursor:pointer; }
.water-check-options input { margin:0; }
.water-fluoreto-control { display:grid; grid-template-columns:1fr 1.2fr; gap:6px; }
.water-fluoreto-control select,
.water-fluoreto-control input { width:100%; min-width:0; }
.water-source-rule-note { margin-top:10px; border-left:3px solid #7f9bb7; background:#f4f7fa; padding:9px 11px; color:var(--muted); font-size:10px; line-height:1.45; }
.water-parameter-entry[hidden],
.water-form-section [hidden] { display:none !important; }
.water-location-catalog-field input { width:100%; }

@media (max-width:720px) {
  .water-fluoreto-control { grid-template-columns:1fr; }
  .water-check-options { align-items:stretch; flex-direction:column; }
  .water-check-options label { width:100%; }
}

/* Água — Itinerário de coleta V3. */
.water-itinerary-shell .panel-heading { align-items: center; }
.water-itinerary-controls { margin-bottom: 14px; }
.water-itinerary-actions { display: flex; align-items: end; justify-content: flex-start; gap: 7px; flex-wrap: wrap; }
.water-itinerary-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.water-itinerary-card { border: 1px solid var(--border); background: #fff; min-width: 0; }
.water-itinerary-card-head { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border); background: #f7f9fb; }
.water-itinerary-card-head h3 { margin: 0; color: var(--navy); font-size: 14px; }
.water-itinerary-card-head span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.water-itinerary-list { display: grid; }
.water-itinerary-list-head { min-height: 30px; display: grid; grid-template-columns: 52px 58px 82px minmax(0, 1fr); align-items: center; border-bottom: 1px solid #e6ebf0; background: #fbfcfd; }
.water-itinerary-list-head > span { padding: 0 8px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; }
.water-itinerary-list-head > span:nth-child(1), .water-itinerary-list-head > span:nth-child(2), .water-itinerary-list-head > span:nth-child(3) { text-align: center; }
.water-itinerary-list-head.is-editing { grid-template-columns: 52px 58px 82px minmax(0, 1fr) 72px; }
.water-itinerary-row { min-height: 40px; display: grid; grid-template-columns: 52px 58px 82px minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid #edf1f5; }
.water-itinerary-row.is-editing { grid-template-columns: 52px 58px 82px minmax(0, 1fr) 72px; }
.water-itinerary-row:last-child { border-bottom: 0; }
.water-itinerary-row > .water-route-number, .water-itinerary-row > .water-bottle-number { display: flex; align-items: center; justify-content: center; border-right: 1px solid #edf1f5; font-size: 10px; font-weight: 800; }
.water-itinerary-row > .water-route-number { color: var(--muted); background: #fafbfc; }
.water-itinerary-row > .water-bottle-number { color: var(--navy); background: #fff; }
.water-itinerary-row > strong { display: flex; align-items: center; padding: 8px 12px; color: var(--text); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.water-itinerary-row > strong.is-placeholder { color: #89939f; font-weight: 700; }
.water-itinerary-type { display: flex; align-items: center; justify-content: center; border-right: 1px solid #edf1f5; font-size: 9px; font-weight: 900; letter-spacing: .025em; }
.water-itinerary-type-sac { color: #204c6f; background: #f2f7fb; }
.water-itinerary-type-sai { color: #6d5424; background: #fbf8ef; }
.water-itinerary-type-city { color: #315d45; background: #f2f8f4; }
.water-itinerary-order-controls { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; border-left: 1px solid #edf1f5; }
.water-order-button { border: 0; border-left: 1px solid #edf1f5; background: #fff; color: var(--navy); font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.water-order-button:first-child { border-left: 0; }
.water-order-button:hover { background: #f3f6f9; }

@media (max-width: 720px) {
  .water-itinerary-actions { align-items: stretch; }
  .water-itinerary-actions .button { width: 100%; }
  .water-itinerary-list { overflow-x: auto; }
  .water-itinerary-list-head, .water-itinerary-row { min-width: 680px; }
}
.water-bottle-adjust { display: grid; border: 1px solid var(--border); background: #fff; }
.water-bottle-adjust-head, .water-bottle-adjust-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 90px; align-items: center; }
.water-bottle-adjust-head { min-height: 30px; background: #f7f9fb; border-bottom: 1px solid var(--border); }
.water-bottle-adjust-head span { padding: 0 9px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.water-bottle-adjust-head span:first-child, .water-bottle-adjust-head span:last-child { text-align: center; }
.water-bottle-adjust-row { min-height: 42px; border-bottom: 1px solid #edf1f5; }
.water-bottle-adjust-row:last-child { border-bottom: 0; }
.water-bottle-adjust-row > span { align-self: stretch; display: flex; align-items: center; justify-content: center; background: #fafbfc; border-right: 1px solid #edf1f5; color: var(--muted); font-size: 10px; font-weight: 800; }
.water-bottle-adjust-row > strong { display:flex; align-items:center; gap:8px; padding: 8px 10px; color: var(--text); font-size: 11px; }
.water-bottle-adjust-row > strong small { min-width:42px; color:var(--muted); font-size:8px; font-weight:900; text-transform:uppercase; }
.water-bottle-adjust-row > input { width: calc(100% - 16px); margin: 4px 8px; text-align: center; font-weight: 800; color: var(--navy); }
