/* Local sample workspaces. Same white-and-blue family as the mechanic shop. */
body.ops-page {
  --blue: #2459db;
  --ink: #171a20;
  --text: #292e36;
  --muted: #4f5868;
  --line: #dfe4eb;
  --soft: #f4f6fa;
  --card: #fff;
  margin: 0;
  color: var(--text);
  background: #f6f8fb;
  font: 15px/1.5 Manrope, "DM Sans", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.ops-page *, .ops-page *::before, .ops-page *::after { box-sizing: border-box; }
.ops-page [hidden] { display: none !important; }
.ops-page :is(button, input, select, textarea) { font: inherit; }
.ops-page :is(button, select, summary, input[type=checkbox], input[type=radio]) { cursor: pointer; }
.ops-page :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #8fb0ff;
  outline-offset: 2px;
}
.ops-page :is(button, input, select, textarea):disabled { cursor: not-allowed; opacity: .65; }
.ops-page :is(h1, h2, h3) { color: var(--ink); line-height: 1.25; }
.ops-page h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.01em; }
.ops-page h2 { margin: 0 0 8px; font-size: 1.08rem; font-weight: 800; }
.ops-page h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; }
.ops-page p { margin: 0 0 10px; }
.ops-page p:last-child { margin-bottom: 0; }
.ops-page a { color: var(--blue); text-underline-offset: 3px; }
.ops-page :is(p, h1, h2, h3, dd, td, small, label, button) { overflow-wrap: anywhere; }
.ops-page :is(button, input, select, textarea, a) { scroll-margin-block: 12px; }
.ops-skip { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ops-skip:focus { left: 12px; top: 12px; z-index: 100; width: auto; height: auto; min-height: 44px; margin: 0; padding: 10px 14px; clip-path: none; border-radius: 10px; background: #fff; color: var(--blue); }

/* Context controls stay in the header; the day’s work gets the page. */
.ops-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 14px max(20px, calc((100vw - 1360px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.ops-brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--ink) !important; text-decoration: none; font-size: 1.2rem; font-weight: 800; letter-spacing: -.03em; }
.ops-brand img { display: block; width: 34px; height: 34px; object-fit: contain; }
.ops-context { display: flex; align-items: end; justify-content: end; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ops-context label { display: grid; gap: 3px; color: var(--muted); font-size: .8rem; font-weight: 700; min-width: 0; }
.ops-context select { width: 100%; min-width: 110px; max-width: 240px; min-height: 44px; padding: 8px 28px 8px 10px; border: 1px solid #c9d0dc; border-radius: 10px; color: var(--ink); background: #fff; font-size: .9rem; }
.ops-page #ops-language-label { display: grid; gap: 3px; min-width: 110px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.ops-page #ops-language { width: 100%; min-height: 44px; padding: 8px 28px 8px 10px; border: 1px solid #c9d0dc; border-radius: 10px; color: var(--ink); background: #fff; font-size: .9rem; }
.ops-banner { padding: 9px 20px; border-bottom: 1px solid #d5e0f8; color: #294d99; background: #eef3ff; font-size: .85rem; text-align: center; }
.ops-banner strong { font-weight: 800; }
.ops-banner a { margin-inline-start: 8px; }

.ops-shell { max-width: 1360px; margin: 0 auto; padding: 0 20px 40px; }
.ops-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 10;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fb;
  scroll-padding-inline: 8px;
}
.ops-nav [data-page] { flex: 0 0 auto; min-height: 44px; padding: 9px 14px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 800; white-space: nowrap; transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease; }
.ops-nav [data-page]:hover { background: #edf1f8; color: var(--ink); }
.ops-nav [data-page]:is([aria-current=page], [aria-selected=true], .active, .is-active) { border-color: #c9d9f9; background: #eaf0ff; color: var(--blue); }
#ops-main { min-width: 0; }
.ops-page-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.ops-page-head p { margin-top: 6px; color: var(--muted); max-width: 62ch; }
.ops-page-head > div { min-width: 0; }
.ops-page-head > :is(button, a) { flex: 0 0 auto; }
.ops-button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; margin-block: 8px; }
.ops-button-row > .ops-btn { flex: 0 1 auto; }
.ops-page-head > .ops-button-row { margin: 0; }
.ops-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px); align-items: end; gap: 12px; }
.ops-filter > label { display: grid; gap: 5px; min-width: 0; color: var(--ink); font-weight: 700; }
.ops-filter :is(input, select) { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid #c9d0dc; border-radius: 10px; color: var(--text); background: #fff; font-weight: 500; }
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; margin-bottom: 12px; }
.ops-grid > * { min-width: 0; }
.ops-card { padding: 14px; border: 1px solid rgba(36, 89, 219, .16); border-radius: 14px; background: rgba(234, 241, 255, .4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 10px rgba(36, 89, 219, .03); margin-bottom: 12px; min-width: 0; }
.ops-grid > .ops-card { margin-bottom: 0; }
.ops-focus { padding: 18px; background: #eef3ff; border: 1px solid #c9d9f9; border-left: 3px solid var(--blue); border-radius: 14px; margin-bottom: 16px; min-width: 0; }
.ops-focus h2 { font-size: clamp(1.2rem, 2.5vw, 1.55rem); }
.ops-focus > .ops-small { color: var(--blue); font-weight: 800; }
.ops-focus .ops-btn { margin-top: 12px; }
.ops-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); gap: 10px; margin-bottom: 16px; }
.ops-stat { display: grid; align-content: start; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.ops-stat :is(strong, b, .ops-amount) { display: block; font-size: clamp(1.45rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.ops-stat small { font-size: .8rem; color: var(--muted); }
.ops-stat > span { font-weight: 700; }

/* Each job remains one readable row, with its status written out. */
.ops-job-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: 100%; padding: 14px; margin-bottom: 8px; text-align: start; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #fff; text-decoration: none !important; transition: border-color 140ms ease, background-color 140ms ease; }
.ops-job-row:hover { border-color: #9dbaf2; background: #f8faff; }
.ops-job-row > :is(div, span) { min-width: 0; }
.ops-job-row > span:first-child { flex: 1 1 180px; }
.ops-job-row > .ops-button-row { flex: 0 1 auto; margin: 0; }
.ops-job-row :is(strong, b) { display: block; color: var(--ink); font-size: 1rem; }
.ops-job-row :is(p, small) { display: block; margin: 3px 0 0; color: var(--muted); line-height: 1.45; }
.ops-job-row .ops-pill { flex: 0 0 auto; }
.ops-pill { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; padding: 4px 9px; border-radius: 999px; background: #edf0f5; color: #3f4858; font-size: .75rem; line-height: 1.35; font-weight: 800; }
.ops-pill[data-status=active] { color: #1646b3; background: #e8efff; }
.ops-pill[data-status=blocked] { color: #7a1a12; background: #ffe9e6; }
.ops-pill[data-status=review] { color: #7a4b00; background: #fff4dc; }
.ops-pill[data-status=done] { color: #17703f; background: #e7f6ec; }
.ops-overview { margin-bottom: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ops-overview h1 { margin-bottom: 10px; }
.ops-overview dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding-top: 12px; margin: 12px 0 0; border-top: 1px solid #e3e7ef; }
.ops-overview dl > div { min-width: 0; }
.ops-overview dt { color: var(--muted); font-size: .8rem; }
.ops-overview dd { margin: 3px 0 0; color: var(--ink); font-weight: 700; }

/* A compact timeline frames the one action a person needs next. */
.ops-job-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.ops-job-layout > * { min-width: 0; }
.ops-timeline { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; }
.ops-timeline ol { list-style: none; padding: 0; margin: 0; counter-reset: ops-step; }
.ops-timeline li { position: relative; padding: 10px 10px 10px 35px; border-radius: 9px; font-weight: 700; color: var(--muted); counter-increment: ops-step; }
.ops-timeline li::before { content: counter(ops-step); display: grid; place-items: center; position: absolute; left: 7px; top: 11px; width: 20px; height: 20px; border: 1px solid #c9d0dc; border-radius: 50%; background: #fff; font-size: .72rem; color: var(--muted); }
.ops-timeline li > span:first-child { display: none; }
.ops-timeline li > strong { display: block; }
.ops-timeline li[data-current]:not([data-current=false]) { color: var(--blue); background: #eaf0ff; }
.ops-timeline li[data-current]:not([data-current=false])::before { color: #fff; border-color: var(--blue); background: var(--blue); }
.ops-timeline li :is(a, button) { display: flex; align-items: center; min-height: 44px; padding: 0; color: inherit; background: transparent; border: 0; font: inherit; font-weight: inherit; text-decoration: none; }
.ops-timeline li small { display: block; margin-top: 3px; font-size: .75rem; font-weight: 500; }
.ops-work { display: grid; gap: 12px; }
.ops-work > .ops-card { margin: 0; }
.ops-actions { padding: 14px; border: 1px solid #c9d9f9; border-radius: 14px; background: #eef3ff; }
.ops-actions .ops-btn { width: 100%; margin-top: 8px; }
.ops-actions .ops-small { display: block; margin-top: 10px; }
.ops-actions hr { border: 0; border-top: 1px solid #d5e0f8; margin: 14px 0; }

.ops-form { display: grid; gap: 12px; }
.ops-field { display: grid; gap: 5px; min-width: 0; font-weight: 700; color: var(--ink); }
.ops-field small { color: var(--muted); font-size: .8rem; font-weight: 500; }
.ops-field :is(input, select, textarea), .ops-form > :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; border: 1px solid #c9d0dc; border-radius: 10px; color: var(--text); background: #fff; font-weight: 500; }
.ops-field textarea, .ops-form > textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.ops-page textarea::placeholder { color: #2459db; opacity: .85; }
.ops-field :is(input, textarea)[aria-invalid=true] { border-color: #b42318; background: #fff5f4; }
.ops-field input[type=file] { padding: 8px; font-size: .85rem; }
.ops-field input[type=file]::file-selector-button { min-height: 44px; margin-right: 8px; padding: 4px 9px; border: 1px solid #c9d0dc; border-radius: 7px; background: #f4f6fa; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.ops-field:has(input[type=checkbox]), .ops-field:has(input[type=radio]) { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.ops-field :is(input[type=checkbox], input[type=radio]) { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: var(--blue); }
.ops-form fieldset { min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; }
.ops-form legend { max-width: 100%; padding-inline: 5px; color: var(--ink); font-weight: 800; overflow-wrap: anywhere; }
.ops-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-block: 8px; cursor: pointer; line-height: 1.45; }
.ops-check > input[type=checkbox] { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 0; accent-color: var(--blue); }
.ops-form details { min-width: 0; }
.ops-form summary { display: flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 800; }
.ops-form summary::before { content: '+'; margin-inline-end: 8px; }
.ops-form details[open] > summary::before { content: '−'; }
.ops-scan-zone { display: grid; gap: 14px; place-items: center; min-height: 170px; margin: 12px 0; padding: 16px; border: 2px dashed #9cb8f0; border-radius: 12px; background: #eef3ff; text-align: center; }
.ops-scan-zone > span { max-width: 42ch; color: #294d99; }
.ops-scan-label { display: inline-flex; align-items: center; justify-content: center; gap: 10px; max-width: 100%; min-height: 58px; padding: 10px 14px; border: 1px solid #c9d0dc; border-radius: 9px; color: var(--ink); background: #fff; box-shadow: 0 2px 6px rgba(23, 26, 32, .06); cursor: grab; }
.ops-scan-label:active { cursor: grabbing; }
.ops-scan-label b { overflow-wrap: anywhere; }
.ops-qr { font-size: 34px; line-height: 1; color: var(--ink); }
.ops-page #ops-scan-result { display: block; margin-top: 8px; color: #17703f; font-weight: 800; }
.ops-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ops-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; max-width: 100%; padding: 10px 14px; border: 1px solid #c9d0dc; border-radius: 10px; color: var(--ink); background: #fff; font-weight: 800; line-height: 1.35; text-align: center; text-decoration: none !important; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease; }
.ops-btn:hover { border-color: #99a7bc; background: #f4f6fa; }
.ops-btn.primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.ops-btn.primary:hover { border-color: #1d49b7; background: #1d49b7; }
.ops-btn.danger { border-color: #eab9b4; background: #fff5f4; color: #7a1a12; }
.ops-btn.danger:hover { background: #ffe9e6; border-color: #b42318; }
.ops-btn.quiet { background: transparent; border-color: transparent; color: var(--blue); }
.ops-btn.quiet:hover { background: #eaf0ff; border-color: #d5e0f8; }
.ops-muted { color: var(--muted); }
.ops-small { font-size: .85rem; line-height: 1.45; }
.ops-error { padding: 10px 12px; border: 1px solid #eab9b4; border-left: 4px solid #b42318; border-radius: 9px; background: #fff5f4; color: #7a1a12; font-weight: 700; }
.ops-notice { padding: 10px 12px; margin-bottom: 12px; border: 1px solid #dfcc9c; border-radius: 10px; background: #fff4dc; color: #7a4b00; line-height: 1.5; }
.ops-empty { padding: 22px 16px; border: 1px dashed #bcc8dc; border-radius: 12px; text-align: center; color: var(--muted); background: #fff; }
.ops-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }

.ops-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; scrollbar-width: thin; }
.ops-table { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: start; }
.ops-table th { padding: 11px 12px; color: var(--muted); background: #f4f6fa; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.ops-table td { padding: 12px; vertical-align: top; border-top: 1px solid #e3e7ef; min-width: 110px; }
.ops-table td small { display: block; color: var(--muted); margin-top: 3px; }
.ops-table .ops-btn { white-space: nowrap; }
.ops-list { list-style: none; display: grid; gap: 8px; padding: 0; margin: 0; }
.ops-list > li { min-width: 0; }
.ops-event { padding: 12px; border: 1px solid #e3e7ef; border-radius: 10px; background: #fff; }
.ops-event p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.ops-event :is(time, small) { color: var(--muted); font-size: .8rem; }
.ops-event strong { color: var(--ink); }
.ops-calendar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.ops-day { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ops-day h3 { margin: 0 0 10px; padding: 0 0 9px; border-bottom: 1px solid #e3e7ef; }
.ops-day h2 { margin: 0 0 10px; padding: 0 0 9px; border-bottom: 1px solid #e3e7ef; font-size: .95rem; }
.ops-slot { display: grid; gap: 4px; width: 100%; min-height: 72px; margin-top: 8px; padding: 10px; text-align: start; border: 1px solid #c9d9f9; border-left: 3px solid var(--blue); border-radius: 9px; background: #eef3ff; color: var(--text); }
.ops-slot small { color: var(--muted); }
.ops-slot[draggable=true] { cursor: grab; }
.ops-slot[draggable=true]:active { cursor: grabbing; }
.ops-slot > .ops-job-row { display: block; min-height: 44px; margin: 0; padding: 0; border: 0; background: transparent; }
.ops-slot > .ops-job-row .ops-pill { margin-top: 8px; }
.ops-slot > .ops-btn { width: 100%; padding-inline: 8px; }
.ops-slot > .ops-error { margin-top: 3px; color: #7a1a12; }
.ops-slot[data-status=blocked] { border-color: #eab9b4; border-left-color: #b42318; background: #fff5f4; }
.ops-slot[data-status=done] { border-color: #bbddc8; border-left-color: #17703f; background: #e7f6ec; }

/* A person picks one business. Family stays in its own optional group. */
.ops-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.ops-space-card { display: grid; align-content: start; gap: 10px; min-height: 190px; padding: 18px; border: 1px solid #d5e0f8; border-radius: 14px; color: var(--ink); background: #fff; text-align: start; text-decoration: none !important; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
.ops-space-card:hover { border-color: #99b8f4; background: #f7faff; }
.ops-space-card :is(strong, h2) { font-size: 1.12rem; margin: 0; }
.ops-space-card strong { display: block; }
.ops-space-card small { display: block; margin-top: 4px; color: var(--muted); font-size: .85rem; }
.ops-card .ops-space-card:not(:has(img)) { min-height: 104px; padding: 14px; }
.ops-space-card p { color: var(--muted); line-height: 1.5; }
.ops-space-card > img { width: 100%; height: 110px; object-fit: contain; }
.ops-space-card > svg { width: 32px; height: 32px; color: var(--blue); }
.ops-family-heading { margin: 26px 0 12px; color: var(--muted); }

/* Native dialogs scroll inside the phone; Close/Cancel stay normal buttons. */
dialog.ops-dialog { width: min(680px, calc(100% - 24px)); max-width: 680px; max-height: min(88vh, 88dvh); margin: auto; padding: 20px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #d5e0f8; border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 18px 64px rgba(23, 26, 32, .18); }
dialog.ops-dialog::backdrop { background: rgba(23, 26, 32, .38); }
.ops-dialog form { min-width: 0; }
.ops-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ops-dialog-head h2 { margin: 0; font-size: 1.3rem; }
.ops-dialog-head .ops-btn { flex: 0 0 auto; }
.ops-dialog-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Keep full photo contents readable; a count and arrows make the set clear. */
.ops-photo-stack { display: block; width: min(100%, 360px); max-width: 100%; padding: 0; margin: 4px 0 12px; }
.ops-photo-thumb { display: block; width: 170px; max-width: 100%; height: 126px; object-fit: contain; background: #f4f6fa; padding: 5px; border: 1px solid #c9d0dc; border-radius: 9px; box-shadow: 0 2px 7px rgba(23, 26, 32, .08); }
.ops-photo-stack > button.ops-photo-thumb { width: 100%; height: 220px; min-height: 44px; padding: 8px; overflow: hidden; cursor: zoom-in; }
.ops-photo-thumb > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ops-photo-stack > .ops-button-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; width: 100%; margin: 8px 0 0; }
.ops-photo-stack .ops-btn { gap: 4px; min-width: 0; padding: 8px; }
.ops-photo-stack [data-action=photo-prev]::before { content: '←'; }
.ops-photo-stack [data-action=photo-next]::after { content: '→'; }
.ops-photo-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; min-height: 26px; padding: 3px 7px; border: 2px solid #fff; border-radius: 999px; color: #fff; background: var(--blue); font-size: .75rem; font-weight: 800; }
.ops-photo-stack .ops-photo-count { position: static; white-space: nowrap; }
.ops-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; margin-top: 10px; }
.ops-photo-grid > * { min-width: 0; }
.ops-photo-grid .ops-photo-thumb { width: 100%; height: 150px; }
.ops-photo-grid > img { display: block; width: 100%; max-width: 100%; height: 150px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #f4f6fa; }
.ops-photo-grid button { padding: 4px; border: 1px solid #c9d0dc; border-radius: 10px; background: #fff; }
.ops-photo-viewer { width: min(920px, calc(100% - 24px)) !important; max-width: 920px !important; }
.ops-photo-viewer img { display: block; width: 100%; max-height: 65vh; max-height: 65dvh; height: auto; object-fit: contain; border-radius: 9px; background: #f4f6fa; }
.ops-photo-viewer .ops-dialog-actions { justify-content: space-between; }

/* The guide occupies real space. It never floats over the working control. */
.ops-guide { position: static; display: block; margin: 0 0 18px; padding: 16px; border: 1px solid #a9c1f4; border-left: 4px solid var(--blue); border-radius: 14px; background: #eef3ff; color: var(--text); }
.ops-guide-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ops-guide-head > div { min-width: 0; }
.ops-guide-head img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 40px; }
.ops-guide h2 { font-size: 1.15rem; }
.ops-guide p { max-width: 78ch; font-size: 1rem; line-height: 1.6; }
.ops-guide-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.ops-guide-progress { display: block; margin-top: 8px; color: #294d99; font-size: .85rem; font-weight: 800; }
.ops-guide-progress:is(progress) { width: 100%; max-width: 340px; height: 8px; accent-color: var(--blue); }
.ops-page [data-guide-target=true] { outline: 3px solid var(--blue); outline-offset: 4px; scroll-margin-top: 82px; scroll-margin-bottom: 20px; }
.ops-toast { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; z-index: 80; width: max-content; max-width: min(540px, calc(100% - 24px)); transform: translateX(-50%); padding: 11px 15px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: 0 4px 20px rgba(23, 26, 32, .15); font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; pointer-events: none; }

@media (max-width: 1100px) {
  .ops-job-layout { grid-template-columns: minmax(0, 1fr) 260px; }
  .ops-timeline { grid-column: 1 / -1; }
  .ops-timeline ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 4px; }
  .ops-context { justify-content: start; }
}
@media (max-width: 720px) {
  .ops-topbar { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; padding: 12px 16px; }
  .ops-brand { font-size: 1.15rem; }
  .ops-context { grid-column: 1 / -1; grid-row: 2; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-page #ops-language-label { grid-column: 2; grid-row: 1; min-width: 0; }
  .ops-page #ops-language { min-width: 0; font-size: 16px; }
  .ops-context select { min-width: 0; max-width: none; font-size: 16px; }
  .ops-banner { padding: 8px 16px; font-size: .8rem; text-align: start; }
  .ops-shell { padding: 0 14px 28px; }
  .ops-nav { gap: 2px; padding: 8px 0; margin-bottom: 12px; }
  .ops-nav [data-page] { padding: 9px 12px; font-size: .9rem; }
  .ops-page-head { margin-bottom: 12px; }
  .ops-page-head .ops-btn { flex-grow: 1; }
  .ops-page-head > .ops-button-row { width: 100%; }
  .ops-button-row > .ops-btn { flex-grow: 1; }
  .ops-filter { grid-template-columns: minmax(0, 1fr); }
  .ops-filter :is(input, select) { font-size: 16px; }
  .ops-card, .ops-overview, .ops-actions { padding: 12px; }
  .ops-focus { padding: 14px; }
  .ops-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ops-stat { padding: 10px 12px; }
  .ops-overview dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-job-row { padding: 12px; align-items: start; flex-wrap: wrap; }
  .ops-job-row > div:first-child { flex: 1 1 200px; }
  .ops-job-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ops-timeline { padding: 8px; }
  .ops-timeline ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-timeline li { padding: 9px 6px 9px 30px; font-size: .85rem; }
  .ops-timeline li::before { left: 4px; top: 10px; }
  .ops-actions { grid-column: 1; }
  .ops-field :is(input, select, textarea) { font-size: 16px; }
  .ops-row2 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .ops-calendar { grid-template-columns: minmax(0, 1fr); }
  .ops-day { padding: 12px; }
  .ops-space-card { min-height: 0; padding: 16px; }
  .ops-guide { padding: 13px; margin-bottom: 14px; }
  .ops-guide-head { gap: 9px; flex-wrap: wrap; }
  .ops-guide-head img { width: 34px; height: 34px; flex-basis: 34px; }
  .ops-guide-actions .ops-btn { flex: 1 1 auto; }
  dialog.ops-dialog { padding: 16px; max-height: 90vh; max-height: 90dvh; }
  .ops-dialog-actions .ops-btn { flex: 1; }
  .ops-photo-viewer img { max-height: 60vh; max-height: 60dvh; }
  .ops-photo-stack > button.ops-photo-thumb { height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .ops-page *, .ops-page *::before, .ops-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .ops-card { background: #eef3ff; box-shadow: none; }
}
@media (forced-colors: active) {
  .ops-page :is(.ops-card, .ops-btn, .ops-pill, .ops-focus, .ops-guide, .ops-timeline) { border: 1px solid CanvasText; }
  .ops-page [data-guide-target=true] { outline-color: Highlight; }
  .ops-nav [aria-current=page] { border-color: Highlight; }
}
@media print {
  .ops-page { background: #fff; }
  .ops-topbar, .ops-banner, .ops-nav, .ops-guide, .ops-toast, .ops-actions, .ops-dialog { display: none !important; }
  .ops-shell { max-width: none; padding: 0; }
  .ops-job-layout { display: block; }
  .ops-card, .ops-overview, .ops-job-row, .ops-event { background: #fff; box-shadow: none; break-inside: avoid; }
  .ops-table-wrap { overflow: visible; }
}

/* Keep the selected language readable on a390px phone. */
#ops-language-label select{min-width:128px;width:128px;}

/* On a phone, the next action comes before the long proof/history content. */
@media(max-width:720px){.ops-job-layout .ops-timeline{grid-row:2}.ops-job-layout .ops-actions{grid-row:1}.ops-job-layout .ops-work{grid-row:3}}
