/* FeeMath Reseller Mileage Log - tool styles. Uses the site variables from /assets/style.css
   with fallbacks. Pure ASCII. */
.ml-page { overflow-x: hidden; }
.ml-page *, .ml-page *::before, .ml-page *::after { box-sizing: border-box; }
.ml-page [hidden] { display: none !important; }
.ml-hero { padding-top: 24px; padding-bottom: 8px; }
.ml-hero .hx { margin: 6px 0 10px; line-height: 1.15; }
.ml-lead { color: var(--muted, #555); font-size: 1.05rem; max-width: 62ch; }
.ml-privacy { margin-top: 12px; }
.ml-app { display: grid; gap: 16px; padding-bottom: 24px; }
.ml-step { padding: 16px; border: 1px solid var(--line, #e3e3e3); border-radius: 14px; background: var(--surface, #fff); color: var(--ink, #111); box-shadow: var(--shadow, none); min-width: 0; }
.ml-h2 { font-size: 1.15rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.ml-h3 { font-size: 1rem; margin: 18px 0 8px; }
.ml-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent, #2457ff); color: var(--accent-ink, #fff); font-size: .85rem; flex: none; }
.ml-plan { margin: 0; font-size: .9rem; color: var(--muted, #555); }
.ml-help, .ml-small { color: var(--muted, #555); font-size: .88rem; }
.ml-small { font-size: .82rem; }
.ml-empty { color: var(--muted, #555); padding: 8px 0; margin: 0; }
.ml-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ml-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ml-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 12px; }
@media (min-width: 640px) { .ml-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { #ml-form > .ml-grid, .ml-step > .ml-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ml-field { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; min-width: 0; margin-bottom: 0; }
.ml-field > span { color: var(--muted, #555); }
.ml-field input, .ml-field select {
  width: 100%; min-height: 42px; padding: 8px 10px; font: inherit; font-size: 1rem; color: var(--ink, #111);
  background: var(--bg, #fff); border: 1px solid var(--line, #ccc); border-radius: 10px;
}
.ml-field input[aria-invalid=true] { border-color: var(--bad, #b42318); }
.ml-field input:focus, .ml-field select:focus, .ml-page .btn:focus-visible, .ml-page summary:focus-visible, .ml-check input:focus-visible, .ml-radios input:focus-visible {
  outline: 3px solid var(--accent, #2457ff); outline-offset: 2px;
}
.ml-inline { flex: 0 1 180px; }
.ml-filters { margin-bottom: 4px; }
.ml-check { display: flex; gap: 8px; align-items: center; font-size: .95rem; min-height: 42px; align-self: end; }
.ml-check input, .ml-radios input { width: 18px; height: 18px; flex: none; margin: 0; }
.ml-fs { border: 1px solid var(--rule, var(--line, #e3e3e3)); border-radius: 12px; padding: 12px; margin: 0 0 12px; min-width: 0; }
.ml-fs legend { font-weight: 700; padding: 0 6px; }
.ml-radios { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; }
.ml-radios label { display: flex; gap: 8px; align-items: center; font-size: .95rem; }
.ml-fs .ml-grid { margin-bottom: 4px; }
.ml-msg { min-height: 1.2em; margin: 8px 0; font-size: .9rem; }
.ml-msg.is-ok { color: var(--good, #137a3a); }
.ml-msg.is-warn { color: var(--bad, #b42318); }
.ml-page .btn { min-height: 42px; cursor: pointer; }
.ml-page .btn.ml-sm { min-height: 34px; padding: 4px 10px; font-size: .85rem; }
.ml-page .btn[aria-disabled=true] { opacity: .55; }
.ml-danger { color: var(--bad, #b42318); }
.ml-filebtn { position: relative; display: inline-flex; align-items: center; }
.ml-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-actions .btn { flex: 1 1 200px; justify-content: center; text-align: center; }

.ml-favs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.ml-favs:empty { display: none; }
.ml-favs-label { font-size: .85rem; color: var(--muted, #555); flex: 0 0 100%; }
.ml-fav { display: inline-flex; align-items: stretch; border: 1px solid var(--accent, #2457ff); border-radius: 999px; overflow: hidden; max-width: 100%; }
.ml-fav button { font: inherit; font-size: .88rem; background: transparent; color: var(--ink, #111); border: 0; padding: 6px 12px; cursor: pointer; min-height: 38px; }
.ml-fav .ml-fav-add { overflow-wrap: anywhere; text-align: left; }
.ml-fav .ml-fav-add small { color: var(--muted, #555); }
.ml-fav .ml-fav-del { border-left: 1px solid var(--line, #ccc); padding: 6px 10px; color: var(--muted, #555); }
.ml-fav button:hover { background: var(--soft, #f2f4ff); }
.ml-fav button:focus-visible { outline: 3px solid var(--accent, #2457ff); outline-offset: -3px; }

.ml-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ml-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ml-table th, .ml-table td { padding: 7px 8px; border-bottom: 1px solid var(--rule, var(--line, #e8e8e8)); text-align: left; vertical-align: top; }
.ml-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #555); }
.ml-table caption { text-align: left; font-size: .82rem; color: var(--muted, #555); padding-bottom: 4px; }
.ml-table tfoot th, .ml-table tfoot td { font-weight: 700; border-top: 2px solid var(--ink, #111); }
.ml-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ml-nowrap { white-space: nowrap; }
.ml-sub { display: block; font-size: .8rem; color: var(--muted, #555); overflow-wrap: anywhere; }
.ml-trips td.ml-dest { min-width: 140px; overflow-wrap: anywhere; }
.ml-acts { white-space: nowrap; }
.ml-acts .btn { margin: 0 0 4px 4px; }

/* trip cards on phones */
@media (max-width: 639px) {
  .ml-trips thead { display: none; }
  .ml-trips, .ml-trips tbody, .ml-trips tr, .ml-trips td { display: block; width: 100%; }
  .ml-trips tr { border: 1px solid var(--line, #e3e3e3); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
  .ml-trips td { border: 0; padding: 2px 0; }
  .ml-trips td.ml-num { text-align: left !important; font-weight: 700; }
  .ml-acts .btn { margin: 4px 6px 0 0; }
}

.ml-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .ml-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ml-kpi { padding: 12px; border-radius: 12px; background: var(--soft, #f6f7fb); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ml-kpi span { font-size: .8rem; color: var(--muted, #555); }
.ml-kpi strong { font-size: 1.2rem; overflow-wrap: anywhere; }
.ml-kpi-main { background: var(--grad, var(--accent, #2457ff)); color: var(--accent-ink, #fff); }
.ml-kpi-main span { color: inherit; opacity: .85; }
.ml-cols { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .ml-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ml-bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--accent, #2457ff); vertical-align: middle; min-width: 2px; }

.ml-upgrade { padding: 14px; border: 2px solid var(--accent, #2457ff); border-radius: 14px; background: var(--soft, #f6f7fb); margin: 12px 0; }
.ml-upgrade .ml-h3 { margin-top: 4px; }
.ml-upgrade p { margin: 6px 0; }
.ml-seo { padding-top: 16px; padding-bottom: 32px; max-width: 860px; }
.ml-seo h2 { margin-top: 28px; }
.ml-seo li { margin-bottom: 6px; }
.ml-steps { padding-left: 1.3em; }
.ml-disclaimer { margin-top: 16px; }
.print-only { display: none; }

@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; color: #000 !important; }
  body > header, body > footer, body > nav, .site-header, .site-footer, header.site, footer.site, #fm-chat, [id^=fm-chat], .no-print, .ml-hero, .ml-seo, .ml-plan { display: none !important; }
  .print-only { display: block !important; }
  .ml-app, .wrap { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .ml-printlog h2 { font-size: 16pt; margin: 0 0 4px; }
  .ml-printlog p { margin: 2px 0; font-size: 10pt; }
  .ml-printlog .ml-table { font-size: 9pt; margin-top: 8px; }
  .ml-printlog .ml-table th, .ml-printlog .ml-table td { padding: 3px 5px; border-color: #999 !important; color: #000 !important; }
  .ml-printlog thead { display: table-header-group; }
  .ml-printlog tr { break-inside: avoid; page-break-inside: avoid; }
  a[href]::after { content: none !important; }
}
@media print { .fmc-b, .fmc-p, .ai-strip { display: none !important; } }
