.fuel-calculator-button {
  width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #b9d8cf; border-radius: 8px;
  color: var(--teal-dark, #075c55); background: #f7fcfa; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
}
.fuel-calculator-button:hover { border-color: #76b1a1; background: #edf7f1; }
.fuel-calculator-button:focus-visible { outline: 2px solid #0d766c88; outline-offset: 3px; }
.fuel-calculator-dialog {
  width: min(1040px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px);
  box-sizing: border-box; padding: 0; border: 1px solid #dbe6e2; border-radius: 16px;
  color: var(--ink, #192b35); background: #fff; box-shadow: 0 18px 70px #17372d30;
  overflow-y: auto; overflow-x: hidden;
}
.fuel-calculator-dialog::backdrop { background: #142d34a1; }
.fuel-calculator-dialog-heading {
  position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center;
  gap: 14px; padding: 12px 18px; border-bottom: 1px solid #e2ebe7; background: #fffffff5; font-size: 14px; font-weight: 700;
}
.fuel-calculator-dialog-heading .icon-button { flex-shrink: 0; width: 30px; height: 30px; font-size: 20px; }
.fuel-calculator { padding: 15px 18px; font-size: 11px; line-height: 1.5; }
.fuel-calculator p { margin: 6px 0; }
.fuel-calculator-intro { color: #627a73; }
.fuel-calculator-intro strong { color: #3e6855; font-weight: 600; }
.fuel-calculator-toolbar {
  display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.65fr); align-items: center;
  gap: 18px; margin: 14px 0 9px;
}
.fuel-calculator-price-label { display: block; font-weight: 600; }
.fuel-calculator-price-field {
  display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 7px 10px;
  border: 1px solid #bdd7cf; border-radius: 8px; background: #fff;
}
.fuel-calculator-price-field:focus-within { outline: 2px solid #0d766c38; border-color: #0d766c; }
.fuel-calculator-price-field input {
  width: 100%; min-width: 0; padding: 3px 0; border: 0; outline: none; color: #203d34;
  background: transparent; font: inherit; font-size: 20px; font-variant-numeric: tabular-nums;
}
.fuel-calculator-price-field span { flex-shrink: 0; color: #7a8c84; font-size: 10px; font-weight: 400; }
.fuel-calculator-output { padding: 12px 15px; border: 1px solid #c5ddcf; border-radius: 10px; background: #eff8f3; }
.fuel-calculator-output > span { color: #5f7b6c; font-size: 10px; }
.fuel-calculator-output > div { display: flex; align-items: baseline; gap: 10px; color: #075f4c; }
.fuel-calculator-output output { min-width: 0; font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fuel-calculator-output > div span { flex-shrink: 0; color: #597767; font-size: 11px; }
.fuel-calculator-output p { margin: 2px 0 0; color: #678473; font-size: 10px; font-variant-numeric: tabular-nums; }
.fuel-calculator-help, .fuel-calculator-footnote { color: #788b82; font-size: 10px; }
.fuel-calculator-table {
  width: 100%; margin: 14px 0 10px; border-collapse: collapse; table-layout: fixed; direction: ltr;
  font-size: 10px; font-variant-numeric: tabular-nums;
}
.fuel-calculator-col-driver { width: 11%; }
.fuel-calculator-col-center { width: 12%; }
.fuel-calculator-col-km { width: 9%; }
.fuel-calculator-col-fuel { width: 9%; }
.fuel-calculator-col-price { width: 11%; }
.fuel-calculator-col-cost { width: 13%; }
.fuel-calculator-col-ratio { width: 12%; }
.fuel-calculator-col-rate { width: 11%; }
.fuel-calculator-table caption { padding: 0 0 7px; color: #7b8e83; font-size: 10px; text-align: left; }
.fuel-calculator-table th, .fuel-calculator-table td {
  padding: 10px 5px; border-bottom: 1px solid #e0ebe5; vertical-align: middle; text-align: center; overflow-wrap: anywhere;
}
.fuel-calculator-table thead th { padding-top: 8px; padding-bottom: 8px; background: #f2f7f4; color: #6f8377; font-size: 9px; font-weight: 600; }
.fuel-calculator-row-rate { color: #086c52; background: #f2f9f4; font-weight: 600; }
.fuel-calculator-inactive { display: block; margin-top: 2px; color: #86928b; font-size: 8px; font-weight: 400; }
.fuel-calculator-calculation { padding: 10px 12px; border: 1px solid #e2ebe5; border-radius: 8px; background: #f8fbf9; color: #506c5a; font-size: 11px; }
.fuel-calculator-calculation h3 { margin: 0 0 6px; color: #304d3c; font-size: 12px; }
.fuel-calculator-calculation p { margin: 6px 0; }
@media (max-width: 760px) {
  .fuel-calculator-toolbar { grid-template-columns: 1fr; gap: 12px; }
  .fuel-calculator-table caption { display: block; width: auto; }
  .fuel-calculator-table, .fuel-calculator-table tbody, .fuel-calculator-table tr, .fuel-calculator-table th, .fuel-calculator-table td { display: block; width: auto; }
  .fuel-calculator-table colgroup { display: none; }
  .fuel-calculator-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .fuel-calculator-table tbody tr { margin-top: 9px; padding: 11px; border: 1px solid #dfe9e3; border-radius: 8px; }
  .fuel-calculator-table th:first-child, .fuel-calculator-table th, .fuel-calculator-table td { width: auto; padding: 3px 0; border: 0; }
  .fuel-calculator-table th:first-child { padding-bottom: 7px; font-size: 12px; text-align: left; }
  .fuel-calculator-table td, .fuel-calculator-table td:nth-child(2) { display: flex; justify-content: space-between; gap: 10px; text-align: right; }
  .fuel-calculator-table td::before { content: attr(data-label); color: #778a7e; font-size: 10px; font-weight: 400; text-align: left; }
  .fuel-calculator-row-rate { margin: 4px -5px 0; padding: 7px 5px !important; border-radius: 5px; }
}
@media (max-width: 480px) {
  .fuel-calculator-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 13px; }
  .fuel-calculator-dialog-heading { padding: 11px 15px; font-size: 12px; }
  .fuel-calculator { padding: 15px; }
}
