/* Inspections page: the dealer MPI (myKaarma) layout in its light colors, toned down, kept minimal.
   Scoped to body.mk so the other pages that share import.css keep their own look. Sheet colors live in mpi.css. */
body.mk {
  color-scheme: light;
  --bg: #eceef0; --surface: var(--mpi-bg); --surface-2: var(--mpi-bg); --border: var(--mpi-frame); --grey: var(--mpi-grey);
  --text: var(--mpi-text); --muted: var(--mpi-muted); --link: #1d6aa8; --blue: #1d6aa8; --error: #b8343c;
  background: var(--bg); color: var(--text);
  font: 14px/1.45 Lato, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body.mk .shell { max-width: 1640px; }
body.mk main { padding-block: 1rem 3rem; }
body.mk #status:empty, body.mk #import-status:empty { display: none; }
body.mk #status { color: var(--muted); }
body.mk main > .mpi + .mpi, body.mk #detail:not([hidden]) { margin-top: .9rem; }

/* Top bar, like the dealer tool's: icon, page name, one plain link. */
.mk-bar { background: var(--mpi-bg); border-bottom: 1px solid var(--mpi-line); }
.mk-bar-inner { display: flex; align-items: center; gap: .75rem; min-height: 52px; }
/* The Ara star on its own, in black (the source SVG is white, made for the blue tile). */
.mk-brand img { display: block; filter: brightness(0); }
.mk-bar h1 { margin: 0; font-size: 18px; font-weight: 400; letter-spacing: 0; }
.mk-bar-link { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 14px; }
.mk-bar-link:hover { color: var(--text); text-decoration: underline; }
.mk-bar-link + .mk-bar-link { margin-left: 1.25rem; }

/* Dealer-tool buttons: uppercase labels; solid blue for the main action, blue outline otherwise. */
body.mk .button {
  width: auto; min-height: 36px; padding: .45rem 1.1rem; border-radius: 4px; cursor: pointer;
  font: 14px/1.2 Lato, "Segoe UI", Arial, sans-serif; letter-spacing: .03em; text-transform: uppercase;
  background: #fff; color: var(--blue); border: 1px solid var(--blue);
}
body.mk .button.primary { background: var(--blue); color: #fff; }
body.mk .button:hover:not(:disabled) { filter: brightness(1.08); }

/* Access key and upload. */
.access-form:not([hidden]) {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .9rem;
  background: var(--mpi-bg); border: 1px solid var(--mpi-line); border-radius: 4px; padding: .7rem .9rem;
}
.access-form input, #new-inspection input:not([type="checkbox"]):not(.file-input), #new-inspection select {
  color: inherit; background: #fff; border: 1px solid var(--mpi-frame); border-radius: 3px; font: inherit; padding: .35rem .55rem;
}
#clip-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
/* Real file input stays in the form (keyboard, validation) but is drawn by the label instead. */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-input:focus-visible + .file-pick { outline: 2px solid var(--blue); outline-offset: 2px; }
.file-pick { cursor: pointer; }
#clip-name { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#import-status { margin: .5rem 0 0; color: var(--muted); }
.review-fields { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
#review label { display: grid; gap: .25rem; }
#review fieldset, #review details { margin-block: 1rem; border: 1px solid var(--mpi-line); }
.measurement-row { margin-bottom: .75rem; }
.measurement-row input { width: 8rem; }
#review-stills { display: flex; flex-wrap: wrap; gap: 1rem; }
#review-stills img { display: block; width: 10rem; height: auto; margin-bottom: .5rem; }
#review-stills label { display: flex; align-items: center; }

/* Inspection list: a dealer-sheet table whose rows are buttons. */
.mk-list .mpi-row, .mk-list .mpi-head { grid-template-columns: minmax(12rem, 38%) 12rem minmax(0, 1fr); }
.mk-pick {
  width: 100%; text-align: start; font: inherit; color: inherit; background: none; cursor: pointer;
  border: 0; border-top: 1px solid var(--mpi-line);
}
.mk-pick[aria-current="true"] { background: var(--mpi-hover); box-shadow: inset 3px 0 0 var(--blue); }
.mk-pick:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.mk-muted { color: var(--mpi-muted); }

/* Report. */
#detail { display: grid; gap: .9rem; outline: none; }
#detail[hidden] { display: none; }
.mk-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem;
  background: var(--mpi-bg); border: 1px solid var(--mpi-line); border-radius: 4px; padding: .75rem 1rem;
}
.mk-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.mk-head p { margin: .15rem 0 0; color: var(--muted); font-size: 14px; }

/* Media sheets: concern | content, transcript as time | words. */
.mk-two .mpi-row { grid-template-columns: minmax(12rem, 38%) minmax(0, 1fr); }
.mk-transcript .mpi-row { grid-template-columns: 5.5rem minmax(0, 1fr); }
.mk-time { padding-left: 1rem; font-variant-numeric: tabular-nums; color: var(--mpi-muted); }
/* Height is fixed and width follows the video's own aspect ratio, so the box hugs a portrait clip exactly
   (no stretching, no side bars). */
#detail video {
  /* align-self: the field column is a flexbox that would otherwise stretch the video to full width. */
  display: block; align-self: flex-start; height: min(70vh, 40rem); width: auto; max-width: 100%;
  background: #000; border-radius: 3px;
}
.mk-stills { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem; }
.mk-stills figure { margin: 0; }
.mk-stills img { display: block; width: 100%; height: auto; border: 1px solid var(--mpi-line); border-radius: 3px; }
.mk-stills figcaption { margin-top: .25rem; font-size: 12px; color: var(--mpi-muted); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .mk-list .mpi-row, .mk-two .mpi-row { grid-template-columns: 1fr; }
  .mk-list .mpi-head { display: none; }
}

/* Result count pills in the list and report header: a step smaller than the checklist buttons. */
.mk-pick .mpi-btn, .mk-head .mpi-btn { height: 1.9rem; min-width: 4.6rem; font-size: 13px; }
