/* Stage Productions — the screens' own pieces (inventory, jobs: quote + pull sheet, scanning, repairs, crew, labels).
   Shared building blocks live in /app.css. Old-phone rules as there: no CSS grid, no flex gap, no inset/clamp;
   a literal colour before each var(). Dark mode: literal colours added here have a dark line at the end. */

/* -- the logo: blue + grey on clear; in white on the blue bar and the dark menu block -- */
.logo-img { display: block; width: auto; }
.logo-white { -webkit-filter: brightness(0) invert(1); filter: brightness(0) invert(1); }
.top .brand .logo-img { height: 34px; }
.side-brand .logo-img { height: 42px; margin-top: 0; }
body.site .site-hero .logo .logo-img { height: 96px; }
@media (max-width: 599px) { body.site .site-hero .logo .logo-img { height: 76px; } }

/* -- small shared bits -- */
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; letter-spacing: .02em; }
.pad { padding-left: 1.35rem; padding-right: 1.35rem; }
p.pad, div.pad { margin-top: .6rem; margin-bottom: .6rem; }
.card.flush > .card-head { padding: 1.05rem 1.35rem 0; margin-bottom: .7rem; }
.card.flush > .tabs, .job-view > .tabs { margin-bottom: 0; }
.card.flush .card-foot { margin: 0; }
.card.flush > .empty, .card.flush > p.empty { padding: 1.4rem 1.35rem; }
.indent { color: #9aa4b5; display: inline-block; min-width: 1em; }
.radio-col .check { display: block; margin: .35rem 0; }
.radio-row .check { display: inline-block; margin: .2rem 1.2rem .2rem 0; }
.checks .check { display: inline-block; margin-right: 1.2rem; }
.skill-picks .check { display: inline-block; margin: .15rem 1rem .15rem 0; }
.set-sub { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin: 1.4rem 0 .6rem; font-size: 1rem; color: #4a5568; color: var(--ink2); }
.set-sub .ic { width: 19px; height: 19px; margin-right: .45rem; color: #7b8698; color: var(--muted); }
.add-row { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.add-row input { -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
.add-row > * + * { margin-left: .5rem; }
.add-row .add-qty { -webkit-flex: 0 0 4.2rem; flex: 0 0 4.2rem; text-align: center; }
.inv-search { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin: 0 0 1rem; max-width: 640px; }
.inv-search input[type=search] { -webkit-flex: 1; flex: 1; min-width: 0; margin-right: .5rem; }
.inv-search .btn + .btn { margin-left: .4rem; }
.tag-sample { text-transform: uppercase; font-size: .66rem; letter-spacing: .05em; }
.help-steps li { margin: .3rem 0; }
.job-note { margin: .8rem 0 0; padding: .7rem .8rem; background: #f7f9fc; background: var(--hover); border-radius: 4px; font-size: .92rem; }

/* -- availability numbers -- */
.av { display: inline-block; font-weight: 700; font-size: .84rem; padding: .12rem .5rem; border-radius: 4px; white-space: nowrap; }
.av-ok { color: #17803d; background: #e3f5ea; }
.av-tight { color: #9a6400; background: #fff4d6; }
.av-short { color: #c53030; background: #fdecec; }
td.av-ok, td.av-tight, td.av-short { text-align: center; font-weight: 700; padding: .45rem .2rem; }
td.av-ok a, td.av-tight a, td.av-short a { color: inherit; display: block; text-decoration: none; }
.av-strip th, .g-table thead th { text-align: center; padding: .4rem .15rem; font-size: .68rem; min-width: 2.2rem; }
.av-strip th.cal-off, .g-table th.cal-off { background: #eceff4; color: #7b8698; }
.av-sum { font-size: 1.15rem; margin: .4rem 0 .2rem; }
.av-sum .up { color: #17803d; } .av-sum .down { color: #c53030; }
.av-why-line { color: #4a5568; color: var(--ink2); font-size: .92rem; }
.av-form .row2 { max-width: 460px; }
.g-table .g-item { position: -webkit-sticky; position: sticky; left: 0; background: #fff; background: var(--card); text-align: left; white-space: nowrap; max-width: 15rem; overflow: hidden; text-overflow: ellipsis; z-index: 1; font-size: .86rem; }
.g-table thead .g-item { background: #4b5468; }
.g-table th.g-today { box-shadow: inset 0 -3px 0 #1f73d1; }
.grid-wrap { max-height: 75vh; }

/* -- inventory -- */
.inv-seg { margin-bottom: .8rem; }
.inv-group .card-head h2 small, .card-head h2 small { color: #7b8698; color: var(--muted); font-weight: 400; font-size: .85rem; }
.inv-table td { padding-top: .6rem; padding-bottom: .6rem; }
.inv-name { font-weight: 600; }
.inv-kv { margin-bottom: .6rem; }
.inv-bc { display: -webkit-inline-flex; display: inline-flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: center; align-items: center; padding: .6rem .8rem; border: 1px solid #e3e8ef; border-radius: 6px; background: #fff; }
.inv-bc .bc { width: 220px; height: 52px; display: block; }
.inv-bc.big .bc { width: 300px; height: 80px; }
.inv-bc .mono { margin-top: .3rem; font-weight: 700; color: #2b3445; }
.bcode { font-weight: 700; }
.units-wrap { max-height: 520px; overflow-y: auto; }
.part-form, .line-form { padding: .7rem 0 .2rem; }
.part-add .row3 { -webkit-align-items: flex-end; align-items: flex-end; }
details.edit-part > summary, details.line-edit > summary, details.add-more > summary { list-style: none; cursor: pointer; }
details.edit-part > summary::-webkit-details-marker, details.line-edit > summary::-webkit-details-marker { display: none; }
details.line-edit[open] { position: relative; }
details.line-edit[open] .line-form { position: absolute; right: 0; z-index: 5; width: 340px; max-width: 86vw; background: #fff; background: var(--card); border: 1px solid #cfd6e0; border: 1px solid var(--line2); border-radius: 6px; box-shadow: 0 8px 26px rgba(16, 32, 64, .18); padding: .9rem 1rem; text-align: left; }
details.add-more { margin-top: .8rem; }
details.add-more > summary { color: #1f73d1; color: var(--accent); font-weight: 600; font-size: .92rem; }

/* -- jobs -- */
.job-head h1 { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.job-head h1 .jobno { margin-right: .5rem; }
.job-head h1 .tag { margin-left: .6rem; font-size: .8rem; }
.job-tabs a { font-size: 1rem; }
.job-facts .kv dd { margin-bottom: .55rem; }
.wait-card { box-shadow: inset 4px 0 0 #f5b400, 0 1px 3px rgba(16, 32, 64, .08); }
.short-card { box-shadow: inset 4px 0 0 #e04848, 0 1px 3px rgba(16, 32, 64, .08); }
.add-gear { margin: 0 !important; }
.add-gear .add-what { font-size: 1rem; }
.q-dept-head th, .p-dept-head th { background: #f2f5f9; color: #2b3445; font-size: .78rem; letter-spacing: .08em; padding-top: .55rem; padding-bottom: .55rem; }
.p-dept-head th small { font-weight: 400; text-transform: none; letter-spacing: 0; color: #7b8698; margin-left: .4rem; }
.q-table td, .p-table td { padding-top: .55rem; padding-bottom: .55rem; }
.q-part td, .p-part td { font-size: .9rem; color: #4a5568; color: var(--ink2); }
.p-part td:first-child, .q-part td:first-child { color: #7b8698; }
.p-d2 td:nth-child(2) { padding-left: 2.2rem; }
.p-done td { background: #f3fbf6; }
.p-done .p-qty b { color: #17803d; }
.p-zero td { text-decoration: line-through; color: #9aa4b5; }
.p-zero td .tag, .p-zero td details { text-decoration: none; }
.q-added td { background: #fffbea; }
.q-totals { width: auto; min-width: 280px; margin: .5rem 1.35rem 1rem auto; }
.q-totals td { padding: .4rem .75rem; border: 0; }
.q-totals .q-total td { font-size: 1.15rem; font-weight: 700; border-top: 2px solid #2b3445; }
.sc-out { color: #4f53cf; font-weight: 600; } .sc-in { color: #0d8a7f; font-weight: 600; }
.p-progress .bar { height: 10px; border-radius: 5px; background: #e3e8ef; overflow: hidden; margin: .2rem 0 .35rem; }
.p-progress .bar span { display: block; height: 100%; background: #12904a; }
.act-mini small { color: #7b8698; }
.crew-view .card-foot .row3 { -webkit-align-items: flex-end; align-items: flex-end; }

/* -- the month -- */
.mo-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 760px; }
.mo-table th { padding: .6rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: #7b8698; border-bottom: 1px solid #e3e8ef; }
.mo-day { vertical-align: top; height: 110px; padding: .35rem .4rem; border: 1px solid #edf0f5; }
.mo-other { background: #fafbfd; } .mo-other .mo-n { color: #b4bcc9; }
.mo-today { box-shadow: inset 0 0 0 2px #1f73d1; }
.mo-day.cal-off { background: #f3f4f7; }
.mo-n { font-weight: 700; text-decoration: none; color: #2b3445; }
.mo-mark { display: block; font-size: .66rem; color: #7b8698; text-transform: uppercase; letter-spacing: .04em; }
.mo-list { margin-top: .2rem; }
.mo-chip { display: block; font-size: .76rem; line-height: 1.3; padding: .12rem .35rem; margin: 2px 0; border-radius: 3px; text-decoration: none; color: #2b3445; background: #eef2f8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-out { background: #eeeefc; color: #3f43b8; } .mo-back { background: #e0f4f1; color: #0b7067; } .mo-event { background: #e7f0fc; color: #1f62b5; }
.mo-chip.st-quote { opacity: .7; border: 1px dashed #b9c2d0; }
.mo-more, .mo-count { display: block; font-size: .72rem; color: #7b8698; text-decoration: none; }
.mo-count { display: none; }
@media (max-width: 760px) { .mo-list { display: none; } .mo-count { display: block; } .mo-table { min-width: 0; } .mo-day { height: 64px; } }

/* -- scanning -- */
.scan-dir { margin-bottom: 1rem; }
.scan-dir a .ic { width: 18px; height: 18px; vertical-align: -4px; margin-right: .2rem; }
.scan-card { border-top: 4px solid #1b5680; }
.scan-row { display: -webkit-flex; display: flex; -webkit-align-items: stretch; align-items: stretch; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.scan-row > * { margin: 0 .5rem .5rem 0; }
.scan-input { -webkit-flex: 1 1 170px; flex: 1 1 170px; font-size: 1.35rem !important; padding: .7rem .8rem !important; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.scan-qty { width: 4.5rem; text-align: center; font-size: 1.1rem !important; }
.scan-dmg { margin: .4rem 0; }
.scan-dmg summary { color: #c53030; font-weight: 600; cursor: pointer; }
.scan-banner { margin-top: .8rem; padding: .9rem 1rem; border-radius: 6px; font-size: 1.05rem; border-left: 6px solid #9aa4b5; background: #f2f5f9; }
.scan-banner .mono { color: #7b8698; margin-left: .3rem; }
.scan-banner form { display: inline-block; margin-left: .5rem; }
.scan-ok { background: #e3f5ea; border-left-color: #12904a; color: #0e5c30; }
.scan-warn { background: #fff4d6; border-left-color: #f5b400; color: #6e4800; }
.scan-err { background: #fdecec; border-left-color: #e04848; color: #8f1f1f; }
.scan-info { background: #e7f0fc; border-left-color: #1f73d1; color: #1a4f8f; }
.scan-flash { -webkit-animation: scanflash .5s ease-out; animation: scanflash .5s ease-out; }
@-webkit-keyframes scanflash { from { -webkit-transform: scale(1.03); } to { -webkit-transform: scale(1); } }
@keyframes scanflash { from { transform: scale(1.03); } to { transform: scale(1); } }
.scan-list li.scan-err .grow { color: #c53030; }
.scan-list li.scan-warn .grow { color: #9a6400; }
.scan-pick .btn { margin-left: .6rem; }
.miss-bulk { margin: .4rem 0; }
.cam-btn[hidden] { display: none; }
.cam-box { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 100; background: #000; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.cam-box video { -webkit-flex: 1; flex: 1; width: 100%; height: 100%; object-fit: cover; }
.cam-box .cam-frame { position: absolute; left: 10%; right: 10%; top: 35%; height: 30%; border: 3px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); pointer-events: none; }
.cam-box .cam-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom)); text-align: center; background: rgba(0, 0, 0, .55); color: #fff; }
.cam-box .cam-bar .btn { min-width: 9rem; }
.cam-box .cam-msg { display: block; margin-bottom: .6rem; font-size: 1.05rem; }

/* -- labels page (its own page, printed) -- */
body.labels { background: #eef1f6; margin: 0; }
.lbl-bar { padding: .8rem 1rem; background: #fff; border-bottom: 1px solid #e3e8ef; font-size: .92rem; }
.lbl-bar a { margin: 0 .2rem; } .lbl-bar a.on { font-weight: 700; color: #2b3445; text-decoration: none; }
.lbl-bar .btn { margin-left: 1rem; }
.lbl-sheet { padding: 1rem; }
.lbl { display: inline-block; vertical-align: top; background: #fff; color: #000; margin: 0 .5rem .5rem 0; padding: .06in .1in; overflow: hidden; text-align: center; box-shadow: 0 0 0 1px #d0d6df; page-break-inside: avoid; break-inside: avoid; }
.lbl .bc { display: block; width: 100%; height: 40%; }
.lbl-name { font: 700 9pt/1.15 -apple-system, Helvetica, Arial, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-code { font: 9pt/1.2 ui-monospace, Menlo, Consolas, monospace; }
.lbl-biz { font: 6.5pt/1.1 -apple-system, Helvetica, Arial, sans-serif; color: #333; }
.lbl-2x1 .lbl { width: 2in; height: 1in; }
.lbl-2_25x1_25 .lbl { width: 2.25in; height: 1.25in; }
.lbl-3x2 .lbl { width: 3in; height: 2in; } .lbl-3x2 .lbl-name { font-size: 12pt; } .lbl-3x2 .lbl-code { font-size: 12pt; }
.lbl-avery5160 .lbl { width: 2.625in; height: 1in; margin: 0 .125in 0 0; }
@media print {
  .noprint, .lbl-bar { display: none !important; }
  body.labels { background: #fff; }
  .lbl-sheet { padding: 0; }
  .lbl { box-shadow: none; margin: 0; }
  .lbl-2x1 .lbl, .lbl-2_25x1_25 .lbl, .lbl-3x2 .lbl { page-break-after: always; break-after: page; display: block; }
  .lbl-avery5160 .lbl-sheet { padding: .5in .19in 0; }
  body.app .side, body.app .top, body.app .tabbar { display: none !important; }
  body.app .frame { margin: 0 !important; }
}

/* -- dark mode for the literal colours above -- */
@media screen and (prefers-color-scheme: dark) {
  html:not(.theme-light) body.app .av-ok { background: #15301f; color: #7fd49b; }
  html:not(.theme-light) body.app .av-tight { background: #3a2f17; color: #f0c674; }
  html:not(.theme-light) body.app .av-short { background: #3a1d20; color: #f19a9a; }
  html:not(.theme-light) body.app .q-dept-head th, html:not(.theme-light) body.app .p-dept-head th { background: #1e2938; color: #e6ebf2; }
  html:not(.theme-light) body.app .p-done td { background: #15251c; }
  html:not(.theme-light) body.app .q-added td { background: #2c2716; }
  html:not(.theme-light) body.app .mo-day { border-color: #2a3545; } html:not(.theme-light) body.app .mo-other { background: #141c27; }
  html:not(.theme-light) body.app .mo-n { color: #e6ebf2; } html:not(.theme-light) body.app .mo-chip { background: #1e2938; color: #c3ccd9; }
  html:not(.theme-light) body.app .scan-ok { background: #15301f; color: #9fe0b5; } html:not(.theme-light) body.app .scan-warn { background: #3a2f17; color: #f0c674; }
  html:not(.theme-light) body.app .scan-err { background: #3a1d20; color: #f6b0b0; } html:not(.theme-light) body.app .scan-info { background: #16283d; color: #a9cdf5; }
  html:not(.theme-light) body.app .inv-bc { background: #fff; }
}
@media screen {
  html.theme-dark body.app .av-ok { background: #15301f; color: #7fd49b; }
  html.theme-dark body.app .av-tight { background: #3a2f17; color: #f0c674; }
  html.theme-dark body.app .av-short { background: #3a1d20; color: #f19a9a; }
  html.theme-dark body.app .q-dept-head th, html.theme-dark body.app .p-dept-head th { background: #1e2938; color: #e6ebf2; }
  html.theme-dark body.app .p-done td { background: #15251c; }
  html.theme-dark body.app .q-added td { background: #2c2716; }
  html.theme-dark body.app .mo-day { border-color: #2a3545; } html.theme-dark body.app .mo-other { background: #141c27; }
  html.theme-dark body.app .mo-n { color: #e6ebf2; } html.theme-dark body.app .mo-chip { background: #1e2938; color: #c3ccd9; }
  html.theme-dark body.app .scan-ok { background: #15301f; color: #9fe0b5; } html.theme-dark body.app .scan-warn { background: #3a2f17; color: #f0c674; }
  html.theme-dark body.app .scan-err { background: #3a1d20; color: #f6b0b0; } html.theme-dark body.app .scan-info { background: #16283d; color: #a9cdf5; }
}
.add-gear, .part-add, .unit-add, .crew-view .card-foot, .line-form, .card-foot.left { text-align: left; }
.unit-add h3 { margin-top: 0; }
