/* App shell laid out like JobTread: top bar (logo, search, quick actions) + left menu + dashboard widgets. */
:root { --accent: var(--gold); --widget-head: #f05a00; --link: #0a9db8; }
@media (prefers-color-scheme: dark) { :root { --widget-head: #ff8a3d; --link: #4cc9e0; } }
body { padding-bottom: 0; }
#signedOut .hero { margin: 0; }
.ic { display: block; flex: none; }
.icon-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; border-radius: 8px; display: inline-grid; place-items: center; position: relative; min-width: 36px; min-height: 36px; }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.icon-btn .badge { position: absolute; top: 0; right: 0; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px calc(0px + env(safe-area-inset-top)); background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: .04em; font-size: 18px; flex: none; }
.gsearch { position: relative; flex: 1; max-width: 460px; }
.gsearch input { margin: 0; min-height: 36px; padding: 6px 12px 6px 34px; border-radius: 18px; background: var(--field); }
.gs-ic { position: absolute; left: 10px; top: 8px; color: var(--muted); pointer-events: none; }
.gs-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 60vh; overflow: auto; z-index: 40; }
.gs-results .item { padding: 10px 14px; cursor: pointer; display: block; }
.gs-results .item:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.gs-results h4 { margin: 0; padding: 8px 14px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.clock-pill { background: var(--gun); color: #fff; border: 0; font: inherit; font-weight: 700; font-size: 13px; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock-pill.on { background: var(--ok); }

.shell { display: flex; min-height: calc(100vh - 52px); }
.side { width: 210px; flex: none; background: var(--card); border-right: 1px solid var(--line); padding: 8px 0 12px; position: sticky; top: 52px; align-self: flex-start; height: calc(100vh - 52px); overflow-y: auto; transition: width .15s; }
.side a, .side button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 18px; color: var(--ink); text-decoration: none; background: none; border: 0; border-left: 3px solid transparent; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.side a:hover, .side button:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.side a.active { background: color-mix(in srgb, var(--gold) 16%, transparent); border-left-color: var(--gold); font-weight: 700; }
.side .ic { color: var(--muted); } .side a.active .ic { color: var(--widget-head); }
.side .sep { height: 1px; background: var(--line); margin: 8px 12px; }
.side .avatar { width: 22px; height: 22px; font-size: 10px; }
.side.collapsed { width: 62px; }
.side.collapsed span.lbl { display: none; }
.side.collapsed a, .side.collapsed button { padding-left: 20px; }
main#main { flex: 1; min-width: 0; max-width: none; margin: 0; padding: 16px 20px 60px; }
main#main > .view, main#main > * { max-width: 1400px; }
.only-narrow { display: none; }
.scrim { display: none; }

@media (max-width: 820px) {
  .only-narrow { display: inline-grid; }
  .brand span { display: none; }
  .side { position: fixed; z-index: 50; top: 0; left: 0; height: 100vh; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); padding-top: calc(8px + env(safe-area-inset-top)); width: 240px; }
  .side.collapsed { width: 240px; }
  .side.collapsed span.lbl { display: inline; }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 14, 16, .5); z-index: 45; }
  main#main { padding: 12px 12px 60px; }
  .hide-narrow { display: none !important; }
}

