:root {
  color-scheme: light;
  --ink: #102f43;
  --ink-soft: #4b6676;
  --blue: #255f7d;
  --blue-deep: #173b52;
  --blue-pale: #eaf2f6;
  --orange: #dd7434;
  --orange-dark: #be5b24;
  --canvas: #eef3f6;
  --surface: #ffffff;
  --line: #cfdae1;
  --line-dark: #b9c7d0;
  --success: #23765a;
  --warning: #a85616;
  --danger: #a63d3d;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 47, 67, .08);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}
.project-closeout-readiness { margin-block: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.project-closeout-readiness h2 { margin-top: 0; font-size: 1.1rem; }
.project-closeout-readiness li, .closeout-outcome { overflow-wrap: anywhere; }
.project-closeout-readiness li + li { margin-top: .65rem; }
.closeout-photo-blockers p { margin: .25rem 0 .6rem; }
.closeout-outcome .notice { margin-block: .75rem; }

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(221, 116, 52, .55); outline-offset: 2px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--surface); border-radius: 8px; }
.skip-link:focus { top: 1rem; }

.boot-screen { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: .8rem; color: var(--ink-soft); }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--blue); color: white; font-weight: 800; letter-spacing: -.05em; }

.app-shell { min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; min-height: 72px; padding: .55rem max(1rem, calc((100vw - 1440px)/2)); background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; min-width: 190px; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; }
.brand-copy { display: grid; line-height: 1.08; }
.brand-copy strong { font-size: .93rem; letter-spacing: .02em; }
.brand-copy small { color: var(--blue); font-size: .69rem; letter-spacing: .16em; font-weight: 700; }
.environment-indicator { display: inline-flex; align-items: center; width: fit-content; margin-top: .18rem; padding: .12rem .38rem; border: 1px solid var(--orange); border-radius: 99px; color: var(--orange-dark); background: #fff4eb; font-size: .58rem; font-weight: 850; letter-spacing: .08em; white-space: nowrap; }
.environment-disposable_test { border-color: var(--danger); color: var(--danger); background: #fff0f0; }
.desktop-nav { display: flex; align-items: center; gap: .1rem; margin-left: 1.5rem; }
.desktop-nav .nav-link { padding-inline: .55rem; }
.nav-link { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem .72rem; border-radius: 9px; text-decoration: none; color: var(--ink-soft); font-size: .9rem; font-weight: 650; }
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--blue-pale); color: var(--blue-deep); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .45rem; }
.utility-icon-button { width: 36px; padding: .38rem; }
.utility-icon-button[aria-current="page"] { border-color: var(--blue); color: var(--blue); background: var(--blue-pale); }
.office-menu { position: relative; }
.office-menu > summary { list-style: none; cursor: pointer; }
.office-menu > summary::-webkit-details-marker { display: none; }
.office-menu-indicator { font-size: .68rem; transition: transform .15s ease; }
.office-menu[open] .office-menu-indicator { transform: rotate(180deg); }
.office-menu-panel { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 45; display: grid; min-width: 190px; padding: .4rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.office-menu-panel .nav-link { width: 100%; }
.icon { display: inline-grid; width: 1.15rem; height: 1.15rem; }
.icon svg { width: 100%; height: 100%; }
.count-badge { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; border-radius: 99px; color: #fff; background: var(--orange); font-size: .72rem; font-weight: 800; }
.connection { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .6rem; border-radius: 99px; color: var(--success); background: #edf8f4; font-size: .78rem; font-weight: 700; }
.connection.offline { color: var(--warning); background: #fff3e7; }
.user-menu { position: relative; }
.user-button { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: .38rem .55rem; color: var(--ink); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: white; font-size: .72rem; font-weight: 800; }
.mobile-menu-button { display: none; }
.mobile-nav { display: none; position: sticky; top: 72px; z-index: 25; padding: .55rem .75rem; gap: .3rem; flex-wrap: wrap; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.mobile-nav.open { display: flex; }
.nav-button { border: 0; width: auto; }
.brand-mark-small { width: 44px; height: 44px; flex: 0 0 44px; font-size: .8rem; }

.layout { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.7rem 0 4rem; }
.layout.layout-operations { width: min(1760px, calc(100% - 2rem)); }
.layout:has(> .calendar-page) { width: calc(100% - 3rem); min-width: 0; }
.page-head { display: flex; gap: 1rem; justify-content: space-between; align-items: start; margin-bottom: 1.35rem; }
.page-head h1 { margin: 0; font-size: clamp(1.7rem, 2.7vw, 2.35rem); line-height: 1.1; letter-spacing: -.035em; }
.page-head p { margin: .45rem 0 0; color: var(--ink-soft); max-width: 760px; }
.page-actions { display: flex; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.25rem; }
.section-title { display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; font-size: 1.08rem; }
.section-kicker { color: var(--orange-dark); text-transform: uppercase; letter-spacing: .13em; font-size: .72rem; font-weight: 800; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.metric { min-height: 116px; padding: 1rem; text-decoration: none; transition: transform .15s, border-color .15s; }
.metric:hover { transform: translateY(-2px); border-color: var(--blue); }
.metric-label { display: flex; justify-content: space-between; gap: .5rem; color: var(--ink-soft); font-weight: 700; font-size: .82rem; }
.metric-value { display: block; margin-top: .5rem; font-size: 2rem; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.metric-note { display: block; margin-top: .5rem; color: var(--ink-soft); font-size: .76rem; }
.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: 1rem; }
.space-top { margin-top: 1rem; }
.compact-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.toolbar { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; margin-bottom: .9rem; }
.toolbar .field { min-width: 180px; flex: 1; }
.record-list { display: grid; gap: .6rem; }
.record { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.record-main { min-width: 0; }
.history-details { grid-column: 1 / -1; min-width: 0; }
.history-details > summary { cursor: pointer; font-size: .85rem; color: var(--ink-soft); }
.history-details:not([open]) > :not(summary) { display: none; }
.history-invoice-reference { margin-top: .7rem; overflow-wrap: anywhere; }
.record-main h3 { margin: 0; font-size: .98rem; }
.record-main p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .83rem; overflow-wrap: anywhere; }
.record-meta { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin-top: .4rem; }
.evidence-record { align-items: start; }
.evidence-record .detail-grid { margin-top: .75rem; }
.evidence-group { margin-top: .8rem; }
.evidence-group h4 { margin: 0 0 .35rem; font-size: .82rem; color: var(--ink); }
.evidence-group ul { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); font-size: .82rem; }
.permanent-photo-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.permanent-photo-caption { overflow-wrap:anywhere; }
@media (min-width:1200px) { .permanent-photo-gallery { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:640px) { .permanent-photo-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.permanent-photo-tile { display: grid; gap: .35rem; padding: .4rem; border: 1px solid var(--line-dark); border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.permanent-photo-tile:focus-visible, .permanent-photo-lightbox .btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.permanent-photo-tile img, .permanent-photo-placeholder { width: 100%; height: 118px; border-radius: 5px; object-fit: contain; background: #f0f3f4; }
.permanent-photo-placeholder { display: grid; place-items: center; padding: .5rem; font-size: .8rem; text-align: center; }
.permanent-photo-caption { font-size: .78rem; overflow-wrap: anywhere; }
.permanent-photo-lightbox { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; gap: .6rem; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); background: rgba(9, 21, 34, .96); color: #fff; }
.permanent-photo-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.permanent-photo-view { min-height: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.permanent-photo-view img { max-width: 100%; max-height: calc(100dvh - 180px); object-fit: contain; }
.permanent-photo-details { margin: .7rem 0 .2rem; overflow-wrap: anywhere; }
.permanent-photo-position { margin: 0; color: #ccd6de; font-size: .85rem; }
.draft-photo-list { display: grid; gap: .5rem; margin-block: .5rem; }
.draft-photo-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .5rem; border: 1px solid var(--line-dark); border-radius: 6px; }
.draft-photo-row > span { overflow-wrap: anywhere; min-width: 0; }
.draft-photo-row .btn, .draft-photo-dialog .btn { min-height: 44px; }
.draft-photo-dialog { width: min(960px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1rem; border: 1px solid var(--line-dark); border-radius: 10px; color: var(--ink); }
.draft-photo-dialog::backdrop { background: rgba(9, 21, 34, .8); }
.draft-photo-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.draft-photo-toolbar h2 { margin: 0; font-size: 1.2rem; }
.draft-photo-content { display: grid; justify-items: center; gap: .5rem; }
.draft-photo-content img { max-width: 100%; max-height: calc(100dvh - 220px); object-fit: contain; }
.draft-photo-hash { overflow-wrap: anywhere; max-width: 100%; font-size: .85rem; }
.status { display: inline-flex; align-items: center; border-radius: 99px; padding: .25rem .55rem; font-size: .73rem; font-weight: 750; background: #edf1f3; color: var(--ink-soft); }
.status-success { background: #e6f5ef; color: var(--success); }
.status-warning { background: #fff1e4; color: var(--warning); }
.status-danger { background: #fae8e8; color: var(--danger); }
.status-info { background: var(--blue-pale); color: var(--blue); }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: .45rem; min-height: 42px; padding: .58rem .86rem; border: 1px solid var(--line-dark); border-radius: 9px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 750; font-size: .86rem; }
.join-work-control[hidden] { display: none !important; }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary { border-color: var(--orange); background: var(--orange); color: #fff; }
.btn-primary:hover { border-color: var(--orange-dark); background: var(--orange-dark); color: #fff; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn:disabled { cursor: not-allowed; opacity: .52; }
.btn-small { min-height: 34px; padding: .38rem .65rem; font-size: .78rem; }
.topbar .mobile-menu-button { display: none; }

.form-card { padding: clamp(1rem, 3vw, 1.7rem); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem; }
.form-grid[hidden] { display: none; }
.field { display: grid; align-content: start; gap: .34rem; min-width: 0; }
.project-create [hidden] { display: none; }
.field-wide { grid-column: 1 / -1; }
.field label, .legend { color: var(--ink); font-size: .82rem; font-weight: 750; }
.field input, .field select, .field textarea, .input { width: 100%; min-height: 44px; border: 1px solid var(--line-dark); border-radius: 8px; padding: .65rem .72rem; background: #fff; color: var(--ink); }
.field textarea { min-height: 98px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,95,125,.1); outline: none; }
.field-help { color: var(--ink-soft); font-size: .75rem; }
.field-message { margin: 0; color: var(--danger); font-size: .78rem; font-weight: 700; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--danger); }
.required { color: var(--danger); }
.fieldset { margin: 1.2rem 0 0; padding: 1rem; border: 1px solid var(--line); border-radius: 11px; }
.fieldset legend { padding: 0 .35rem; }
.chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip label { display: inline-flex; min-height: 38px; align-items: center; padding: .48rem .72rem; border: 1px solid var(--line-dark); border-radius: 99px; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 700; cursor: pointer; }
.chip input:checked + label { border-color: var(--blue); color: #fff; background: var(--blue); }
.chip input:focus-visible + label { outline: 3px solid rgba(221,116,52,.55); }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: .7rem; margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1rem; }

.tabs { display: flex; gap: .35rem; overflow-x: auto; margin-bottom: 1rem; padding-bottom: .2rem; }
.tab { white-space: nowrap; border: 1px solid var(--line); border-radius: 99px; padding: .47rem .72rem; background: #fff; color: var(--ink-soft); font-weight: 700; font-size: .8rem; }
.tab[aria-selected="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.detail { padding: .7rem; border-radius: 9px; background: #f7f9fa; }
.detail dt { color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; font-size: .67rem; font-weight: 800; }
.detail dd { margin: .25rem 0 0; overflow-wrap: anywhere; font-size: .88rem; font-weight: 650; }
.contact-summary { display: grid; min-width: 0; gap: .12rem; font-weight: 400; overflow-wrap: anywhere; }
.contact-summary strong { color: var(--ink); font-weight: 750; }
.contact-summary span { color: var(--ink-soft); }
.customer-report-card { padding: clamp(1rem, 2.5vw, 1.5rem); overflow: hidden; }
.customer-report-card > h2 { margin: 0; }
.customer-report-card > .muted { margin: .35rem 0 1rem; }
.customer-report-preview {
  min-width: 0;
  padding: clamp(1rem, 3.5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  overflow-wrap: anywhere;
}
.customer-report-preview > * { min-width: 0; }
.customer-report-preview > .detail-group:first-child { padding-bottom: 1rem; border-bottom: 3px solid var(--orange); }
.customer-report-preview > .detail-grid { margin-top: 1rem; }
.customer-report-preview > section.detail-group { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.customer-report-preview h3, .customer-report-preview h4 { margin: 0 0 .45rem; }
.customer-report-preview p { margin: .25rem 0; }
.customer-report-preview .detail-list { margin: .35rem 0 0; padding-left: 1.35rem; }
.customer-report-workspace { display: grid; min-width: 0; gap: 1rem; }
.customer-report-workspace > * { min-width: 0; }
.customer-report-heading { margin-bottom: .1rem; }
.customer-report-section, .customer-report-editor { min-width: 0; overflow-wrap: anywhere; }
.customer-report-section > :first-child, .customer-report-editor > :first-child { margin-top: 0; }
.customer-report-section > :last-child, .customer-report-editor > :last-child { margin-bottom: 0; }
.customer-report-workspace .stack { display: grid; min-width: 0; gap: 1rem; }
.customer-report-workspace .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.customer-report-workspace .section-heading h2,
.customer-report-workspace .section-heading p { margin-top: 0; }
.customer-report-workspace .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.customer-report-editor > .muted { margin: .35rem 0 1.15rem; }
.customer-report-editor-form { gap: 1.2rem; }
.customer-report-editor-fields { display: grid; min-width: 0; gap: 1rem; }
.customer-wording-field { min-width: 0; margin: 0; }
.customer-report-structured-section { padding: 1rem; }
.customer-report-structured-section > .field-help { display: block; margin: 0 0 .85rem; }
.customer-report-structured-item { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: #f7f9fa; }
.customer-report-structured-item + .customer-report-structured-item { margin-top: .8rem; }
.customer-report-structured-item h4 { margin: 0 0 .75rem; color: var(--blue-deep); }
.customer-report-structured-item .field textarea { min-height: 104px; overflow-wrap: anywhere; }
.customer-content-selection { min-width: 0; padding-top: .2rem; }
.customer-content-selection > h3,
.customer-content-selection > p { margin-top: 0; }
.customer-content-group { min-width: 0; margin-top: 0; }
.customer-content-group > .field-help { display: block; margin: 0 0 .9rem; max-width: 760px; }
.customer-content-row { min-width: 0; padding: .9rem; border-radius: 9px; background: #f7f9fa; }
.customer-content-row + .customer-content-row { margin-top: .75rem; }
.customer-content-toggle { display: flex; align-items: flex-start; gap: .55rem; min-width: 0; overflow-wrap: anywhere; }
.customer-content-toggle input { flex: 0 0 auto; margin-top: .18rem; }
.customer-content-row .form-grid { margin-top: .8rem; }
.customer-report-evidence-record { grid-template-columns: minmax(0, 1fr); align-items: start; }
.customer-report-evidence-record > .detail-grid { width: 100%; margin-top: .2rem; }
.customer-report-workspace .plain-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.customer-report-workspace .list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .75rem; min-width: 0; padding: .8rem; border: 1px solid var(--line); border-radius: 9px; }
.customer-report-workspace .list-row > * { min-width: 0; }
.customer-report-workspace .list-row p { margin: .2rem 0 0; overflow-wrap: anywhere; }
.customer-report-actions { justify-content: flex-end; padding-top: .2rem; }
.customer-report-blockers { margin: .45rem 0 0; padding-left: 1.2rem; }
.attention-card { border-left: 4px solid var(--orange); }
.record.attention-severity-warning, .operations-work-card.attention-severity-warning { border-color: #d8ab32; border-left: 4px solid #b68113; background: #fff9df; }
.record.attention-severity-critical, .operations-work-card.attention-severity-critical { border-color: #cb7777; border-left: 4px solid var(--danger); background: #fff0f0; }
.empty-state { text-align: center; padding: 2.2rem 1rem; color: var(--ink-soft); }
.empty-state h3 { margin: .7rem 0 .3rem; color: var(--ink); }
.empty-state p { margin: 0 auto 1rem; max-width: 520px; }
.empty-icon { margin: 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--blue-pale); color: var(--blue); font-weight: 900; }
.my-work-section { margin-top: 1.25rem; }
.my-work-section-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.my-work-section-head h2 { margin: 0; color: var(--blue-deep); font-size: 1.15rem; }
.my-work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.my-work-card { position: relative; min-width: 0; padding: 1rem; overflow: hidden; }
.my-work-card-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.my-work-card-hit:focus-visible { outline: 3px solid var(--orange); outline-offset: -4px; }
.my-work-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.my-work-card-head h3 { margin: .15rem 0 0; color: var(--blue-deep); }
.my-work-property { margin: .8rem 0 .1rem; font-weight: 800; }
.my-work-address, .my-work-summary { margin: .25rem 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.my-work-summary { color: var(--ink); }
.my-work-meta, .my-work-card-actions { position: relative; z-index: 2; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.my-work-meta { margin-top: .75rem; font-size: .8rem; color: var(--ink-soft); }
.my-work-meta-item { display: inline-flex; align-items: center; min-width: 0; }
.my-work-meta-item + .my-work-meta-item { padding-left: .7rem; border-left: 1px solid var(--line); }
.my-work-card-actions { justify-content: flex-end; margin-top: .9rem; }
.my-work-card-actions a, .my-work-card-actions button { position: relative; z-index: 3; }
.work-pause-dialog, .work-conflict-dialog { width: min(560px, calc(100vw - 2rem)); }
.work-pause-reasons { margin: 1rem 0; }
.work-pause-choice { border: 1px solid var(--line-dark); border-radius: 99px; background: #fff; color: var(--ink); padding: .52rem .76rem; font-weight: 700; cursor: pointer; }
.work-pause-choice.is-selected { border-color: var(--blue); color: #fff; background: var(--blue); }
.my-work-activity .record-main { min-width: 0; }
.my-work-activity h3, .my-work-activity p { overflow-wrap: anywhere; }
.my-work-request { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.my-work-request h3 { margin: 0 0 .35rem; color: var(--blue-deep); font-size: .95rem; }
.my-work-request p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.my-work-detail-head > div { display: grid; gap: .45rem; }
.my-work-detail-head h1, .my-work-detail-head p { margin: 0; }
.my-work-detail-context { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .85rem; }
.my-work-detail-context .back-link { display: inline-flex; align-items: center; padding-right: .85rem; border-right: 1px solid var(--line); }
.my-work-detail-context .section-kicker { display: inline-flex; margin: 0; }
.my-work-detail-flags { display: flex; flex-wrap: wrap; gap: .4rem; }
.my-work-detail-actions { position: sticky; bottom: .75rem; z-index: 12; display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); backdrop-filter: blur(8px); }
.operations-page-head { margin-bottom: 1rem; }
.operations-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(380px, 1fr); align-items: start; gap: 1rem; }
.operations-today, .operations-attention { display: grid; min-width: 0; gap: 1rem; }
.operations-attention { position: static; max-height: none; overflow: visible; }
.layout.layout-search { width: min(1500px, calc(100% - 2rem)); min-width: 0; }
.search-page-head { margin-bottom: 1rem; }
.search-panel { margin-bottom: 1.25rem; }
.search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .65rem; }
.search-form input { min-width: 0; }
.search-results { display: grid; gap: 1.35rem; min-width: 0; }
.search-group { min-width: 0; }
.search-group-head { display: flex; align-items: baseline; gap: .8rem; min-width: 0; margin-bottom: .65rem; }
.search-group-head h2 { margin: 0; color: var(--blue-deep); font-size: 1.08rem; }
.search-group-head .search-group-count { color: var(--ink-soft); font-size: .78rem; font-weight: 500; }
.search-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.search-result-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem; min-width: 0; padding: .9rem; }
.search-result-main { min-width: 0; }
.search-result-topline { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.search-result-type { color: var(--orange-dark); font-size: .67rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.search-exact { padding: .18rem .42rem; border-radius: 999px; background: var(--blue-pale); color: var(--blue-deep); font-size: .66rem; font-weight: 800; }
.search-result-card h3 { margin: .25rem 0 0; color: var(--blue-deep); font-size: 1rem; overflow-wrap: anywhere; }
.search-result-card p { margin: .25rem 0 0; overflow-wrap: anywhere; }
.search-result-context { color: var(--ink-soft); font-size: .8rem; }
.search-result-summary { color: var(--ink); font-size: .84rem; }
.search-result-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.field-history-head .back-link { display: inline-block; margin-bottom: .7rem; }
.field-history-section { display: grid; gap: .7rem; margin-top: 1rem; }
.field-history-section > h2 { margin: 0; color: var(--blue-deep); font-size: 1.08rem; }
.field-history-evidence { display: grid; gap: .75rem; }
.field-history-evidence-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.field-history-evidence-head h3 { margin: 0; color: var(--blue-deep); font-size: 1rem; }
.field-history-grid dt { color: var(--ink-soft); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.field-history-grid dd { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.field-history-materials h4 { margin: 0 0 .4rem; color: var(--blue-deep); }
.field-history-materials ul, .field-history-section ul { margin: 0; padding-left: 1.2rem; }
.field-history-notice { margin-top: 1rem; }
.operations-technician-group, .operations-bucket { min-width: 0; }
.operations-technician-head, .operations-bucket-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: .75rem; }
.operations-technician-head h2, .operations-bucket-head h2 { margin: 0; color: var(--blue-deep); font-size: 1rem; }
.operations-technician-head p { margin: .2rem 0 0; color: var(--ink-soft); font-size: .8rem; }
.operations-work-list, .operations-bucket-list { display: grid; gap: .65rem; }
.operations-work-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-width: 0; gap: .75rem; padding: .8rem; border: 1px solid var(--line); border-radius: 9px; background: #f8fafb; }
.operations-work-main { min-width: 0; }
.operations-card-top { display: flex; flex-wrap: wrap; gap: .4rem; }
.operations-attention .operations-work-card { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.operations-attention .operations-work-main { width: 100%; }
.operations-attention .operations-card-actions { width: 100%; justify-content: flex-start; }
.operations-attention .operations-card-top .status { flex: 0 1 auto; max-width: 100%; white-space: normal; line-height: 1.25; }
.operations-attention .operations-work-card > .btn { justify-self: start; }
.operations-domain { margin: .45rem 0 .15rem; color: var(--blue); font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.operations-work-card h3 { margin: 0; color: var(--blue-deep); font-size: .95rem; overflow-wrap: anywhere; }
.operations-work-card p { margin: .25rem 0 0; overflow-wrap: anywhere; }
.operations-card-meta { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin-top: .5rem; color: var(--ink-soft); font-size: .76rem; }
.operations-empty-inline { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.operations-bucket.is-empty { padding-block: .8rem; }
.notice { padding: .8rem 1rem; border: 1px solid #bcd8e5; border-radius: 9px; color: var(--blue-deep); background: #eef7fb; font-size: .84rem; }
.notice-warning { border-color: #f0c7a6; background: #fff4ea; color: #7c3d10; }
.notice-danger { border-color: #e8bcbc; background: #fff0f0; color: #762626; }
.loading { padding: 2rem; text-align: center; color: var(--ink-soft); }
.skeleton { min-height: 80px; border-radius: 10px; background: linear-gradient(90deg,#edf1f3,#f8fafb,#edf1f3); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); }
.auth-brand { display: grid; place-content: center; padding: 2rem; background: var(--blue-deep); color: #fff; }
.auth-brand-inner { width: min(390px, 100%); }
.auth-brand .brand-mark { background: #fff; color: var(--blue-deep); }
.auth-brand h1 { margin: 1rem 0 .6rem; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -.055em; }
.auth-brand p { color: #c7dbe6; }
.auth-panel { display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: min(440px, 100%); padding: 1.6rem; }
.auth-card h2 { margin: 0; }
.auth-card > p { color: var(--ink-soft); margin: .4rem 0 1.2rem; }
.auth-card form { display: grid; gap: .85rem; }

.offline-banner { position: sticky; top: 72px; z-index: 20; padding: .55rem 1rem; background: #fff0df; border-bottom: 1px solid #efc49b; color: #71370f; text-align: center; font-size: .8rem; font-weight: 700; }
.toast-region { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; width: min(360px, calc(100% - 2rem)); }
.toast { padding: .8rem 1rem; color: #fff; background: var(--blue-deep); border-radius: 9px; box-shadow: var(--shadow); font-size: .84rem; }
.toast-error { background: var(--danger); }
.toast-success { background: var(--success); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1240px) {
  .desktop-nav { display: none; }
  .topbar .mobile-menu-button { display: inline-flex; }
}

@media (max-width: 920px) {
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar .connection span { display: none; }
  .mobile-nav.open { display: flex; }
  .operations-layout { grid-template-columns: 1fr; }
  .operations-attention { position: static; max-height: none; overflow: visible; }
  .search-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { min-height: 64px; padding: .45rem .75rem; }
  .brand { min-width: 0; }
  .brand-copy strong { font-size: .78rem; }
  .brand-copy small, .user-button .user-name { display: none; }
  .brand-logo { width: 42px; height: 42px; }
  .layout { width: min(100% - 1rem, 1180px); padding-top: 1rem; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-actions { justify-content: stretch; }
  .page-actions .btn { flex: 1; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .metric { min-height: 105px; padding: .8rem; }
  .metric-value { font-size: 1.65rem; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .record { grid-template-columns: 1fr; gap: .7rem; }
  .record > .btn { width: 100%; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 210px; place-content: end start; padding: 1.4rem; }
  .auth-brand h1 { font-size: 2rem; }
  .auth-brand p { margin-bottom: 0; }
  .auth-panel { align-items: start; padding: 1rem; }
  .offline-banner { top: 64px; }
  .mobile-nav { top: 64px; }
  .mobile-nav .nav-link { flex: 1 1 calc(50% - .3rem); justify-content: center; }
  .mobile-nav .office-menu-mobile { flex: 1 1 100%; }
  .mobile-nav .office-menu-mobile > summary { justify-content: center; }
  .mobile-nav .office-menu-panel { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .35rem; box-shadow: none; }
  .mobile-nav .office-menu-panel .nav-link { justify-content: center; }
  .compact-details { grid-template-columns: 1fr; }
  .customer-report-card { padding: .8rem; }
  .customer-report-preview { padding: 1rem; }
  .customer-report-workspace .section-heading { align-items: stretch; flex-direction: column; }
  .customer-report-workspace .button-row { align-items: stretch; }
  .customer-report-workspace .button-row .btn { flex: 1 1 auto; }
  .customer-report-workspace .list-row { grid-template-columns: 1fr; align-items: stretch; }
  .customer-report-workspace .list-row .btn { width: 100%; }
  .customer-report-structured-section, .customer-content-group { padding: .8rem; }
  .customer-report-structured-item, .customer-content-row { padding: .8rem; }
  .my-work-grid { grid-template-columns: 1fr; }
  .my-work-card-head { align-items: stretch; flex-direction: column; }
  .my-work-card-actions { align-items: stretch; flex-direction: column; }
  .my-work-card-actions .btn { width: 100%; }
  .my-work-meta-item + .my-work-meta-item { padding-left: 0; border-left: 0; }
  .my-work-meta-item { flex-basis: 100%; }
  .my-work-detail-context { align-items: flex-start; flex-direction: column; }
  .my-work-detail-context .back-link { padding-right: 0; padding-bottom: .45rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .my-work-detail-actions { bottom: .35rem; align-items: stretch; flex-direction: column-reverse; }
  .my-work-detail-actions .btn { width: 100%; }
  .operations-work-card { grid-template-columns: 1fr; align-items: stretch; }
  .operations-work-card > .btn { width: 100%; }
  .operations-technician-head { align-items: stretch; flex-direction: column; }
  .search-form { grid-template-columns: 1fr; }
  .search-form .btn { width: 100%; }
  .search-group-head { align-items: flex-start; }
  .search-result-card { grid-template-columns: 1fr; align-items: stretch; }
  .search-result-card > .btn { width: 100%; }
  .field-history-evidence-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .topbar-actions .btn-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  .topbar, .page-actions, .toolbar, .tabs, .offline-banner, .toast-region { display: none !important; }
  body, html { background: #fff; }
  .layout { width: 100%; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}
.operations-card-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.assignment-dialog {
  margin: auto;
  max-height: min(85vh, 42rem);
  max-width: min(92vw, 34rem);
  width: 100%;
}

.assignment-dialog::backdrop {
  background: rgb(15 35 50 / 45%);
}

.schedule-mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  min-width: 0;
  padding: 0;
  border: 0;
}

.schedule-mode-group legend {
  width: 100%;
  margin-bottom: .25rem;
  color: var(--blue-deep);
  font-size: .78rem;
  font-weight: 800;
}

.schedule-mode-choice {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.35rem;
  padding: .45rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.schedule-mode-choice:has(input:checked) {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: #eef7fb;
}

.schedule-conditional {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.schedule-conflict-list { display: grid; gap: .55rem; margin: .85rem 0; }
.schedule-conflict-list .notice p { margin: .2rem 0 0; }

.maintenance-workspace { display: grid; gap: .5rem; }
.maintenance-workspace .maintenance-scope-item { padding: .8rem; }
.maintenance-scope-item > p { margin-top: .35rem; margin-bottom: .5rem; }
.maintenance-scope-item .maintenance-task-instruction { line-height: 1.5; }
.maintenance-scope-item { box-shadow: none; }
.maintenance-completion-target { display: flex; align-items: center; gap: .8rem; min-height: 56px; font-size: 1rem; font-weight: 750; cursor: pointer; }
.maintenance-completion-target input { width: 24px; height: 24px; flex: none; }
.maintenance-completion-target span { min-width: 0; overflow-wrap: anywhere; }
.maintenance-completion-target:focus-within { outline: 3px solid rgba(37,95,125,.3); outline-offset: 3px; }
.maintenance-item-options, .maintenance-scoped-propane { margin-top: .7rem; }
.maintenance-item-options summary { cursor: pointer; }
.maintenance-task-details, .maintenance-replacement-fields { min-width: 0; }
.maintenance-replacement-fields { grid-column: 1 / -1; }
.maintenance-scoped-propane { display: grid; gap: .6rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.maintenance-scoped-propane h4 { margin: 0; }
.maintenance-tank-row { display: grid; gap: .3rem; }
.maintenance-optional-section { display: grid; gap: .7rem; }
.maintenance-optional-section, .maintenance-optional-section .record-list,
.maintenance-optional-section .card { min-width: 0; }
.maintenance-optional-section input[type="file"] { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; }
.maintenance-optional-section .attachment-row { min-width: 0; overflow-wrap: anywhere; }
.attachment-row details { min-width: 0; }
.photo-thumbnail { padding:0; border:1px solid var(--border, #ccd7db); background:transparent; border-radius:8px; overflow:hidden; }
.photo-thumbnail img { width:76px; height:76px; object-fit:cover; display:block; }
.attachment-row pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; max-width: 100%; }
.maintenance-optional-section[hidden] { display: none !important; }
details.maintenance-optional-section:not([open]) > :not(summary) { display: none; }
.maintenance-optional-section .record-list[hidden], .maintenance-optional-section [hidden] { display: none !important; }
.maintenance-evidence-group { margin-top: 1rem; }
.maintenance-evidence-group h3 { margin-bottom: .5rem; }
.maintenance-custom-scope { display: grid; gap: .75rem; }
.maintenance-custom-scope[hidden] { display: none !important; }
.maintenance-custom-scope h4 { margin: .45rem 0 0; }
.maintenance-scope-picker { padding: .75rem; border-radius: 9px; background: var(--surface); }
.maintenance-scope-picker .form-actions { align-self: end; margin: 0; border: 0; padding: 0; }
.maintenance-selected-scope { min-height: 2.5rem; }
.maintenance-selected-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .75rem; padding: .65rem .75rem; min-width: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.maintenance-selected-task .field { margin: 0; min-width: 0; }
.maintenance-selected-task .field:nth-child(2) { grid-column: 1 / -1; }
.maintenance-selected-task .field textarea { min-height: 44px; line-height: 1.45; overflow-y: hidden; }
.maintenance-selected-task-actions { grid-column: 2; grid-row: 1; align-self: end; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.maintenance-selected-task-actions > label { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; cursor: pointer; }
.maintenance-selected-task-actions .btn { min-height: 44px; }
@media (max-width: 600px) { .maintenance-selected-task { grid-template-columns: minmax(0, 1fr); } .maintenance-selected-task-actions { grid-column: 1; grid-row: auto; } }

@media (max-width: 680px) {
  .maintenance-scope-picker { grid-template-columns: 1fr; }
  .maintenance-scope-picker .btn { width: 100%; }
  .maintenance-task-details, .maintenance-replacement-fields { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .operations-card-actions {
    justify-content: stretch;
    width: 100%;
  }

  .operations-card-actions .btn {
    flex: 1 1 auto;
  }

  .schedule-conditional { grid-template-columns: 1fr; }
}


/* Fixed Agreement levels keep inclusion separate from disclosure. */
.agreement-level-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.agreement-level-header h2 { margin: 0; flex: 1 1 12rem; }
.agreement-level-header .field-help { flex-basis: 100%; }
.agreement-level[data-included="false"] .agreement-level-content { opacity: .6; }
.agreement-level-content { margin-top: 1rem; }
.agreement-level-content[hidden] { display: none; }
.agreement-checklist-row { flex-wrap: wrap; }
.agreement-level .field-check { min-height: 2.75rem; }
@media (max-width: 640px) {
  .agreement-level-header { align-items: flex-start; }
  .agreement-level-header h2 { flex-basis: 100%; }
  .agreement-checklist-row .record-main { flex-basis: 100%; }
}

/* Maintenance instructions are primary task text, not shared field help. */
.maintenance-scope-item .maintenance-task-instruction { font-size: 1.08rem; line-height: 1.5; }
.maintenance-work-performed li { margin: .45rem 0; }

/* Calendar: compact planning shell; detailed agendas keep existing cards. */
.calendar-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem; margin-bottom: .55rem; }
.calendar-header h1 { margin: 0; font-size: 1.45rem; }
.calendar-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin-block: .5rem; }
.calendar-period, .calendar-views { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.calendar-period h2 { margin: 0 .35rem; font-size: 1.08rem; }
.calendar-toolbar .btn { min-height: 32px; padding: .3rem .55rem; font-size: .85rem; }
.calendar-views { margin-left: auto; padding: .15rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.calendar-views .btn { border-color: transparent; background: transparent; text-transform: capitalize; }
.calendar-views .btn[aria-pressed="true"] { background: var(--blue-pale); border-color: var(--line-dark); color: var(--blue-deep); }
.calendar-date-picker { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--ink-soft); }
.calendar-date-picker input { width: 9rem; min-height: 32px; padding: .2rem .35rem; font-size: .85rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.calendar-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-block: .6rem .75rem; }
.calendar-filters .field { margin: 0; gap: .15rem; font-size: .78rem; }
.calendar-filters select { min-width: 0; width: 100%; min-height: 34px; padding: .3rem .45rem; font-size: .88rem; }
.calendar-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(clamp(7.5rem, calc((100dvh - 20rem) / 5), 10rem), auto); gap: 1px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); }
.calendar-weekday { padding: .3rem .4rem; font-size: .8rem; font-weight: 700; color: var(--ink-soft); background: var(--canvas); }
.calendar-month { grid-template-rows: auto; }
.calendar-cell { position: relative; min-width: 0; padding: .25rem .3rem; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-dark); }
.calendar-cell-head { display: flex; align-items: center; gap: .35rem; margin-bottom: .15rem; }
.calendar-date { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; padding: .1rem .3rem; border: 1px solid transparent; border-radius: 99px; background: transparent; color: var(--ink); font-size: .85rem; font-weight: 650; text-decoration: none; }
/* Extend the native date button across its cell; event controls stay above it. */
.calendar-date::after { content: ''; position: absolute; inset: 0; z-index: 0; cursor: pointer; }
.calendar-date:focus-visible::after { outline: 2px solid var(--blue-deep); outline-offset: -2px; }
.calendar-entry, .calendar-overflow { position: relative; z-index: 1; }
.calendar-date-full { display: none; }
.calendar-date:hover { background: var(--blue-pale); }
.calendar-cell.is-today { background: #f7fafc; }
.calendar-date[aria-current="date"] { border-color: var(--blue-deep); background: var(--blue-deep); color: var(--surface); }
.calendar-today-label { font-size: .72rem; font-weight: 650; color: var(--blue-deep); }
.calendar-cell.adjacent-month { background: #f6f8fa; }
.calendar-cell.adjacent-month .calendar-date { color: var(--ink-soft); }
.calendar-entry { display: flex; align-items: center; gap: .25rem; min-height: 52px; margin-block: .2rem; padding: .3rem .4rem; border-left: 3px solid var(--blue); border-radius: 4px; background: var(--blue-pale); color: var(--ink); font-size: .85rem; line-height: 1.3; text-decoration: none; }
.calendar-entry-kind { flex-shrink: 0; font-size: .7rem; font-weight: 750; }
.calendar-entry-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-entry.calendar-maintenance_visit { border-left-color: var(--success); background: #eef7f1; }
.calendar-entry.calendar-tb_project { border-left-color: var(--orange-dark); background: #fff4eb; }
.calendar-entry:hover { box-shadow: inset 0 0 0 1px var(--line-dark); }
.calendar-overflow { min-height: 24px; padding: .1rem .25rem; border: 0; border-radius: 4px; background: transparent; color: var(--blue-deep); font-size: .8rem; font-weight: 650; text-decoration: none; }
.calendar-overflow:hover { background: var(--blue-pale); }
.calendar-agenda { display: grid; gap: 1rem; }
.calendar-card { margin-block: .4rem; padding: .8rem 1rem; min-width: 0; }
.calendar-card-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .3rem .75rem; }
.calendar-card-heading h3 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.calendar-card p { margin: .25rem 0; overflow-wrap: anywhere; }
.calendar-card-client { color: var(--ink-soft); }
.calendar-card-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.calendar-card-actions .btn { min-height: 36px; padding: .35rem .65rem; }
.calendar-agenda-day > h2 { margin: .35rem 0; font-size: 1.05rem; }
.calendar-agenda-day > h3 { margin: .35rem 0; font-size: .9rem; }
.calendar-agenda-empty { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .65rem; }
.calendar-agenda-empty h2, .calendar-agenda-empty p { margin: .15rem 0; }
.calendar-empty-message { color: var(--ink-soft); font-size: .9rem; }
@media (max-width: 900px) {
  .calendar-views { margin-left: 0; }
}
@media (max-width: 640px) {
  .layout:has(> .calendar-page) { width: calc(100% - 1rem); }
  .calendar-card { padding: .75rem; }
  .calendar-card-actions { justify-content: flex-start; }
  .calendar-card-actions .btn { min-height: 44px; }
  .calendar-header { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .calendar-period { width: 100%; }
  .calendar-period h2 { flex: 1; font-size: 1rem; }
  .calendar-toolbar .btn, .calendar-date-picker input { min-height: 44px; }
  .calendar-date-picker { flex-wrap: wrap; }
  .calendar-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-filters select { min-height: 44px; }
  .calendar-month { display: block; background: var(--surface); }
  .calendar-weekday { display: none; }
  .calendar-cell { min-height: 0; display: block; padding: .4rem .55rem; border-bottom: 1px solid var(--line); }
  .calendar-date { min-height: 44px; font-weight: 700; }
  .calendar-date-number { display: none; }
  .calendar-date-full { display: inline; }
  .calendar-entry { min-height: 44px; }
  .calendar-overflow { min-height: 44px; }
  .calendar-cell.adjacent-month { display: block; }
}
/* Time Sheets: compact daily intervals; no Calendar presentation changes. */
.time-sheet-content { display: grid; gap: 1rem; min-width: 0; }
.time-interval { border-block-start: 1px solid var(--border, #ddd); padding-block: .65rem; overflow-wrap: anywhere; }
.time-form { display: grid; gap: .65rem; min-width: 0; }
.time-form input, .time-form select { max-width: 100%; min-width: 0; }
@media (max-width: 600px) { .time-sheet-content .page-head { flex-wrap: wrap; } }

/* Time Sheets UI: native accordions and compact responsive rows. */
.time-sheet-content { gap: .65rem; }
.time-period-actions, .time-join-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.time-period-label { margin: 0; }
.time-accordion > summary { box-sizing: border-box; width: 100%; min-height: 44px; padding: .65rem .85rem; cursor: pointer; }
.time-accordion > summary:focus-visible, .time-employee:focus-visible { outline: 2px solid var(--primary, #2563eb); outline-offset: 2px; }
.time-day > summary, .time-employee { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(4rem, auto); align-items: center; gap: .6rem; text-align: left; }
.time-day > summary::before { content: '▸'; grid-column: 1; grid-row: 1; }
.time-day > summary > span:first-of-type { grid-column: 1; grid-row: 1; padding-inline-start: 1rem; }
.time-day[open] > summary::before { content: '▾'; }
.time-day > summary::marker { content: ''; }
.time-employee { width: 100%; min-height: 44px; padding: .65rem .85rem; }
.time-clear { color: var(--muted, #64748b); }
.time-issues { font-weight: 600; }
.time-interval { padding: .65rem .85rem; }
.time-interval p { margin: .3rem 0; }
.time-empty { margin: .35rem .85rem .65rem; }
.time-accordion .time-form { margin: 0; box-shadow: none; border: 0; }
.time-join { margin-block: .5rem; padding: .7rem; gap: .35rem; }
.time-join > p:empty { display: none; }
.time-join-actions { justify-content: flex-end; }
@media (max-width: 600px) {
  .time-day > summary, .time-employee { grid-template-columns: minmax(0, 1fr) auto; }
  .time-day > summary > span:last-child, .time-employee > span:last-child { grid-column: 1 / -1; font-size: .9rem; }
  .time-sheet-content .page-head { align-items: flex-start; gap: .5rem; }
  .time-period-actions .btn { flex: 1 1 auto; min-height: 44px; }
  .time-join-actions .btn { min-height: 44px; }
}

/* Explicit minute entry: native keyboard-accessible controls, no seconds. */
.time-clock { min-width: 0; margin: 0; padding: .6rem; border: 1px solid var(--border); border-radius: .4rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.time-clock legend { padding-inline: .25rem; font-weight: 600; }
.time-clock .field { min-width: 0; margin: 0; }
.time-clock select { width: 100%; min-height: 44px; }
.time-period-total { margin: .35rem 0; font-weight: 600; }

/* Office-only correction history reuses native accessible accordion headings. */
.time-history { margin-block: .6rem; border: 1px solid var(--line); border-radius: .5rem; }
.time-history > summary { font-weight: 600; }
.time-history-body, .time-history > p { padding-inline: .85rem; }
.time-history-version { border-block-start: 1px solid var(--line); padding-block: .6rem; }
.time-history h4 { margin: .35rem 0; }
.time-history-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.time-history dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .6rem; margin-block: .4rem; }
.time-history dt { color: var(--ink-soft); }
.time-history dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .time-history-comparison { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
}

.time-gap { display: grid; gap: .3rem; min-width: 0; }
.time-gap > p { margin: 0; overflow-wrap: anywhere; }
.time-gap-recorded { color: var(--ink-soft); font-size: .85rem; }
.time-compact-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.time-compact-actions .btn { min-height: 44px; width: auto; }
.time-current-work { min-width: 0; overflow-wrap: anywhere; }
.time-current-work h3, .time-current-work p { margin: 0 0 .3rem; }
.time-child-reference { color: var(--ink-soft); font-size: .85rem; }

@media (max-width: 1240px) {
  .topbar { flex-wrap: wrap; }
  .topbar > .mobile-nav { position: static; top: auto; flex-basis: 100%; width: 100%; }
  .topbar .search-utility { width: 44px; min-width: 44px; min-height: 44px; flex-shrink: 0; }
  .topbar a[href="/outbox"], .topbar .mobile-menu-button, .topbar .user-button { min-width: 44px; min-height: 44px; }
}
/* Phone utilities use a second row; desktop navigation retains its existing layout. */
@media (max-width: 680px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) 44px auto; gap: .5rem; }
  .topbar .brand { grid-column: 1 / 3; grid-row: 1; min-width: 0; }
  .topbar .brand-copy { min-width: 0; }
  .topbar .brand-copy strong { overflow-wrap: anywhere; }
  .topbar-actions { display: contents; }
  .topbar .user-button { grid-column: 3; grid-row: 1; justify-self: end; min-width: 44px; min-height: 44px; }
  .topbar .mobile-menu-button { grid-column: 1; grid-row: 2; justify-self: start; min-height: 44px; padding-inline: 10px; }
  .topbar .search-utility { grid-column: 2; grid-row: 2; width: 44px; min-height: 44px; }
  .topbar a[href="/outbox"] { grid-column: 3; grid-row: 2; min-height: 44px; padding-inline: 10px; }
  .topbar .connection { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .topbar .connection span { display: inline; }
  .topbar > .mobile-nav { grid-column: 1 / -1; grid-row: 3; }
}
/* Saved customer copy: only this isolated, ready document is printable. */
.customer-report-print-view { position: fixed; inset: 0; z-index: 1000; overflow: auto; background: #f4f5f6; padding: 1rem; }
.customer-report-print-controls { max-width: 8.5in; margin: 0 auto 1rem; }
.customer-report-print-document { max-width: 8.5in; margin: auto; padding: .6in; background: white; color: #18222b; overflow-wrap: anywhere; }
.customer-report-print-identity { font-size: .85rem; color: #47525c; }
.customer-report-print-document .customer-report-preview { border: 0; padding: 0; box-shadow: none; }
.customer-report-print-document figure { margin: 1rem 0; break-inside: avoid; }
.customer-report-print-document figure img { display: block; width: auto; max-width: 100%; height: auto; max-height: 6in; margin: auto; object-fit: contain; }
.customer-report-print-document figcaption { margin-top: .4rem; font-size: .9rem; text-align: center; }
@media (max-width: 600px) {
  .customer-report-print-view { padding: .75rem; }
  .customer-report-print-document { padding: 1rem; }
  .customer-report-print-document .detail-grid { grid-template-columns: 1fr; }
  .customer-report-print-controls .button-row { flex-wrap: wrap; }
}
@media print {
  @page customer-report { size: letter portrait; margin: .65in; }
  body.customer-report-print-active > :not(.customer-report-print-view),
  .customer-report-print-controls { display: none !important; }
  body.customer-report-print-active:not(.customer-report-print-ready) .customer-report-print-view { display: none !important; }
  body.customer-report-print-active .customer-report-print-view { position: static; overflow: visible; padding: 0; background: white; }
  body.customer-report-print-active .customer-report-print-document { page: customer-report; width: auto; max-width: none; padding: 0; margin: 0; font: 11pt/1.4 Arial, sans-serif; }
  .customer-report-print-document .customer-report-preview,
  .customer-report-print-document .detail-group { break-inside: auto; }
  .customer-report-print-document h2, .customer-report-print-document h3,
  .customer-report-print-document h4 { break-after: avoid; }
  .customer-report-print-document p, .customer-report-print-document li { orphans: 3; widows: 3; }
  .customer-report-print-document li { break-inside: avoid; }
  .customer-report-print-document .detail-grid { grid-template-columns: 1fr 1fr; }
}
/* Repeatable Doors assessment: native summaries and bounded mobile columns. */
.tb-door-entry { border: 1px solid var(--border, #d5dce2); border-radius: .5rem; margin-block: .5rem; padding: .65rem; min-width: 0; }
.tb-door-entry > summary { cursor: pointer; font-weight: 650; min-height: 44px; display: list-item; overflow-wrap: anywhere; padding-block: .5rem; }
.tb-door-entry > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.tb-door-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .8rem; }
.tb-door-grid .field { margin: 0; min-width: 0; }
.tb-door-grid input, .tb-door-grid select, .tb-door-grid textarea, .tb-door-entry input[type="file"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.tb-door-actions { gap: .5rem; flex-wrap: wrap; margin-block: .5rem 0; }
.tb-door-actions button { min-height: 44px; }
@media (max-width: 600px) { .tb-door-grid { grid-template-columns: minmax(0, 1fr); } .tb-door-entry { padding: .5rem; } }

/* Grouped, immutable trade evidence: shared by Office and Technician views. */
.tb-door-evidence { border: 1px solid var(--border, #d5dce2); border-radius: .5rem; padding: .8rem; margin-block: .7rem; min-width: 0; }
.tb-door-evidence > header { border-bottom: 1px solid var(--border, #d5dce2); padding-bottom: .5rem; margin-bottom: .5rem; }
.tb-door-evidence h4, .tb-door-evidence header p { margin: 0; overflow-wrap: anywhere; }
.tb-door-evidence h4 { font-size: 1rem; }
.tb-door-evidence header p { margin-top: .2rem; color: var(--ink-soft); }
.tb-door-evidence .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: 0; }
.tb-door-evidence .detail { min-width: 0; padding-block: .35rem; }
.tb-door-evidence dt { font-weight: 650; }
.tb-door-evidence dd { margin: .2rem 0 0; font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-saved-draft { display: flex; flex-direction: column; align-items: flex-start; text-align: left; min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.tb-saved-draft small { font-weight: 400; }
@media (max-width: 600px) { .tb-door-evidence .detail-grid { grid-template-columns: minmax(0, 1fr); } }

/* Trade estimating forms share the accepted grouped evidence pattern. */
.tb-assessment-entry { border: 1px solid var(--border, #d5dce2); border-radius: .5rem; margin-block: .5rem; padding: .65rem; min-width: 0; }
.tb-assessment-entry > summary { cursor: pointer; font-weight: 650; min-height: 44px; display: list-item; overflow-wrap: anywhere; padding-block: .5rem; }
.tb-assessment-entry > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.tb-assessment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .8rem; }
.tb-assessment-grid .field { margin: 0; min-width: 0; }
.tb-assessment-grid input, .tb-assessment-grid select, .tb-assessment-grid textarea, .tb-assessment-entry input[type="file"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.tb-assessment-actions { gap: .5rem; flex-wrap: wrap; margin-block: .5rem 0; }
.tb-assessment-actions button { min-height: 44px; }
.tb-assessment-evidence { border: 1px solid var(--border, #d5dce2); border-radius: .5rem; padding: .8rem; margin-block: .7rem; min-width: 0; }
.tb-assessment-evidence > header { border-bottom: 1px solid var(--border, #d5dce2); padding-bottom: .5rem; margin-bottom: .5rem; }
.tb-assessment-evidence h4, .tb-assessment-evidence header p { margin: 0; overflow-wrap: anywhere; }
.tb-assessment-evidence h4 { font-size: 1rem; }
.tb-assessment-evidence header p { margin-top: .2rem; color: var(--ink-soft); }
.tb-assessment-evidence .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin: 0; }
.tb-assessment-evidence .detail { min-width: 0; padding-block: .35rem; }
.tb-assessment-evidence dt { font-weight: 650; }
.tb-assessment-evidence dd { margin: .2rem 0 0; font-weight: 400; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { .tb-assessment-grid, .tb-assessment-evidence .detail-grid { grid-template-columns: minmax(0, 1fr); } .tb-assessment-entry { padding: .5rem; } }

/* Combined trade evidence retains the accepted compact responsive pattern. */
.tb-trade { min-width: 0; margin-block: .75rem; }
.tb-trade h3 { margin: 0; }
.tb-trade > .page-head { gap: .5rem; flex-wrap: wrap; }

/* Equal Project crew and compact, keyboard-accessible evidence groups. */
.tb-crew-choices{border:1px solid var(--border,#d5dce3);border-radius:8px;padding:12px;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
.tb-crew-choice{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;overflow-wrap:anywhere}
.tb-crew-choice input{width:20px;height:20px;flex:0 0 auto}
.tb-trade-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:12px;cursor:pointer;font-weight:700}
.tb-trade-heading span{flex:1;min-width:0;overflow-wrap:anywhere}.tb-trade-heading .tb-trade-remove{flex:0 0 auto;width:auto;min-height:44px;min-width:44px;padding:.35rem .65rem;white-space:nowrap}.tb-scope-event{padding:10px 0;border-top:1px solid var(--border,#d5dce3)}
.tb-scope-event>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600}
.tb-crew-history{padding:8px 0;border-top:1px solid var(--border,#d5dce3)}
.tb-crew-history p{margin:4px 0}.my-work-crew{font-size:.95rem;overflow-wrap:anywhere}.preserve-lines{white-space:pre-wrap;overflow-wrap:anywhere}
.my-work-crew-list{list-style:none;margin:.25rem 0 0;padding:0;display:grid;gap:.15rem;line-height:1.35}
.tb-completion-reason[hidden]{display:none}
.tb-project-crew form,.tb-project-crew fieldset,.tb-project-crew .field{min-width:0;max-width:100%}
.tb-project-crew input[type="file"]{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
@media(max-width:480px){.tb-crew-choices{grid-template-columns:1fr}.tb-trade-heading{flex-wrap:wrap}.tb-crew-form .form-actions{flex-wrap:wrap}}

/* Isolated staging diagnostics; ordinary field layouts retain their existing rules. */
.security-diagnostic-entry { max-width: 1440px; margin: 1rem auto; padding: 0 1rem; }
.security-diagnostic-dialog { width: min(900px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1rem; border: 1px solid var(--line-dark); border-radius: 10px; color: var(--ink); }
.security-diagnostic-dialog::backdrop { background: rgba(9, 21, 34, .8); }
.security-diagnostic-dialog .btn { min-height: 44px; }
.security-diagnostic-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; padding-left: 1.3rem; }
.security-diagnostic-results li { min-width: 0; padding: .65rem; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.security-diagnostic-results h3 { margin: 0 0 .35rem; font-size: 1rem; }
.security-diagnostic-results p { margin: .3rem 0; font-size: .88rem; }
.isolated-security-panel .field-help { overflow-wrap: anywhere; }
.isolated-security-panel textarea { width: 100%; max-width: 100%; }
.isolated-security-panel label { overflow-wrap: anywhere; }
.isolated-security-panel .form-actions { display: flex; flex-wrap: wrap; }
.isolated-security-panel .form-actions .btn { max-width: 100%; white-space: normal; }
@media (max-width: 600px) { .security-diagnostic-results { grid-template-columns: minmax(0, 1fr); } }
/* Build 3: restricted local drafts reuse the normal field forms. */
.offline-recovery-banner { padding: 1rem; border-bottom: 1px solid var(--border, #d4dee5); background: var(--surface, #fff); }
.offline-recovery-banner > * { max-width: 76rem; margin-left: auto; margin-right: auto; }
.offline-recovery-banner h1 { font-size: 1.6rem; }
.offline-recovery-banner .form-actions { flex-wrap: wrap; }
.offline-draft-editor { min-width: 0; }
.draft-photo-dialog > img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; margin: 1rem auto; }
/* V1 Office presentation. Commands, authority and evidence remain unchanged. */
.property-access-card, .property-access-card .record-list { min-width: 0; }
.property-access-card .record { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.property-access-card .record-main h3 { overflow-wrap: break-word; word-break: normal; }
.property-access-card .record-meta { min-width: 0; flex-wrap: wrap; }
.property-access-card .btn { max-width: 100%; white-space: normal; word-break: normal; }
.contact-reuse-slot { min-width: 0; }
.contact-reuse-slot > section { margin-top: 0; padding: .8rem; background: var(--canvas); }
.contact-reuse-slot .record { grid-template-columns: minmax(0, 1fr); }
.status-control.status-active { color: #175632; background: #e5f5e9; border-color: #8bbf9a; }
.status-control.status-inactive { color: #8b2424; background: #fae9e9; border-color: #d9a2a2; }
.status-danger { color: #8a2926; background: #fae9e7; }
.maintenance-visit-details .detail-grid dt, .office-detail-grid dt { font-weight: 750; }
.office-detail-grid dt { text-transform: none; letter-spacing: normal; font-size: .85rem; }
.maintenance-visit-details .detail-grid dd, .office-detail-grid dd { font-weight: 400; margin: .25rem 0 0; min-width: 0; overflow-wrap: break-word; }
.time-zone-note { display: block; color: var(--ink-soft); font-size: .82rem; margin-top: .2rem; }
.agreement-evidence { width: 100%; min-width: 0; overflow-wrap: break-word; }
.agreement-evidence .detail-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,12rem),1fr)); }
.agreement-evidence li, .agreement-revision { margin-block: .5rem; }
.maintenance-agreement-card { grid-template-columns: minmax(0, 1fr); align-items: start; gap: .75rem; }
.maintenance-agreement-card > * { min-width: 0; max-width: 100%; }
.maintenance-agreement-card .record-main h3 { margin: 0 0 .35rem; overflow-wrap: break-word; word-break: normal; }
.maintenance-agreement-card .record-main p { margin: .25rem 0; overflow-wrap: break-word; }
.maintenance-agreement-card > .page-actions { justify-content: flex-start; }
.maintenance-agreement-card > .page-actions .btn { min-height: 44px; max-width: 100%; white-space: normal; }
.calendar-timezone { color: var(--ink-soft); font-size: .8rem; }
.customer-report-logo { display: block; width: 100px; height: auto; max-width: 100%; object-fit: contain; }
.calendar-maintenance_visit, .calendar-maintenance_obligation { --work-color: #527c94; --work-tint: #e9f0f4; }
.calendar-tb_project { --work-color: #e47b36; --work-tint: #fff0e6; }
.calendar-service_call { --work-color: #c95f58; --work-tint: #f9eae8; }
.calendar-tb_assessment { --work-color: #89749e; --work-tint: #f0ebf5; }
.btn.job-walk-action { background: #f0ebf5; color: #493258; border-color: #89749e; min-height: 44px; }
.btn.job-walk-action:hover { background: #e4d9ed; color: #493258; border-color: #89749e; }
.property-record-back { display: block; width: fit-content; margin-bottom: .85rem; }
.time-interval > .btn { margin: .4rem .75rem .4rem 0; min-height: 44px; }
.calendar-entry, .calendar-entry.calendar-maintenance_visit, .calendar-entry.calendar-tb_project { background: var(--work-tint); border-left-color: var(--work-color); color: #173b52; }
.calendar-entry { flex-direction: column; align-items: stretch; gap: .05rem; }
.calendar-entry-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow-wrap: break-word; font-weight: 650; }
.calendar-entry-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .1rem .35rem; font-size: .7rem; }
.calendar-entry-schedule { white-space: nowrap; }
.calendar-entry-technician { font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-entry-kind { display: block; font-size: .67rem; font-weight: 400; }
.calendar-card { border-left: 4px solid var(--work-color); background: var(--work-tint); color: #173b52; }
.calendar-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; margin-bottom: .65rem; }
.calendar-legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.calendar-legend-swatch { width: .8rem; height: .8rem; border-radius: 2px; background: var(--work-color); }

/* Increment A: hidden controls stay hidden within the reference component. */
.project-references [hidden] { display: none !important; }

/* Compact shared navigation; domain colors retain their existing rules. */
.full-card { position: relative; }
.record-card-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.record-card-hit:focus-visible { outline: 3px solid var(--accent, #16779b); outline-offset: 3px; }
.record-card-actions { position: relative; z-index: 2; display: flex; gap: .5rem; flex-wrap: wrap; }
.property-row h3 { font-size: 1.13rem; font-weight: 750; }
.property-row p { font-size: .9rem; margin-top: .2rem; }
.property-list { margin-top: .8rem; }
.time-sheet-content.time-sheet-own { max-width: 650px; width: 100%; margin-inline: auto; }
.time-day-recorded > summary { font-weight: 700; border-left: 4px solid var(--accent, #16779b); }

/* Compact work and Maintenance presentation; original domain colors remain. */
.work-card {padding:.85rem 1rem;gap:.6rem}.work-card h3{font-size:1.08rem;margin:0}.work-card p{margin:.25rem 0}.work-card .record-meta{gap:.35rem}
.maintenance-scope-item{padding:.75rem;margin:.4rem 0}.maintenance-task-instruction{margin:.35rem 0 .5rem;line-height:1.45}.maintenance-current-record .record{padding:.65rem .75rem}.maintenance-evidence-group{margin:.8rem 0}.maintenance-evidence-group h3{margin:.4rem 0}.maintenance-history>summary{font-weight:650;cursor:pointer}
.maintenance-scope-item .maintenance-task-instruction { font-size: 1.1rem; font-weight: 650; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.maintenance-task > p { font-size: 1.17rem; font-weight: 650; color: var(--ink); }
.calendar-card-actions{position:relative;z-index:2}.maintenance-current-record .record-list{gap:.4rem}
@media(max-width:600px){.work-card,.maintenance-scope-item{padding:.75rem}.my-work-card{padding:.85rem}.my-work-card-actions .btn{min-height:44px}}

.time-sheet-own>.page-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.5rem}.time-sheet-own>.page-head h1{font-size:1.8rem;margin:0}.time-sheet-own>.page-head>.time-period-label{grid-column:1;grid-row:2}.time-sheet-own>.page-head>.btn{grid-column:2;grid-row:1/3}.time-sheet-own>.page-head>.time-period-actions{grid-column:1/-1;grid-row:3}
@media(max-width:600px){.time-sheet-own>.page-head h1{font-size:1.5rem}.maintenance-visit-details .detail-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem 1rem}}

/* Customer report v2: same approved CSS as the trusted renderer, served under style-src self. */

.maintenance-report-v2{color:#17384b;font-family:Arial,sans-serif;font-size:14px;line-height:1.45;overflow-wrap:anywhere;min-width:0}
.maintenance-report-v2 *{box-sizing:border-box}.maintenance-report-v2 .mr-header{display:grid;grid-template-columns:76px minmax(0,1fr);gap:18px;align-items:center;border-bottom:2px solid #db7638;padding-bottom:12px;margin-bottom:14px;break-inside:avoid}
.maintenance-report-v2 .mr-logo{display:block;width:76px;height:auto;max-width:100%;object-fit:contain}.maintenance-report-v2 .mr-title{font-size:21px;line-height:1.15;margin:0 0 6px;font-weight:700;letter-spacing:.025em}.maintenance-report-v2 .mr-property{font-size:17px;font-weight:700;margin:0 0 2px}.maintenance-report-v2 .mr-address{margin:0;color:#496376}.maintenance-report-v2 .mr-facts{display:flex;flex-wrap:wrap;gap:3px 18px;margin-top:8px;font-size:12px}.maintenance-report-v2 .mr-facts span{display:inline-block}
.maintenance-report-v2 .mr-section{margin:14px 0 0;padding:0;border:0;break-inside:avoid}.maintenance-report-v2 .mr-section h2{font-size:15px;font-weight:700;line-height:1.25;color:#2f607b;margin:0 0 5px;break-after:avoid}.maintenance-report-v2 ul{margin:0;padding-left:20px}.maintenance-report-v2 li{margin:0 0 3px;break-inside:avoid}.maintenance-report-v2 .mr-notes{margin:0;white-space:pre-wrap}.maintenance-report-v2 .mr-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.maintenance-report-v2 figure{margin:0;break-inside:avoid;min-width:0}.maintenance-report-v2 figure img{display:block;width:100%;height:auto;max-height:260px;object-fit:contain}.maintenance-report-v2 figcaption{font-size:12px;color:#496376;margin:4px 0 0;white-space:pre-wrap}
@media(max-width:500px){.maintenance-report-v2 .mr-header{grid-template-columns:60px minmax(0,1fr);gap:10px}.maintenance-report-v2 .mr-logo{width:60px}.maintenance-report-v2 .mr-title{font-size:18px}.maintenance-report-v2 .mr-facts{display:grid;gap:2px}.maintenance-report-v2 .mr-photo-grid{grid-template-columns:1fr}}
@media print{.maintenance-report-v2{font-size:10.5pt}.maintenance-report-v2 .mr-header{grid-template-columns:64px minmax(0,1fr)}.maintenance-report-v2 .mr-logo{width:64px}.maintenance-report-v2 .mr-title{font-size:17pt}.maintenance-report-v2 .mr-section h2{font-size:12pt}.maintenance-report-v2 .mr-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-report-v2 .mr-section{break-inside:auto}.maintenance-report-v2 .mr-section h2{break-after:avoid}.maintenance-report-v2 li,.maintenance-report-v2 figure{break-inside:avoid}}

.maintenance-report-workspace{display:grid;gap:16px;min-width:0}.maintenance-report-workspace .mr-review-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,.9fr);gap:18px;align-items:start}.maintenance-report-workspace .mr-preview-card{padding:22px;min-width:0}.maintenance-report-workspace .mr-adjust{padding:16px;min-width:0}.maintenance-report-workspace .mr-adjust h2{margin:0 0 10px}.maintenance-report-workspace .mr-edit-section{margin:0 0 14px;border:0;padding:0;min-width:0}.maintenance-report-workspace .mr-edit-section legend{font-weight:700;padding:0;margin-bottom:5px}.maintenance-report-workspace .mr-edit-row{padding:7px 0;border-bottom:1px solid #e5ebef;min-width:0}.maintenance-report-workspace .mr-toggle{display:flex;align-items:flex-start;gap:8px;overflow-wrap:anywhere}.maintenance-report-workspace .mr-toggle input{width:auto;flex:none;margin-top:4px}.maintenance-report-workspace .mr-edit-row details{margin:4px 0 0 24px}.maintenance-report-workspace .mr-edit-row summary{font-size:13px;color:#2f607b;cursor:pointer}.maintenance-report-workspace .mr-edit-row .field{margin:6px 0}.maintenance-report-workspace .mr-edit-row input[type=text]{min-height:36px}.maintenance-report-workspace .mr-edit-row textarea{min-height:60px}.maintenance-report-workspace .mr-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.maintenance-report-workspace .mr-version{font-size:13px;color:#496376}.maintenance-report-workspace .mr-note{margin:5px 0;font-size:13px}.maintenance-report-workspace .mr-saved{max-width:900px}.maintenance-report-workspace .mr-saving{color:#496376}@media(max-width:800px){.maintenance-report-workspace .mr-review-grid{grid-template-columns:minmax(0,1fr)}.maintenance-report-workspace .mr-preview-card{padding:14px}}

/* Short, stable time choices; no scrolling minute spinner. */
.time-control{border:0;margin:0;padding:0;min-width:0;display:grid;gap:.45rem}.time-control legend{font-weight:600;margin-bottom:.45rem}.time-control-choices{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:.45rem}.time-control label{display:grid;gap:.2rem;min-width:0}.time-control label>span{font-size:.85rem}.time-control select,.time-control input[type=text]{min-height:44px;width:100%;min-width:0}.time-control-options{display:flex;flex-wrap:wrap;gap:.35rem}.time-control [hidden]{display:none!important}

.technician-record{display:grid;gap:.8rem}.technician-record .page-head{margin-bottom:0}.technician-record-property{font-size:1.15rem;font-weight:650}.technician-record-schedule{font-weight:600}.technician-record-scope ul{padding-left:1.3rem;margin:.5rem 0}.technician-record-scope li{padding:.3rem 0;overflow-wrap:anywhere}.technician-record-actions>.page-actions{display:contents}.technician-record .btn{min-height:44px}.technician-record h1{overflow-wrap:anywhere}@media(max-width:600px){.technician-record-actions{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.technician-record-actions .btn-primary{grid-column:1/-1}.technician-record .card-pad{padding:1rem}}

/* Management account workspace */
.management-tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin:1rem 0}
.management-tabs [aria-pressed="true"]{background:var(--ink);color:#fff}
.management-directory-links{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:1rem}
.management-contact{min-width:0;overflow-wrap:anywhere}
.management-contact .page-head{margin-bottom:.5rem}
.management-contact-applicability{padding-left:1.25rem;line-height:1.6}
.management-property-choices{border:1px solid var(--line);border-radius:.5rem;padding:.75rem;display:grid;gap:.5rem}
.management-property-choices[hidden]{display:none}
.management-property-choices label{display:flex;gap:.6rem;align-items:center}
.management-property-choices input{width:auto;flex:none}
.management-setup .record{flex-wrap:wrap;gap:.5rem}
.management-setup .record-main{overflow-wrap:anywhere;min-width:0}
@media(max-width:600px){.management-tabs .btn{flex:1}.management-directory-links .btn{width:100%}.management-contact .button-row{display:flex;flex-wrap:wrap;gap:.5rem}}

.management-setup{scroll-margin-top:8rem}
.management-contact small.field-help{display:block;margin-top:.25rem}

/* Compact Management Contacts; detailed rules remain available. */
.management-property-relationships{margin:.5rem 0 1rem}
.management-property-relationships>summary{cursor:pointer;font-weight:650}
.management-relationship-summary{font-weight:600;margin:.5rem 0}
.management-contact-choice{flex-wrap:wrap;align-items:flex-start}
.management-contact-choice .record-main{overflow-wrap:anywhere;min-width:0}
.management-contact-choice .button-row{display:flex;flex-wrap:wrap;gap:.5rem}
.management-linked-label{display:inline-block;color:var(--ink)}
.management-contact-choices .record p{margin:.25rem 0}

/* The same private designation is used in every Property view. */
.property-cover-thumb{width:64px;min-width:64px;position:relative;z-index:2}.property-cover-thumb .permanent-photo-gallery{display:block}.property-cover-thumb .permanent-photo-tile{width:64px;height:64px;min-height:0;padding:0;overflow:hidden}.property-cover-thumb .permanent-photo-tile img{width:64px;height:64px;object-fit:cover;image-orientation:from-image}.property-cover-thumb .permanent-photo-caption{display:none}.property-cover-placeholder{display:grid;place-items:center;font-size:2rem;background:var(--surface,#eee);border-radius:8px;min-height:64px}.property-cover-large{max-width:640px}.property-cover-large img{image-orientation:from-image;object-fit:contain}.saved-trade-reference{margin-block:.6rem}.saved-trade-reference summary{padding:.6rem;font-weight:600}.property-row .record-main{min-width:0}@media(max-width:480px){.property-cover-thumb{width:48px;min-width:48px}.property-cover-thumb .permanent-photo-tile,.property-cover-thumb .permanent-photo-tile img{width:48px;height:48px}.property-cover .permanent-photo-tile{max-width:100%}}

/* Cover and reference controls must honor their explicit hidden state. */
.property-cover [hidden],.project-references [hidden]{display:none!important}
.property-cover-large .permanent-photo-gallery{grid-template-columns:minmax(0,1fr)}
.property-cover-large .permanent-photo-tile{width:100%;max-width:100%}
.property-cover-large .permanent-photo-tile img{height:auto;max-height:400px}

.property-row{grid-template-columns:auto minmax(0,1fr) auto;gap:.75rem}
.property-row .record-main h3{overflow-wrap:anywhere}

/* Estimating aids are read-only and never submitted as Project fields. */
.tb-trade-heading{scroll-margin-block-start:12rem}
.tb-estimating-result[hidden]{display:none!important}
.tb-estimating-result output{display:block;min-height:2.5rem;padding:.6rem .75rem;border:1px solid var(--line);border-radius:7px;background:#edf5f7;font-weight:700}
/* Job Walk review keeps stable identities and long observations readable on phones. */
.assessment-comparison,.assessment-draft-review,.assessment-office-instructions{min-width:0;overflow-wrap:anywhere}
.assessment-change{padding:.65rem 0;border-bottom:1px solid var(--border,#ddd)}
.assessment-change>summary{min-height:44px;cursor:pointer}
.assessment-office-instructions p{margin-bottom:0}

/* Compact equipment references retain normal responsive document flow. */
.property-equipment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr));gap:.75rem}
.property-equipment-card{min-width:0;padding:.85rem;border:1px solid var(--border,#d5dce3);border-radius:.5rem;overflow-wrap:anywhere}
.property-equipment-card button[hidden]{display:none!important}
.property-equipment-card h3{margin:0 0 .35rem}.equipment-location{margin:.2rem 0 .5rem}.equipment-specifications{padding-left:1.2rem;margin:.4rem 0}.equipment-photo-placeholder{padding:.6rem;background:var(--surface-muted,#f4f6f8);font-size:.9rem}.property-equipment-card .permanent-photo-gallery{grid-template-columns:repeat(auto-fill,minmax(6rem,1fr));gap:.4rem}.property-equipment-card .permanent-photo-tile img{height:6rem;object-fit:cover}.equipment-photo-editor{margin-top:.65rem}.maintenance-office-followups{margin:.3rem .5rem .75rem}.maintenance-office-followups .record{display:block}

/* Date-only Project workdays retain the existing calendar and crew identity. */
.project-workdays-dialog{max-width:54rem;width:min(54rem,calc(100vw - 2rem));max-height:calc(100dvh - 2rem)}.project-workdays-form .form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end}.project-workdays-form .form-grid>.form-actions{border:0;padding:0;margin:0}.project-workdays-selected{margin-block:1rem;max-height:38vh;overflow:auto}.project-workday-row{display:grid;grid-template-columns:minmax(7rem,1fr) minmax(9rem,1fr) minmax(5rem,.6fr) auto;gap:.5rem;align-items:center;padding:.45rem 0;border-bottom:1px solid var(--line)}.project-workday-row input{min-width:0;max-width:100%}.project-workdays-close{margin-top:.75rem}@media(max-width:600px){.project-workday-row{grid-template-columns:1fr 1fr}.project-workday-row>span:first-child{grid-column:1/-1}.project-workdays-dialog{padding:1rem}.project-workdays-form .form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.project-workdays-form .form-grid>.form-actions{grid-column:1/-1}}

/* Project presentation only: keep save visible and date controls within their cells. */
.project-save-bar{position:sticky;bottom:0;z-index:2;background:var(--surface,#fff);padding:.75rem 0;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:.5rem}
.project-save-confirmation{overflow-wrap:anywhere}.project-estimates>summary{font-weight:700;padding:1rem;cursor:pointer}.project-workdays-summary{overflow-wrap:anywhere}
.appointment-controls{min-width:0;grid-column:1/-1;border:1px solid var(--line);border-radius:.65rem;padding:.85rem;margin:.5rem 0}.appointment-controls legend{font-weight:650;padding:0 .35rem}.appointment-choices{display:flex;flex-wrap:wrap;gap:.5rem 1rem}.appointment-choice{display:flex;align-items:center;gap:.4rem;min-height:44px;cursor:pointer}.appointment-choice input{width:auto;flex:none;min-height:20px}.appointment-time-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.appointment-time-fields:empty{display:none}.appointment-controls input[type=time]{width:100%;min-width:0;box-sizing:border-box}.project-workdays-selected{max-height:none;overflow:visible}.project-workday-row{grid-template-columns:minmax(8rem,.85fr) minmax(0,2fr) auto;align-items:start;gap:.8rem;padding:.8rem 0}.project-workday-date{display:grid;gap:.4rem;min-width:0}.project-workday-row>details{min-width:0}.project-workday-row>details>summary{min-height:44px;cursor:pointer;padding:.5rem .2rem}.project-workday-row>.field-help{grid-column:1/-1;margin:0}.project-workday-row .appointment-choices{gap:.25rem .75rem}.project-workdays-dialog{overflow-y:auto}.project-workdays-form details>summary{font-weight:650;padding:.65rem 0}.project-workdays-form .project-save-bar{position:sticky;bottom:0;background:var(--surface,#fff);padding:.75rem 0;z-index:1;border-top:1px solid var(--line)}
@media(max-width:600px){.appointment-time-fields{grid-template-columns:minmax(0,1fr)}.appointment-choices{flex-direction:column;gap:0}.project-workday-row{grid-template-columns:minmax(0,1fr) auto}.project-workday-row>details{grid-column:1/-1;grid-row:2}.project-workday-row>.field-help{grid-row:3}.appointment-controls{padding:.65rem}.project-workdays-form .btn{min-height:44px}}
.project-workdays-form .form-grid>*{min-width:0}.project-workdays-form input[type=date]{box-sizing:border-box;width:100%;min-width:0;max-width:100%}
.project-workdays-form .form-actions{display:flex;flex-wrap:wrap;gap:.5rem}.project-workdays-form .form-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.project-workdays-form .form-grid>.form-actions{grid-column:1/-1}.project-workday-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.7fr) auto}
.project-work-item{margin-block:.75rem}.project-work-item dd{overflow-wrap:anywhere}
.work-archive-menu{align-self:flex-start;max-width:100%;min-width:0}.work-archive-menu>summary{cursor:pointer;min-height:44px;padding:.7rem 1rem;box-sizing:border-box;font-weight:600}.work-archive-menu[open]{width:min(28rem,100%)}.archive-actions-body{display:grid;gap:.5rem;padding:.5rem}.archive-actions-body .btn{min-height:44px}.archive-actions-body p,.work-archive-menu p{overflow-wrap:anywhere}
@media(max-width:600px){.project-workdays-form .form-grid{grid-template-columns:minmax(0,1fr)}.project-workday-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.project-workday-row>span:first-child{grid-column:1/-1}.project-workdays-form .form-actions .btn{min-height:44px}}

.office-item-photos{min-width:0;margin:.65rem 0;padding:.65rem}.office-item-photos h3{font-size:1rem;margin:0 0 .5rem}.office-item-photos [hidden]{display:none!important}.office-item-photos .attachment-row{min-width:0;overflow-wrap:anywhere}

/* Agreement task text stays in normal reading order at every width. */
.maintenance-agreement-card .maintenance-agreement-task { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; padding: .75rem; }
.maintenance-agreement-task > * { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.maintenance-recommendation-card .record-main { min-width: 0; overflow-wrap: anywhere; }
.maintenance-recommendation-review [hidden] { display: none; }

/* Project-only compact action presentation; handlers and eligibility unchanged. */
.project-office-actions{justify-content:flex-start;align-items:flex-start;gap:.45rem;max-width:650px}.project-office-actions>.btn{min-height:44px}.project-secondary-actions>summary{padding:.65rem;cursor:pointer;border:1px solid var(--line-dark);border-radius:8px;min-height:44px}.project-action-group{display:flex;flex-wrap:wrap;gap:.45rem;padding:.5rem 0}.invoice-work-summary{margin-block:.75rem}.invoice-visit{padding:.75rem 0;border-top:1px solid var(--line)}.invoice-documentation>summary{padding:.5rem 0;cursor:pointer}.invoice-work-summary p,.invoice-work-summary li{overflow-wrap:anywhere}.calendar-entry-status{font-size:.72rem;line-height:1.3}@media(max-width:600px){.project-office-actions{width:100%}.project-office-actions>.btn{flex:0 1 auto}.project-secondary-actions{flex:0 0 100%}.project-action-group .btn{flex:1 1 140px}.invoice-work-summary{padding:1rem}}

.invoice-visit h3{margin:.35rem 0}.invoice-visit h4{margin:.5rem 0}.invoice-visit p{margin:.4rem 0}.invoice-visit ul{margin:.4rem 0;padding-left:1.5rem}.invoice-documentation>summary{min-height:44px}.invoice-work-summary>.field-help{margin:.3rem 0}

/* Office record actions: shared sizing, natural wrapping, existing handlers. */
.office-detail-actions{display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start;justify-content:flex-start;gap:.4rem;max-width:100%;min-width:0}.office-detail-actions>.btn,.office-detail-actions .archive-actions-body>.btn{flex:0 1 auto;min-height:44px;padding:.55rem .8rem;font-size:.9rem;line-height:1.3;max-width:100%;white-space:normal}.office-detail-actions .work-archive-menu{display:contents}.office-detail-actions .archive-actions-body{display:contents}.office-detail-actions .field-help{font-size:.8rem;margin:.25rem 0;flex-basis:100%;max-width:38rem}.office-detail-actions .work-archive-menu>p:empty{display:none}.maintenance-visit-details .technician-time-row{padding:.5rem 0;border-top:1px solid var(--line)}.maintenance-technician-time h3,.maintenance-technician-time h4{margin:.5rem 0}.technician-time-segments{padding-left:1.2rem;font-size:.88rem}.invoice-documentation{display:block}.invoice-documentation article{margin:.6rem 0}.maintenance-current-record .permanent-photo-gallery,.invoice-visit .permanent-photo-gallery{grid-template-columns:repeat(auto-fill,minmax(7rem,1fr));gap:.5rem}.maintenance-current-record .permanent-photo-tile img{height:7rem;object-fit:cover}.project-workday:has(details:not([open])):not(:has(>h3,>p)){padding:.6rem 1rem}.page-head:has(.office-detail-actions){align-items:flex-start;gap:.75rem}.page-head:has(.office-detail-actions)>div:first-child{min-width:0}.office-detail-actions .btn-primary{font-weight:650}@media(max-width:600px){.office-detail-actions{width:100%}.office-detail-actions>.btn,.office-detail-actions .archive-actions-body>.btn{flex:0 1 auto}.page-head:has(.office-detail-actions){flex-direction:column;align-items:stretch}.invoice-work-summary{padding:1rem}.maintenance-technician-time .detail-grid{grid-template-columns:1fr}}
/* Office Tasks: existing cards and controls, compact at phone widths. */
.office-task-fields,.office-task-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.office-task-form{margin-bottom:18px}.office-task{margin:12px 0;overflow-wrap:anywhere}
.office-task h3{margin-top:0}.office-task-form summary{cursor:pointer;min-height:44px;display:flex;align-items:center}
.office-task .page-actions{margin-top:12px}.office-task-form textarea{min-height:90px;resize:vertical}
.office-task-form .field,.office-task-history,.office-task-completed{min-width:0;overflow-wrap:anywhere}
.office-task-form .office-task-fields>.field:last-child{grid-column:1/-1}
.invoice-job-title{font-weight:650;overflow-wrap:anywhere}
.office-task-completed{border-bottom:1px solid var(--border,#d8dfe5);padding:.15rem 0}
.office-task-completed>summary{cursor:pointer;min-height:48px;padding:.65rem .5rem;line-height:1.4}
.office-task-completed-title{font-weight:650;margin-right:.8rem}
.office-task-completed-time{font-size:.9rem;color:var(--muted,#52616d);white-space:normal}
.office-task-completed-details{padding:.25rem 1rem .85rem}
.office-task-completed-details p{margin:.4rem 0}.office-task-completed-details .page-actions{margin:.5rem 0}
.office-task-event{display:block;border-top:1px solid var(--border,#d8dfe5);padding:.8rem 0;margin-top:.6rem}
.office-task-event>p{margin:.3rem 0}.office-task-changes{display:block;margin:.5rem 0}
.office-task-changes>div{display:block;margin:.55rem 0}.office-task-changes dt{font-weight:650}
.office-task-changes dd{margin:.15rem 0;overflow-wrap:anywhere;white-space:pre-wrap}
.office-task-original-values{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%;font-size:.8rem}
.office-task-history:empty{display:none}.office-task-search{display:flex;align-items:end;gap:.6rem;margin:1rem 0;flex-wrap:wrap}
.office-task-search .field{flex:1;min-width:180px}.office-task-completed .btn,.office-task-completed summary{min-height:44px}
@media(max-width:600px){.office-task-completed-time{display:block;margin-top:.15rem}.office-task-completed-details{padding:.25rem .5rem .75rem}}
@media(max-width:600px){.office-task-fields,.office-task-filters{grid-template-columns:minmax(0,1fr)}.office-task .btn{min-height:44px}.office-task-form input,.office-task-form select,.office-task-form textarea{max-width:100%;min-width:0}}

/* Operational equipment stays in the existing responsive forms and gallery. */
.service-call-information-editor [hidden],.service-call-crew-editor [hidden]{display:none!important}
.service-call-information-editor,.service-call-crew-editor{min-width:0;margin:.7rem 0}
.service-call-information-editor>summary,.service-call-crew-editor>summary>summary{cursor:pointer;min-height:44px;padding:.65rem 0}
.service-call-information-editor input,.service-call-information-editor textarea,.service-call-crew-editor textarea{max-width:100%;min-width:0}
.action-error{display:flex;gap:.8rem;align-items:flex-start;justify-content:space-between;position:static;padding:.85rem 1rem;margin:.75rem 0;border:1px solid var(--danger);border-radius:9px;background:var(--surface);color:var(--danger);overflow-wrap:anywhere}
.action-error p{margin:0;min-width:0}.action-error .btn{flex-shrink:0;min-height:44px}
.page-head>div:first-child{min-width:0;flex:1}.page-head h1{overflow-wrap:anywhere}.page-head>.page-actions{flex:0 1 55%;min-width:0}.page-head>.page-actions .btn{max-width:100%;white-space:normal}
.invoice-preparation-summary{display:grid;gap:1rem;margin-block:1rem}.invoice-preparation-summary>.card{margin:0}.history-details{margin-top:.75rem}.history-invoice-reference{margin:.85rem 0}.field-history-evidence-head{display:flex;flex-wrap:wrap;gap:.75rem;align-items:baseline}.field-history-evidence-head h3{margin:0}.record-main h3+.record-meta{margin-top:.6rem}
.invoice-preparation-queues{display:grid;gap:1rem;min-width:0}.invoice-preparation-queues>h2,.invoice-preparation-queues>p{margin:0}.invoice-preparation-queues>.card{min-width:0}.invoice-preparation-queues .record-main h4{margin:0 0 .35rem;overflow-wrap:anywhere}.record-main>.record-meta{margin-top:.6rem}
@media(max-width:600px){.page-head{flex-direction:column;align-items:stretch}.page-head>.page-actions{flex-basis:auto;justify-content:flex-start}.page-head>.page-actions .btn{flex:0 1 auto}.action-error{flex-wrap:wrap}.invoice-preparation-summary{gap:.8rem}}
.property-wifi .wifi-card{padding:.75rem 0;border-bottom:1px solid var(--border)}.property-wifi .wifi-form{max-width:44rem;display:grid;gap:.8rem;margin:1rem 0}.property-wifi input,.property-wifi textarea{max-width:100%;min-height:44px}.property-wifi dd{overflow-wrap:anywhere}.property-equipment-editor input,.property-equipment-editor select{min-height:44px;min-width:0;max-width:100%}.property-equipment-editor textarea{min-height:6rem}.equipment-obsolete{color:var(--text-muted);font-weight:600}.equipment-photo-editor .attachment-row{min-width:0}.equipment-photo-editor .attachment-row .record-main strong{font-size:.8rem}.equipment-photo-editor .fieldset>h3{display:none}

.assigned-work-heading{margin:.25rem 0 .75rem;font-size:1.2rem}.operations-today>.operations-bucket{margin-top:1rem}.my-work-section{min-width:0}.my-work-section-head{flex-wrap:wrap;gap:.5rem}
/* Persistent, nonmodal reminder lives outside route content and action controls. */
.timer-reminder-host:empty { display: none; }
.layout.timer-reminder-host { padding-bottom: 0; }
.timer-reminder { margin: 0; overflow-wrap: anywhere; }
.timer-reminder .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
/* Bundle 2: work-level Office cards and compact invoice categories. */
.office-crew-status { list-style:none; margin:.35rem 0; padding:0; display:grid; gap:.3rem; }
.office-crew-status li { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; }
.office-assignment-actions { display:flex; flex-wrap:wrap; gap:.35rem; }
.office-invoice-queues { display:grid; gap:.65rem; min-width:0; }
.invoice-category { border-inline-start:4px solid var(--invoice-color); }
.invoice-service_call { --invoice-color:#c95f58; }
.invoice-tb_project { --invoice-color:#e47b36; }
.invoice-maintenance_visit { --invoice-color:#527c94; }
.invoice-category > summary { cursor:pointer; font-weight:700; display:list-item; }
.invoice-category > summary .count-badge { margin-inline-start:.5rem; }
.invoice-work-card { gap:.5rem; padding:.65rem 0; flex-wrap:wrap; }
.invoice-work-card p { margin:.2rem 0; overflow-wrap:anywhere; }
.office-held-work > summary { cursor:pointer; font-weight:700; }
.work-creation-shortcuts { flex-wrap:wrap; margin:.5rem 0; }
