/* Development workspace owns its chrome; existing registered field screens stay intact. */
#turfWorkspaceScreen.screen.on{position:fixed;inset:0;display:block;padding:0;margin:0;min-height:0;width:100%;max-width:none;overflow:hidden;background:#f3f5f8;z-index:20}
.workspace-active{padding:0!important;margin:0!important}
.workspace-active>.rail,.workspace-active>.nav,.workspace-active>.appbar,.workspace-active>.mobileOwnerNav{display:none!important}
.workspace-tools{padding:12px 24px;background:#fff;border-top:1px solid #dce4ee}
.workspace-tools button{font:inherit;color:#1a2c44;background:#fff;border:1px solid #dce4ee;border-radius:8px;padding:10px 14px;cursor:pointer}
.turf-workspace .tw-row-title,.turf-workspace .tw-muted{display:block}
.turf-workspace .tw-phase--complete{background:var(--tw-bg)!important;border-color:var(--tw-line)!important}
.turf-workspace .tw-phase[aria-pressed="true"]{outline:2px solid var(--tw-ink);outline-offset:2px;box-shadow:none}
.turf-workspace .tw-phase-status,.turf-workspace .tw-badge{font-size:13px}
.turf-workspace .tw-phase-detail{font-size:14px;color:var(--tw-ink)}
.turf-workspace .tw-stage-label{font-size:14px}
.turf-workspace .tw-stage-count{font-size:16px;font-weight:500}
.tw-customer-tabs { display:flex; gap:.5rem; flex-wrap:wrap; margin:1rem 0; }
.tw-customer-tabs button { border:1px solid var(--tw-line, #ccd5d1); border-radius:.5rem; padding:.75rem 1rem; background:white; color:var(--tw-ink, #172d28); font:inherit; cursor:pointer; }
.tw-customer-tabs button[aria-pressed="true"] { background:var(--tw-ink, #172d28); color:white; }
.tw-schedule-form { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; padding:1rem 0; }
.tw-schedule-form label { display:grid; gap:.5rem; font-size:1rem; }
.tw-schedule-form input,.tw-schedule-form select { width:100%; box-sizing:border-box; padding:.75rem; font:inherit; color:inherit; background:white; border:1px solid #aab8b1; border-radius:.4rem; }
.tw-schedule-form p { grid-column:1/-1; }
.tw-schedule-form button { padding:.8rem 1rem; font:inherit; cursor:pointer; }
.turf-workspace .tw-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--tw-line);border-radius:8px}
.turf-workspace .tw-table-wrap table{min-width:760px;margin:0}
.turf-workspace .tw-table-wrap small{display:block;margin-top:2px}
.turf-workspace .tw-queue-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;color:var(--tw-muted)}
.turf-workspace .tw-calendar{display:grid;gap:16px}
.turf-workspace .tw-calendar-day{border:1px solid var(--tw-line);border-radius:8px;background:#fff;overflow:hidden}
.turf-workspace .tw-calendar-day h3{margin:0;padding:10px 12px;border-bottom:1px solid var(--tw-line);font-size:15px}
.turf-workspace .tw-calendar-entry{display:flex;width:100%;gap:12px;align-items:center;justify-content:space-between;text-align:left;padding:12px;border:0;border-bottom:1px solid var(--tw-line);background:#fff;color:inherit;font:inherit;cursor:pointer}
.turf-workspace .tw-calendar-entry:last-child{border-bottom:0}
.turf-workspace .tw-calendar-entry--attention{border-left:4px solid #9a5a00;background:#fff9ed}
.turf-workspace .tw-calendar-warning{display:block;margin-top:4px;color:#734500;font-weight:600}
.turf-workspace .tw-calendar-availability{margin:0;padding-left:20px;display:grid;gap:7px}
.turf-workspace .tw-row-main,.turf-workspace .tw-row-title,.turf-workspace .tw-muted,.turf-workspace .tw-value,.turf-workspace .tw-stat,.turf-workspace td,.turf-workspace th{min-width:0;overflow-wrap:anywhere;word-break:break-word}
.turf-workspace .tw-schedule-form textarea{width:100%;min-height:5rem;box-sizing:border-box;padding:.75rem;font:inherit;color:inherit;background:#fff;border:1px solid #aab8b1;border-radius:.4rem;resize:vertical}
.turf-workspace .tw-command-status p{margin:.25rem 0}.turf-workspace .tw-inline-action{display:inline-block;margin:.25rem 0}.turf-workspace .tw-member-form{align-items:end;gap:.75rem}
.turf-workspace [data-turf-material-change]>.tw-list{grid-column:1/-1;display:grid;gap:10px}
.turf-workspace [data-turf-material-line]{display:grid;grid-template-columns:minmax(120px,1fr) minmax(160px,2fr) minmax(95px,1fr) minmax(110px,1fr) minmax(140px,1.5fr) auto;gap:10px;align-items:end}
.turf-workspace [data-turf-material-line] label{min-width:0}
.turf-workspace [data-turf-material-line] label:last-child{display:flex;align-items:center;gap:6px}
.turf-workspace [data-turf-material-line] input[type=checkbox]{width:auto}
.turf-workspace .tw-material-line{padding:14px 0;border-top:1px solid var(--tw-line)}
.turf-workspace .tw-material-line:first-of-type{border-top:0}
.turf-workspace .tw-material-line>.tw-row{border-bottom:0}
.turf-workspace .tw-material-line>details{margin-top:8px}
.turf-workspace .tw-material-line>details>summary{color:var(--tw-blue);cursor:pointer}
@media(max-width:980px){.turf-workspace .tw-columns{grid-template-columns:1fr}.turf-workspace .tw-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.turf-workspace .tw-schedule-form{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* The host shell deliberately locks body scrolling. Keep the workspace inside
   that viewport and give its content column the scrollport instead; otherwise
   a phone can grow the screen below the fold and strand its bottom navigation. */
.workspace-active #turfWorkspaceScreen .turf-workspace,
.workspace-active #turfWorkspaceScreen .tw-shell,
.workspace-active #turfWorkspaceScreen .tw-work{height:100%;min-height:0}
.workspace-active #turfWorkspaceScreen .turf-workspace{overflow:hidden}
.workspace-active #turfWorkspaceScreen .tw-main{min-height:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.workspace-active #turfWorkspaceScreen .tw-mobile{flex:0 0 auto}
@media(max-width:750px){
  .workspace-active #turfWorkspaceScreen .tw-shell{grid-template-rows:minmax(0,1fr)}
  .workspace-active #turfWorkspaceScreen .tw-header{padding-right:104px}
  .turf-workspace .tw-queue-pagination{align-items:stretch;flex-direction:column}
  .turf-workspace .tw-strip,.turf-workspace .tw-schedule-form{grid-template-columns:1fr}
  .turf-workspace .tw-member-form{display:grid;grid-template-columns:1fr}
  .turf-workspace .tw-main{padding-left:14px;padding-right:14px;padding-bottom:calc(92px + env(safe-area-inset-bottom))}
  .turf-workspace [data-turf-material-line]{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Messages appear as a toast in view at the bottom, never as a banner scrolled off the top. */
div.tw-command-status[role="status"]{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:4000;max-width:min(92vw,560px);margin:0;padding:12px 18px;border-radius:10px;background:#15231b;color:#fff;border:0;font-weight:600;box-shadow:0 6px 24px rgba(0,0,0,.25);pointer-events:none;animation:tiq-toast-out .4s ease 5.6s forwards}
div.tw-command-status[role="status"].tw-command-status--error{background:#a3271d;color:#fff;animation:none}
@keyframes tiq-toast-out{to{opacity:0;visibility:hidden}}
@media(max-width:760px){div.tw-command-status[role="status"]{bottom:calc(76px + env(safe-area-inset-bottom,0px))}}
@media(prefers-reduced-motion:reduce){div.tw-command-status[role="status"]{animation-duration:.01s}}
/* Invoice actions that cannot be undone. */
[data-turf-invoice-action="void"],[data-turf-invoice-action="expire"]{color:#a3271d!important;border-color:#a3271d!important;background:#fff!important}
div.tw-command-status[role="status"]:has(button){pointer-events:auto}

/* Job stage bar */
.tw-stagebar{list-style:none;margin:0 0 16px;padding:0;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px}
.tw-stagebar li{padding:10px 6px;text-align:center;font:600 12.5px/1.2 system-ui,sans-serif;border-radius:8px;background:#e7ece4;color:#55655b;overflow-wrap:anywhere}
.tw-stagebar li.tw-stagebar-done{background:#dff0e3;color:#1c6b39}
.tw-stagebar li.tw-stagebar-now{background:#1c6b39;color:#fff;font-size:14px}
@media(max-width:640px){.tw-stagebar{grid-auto-flow:row;grid-auto-columns:auto}}

.tw-queue-meta{display:flex;flex-wrap:wrap;gap:2px 14px}
.tw-queue-meta>span{white-space:nowrap}