/* ---- dashboard (Home) ---- */
.dash-head .crumbs { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--widget-head); text-transform: uppercase; }
.dash-head h1 { margin: 2px 0 14px; font-size: 24px; }
.dash { display: grid; gap: 14px; grid-template-columns: 1.35fr 1fr 1fr 1fr; grid-auto-rows: minmax(120px, auto); align-items: start; }
.widget { background: var(--card); border-radius: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.widget > h3 { margin: 0; padding: 12px 14px 8px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--widget-head); display: flex; align-items: center; justify-content: space-between; }
.widget .w-body { max-height: 360px; overflow-y: auto; }
.widget.tall { grid-row: span 2; } .widget.tall .w-body { max-height: 760px; }
.widget table.t th { padding: 6px 12px; } .widget table.t td { padding: 8px 12px; }
.widget .w-foot { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13px; display: flex; justify-content: space-between; font-weight: 700; }
.widget .w-empty { padding: 20px 14px; color: var(--muted); text-align: center; font-size: 14px; }
.joblink { color: var(--link); text-decoration: none; font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 6px; display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.act-day { text-align: center; margin: 8px 0; } .act-day span { background: var(--field); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; padding: 2px 12px; color: var(--muted); }
.act { display: flex; gap: 10px; padding: 10px 14px; }
.act .main { flex: 1; min-width: 0; } .act .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.act .what { background: var(--field); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin-top: 6px; font-size: 13px; }
.action-item { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.action-item .ai-ic { color: var(--link); } .action-item .main { flex: 1; min-width: 0; }
.action-item .go { color: var(--link); font-weight: 700; font-size: 13px; white-space: nowrap; text-decoration: none; }
.action-item .bad { color: var(--bad); font-size: 12px; font-weight: 700; }
@media (max-width: 1180px) { .dash { grid-template-columns: 1fr 1fr; } .widget.tall { grid-row: auto; grid-column: 1 / -1; } }
@media (max-width: 620px) { .dash { grid-template-columns: 1fr; } }

/* ---- jobs board (kanban by status) ---- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.col { flex: 0 0 270px; background: color-mix(in srgb, var(--ink) 5%, var(--bg)); border-radius: 10px; border: 1px solid var(--line); }
.col > h4 { margin: 0; padding: 10px 12px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; color: var(--widget-head); text-transform: uppercase; letter-spacing: .05em; }
.col > h4 .n { background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.col .cards { padding: 0 8px 8px; display: grid; gap: 8px; max-height: calc(100vh - 230px); overflow-y: auto; }
.jcard { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; cursor: pointer; box-shadow: var(--shadow); }
.jcard:hover { border-color: var(--gold); }
.jcard .cust { font-size: 12px; color: var(--muted); } .jcard .nm { font-weight: 700; overflow-wrap: anywhere; } .jcard .meta { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.viewtoggle button { background: var(--card); border: 0; padding: 6px 10px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.viewtoggle button.on { background: var(--gun); color: #fff; }
.btn.orange, .btn.new { background: var(--gold); color: var(--gun); }

/* ---- phone layout (matches JobTread's app): bottom tab bar + full-screen More list ---- */
.tabbar, .more-panel { display: none; }
@media (max-width: 820px) {
  .side { display: none !important; }
  .topbar { height: 56px; gap: 6px; padding: 0 8px; }
  .gsearch { flex: 1; min-width: 36px; }
  .gsearch input { padding-left: 32px; min-height: 36px; background: transparent; border-color: transparent; }
  .top-actions { gap: 0; }
  .top-actions .icon-btn { min-width: 40px; }
  .clock-pill { font-size: 15px; padding: 9px 11px; border-radius: 8px; letter-spacing: .06em; }
  main#main { padding: 14px 12px calc(76px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font: inherit; font-size: 12px; color: var(--ink); text-decoration: none; background: none; border: 0; border-top: 3px solid transparent; cursor: pointer; }
  .tabbar .active { background: color-mix(in srgb, var(--ink) 7%, transparent); border-top-color: var(--widget-head); }
  body.more-open .more-panel { display: block; position: fixed; z-index: 35; top: 56px; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--card); }
  .more-panel a, .more-panel button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 20px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; font-size: 17px; text-align: left; cursor: pointer; }
  .more-panel .ic { color: var(--ink); }
  .more-panel .avatar { width: 26px; height: 26px; font-size: 11px; }
  .dash-head h1 { font-size: 26px; }
}
.only-narrow { display: none; }
@media (max-width: 820px) { .only-narrow { display: inline-grid; } }

/* ---- activity feed items (JobTread style) ---- */
.act .title { font-weight: 700; }
.act .by { font-size: 13px; color: var(--muted); margin-top: 1px; }
.act .chip { display: block; margin-top: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; text-decoration: none; }
.act .chip .path { color: var(--link); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .01em; }
.act .chip .nm { color: var(--ink); font-weight: 700; margin-top: 2px; }
.act .chip .note { color: var(--muted); font-size: 13px; margin-top: 2px; }
.act .avatar { border-radius: 4px; }
.act-filter { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; text-transform: none; letter-spacing: 0; }
.dash-head .crumbs { color: var(--link); }
.widget > h3 .act-filter { width: auto; min-height: 0; margin: 0; padding: 6px 10px; flex: none; }
@media (max-width: 820px) { .widget.tall .w-body { max-height: 70vh; } }

