/* Everything is scoped under .ra so MyGeotab's global styles can't leak in or out. */
.ra, .ra * { box-sizing: border-box; }
.ra {
  --ra-ink: #1f2a37; --ra-muted: #5b6573; --ra-line: #dde2e8; --ra-bg: #f5f7fa; --ra-card: #fff;
  --ra-blue: #0b62d6; --ra-blue-ink: #fff;
  --ra-green: #1e7a3c; --ra-green-bg: #e3f4e8;
  --ra-amber: #8a5300; --ra-amber-bg: #fff1d6;
  --ra-red: #b42318; --ra-red-bg: #fde7e5;
  --ra-grey: #4b5563; --ra-grey-bg: #eceff3;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ra-ink); background: var(--ra-bg); min-height: 100vh; margin: 0; padding: 20px 28px 40px;
}
.ra-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ra-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.ra-title { font-size: 26px; font-weight: 600; margin: 0 0 4px; }
.ra-sub { margin: 0; color: var(--ra-muted); max-width: 760px; }
.ra-badge { background: #efe7ff; color: #5b21b6; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }

.ra-search { background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: 8px; padding: 14px; }
.ra-form { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.ra-input {
  flex: 1 1 420px; min-height: 38px; max-height: 260px; resize: vertical; padding: 8px 10px;
  font: inherit; color: inherit; border: 1px solid #b9c1cc; border-radius: 6px; background: #fff;
}
.ra-input:focus, .ra-btn:focus-visible, .ra-toggle input:focus-visible, .ra-check:focus-visible {
  outline: 3px solid #8bb8f5; outline-offset: 1px;
}
.ra-toggle { display: inline-flex; align-items: center; gap: 6px; height: 38px; user-select: none; cursor: pointer; }
.ra-toggle input { width: 16px; height: 16px; margin: 0; }
.ra-btn {
  height: 38px; padding: 0 16px; border-radius: 6px; border: 1px solid #b9c1cc; background: #fff; color: var(--ra-ink);
  font: inherit; font-weight: 600; cursor: pointer;
}
.ra-btn[disabled] { opacity: .5; cursor: not-allowed; }
.ra-btn-primary { background: var(--ra-blue); border-color: var(--ra-blue); color: var(--ra-blue-ink); }
.ra-hint { margin: 8px 0 0; color: var(--ra-muted); font-size: 13px; }

.ra-legend { display: grid; grid-template-columns: repeat(4, auto 1fr); gap: 6px 8px; align-items: center; margin: 14px 2px; font-size: 12.5px; color: var(--ra-muted); }
@media (max-width: 1000px) { .ra-legend { grid-template-columns: auto 1fr auto 1fr; } }

.ra-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.ra-v-eligible   { color: var(--ra-green); background: var(--ra-green-bg); }
/* Amber is deliberately dashed + a different word, so it never reads as green. */
.ra-v-review     { color: var(--ra-amber); background: var(--ra-amber-bg); border: 1px dashed #c98a1a; }
.ra-v-expired    { color: var(--ra-grey);  background: var(--ra-grey-bg); }
.ra-v-ineligible { color: var(--ra-red);   background: var(--ra-red-bg); }
.ra-v-active, .ra-v-in_progress { color: #1d4f91; background: #e4eefb; }
.ra-v-needs_check{ color: #6b21a8; background: #f3e8ff; }
.ra-v-not_found  { color: var(--ra-grey); background: #fff; border-color: var(--ra-line); }

.ra-status { min-height: 22px; margin: 4px 2px 8px; color: var(--ra-muted); }
.ra-status.ra-error { color: var(--ra-red); font-weight: 600; }

.ra-results { background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: 8px; overflow: hidden; }
.ra-summary { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--ra-line); align-items: center; }
.ra-summary-label { color: var(--ra-muted); margin-right: 4px; }
.ra-table-wrap { overflow-x: auto; }
.ra-table { width: 100%; border-collapse: collapse; }
.ra-table th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ra-muted); padding: 9px 12px; border-bottom: 1px solid var(--ra-line); background: #fafbfc; position: sticky; top: 0; }
.ra-table td { padding: 10px 12px; border-bottom: 1px solid #eef1f4; vertical-align: top; }
.ra-table tr.ra-row-review td { background: #fffbf2; }
.ra-col-check { width: 36px; }
.ra-check { width: 16px; height: 16px; margin: 2px 0 0; }
.ra-asset { font-weight: 600; color: #1d4f91; }
.ra-meta { color: var(--ra-muted); font-size: 12.5px; }
.ra-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.ra-headline { font-weight: 600; }
.ra-tag { display: inline-block; margin: 4px 6px 0 0; padding: 1px 7px; border-radius: 4px; background: var(--ra-grey-bg); color: var(--ra-grey); font-size: 11.5px; font-weight: 600; }
.ra-term-head td { background: #f7f9fb; color: var(--ra-muted); font-size: 12px; padding: 6px 12px; }
.ra-caution { color: var(--ra-amber); font-weight: 700; margin-left: 4px; }

.ra-actions { display: flex; align-items: center; gap: 10px; padding: 12px 14px; justify-content: flex-end; border-top: 1px solid var(--ra-line); }
.ra-actions #ra-selected { margin-right: auto; color: var(--ra-muted); }
.ra-foot { color: var(--ra-muted); font-size: 12px; margin-top: 16px; }

.ra-input-short { flex: 0 1 260px; min-height: 38px; }
.ra-diag { margin-top: 16px; background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: 8px; padding: 10px 14px; }
.ra-diag summary { cursor: pointer; font-weight: 600; color: var(--ra-muted); }
.ra-diag-out { white-space: pre-wrap; word-break: break-word; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f7f9fb; border: 1px solid var(--ra-line); border-radius: 6px; padding: 10px; margin: 10px 0 0; max-height: 420px; overflow: auto; }
.ra-diag-out:empty { display: none; }

.ra-preview { background: #fff4e5; border: 1px solid #f0b45a; color: #6b3d00; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; }
