/* ICS Benz Parts review app -- navy/white/orange, same as the desktop. */
:root {
  /* Navy and gold are sampled from the store banner, so the artwork
     sits on the bar with no seam. --orange stays the interactive
     accent: the banner gold is more yellow and does not carry enough
     contrast against white button text. */
  --navy: #101B3B; --gold: #EDB51A;
  --orange: #F5871F; --orange-text: #3D1400;
  --body: #1A1A1A; --muted: #6B7280; --border: #E2E2DD;
  --panel: #F4F5F7; --good: #1F7A3D; --bad: #791F1F; --warn: #8A5A00;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: #fff; color: var(--body);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}
a { color: var(--navy); }
/* Anything inside the navy bar is light by default. The base rule
   above would otherwise paint a link navy-on-navy -- invisible
   rather than merely unstyled -- which is exactly what happened
   to the header nav before it had rules of its own. */
.bar a { color: #fff; }
.mono { font-family: Consolas, ui-monospace, monospace; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* header */
.bar {
  background: var(--navy); color: #fff; padding: 10px 18px;
  /* Wraps rather than overflowing: the logo, four nav links and the
     user chip do not fit one line on a phone, and this gets used on a
     phone in the yard. */
  flex-wrap: wrap; row-gap: 6px;
  /* center, not baseline: the brand is an image now, and a
     baseline-aligned image sits on the text baseline rather
     than in the middle of the bar. */
  display: flex; align-items: center; gap: 14px;
}
.brand { color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; }
.brand span { color: var(--orange); }
.bar-sub { color: #B9C3D4; font-size: 13px; }
.bar-right { margin-left: auto; color: #B9C3D4; font-size: 13px; }
.bar-right a { color: var(--orange); }

/* flashes */
.flashes { padding: 10px 18px 0; }
.flash { margin: 0 0 8px; padding: 10px 12px; border-radius: 4px;
         background: var(--panel); border-left: 4px solid var(--muted); }
.flash.error { border-left-color: var(--bad); background: #FBF0F0; }
.flash.ok { border-left-color: var(--good); background: #F1F8F3; }

main { padding: 18px; }

/* login */
.login { max-width: 380px; margin: 7vh auto; }
.login h1 { margin-top: 0; }
.login label, form label { display: block; margin-bottom: 14px; font-weight: 600; }
input, textarea, button {
  font: inherit; width: 100%; padding: 9px 10px;
  border: 1px solid var(--border); border-radius: 4px;
}
textarea { resize: vertical; }
button {
  width: auto; cursor: pointer; background: #fff; font-weight: 600;
}
button.primary { background: var(--orange); color: var(--orange-text);
                 border-color: var(--orange); }
button.warnbtn { color: var(--warn); }

/* queue */
.tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
        margin-bottom: 14px; }
.tab { padding: 7px 12px; border-radius: 4px; text-decoration: none;
       background: var(--panel); font-size: 14px; }
.tab.on { background: var(--navy); color: #fff; }
.tab b { opacity: .7; font-weight: 600; margin-left: 4px; }
.search { display: flex; gap: 6px; margin-left: auto; }
.search input { width: 260px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border);
         vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
     color: var(--muted); }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--panel); }
td .muted { display: block; font-size: 12px; }
.num { text-align: right; width: 70px; }
.warn { color: var(--warn); }
.empty { color: var(--muted); padding: 30px 0; }

.pill { font-size: 12px; padding: 2px 8px; border-radius: 10px;
        background: var(--panel); }
.pill.reviewed { background: #E6F3EA; color: var(--good); }
.pill.flagged  { background: #FBF0F0; color: var(--bad); }

/* item */
.item { display: grid; grid-template-columns: minmax(0,1fr) 460px; gap: 24px; }
.photos img { width: 100%; margin-bottom: 12px; border: 1px solid var(--border); }
.nophoto {
  background: var(--panel); border: 1px dashed var(--border); padding: 28px;
  text-align: center; color: var(--muted); margin-bottom: 12px;
}
.nophoto b { display: block; color: var(--body); margin-bottom: 4px; }
.head { display: flex; align-items: center; gap: 10px; }
.head h1 { font-size: 20px; margin: 0 0 10px; }

.facts { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0 0 4px; }
.facts dt { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0 0 8px; font-weight: 600; }

.hint { display: block; font-weight: 400; font-size: 12px; color: var(--muted);
        margin-top: 3px; }
.hint.bad { color: var(--bad); font-weight: 600; }
.preview { background: var(--panel); padding: 10px 12px; border-radius: 4px;
           margin-bottom: 14px; }
.preview b { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.preview p { margin: 6px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pager { display: flex; gap: 16px; margin-top: 18px; padding-top: 12px;
         border-top: 1px solid var(--border); }

/* a phone or a narrow laptop */
@media (max-width: 900px) {
  .item { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
}

/* ------------------------------------------------------------------ */
/* The yard screens: catalog, items, cars, mass list.                  */
/* ------------------------------------------------------------------ */
.bar-nav { display: flex; gap: 4px; }
.bar-nav a { color: #B9C3D4; text-decoration: none; font-size: 14px;
             padding: 5px 10px; border-radius: 4px; }
.bar-nav a:hover { color: #fff; }
.bar-nav a.on { background: rgba(255,255,255,.12); color: #fff; }

.screen { max-width: 1100px; }
.screen.narrow { max-width: 720px; }
.screen-head { display: flex; align-items: flex-start; gap: 16px;
               margin-bottom: 4px; }
.screen-head h1 { margin: 0 0 4px; font-size: 22px; }
.screen-head .actions { margin-left: auto; display: flex; gap: 8px;
                        flex-shrink: 0; }

.btn { display: inline-block; padding: 8px 14px; border-radius: 4px;
       border: 1px solid var(--border); background: #fff; color: var(--body);
       text-decoration: none; font-size: 14px; cursor: pointer; }
.btn:hover { background: var(--panel); }
.btn.primary { background: var(--orange); border-color: var(--orange);
               color: var(--orange-text); font-weight: 600; }

/* Filters are top-level chrome, not a dropdown buried in a form --
   the same call the desktop screens make. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
           padding: 12px; background: var(--panel); border-radius: 4px;
           margin: 12px 0; }
.filters input, .filters select, .filters button { margin: 0; }
.filters input[name="q"] { min-width: 240px; flex: 1; }

.two-col { display: grid; grid-template-columns: 1fr 300px; gap: 24px;
           align-items: start; }
.panel { background: var(--panel); border-radius: 4px; padding: 14px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em;
            color: var(--muted); margin: 14px 0 6px; }
.panel h2:first-child { margin-top: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 3px 0; font-size: 14px; }

/* Forms: label above input, the way eBay's Sell form reads, not the
   label-beside-input grid a database form usually gets. */
.record-form { max-width: 620px; }
.field { display: block; margin-bottom: 14px; font-weight: 400; }
.field-label { display: block; font-weight: 600; font-size: 14px;
               margin-bottom: 3px; }
.field .req { color: var(--bad); font-style: normal; font-size: 12px;
              font-weight: 600; margin-left: 6px; }
.field input, .field select, .field textarea { width: 100%; box-sizing: border-box; }
.hint { display: block; color: var(--muted); font-size: 12.5px;
        margin-top: 3px; }
.locked { margin: 0 0 2px; font-size: 15px; }
.form-section { margin: 26px 0 10px; border-bottom: 1px solid var(--border);
                padding-bottom: 4px; }
.form-section h3 { margin: 0; font-size: 15px; }
.form-section .hint { margin-top: 4px; }
.form-actions { display: flex; gap: 10px; align-items: center;
                margin: 26px 0; padding-top: 16px;
                border-top: 1px solid var(--border); }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
             gap: 4px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 14px;
         font-weight: 400; margin: 0; }
.check input { width: auto; margin: 0; }

.inline-form { display: flex; gap: 8px; align-items: center;
               flex-wrap: wrap; margin-bottom: 10px; }
.inline-form input, .inline-form select, .inline-form button { margin: 0; }
.side-actions { margin-top: 30px; padding-top: 10px; }

/* Readiness: the same error-versus-warning distinction the export makes. */
.readiness { background: var(--panel); border-radius: 4px; padding: 10px 14px;
             margin: 12px 0; }
.readiness p { margin: 3px 0; font-size: 13.5px; }
.readiness.good { color: var(--good); }
.bad { color: var(--bad); }
.good { color: var(--good); }

.photos { margin: 12px 0 20px; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.shot { margin: 0; width: 132px; position: relative; }
.shot img { width: 132px; height: 99px; object-fit: cover; border-radius: 3px;
            border: 1px solid var(--border); display: block; }
.shot.hero img { border-color: var(--orange); border-width: 2px; }
.shot figcaption { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.shot-actions { position: absolute; top: 3px; right: 3px; display: flex;
                gap: 2px; opacity: 0; transition: opacity .1s; }
.shot:hover .shot-actions { opacity: 1; }
.shot-actions button { padding: 1px 6px; font-size: 13px; margin: 0;
                       background: rgba(255,255,255,.92); line-height: 1.4; }
.upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
          padding: 10px; background: var(--panel); border-radius: 4px; }
.upload input { margin: 0; }

.banner { padding: 10px 14px; border-radius: 4px; margin-bottom: 8px;
          background: #EAF1F8; border-left: 4px solid var(--navy);
          font-size: 14px; display: flex; align-items: center; gap: 8px;
          flex-wrap: wrap; }
.banner.warn { background: #FDF3E2; border-left-color: var(--warn);
               color: var(--warn); }
.banner.bad { background: #FBF0F0; border-left-color: var(--bad);
              color: var(--bad); }
.banner-actions { margin-left: auto; }

.pill.unlisted { background: #FDF0E2; color: #8A5A00; }
.pill.listing  { background: #EAF1F8; color: var(--navy); }
.pill.listed, .pill.relisted { background: #FDE9D2; color: #8A4A00; }
.pill.sold     { background: #E6F3EA; color: var(--good); }
.pill.scrapped { background: #F0EFEF; color: var(--muted); }
.pill.warnpill { background: #FDF3E2; color: var(--warn); }

.note { margin-top: 28px; padding: 14px; background: var(--panel);
        border-radius: 4px; }
.note h3 { margin: 0 0 6px; font-size: 14px; }

@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; }
  .screen-head { flex-direction: column; }
  .screen-head .actions { margin-left: 0; }
}

/* ------------------------------------------------------------------ */
/* The store banner.                                                   */
/* ------------------------------------------------------------------ */
/* Shown whole rather than cropped. The artwork is 1280x290, and a crop
   tight enough to isolate the wordmark would have to cut "ICS" and
   "ARTS" off the ends -- the text band alone is about 8:1, far wider
   than any slot in a 52px bar. Scaled whole it stays legible and it
   stays the actual logo. */
.brand-mark { display: block; height: 34px; width: auto; }
.brand-link { display: flex; align-items: center; text-decoration: none; }

/* On the login page it has room, so it runs the width of the card.
   max-width here is the card's, not its own: a wider value overflows
   the 380px column and drags the whole form off-centre. */
.hero { width: 100%; margin: 0 auto 20px; display: block; }
.hero img { width: 100%; height: auto; display: block; }