/* ---- Time page (JobTread phone layout): cards with a status bar, labelled fields, totals bar ---- */
.crumb.up { text-transform: uppercase; font-weight: 800; letter-spacing: .04em; color: var(--link); font-size: 13px; }
.tlist { display: grid; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tcard { position: relative; padding: 10px 12px 10px 18px; border-top: 1px solid var(--line); cursor: pointer; }
.tcard:first-child { border-top: 0; }
.tcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: #d9a400; }
.tcard.running::before { background: #2a7de1; }
.tcard .t-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.tcard .t-date { min-width: 74px; font-size: 16px; } .tcard .t-user { font-size: 16px; font-weight: 500; }
.tcard .avatar { width: 24px; height: 24px; font-size: 10px; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 0 12px; border-top: 1px solid var(--line); }
.tc { padding: 6px 0; min-width: 0; } .tc .lb { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .tc > div:last-child { overflow-wrap: anywhere; }
.tcard > .tc { border-top: 1px solid var(--line); }
.totalbar { position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: space-between; background: var(--gun); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .02em; padding: 12px 14px; border-radius: 0 0 10px 10px; margin-top: -1px; }
@media (max-width: 820px) { .totalbar { bottom: calc(60px + env(safe-area-inset-bottom)); border-radius: 0; margin-left: -12px; margin-right: -12px; } }

.maplink { color: var(--link); text-decoration: none; }
.maplink:hover { text-decoration: underline; }

/* ---- JobTread-style list pages: view dropdown + search, pipeline board, totals bar ---- */
.viewbar { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }
.viewbar select { width: auto; min-width: 150px; margin: 0; min-height: 40px; font-weight: 600; }
.vsearch { position: relative; flex: 1; min-width: 120px; margin: 0; }
.vsearch span { position: absolute; left: 10px; top: 11px; color: var(--muted); pointer-events: none; }
.vsearch input { margin: 0; padding-left: 32px; min-height: 40px; }
.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.col { flex: 0 0 300px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--widget-head); border-radius: 6px; }
.col > h4 { margin: 0; padding: 12px; display: flex; justify-content: space-between; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.col > h4 .n { background: none; border: 0; color: #d93025; font-weight: 800; }
.col.empty { flex: 0 0 40px; min-height: 150px; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 10px; }
.col.empty .n { color: var(--muted); font-weight: 800; } .col.empty .vlabel { writing-mode: vertical-rl; font-weight: 700; color: var(--link); }
.col .cards { padding: 0 8px 8px; display: grid; gap: 8px; max-height: calc(100vh - 300px); overflow-y: auto; }
.jcard { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; cursor: pointer; box-shadow: none; }
.jcard .jc-top { display: flex; justify-content: space-between; gap: 8px; } .jcard .nm { font-weight: 700; } .jcard .go { color: var(--muted); }
.jcard .lb { font-size: 11px; color: var(--muted); margin-top: 8px; } .jcard .cust { overflow-wrap: anywhere; }
.totalbar.plain { position: static; border-radius: 0 0 8px 8px; margin: -1px 0 0; }

/* ---- more JobTread-style list pages ---- */
.pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.pill.orange { color: #d98600; } .pill.green { color: #1a9a4a; } .pill.blue { color: #2a7de1; } .pill.red { color: #d93025; } .pill.gray { color: var(--muted); }
.avatar.big { width: 40px; height: 40px; font-size: 14px; border-radius: 6px; } .avatar.tiny { width: 18px; height: 18px; font-size: 8px; border-radius: 3px; vertical-align: middle; }
.todo-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.todo-row:first-child { border-top: 0; }
.todo-check input { width: 24px; height: 24px; margin: 0; accent-color: var(--gold-dark); border-radius: 50%; }
.todo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; }
.todo-main .struck { text-decoration: line-through; color: var(--muted); } .todo-main .late { color: var(--bad); font-weight: 700; }
.msg-row { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.msg-row:first-child { border-top: 0; } .msg-row .main { flex: 1; min-width: 0; }
.msg-row .top { display: flex; gap: 8px; align-items: baseline; } .msg-row .when { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.msg-row .subj { font-size: 14px; } .msg-row .prev { color: var(--muted); font-size: 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.daybar { background: var(--field); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 14px; font-weight: 700; margin: 12px -2px 0; display: flex; gap: 8px; align-items: center; }
.dl-card { background: var(--card); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dl-who { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.chip-path, a.chip-path { display: block; color: var(--link); font-weight: 700; font-size: 13px; text-transform: uppercase; text-decoration: none; margin: 6px 0; }
.chip-path a { color: var(--link); text-decoration: none; }
.dl-notes { white-space: pre-wrap; margin: 6px 0 10px; }
.dl-strip { background: var(--field); border-radius: 4px; padding: 7px 10px; font-size: 13px; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.shared-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 2px 8px; }
.dl-photos { display: flex; gap: 6px; } .dl-photos .ph { position: relative; width: 33%; aspect-ratio: 1; border-radius: 4px; overflow: hidden; cursor: pointer; background: var(--field); }
.dl-photos img { width: 100%; height: 100%; object-fit: cover; } .dl-photos .more { position: absolute; inset: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-weight: 800; }
.file-list .file-row { display: flex; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: flex-start; }
.file-list .file-row:first-child { border-top: 0; } .file-row input { width: 20px; height: 20px; margin-top: 12px; accent-color: var(--gold-dark); }
.file-row .thumb { width: 44px; height: 44px; border-radius: 4px; overflow: hidden; background: var(--field); display: grid; place-items: center; flex: none; cursor: pointer; font-size: 22px; }
.file-row .thumb img { width: 100%; height: 100%; object-fit: cover; } .file-row .main { flex: 1; min-width: 0; }
.file-row .fname { font-weight: 500; overflow-wrap: anywhere; } .file-row .by { font-size: 13px; color: var(--muted); }

/* ---- Settings sections ---- */
.sec-title { color: var(--widget-head); font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; margin: 14px 2px 6px; }
.sec-h { display: flex; align-items: center; gap: 8px; color: var(--widget-head); text-transform: uppercase; font-size: 13px; letter-spacing: .05em; }
.field-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; border-top: 1px solid var(--line); }
.int-card .pill { font-size: 12px; }

/* ---- Members + documents + activity extras ---- */
.member { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); } .member:first-of-type { border-top: 0; }
.member .main { flex: 1; min-width: 0; } .member .line { font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; text-decoration: none; cursor: pointer; }
.chip-btn.danger { color: var(--bad); }
table.docs th.sortable { cursor: pointer; user-select: none; }
.ic-tile { width: 34px; height: 34px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; background: color-mix(in srgb, var(--link) 16%, var(--card)); color: var(--link); }
.ic-tile.good { background: color-mix(in srgb, var(--ok) 16%, var(--card)); color: var(--ok); }
.act .when { text-align: right; } .act .amt { font-weight: 800; font-size: 14px; margin-bottom: 2px; } .act .amt.good { color: var(--ok); } .act .amt.bad { color: var(--ink); }
.act-thumbs { display: flex; gap: 6px; margin-top: 8px; } .act-thumbs img { width: 33%; max-width: 120px; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }

/* ---- clock-in job picker: search + tap, no scrolling a dropdown ---- */
.job-pick { max-height: 38vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--field); }
.job-pick .jp { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: transparent; border: 0; border-top: 1px solid var(--line); padding: 10px 12px; cursor: pointer; }
.job-pick .jp:first-child { border-top: 0; } .job-pick .jp:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.job-pick .jp.sel { background: color-mix(in srgb, var(--gold) 24%, transparent); box-shadow: inset 4px 0 0 var(--gold); }
.jp-main { display: flex; flex-direction: column; min-width: 0; } .jp-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.job-pick .jp em { font-style: normal; font-size: 11px; color: var(--link); white-space: nowrap; }

/* ---- break countdown ---- */
.clock-pill.brk { background: #d98600; color: #fff; }
.clock.brk { background: color-mix(in srgb, #d98600 16%, var(--card)); } .clock.brk .big { color: #d98600; }

/* ---- CompanyCam-style capture + photo feed ---- */
.cap-job { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; position: relative; }
.cap-job .chg { position: absolute; right: 12px; top: 12px; color: var(--link); font-weight: 700; font-size: 13px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; align-items: center; }
.tagchip { font: inherit; font-size: 13px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.tagchip.on { background: var(--gun); color: #fff; border-color: var(--gun); } .tagchip.add { color: var(--link); border-style: dashed; }
.who-sel { width: auto; min-height: 32px; margin: 0; padding: 2px 8px; font-size: 13px; border-radius: 999px; }
.cap-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .cap-btns .btn { min-height: 64px; font-size: 16px; }
.cap-shots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.shot { position: relative; width: 70px; height: 70px; border-radius: 8px; overflow: hidden; background: var(--field); }
.shot img { width: 100%; height: 100%; object-fit: cover; } .shot span { position: absolute; right: 3px; bottom: 3px; font-size: 12px; font-weight: 800; background: rgba(0,0,0,.6); color: #fff; border-radius: 10px; padding: 0 6px; }
.shot.up img { opacity: .5; } .shot.fail span { background: var(--bad); }
.feed-day { margin-bottom: 14px; } .feed-day .daybar { margin: 10px 0 6px; border-radius: 6px; border: 1px solid var(--line); }
.feed-job { margin: 6px 2px 4px; } .photos .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 26px; text-shadow: 0 1px 6px #000; }
.photos .badge-s, .photos .badge-q { position: absolute; top: 5px; right: 5px; font-size: 11px; background: rgba(0,0,0,.6); color: #fff; border-radius: 10px; padding: 1px 6px; } .photos .badge-q { top: 28px; background: #d98600; font-weight: 800; }
.marks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vimg { position: relative; line-height: 0; } .vimg img { width: 100%; max-height: 58vh; object-fit: contain; display: block; border-radius: 8px; background: #000; }
.vimg .draw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; } .vimg .draw.on { pointer-events: auto; cursor: crosshair; outline: 2px solid var(--gold); }
.vnav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; } .swatch.on { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }

/* ---- Quick Quote ---- */
.qres { margin-top: 10px; display: grid; gap: 6px; } .qres-h { font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--widget-head); margin-top: 6px; }
.qres-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.qres-item span { font-size: 13px; color: var(--muted); } .qres-item.new { border-style: dashed; color: var(--link); } .qres-item:hover { border-color: var(--gold); }
.qbuilder { padding-bottom: 90px; }
.qline { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; box-shadow: var(--shadow); }
.q-top { display: flex; gap: 6px; align-items: flex-start; } .q-namebox { position: relative; flex: 1; min-width: 0; }
.q-name { margin: 0 !important; font-weight: 600; } .icon-x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 10px; border-radius: 8px; } .icon-x:hover { color: var(--bad); }
.q-sg { position: absolute; z-index: 20; left: 0; right: 0; top: 48px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); overflow: hidden; }
.q-sg button { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: none; border: 0; border-top: 1px solid var(--line); padding: 12px; cursor: pointer; } .q-sg button:hover { background: color-mix(in srgb, var(--gold) 14%, transparent); } .q-sg em { font-style: normal; color: var(--muted); white-space: nowrap; }
.sg-h { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 12px 0; }
.q-row { display: grid; grid-template-columns: auto 64px 1fr auto; gap: 8px; align-items: center; margin-top: 8px; }
.q-row.cost { grid-template-columns: 1fr 140px; } .q-row input, .q-row select { margin: 0; min-height: 44px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--field); }
.stepper button { width: 44px; height: 44px; font-size: 22px; line-height: 1; border: 0; background: none; color: var(--ink); cursor: pointer; } .stepper button:active { background: var(--gold-tint); }
.stepper input { width: 58px; text-align: center; border: 0; background: transparent; min-height: 44px; padding: 0 2px; }
.q-price { display: flex; align-items: center; gap: 4px; margin: 0; } .q-price span { color: var(--muted); font-size: 13px; white-space: nowrap; } .q-total { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; min-width: 78px; }
.quick-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; } .quick-add .btn { flex: 1 1 auto; }
.photos .ph.pick { outline: 3px solid var(--gold); outline-offset: -3px; }
.qbar { position: sticky; bottom: 0; z-index: 12; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 12px; box-shadow: 0 -4px 18px rgba(0,0,0,.18); }
.qbar-l { flex: 1; min-width: 130px; } .qtot { display: flex; align-items: baseline; gap: 8px; } .qtot b { font-size: 26px; font-variant-numeric: tabular-nums; } .qsub { font-size: 12px; color: var(--muted); }
.qstat { font-size: 12px; color: var(--muted); } .qbar-r { display: flex; gap: 6px; align-items: center; }
@media (max-width: 820px) { .qbar { bottom: calc(62px + env(safe-area-inset-bottom)); } .q-row { grid-template-columns: auto 1fr; } .q-row .q-unit { width: 100%; } .q-row .q-total { text-align: right; } }

.crumb a { color: var(--link); text-decoration: none; font-weight: 600; } .crumb a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { .tag.gold { color: #f6e7bd; } }
.q-unit { text-align: center; }
