:root {
  color-scheme: light;
  --ink: #303338;
  --muted: #71767d;
  --subtle: #9a9fa5;
  --canvas: #eef0f3;
  --surface: #ffffff;
  --surface-soft: #f6f7f8;
  --border: #d7dade;
  --border-strong: #c2c6cb;
  --rail: #303133;
  --rail-deep: #292a2c;
  --rail-muted: #c5c7ca;
  --selected: #6d93ec;
  --blue: #2455cf;
  --blue-dark: #1746bd;
  --orange: #f29a49;
  --green: #68a35b;
  --red: #ef5c59;
  --yellow: #efc34a;
  --shadow: 0 12px 38px rgba(25, 29, 34, .22);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* Sync trust and mobile global utilities. */
.sync-status-button {
  position: relative;
  display: inline-flex;
  min-width: 72px;
  height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #d4d8dc;
  border-radius: 15px;
  background: #fff;
  color: #596067;
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}
.sync-status-button:hover, .sync-status-button[aria-expanded="true"] { border-color: #9cb8ed; background: #f4f8ff; }
.sync-status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #39a766; box-shadow: 0 0 0 2px rgba(57,167,102,.14); }
.sync-status-button[data-status="local"] .sync-status-dot,
[data-mobile-utility="sync"][data-status="local"] .sync-status-dot,
.sync-status-hero.is-local .sync-status-dot { background: #77818a; box-shadow: 0 0 0 2px rgba(119,129,138,.14); }
.sync-status-button[data-status="pending"] .sync-status-dot,
.sync-status-button[data-status="warning"] .sync-status-dot,
[data-mobile-utility="sync"][data-status="pending"] .sync-status-dot,
[data-mobile-utility="sync"][data-status="warning"] .sync-status-dot,
.sync-status-hero.is-pending .sync-status-dot,
.sync-status-hero.is-warning .sync-status-dot { background: #e39a25; box-shadow: 0 0 0 2px rgba(227,154,37,.16); }
.sync-status-button[data-status="offline"] .sync-status-dot,
[data-mobile-utility="sync"][data-status="offline"] .sync-status-dot,
.sync-status-hero.is-offline .sync-status-dot { background: #858c93; box-shadow: 0 0 0 2px rgba(133,140,147,.14); }
.sync-status-button[data-status="error"] .sync-status-dot,
[data-mobile-utility="sync"][data-status="error"] .sync-status-dot,
.sync-status-hero.is-error .sync-status-dot { background: #d34a50; box-shadow: 0 0 0 2px rgba(211,74,80,.15); }
.sync-status-button[data-status="working"] .sync-status-dot,
[data-mobile-utility="sync"][data-status="working"] .sync-status-dot,
.sync-status-hero.is-working .sync-status-dot { background: #1769f6; animation: sync-pulse 1s ease-in-out infinite; }
.sync-status-button > b, .mobile-utility-grid > button > b { display: grid; min-width: 16px; height: 16px; place-items: center; padding: 0 4px; border-radius: 9px; background: #d9474f; color: #fff; font-size: 9px; }
.sync-status-button > b[hidden], .mobile-utility-grid > button > b[hidden] { display: none; }
@keyframes sync-pulse { 50% { opacity: .35; transform: scale(.8); } }

.sync-status-dialog { width: min(520px, calc(100vw - 40px)); }
.sync-status-dialog .floating-panel-header > div,
.mobile-account-dialog .floating-panel-header > div { display: grid; gap: 2px; }
.sync-status-dialog .floating-panel-header span,
.mobile-account-dialog .floating-panel-header span { color: #777f87; font-size: 10px; }
.sync-status-content { display: grid; gap: 15px; padding: 18px 20px 8px; }
.sync-status-hero { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid #dce1e5; border-radius: 4px; background: #f8f9fa; }
.sync-status-hero .sync-status-dot { width: 13px; height: 13px; flex-basis: 13px; }
.sync-status-hero > div { display: grid; gap: 3px; }
.sync-status-hero strong { color: #343a40; font-size: 13px; }
.sync-status-hero small { color: #6f777e; font-size: 10px; line-height: 1.4; }
.sync-status-facts { display: grid; margin: 0; border-top: 1px solid #e1e4e7; }
.sync-status-facts > div { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e1e4e7; font-size: 11px; }
.sync-status-facts dt { color: #737a81; }
.sync-status-facts dd { margin: 0; color: #353b41; font-weight: 600; text-align: right; }
.sync-status-message { margin: 0; padding: 10px 12px; border-left: 3px solid #8da6cb; background: #f3f6fa; color: #626a72; font-size: 10px; line-height: 1.5; }
.sync-offline-boundary { display: grid; gap: 3px; margin: 0; padding: 10px 12px; border: 1px solid #e1e4e7; border-radius: 3px; background: #fbfbfc; color: #687079; font-size: 10px; line-height: 1.5; }
.sync-offline-boundary strong { color: #444b52; }
.sync-status-actions { padding: 12px 20px 17px; }

.mobile-utility-section { display: none; }
.mobile-account-dialog { width: min(430px, calc(100vw - 32px)); }
.mobile-account-content { display: flex; align-items: center; gap: 13px; padding: 20px; }
.mobile-account-avatar { position: relative; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; background: #e8eef8; }
.mobile-account-avatar::before { position: absolute; top: 9px; left: 17px; width: 12px; height: 12px; border-radius: 50%; background: #6582ae; content: ""; }
.mobile-account-avatar::after { position: absolute; right: 9px; bottom: 8px; left: 9px; height: 15px; border-radius: 14px 14px 8px 8px; background: #6582ae; content: ""; }
.mobile-account-content > div:last-child { display: grid; gap: 3px; }
.mobile-account-content strong { color: #343a40; font-size: 15px; }
.mobile-account-content span, .mobile-account-content small { color: #757d84; font-size: 11px; }
.mobile-account-actions { display: grid; border-top: 1px solid #e1e4e7; border-bottom: 1px solid #e1e4e7; }
.mobile-account-actions button { min-height: 44px; padding: 10px 20px; border: 0; border-bottom: 1px solid #e7e9eb; background: #fff; color: #3e454b; cursor: pointer; text-align: left; }
.mobile-account-actions button:last-child { border-bottom: 0; }
.mobile-account-actions button.is-danger { color: #bd3942; }
.notifications-header-actions { display: flex; align-items: center; gap: 3px; }
.notifications-drawer > header .notifications-close { display: none; font-size: 24px; }

@media (max-width: 720px) {
  .mobile-module-panel { max-height: min(82dvh, 720px); }
  .mobile-utility-section { display: block; padding: 0 16px 16px; border-top: 1px solid #e1e4e7; }
  .mobile-utility-section h3 { margin: 14px 0 10px; color: #737b82; font-size: 11px; font-weight: 600; }
  .mobile-utility-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-utility-grid > button { position: relative; display: grid; min-height: 58px; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #d9dde1; border-radius: 8px; background: #fff; color: #4d555c; text-align: left; }
  .mobile-utility-grid > button > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
  .mobile-utility-grid strong, .mobile-utility-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-utility-grid strong { font-size: 11px; }
  .mobile-utility-grid small { color: #7b838a; font-size: 9px; }
  .mobile-utility-icon { position: relative; display: grid; width: 22px; height: 22px; place-items: center; color: #59636c; }
  .mobile-utility-icon.notification-icon::before { top: 4px; left: 5px; }
  .mobile-utility-icon.notification-icon::after { left: 9px; bottom: 2px; }
  .mobile-help-icon { border: 1.5px solid currentColor; border-radius: 50%; font-weight: 700; }
  .mobile-account-icon::before { position: absolute; top: 2px; left: 7px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; content: ""; }
  .mobile-account-icon::after { position: absolute; right: 3px; bottom: 2px; left: 3px; height: 9px; border-radius: 9px 9px 3px 3px; background: currentColor; content: ""; }
  .sync-status-dialog, .mobile-account-dialog { width: 100%; max-height: 100%; }
  .sync-status-content { padding: 16px 16px 6px; }
  .sync-status-actions { padding: 12px 16px 16px; }
  .notifications-drawer > header .notifications-close { display: grid; place-items: center; }
  .notifications-drawer { width: 100vw; }
}

/* Project trash follows Fieldwire's 30-day recovery workspace. */
.trash-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #f3f4f6; color: #33383d; }
.trash-workspace[hidden], .trash-bulk-bar[hidden] { display: none; }
.trash-toolbar { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 24px; border-bottom: 1px solid #d7dade; background: #fff; }
.trash-heading { display: grid; gap: 4px; }
.trash-heading h1 { margin: 0; font-size: 20px; font-weight: 600; }
.trash-heading span { color: #7a828a; font-size: 12px; }
.trash-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.trash-search { display: flex; width: min(330px, 32vw); min-height: 38px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #cbd0d5; border-radius: 3px; background: #fff; color: #60676e; }
.trash-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font: inherit; }
.trash-type-control select { min-width: 138px; min-height: 38px; padding: 0 32px 0 10px; border: 1px solid #cbd0d5; border-radius: 3px; background: #fff; color: #34393e; }
.trash-notice { display: flex; align-items: flex-start; gap: 9px; margin: 18px 24px 0; padding: 12px 14px; border: 1px solid #cbdcf6; border-radius: 4px; background: #f2f7ff; color: #43556b; }
.trash-notice p { margin: 0; font-size: 12px; line-height: 1.5; }
.trash-bulk-bar { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 24px 0; padding: 7px 12px 7px 16px; border: 1px solid #a9c4f5; border-radius: 4px; background: #fff; }
.trash-bulk-bar strong { font-size: 12px; }
.trash-content { min-height: 0; flex: 1; overflow: auto; padding: 18px 24px 40px; }
.trash-date-group { margin: 0 0 22px; }
.trash-date-group > h2 { margin: 0 0 8px; color: #646c74; font-size: 12px; font-weight: 600; }
.trash-list { overflow: hidden; border: 1px solid #d4d8dc; border-radius: 3px; background: #fff; }
.trash-row { display: grid; grid-template-columns: 34px 38px minmax(220px, 1fr) 150px 92px 112px; min-height: 64px; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid #e4e6e8; }
.trash-row:last-child { border-bottom: 0; }
.trash-row.is-unavailable { background: #fafafa; color: #959ba0; }
.trash-select { display: grid; width: 34px; height: 44px; place-items: center; }
.trash-select input { width: 16px; height: 16px; }
.trash-item-icon { display: grid; width: 30px; height: 34px; place-items: center; border-radius: 3px; background: #eef2f6; color: #66717b; font-size: 9px; font-weight: 700; }
.trash-item-icon::before { content: "文件"; }
.trash-item-planDocument::before { content: "图纸"; }
.trash-item-fileFolder::before { content: "目录"; }
.trash-item-task::before { content: "任务"; }
.trash-item-form::before { content: "表单"; }
.trash-item-attachment::before { content: "照片"; }
.trash-item-main { display: grid; min-width: 0; gap: 4px; }
.trash-item-main strong, .trash-item-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-item-main strong { font-size: 13px; font-weight: 500; }
.trash-item-main span, .trash-row time, .trash-expiry, .trash-readonly { color: #7a8289; font-size: 11px; font-style: normal; }
.trash-row .text-button { justify-self: end; color: #1769f6; }
.trash-row .text-button:disabled { color: #9ba1a7; cursor: default; }
.trash-empty { display: grid; min-height: 360px; place-items: center; align-content: center; gap: 10px; color: #737c84; text-align: center; }
.trash-empty-icon { position: relative; width: 72px; height: 72px; border-radius: 50%; background: #e9edf2; }
.trash-empty h2 { margin: 8px 0 0; color: #343a40; font-size: 18px; }
.trash-empty p { margin: 0; font-size: 12px; }

@media (max-width: 720px) {
  .trash-toolbar { min-height: auto; align-items: stretch; flex-direction: column; gap: 12px; padding: 14px 12px; }
  .trash-heading h1 { display: none; }
  .trash-toolbar-actions { display: grid; grid-template-columns: minmax(0, 1fr) 112px; }
  .trash-search { box-sizing: border-box; width: 100%; min-height: 44px; }
  .trash-type-control select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; }
  .trash-notice { margin: 10px 12px 0; }
  .trash-bulk-bar { position: sticky; z-index: 2; top: 0; margin: 10px 12px 0; }
  .trash-content { padding: 12px 12px calc(var(--mobile-nav-height) + 24px); }
  .trash-list { border: 0; overflow: visible; background: transparent; }
  .trash-row { grid-template-columns: 30px 34px minmax(0, 1fr) 76px; gap: 8px; min-height: 82px; margin-bottom: 8px; padding: 9px 10px 9px 4px; border: 1px solid #d8dce0; border-radius: 7px; background: #fff; }
  .trash-row time { grid-column: 3; }
  .trash-expiry { grid-column: 3; }
  .trash-row .text-button, .trash-readonly { grid-column: 4; grid-row: 1 / 4; justify-self: end; text-align: right; }
  .trash-empty { min-height: 280px; padding: 0 24px; }
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--canvas); color: var(--ink); font-size: 13px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid rgba(36, 85, 207, .42);
  outline-offset: 1px;
}

.app-shell {
  display: grid;
  grid-template-columns: 194px minmax(0, 1fr) 236px;
  grid-template-areas: "rail workspace tasks";
  width: 100vw;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
}
.app-shell.is-wide-workspace { grid-template-columns: 194px minmax(0, 1fr); grid-template-areas: "rail workspace"; }

/* Fieldwire-like project rail: high density, hard edges, one blue selection. */
.global-rail {
  grid-area: rail;
  position: relative;
  z-index: 40;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--rail);
  color: #fff;
}

.project-switcher {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
  width: 100%;
  height: 49px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
  background: var(--rail-deep);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.project-switcher:hover { background: #252628; }
.project-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--yellow);
  color: #343536;
  font-size: 10px;
  font-weight: 800;
}
.project-name { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.project-caret { color: #e0e1e3; font-size: 17px; text-align: right; }
.rail-section-title { padding: 14px 13px 7px; color: #9fa3a7; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.rail-task-title { color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.rail-primary, .rail-filters { display: grid; }
.rail-task-title[hidden], .rail-filters[hidden] { display: none; }
.rail-item, .rail-filter {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--rail-muted);
  text-align: left;
  cursor: pointer;
}
.rail-item:hover, .rail-filter:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail-item.is-active, .rail-filter.is-active { background: var(--selected); color: #fff; }
.rail-icon { position: relative; display: block; width: 15px; height: 15px; margin: auto; color: #f3f4f5; }
.icon-plans { border: 1.4px solid currentColor; }
.icon-plans::before { position: absolute; top: 3px; left: 3px; width: 4px; height: 4px; border: 1px solid currentColor; content: ""; }
.icon-plans::after { position: absolute; right: 2px; bottom: 2px; width: 5px; height: 1px; background: currentColor; box-shadow: 0 -3px currentColor; content: ""; }
.icon-specs { border-left: 2px solid currentColor; border-right: 1px solid currentColor; }
.icon-specs::before { position: absolute; inset: 1px 3px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; box-shadow: 0 4px 0 -3px currentColor; content: ""; }
.icon-tasks::before { position: absolute; top: 2px; left: 0; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 0 5px currentColor, 0 10px currentColor; content: ""; }
.icon-tasks::after { position: absolute; top: 3px; right: 0; width: 9px; height: 1px; background: currentColor; box-shadow: 0 5px currentColor, 0 10px currentColor; content: ""; }
.icon-photos { top: 2px; height: 11px; border: 1.4px solid currentColor; border-radius: 1px; }
.icon-photos::before { position: absolute; top: 2px; left: 5px; width: 3px; height: 3px; border: 1px solid currentColor; border-radius: 50%; content: ""; }
.icon-photos::after { position: absolute; top: -4px; left: 3px; width: 7px; height: 3px; border: 1px solid currentColor; border-bottom: 0; content: ""; }
.icon-forms { border: 1.4px solid currentColor; border-radius: 1px; }
.icon-forms::before { position: absolute; top: -3px; left: 3px; width: 7px; height: 3px; border: 1px solid currentColor; background: var(--rail); content: ""; }
.icon-forms::after { position: absolute; top: 5px; left: 3px; width: 8px; height: 1px; background: currentColor; box-shadow: 0 4px currentColor; content: ""; }
.icon-files { width: 8px; height: 15px; border: 1.4px solid currentColor; border-radius: 6px; transform: rotate(38deg); }
.icon-files::before { position: absolute; top: 2px; left: 1px; width: 3px; height: 8px; border: 1px solid currentColor; border-radius: 4px; content: ""; }
.icon-models { width: 14px; height: 14px; border: 1.4px solid currentColor; transform: rotate(30deg) skew(-5deg); }
.icon-models::before { position: absolute; top: 5px; left: -1px; width: 14px; height: 1px; background: currentColor; content: ""; transform: rotate(-30deg); }
.rail-item > span:last-child, .rail-filter > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-filter > span:first-child { color: #fff; font-size: 15px; text-align: center; }
.rail-filter b { color: inherit; font-size: 11px; font-weight: 400; font-variant-numeric: tabular-nums; }
.rail-divider { height: 1px; margin: 10px 14px 0; background: rgba(255,255,255,.16); }
.category-code {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #55585c;
  font-size: 8px !important;
  font-weight: 700;
}
.rail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 8px 10px;
  border-top: 1px solid rgba(255,255,255,.15);
  background: var(--rail-deep);
}
.rail-footer-links { display: flex; min-width: 0; align-items: center; gap: 1px; }
.rail-footer-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: #d7d9dc;
  cursor: pointer;
  font-size: 10px;
}
.rail-footer-button[hidden] { display: none; }
.rail-footer-button:hover, .rail-footer-button.is-active { border-radius: 2px; background: rgba(255,255,255,.11); color: #fff; }
.rail-footer-icon { position: relative; display: block; width: 15px; height: 15px; }
.icon-people::before { position: absolute; top: 0; left: 5px; width: 5px; height: 5px; border: 1.3px solid currentColor; border-radius: 50%; content: ""; }
.icon-people::after { position: absolute; right: 1px; bottom: 0; left: 1px; height: 7px; border: 1.3px solid currentColor; border-radius: 8px 8px 2px 2px; content: ""; }
.icon-settings::before { position: absolute; inset: -2px; display: grid; place-items: center; content: "⚙"; font-size: 17px; line-height: 1; }
.device-badge {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
}

/* Right task rail. */
.context-sidebar {
  grid-area: tasks;
  position: relative;
  z-index: 35;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: var(--surface);
}
.sidebar-header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 9px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header > div:first-child { display: flex; align-items: baseline; gap: 7px; }
.sidebar-header h2 { margin: 0; font-size: 14px; font-weight: 600; }
.sidebar-header #visible-count { color: var(--subtle); font-size: 10px; }
.sidebar-actions { display: flex; gap: 5px; }
.sidebar-add, .sidebar-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: #50545a;
  cursor: pointer;
  font-size: 18px;
}
.sidebar-close { display: none; }
.sidebar-filter-open { display: none; }
.search-field {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 9px 10px 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: var(--muted);
}
.search-field:focus-within { border-color: #8aa8e7; }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.filter-row { display: flex; padding: 0 10px 8px; border-bottom: 1px solid var(--border); }
.filter-chip {
  flex: 1 1 auto;
  padding: 5px 4px;
  border: 1px solid var(--border);
  border-right-width: 0;
  border-radius: 0;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
}
.filter-chip:first-child { border-radius: 2px 0 0 2px; }
.filter-chip:last-child { border-right-width: 1px; border-radius: 0 2px 2px 0; }
.filter-chip.is-active { border-color: #91aae0; background: #edf2ff; color: var(--blue); }
.task-list { min-height: 0; flex: 1; overflow: auto; scrollbar-width: thin; }
.task-card {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
  min-height: 69px;
  padding: 10px 10px 9px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.task-card:hover { background: #f7f8fa; }
.task-card.is-selected { border-left-color: var(--selected); background: #edf2ff; }
.task-card-pin, .task-pin {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 5px;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  transform: rotate(-45deg);
}
.task-card-pin span, .task-pin span { transform: rotate(45deg); }
.task-card-pin span, .task-pin span { font-size: 8px; letter-spacing: -.03em; }
.task-card-pin.status-in_progress { background: #5b86df; }
.task-card-pin.status-completed, .task-card-pin.status-verified { background: var(--green); }
.task-card-pin.category-safety { background: var(--red); }
.task-card-main { display: grid; min-width: 0; gap: 3px; }
.task-card-title { display: -webkit-box; overflow: hidden; font-size: 11px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-card-meta { display: flex; min-width: 0; gap: 4px; color: var(--subtle); font-size: 9px; }
.task-card-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card-meta span + span::before { margin-right: 4px; content: "·"; }
.task-card-reference { color: #7f858b; font-size: 9px; }
.local-mark { color: #b86e19 !important; font-weight: 700; }
.task-card-status { display: none; }
.empty-list { padding: 34px 16px; color: var(--muted); text-align: center; }
.sidebar-footer { flex: 0 0 auto; padding: 8px 10px; border-top: 1px solid var(--border); }
.sidebar-footer button { width: 100%; padding: 6px 8px; border: 0; background: transparent; color: var(--muted); text-align: left; cursor: pointer; font-size: 10px; }
.sidebar-footer .new-task-row { color: #767b81; text-align: center; }
.sidebar-footer .new-task-row:hover { color: var(--blue); }

/* Global and plan toolbars. */
.workspace { grid-area: workspace; position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; background: var(--canvas); }
.global-topbar {
  position: relative;
  z-index: 50;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.topbar-leading, .topbar-actions { display: flex; min-width: 0; align-items: center; gap: 8px; }
.topbar-menu, .topbar-icon, .account-button {
  height: 32px;
  border: 0;
  background: transparent;
  color: #5f646a;
  cursor: pointer;
}
.topbar-menu { width: 32px; font-size: 16px; }
.global-search { position: relative; display: flex; width: min(270px, 28vw); align-items: center; }
.global-search input { width: 100%; height: 32px; padding: 6px 34px 6px 12px; border: 1px solid var(--border); border-radius: 2px; background: #f8f9fa; outline: 0; }
.global-search input:focus { border-color: #8ea8e1; background: #fff; }
.global-search span { position: absolute; right: 10px; color: #3d4247; font-size: 16px; }
.topbar-icon { position: relative; width: 28px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.topbar-icon:hover { background: #f0f1f3; }
.notification-icon { position: relative; display: block; width: 11px; height: 11px; margin: 0 auto; border-radius: 7px 7px 3px 3px; background: #62676d; }
.notification-icon::before { position: absolute; top: -3px; left: 4px; width: 3px; height: 4px; border-radius: 3px 3px 0 0; background: #62676d; content: ""; }
.notification-icon::after { position: absolute; right: -2px; bottom: -2px; left: -2px; height: 2px; border-radius: 2px; background: #62676d; content: ""; }
.account-button { display: inline-flex; align-items: center; gap: 4px; padding: 0 5px; font-size: 10px; }

.workspace-toolbar {
  position: relative;
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.workspace-toolbar[hidden], .plan-workspace[hidden], .context-sidebar[hidden] { display: none; }
.toolbar-leading, .toolbar-actions { display: flex; min-width: 0; align-items: center; gap: 7px; }
.toolbar-actions { justify-content: flex-end; }
.toolbar-button {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: #4d5258;
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}
.toolbar-button:hover { background: #f2f3f5; }
.toolbar-button:disabled { opacity: .4; cursor: default; }
.toolbar-button.icon-only { width: 32px; padding: 0; font-size: 15px; }
.filter-icon { position: relative; display: block; width: 11px; height: 10px; }
.filter-icon::before { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 62% 45%, 62% 100%, 38% 84%, 38% 45%); background: currentColor; content: ""; }
.filter-count { display: grid; min-width: 15px; height: 15px; place-items: center; padding: 0 4px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 8px; }
.filter-count[hidden] { display: none; }
.back-button span { font-size: 20px; line-height: 1; }
.plan-heading { min-width: 0; text-align: center; }
.plan-heading p { margin: 0 0 2px; color: var(--subtle); font-size: 8px; }
.plan-heading h1 { margin: 0; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.mobile-only { display: none; }

.toolbar-menu {
  position: absolute;
  z-index: 70;
  top: 49px;
  display: grid;
  width: 238px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(24,28,33,.22);
}
.toolbar-menu[hidden] { display: none; }
.actions-menu { left: 106px; }
.recent-plans-menu { left: 238px; width: 260px; }
.all-plans-menu { left: 12px; width: 285px; }
.toolbar-menu > button { display: grid; min-height: 47px; gap: 3px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border); background: #fff; color: #4d5258; text-align: left; cursor: pointer; }
.toolbar-menu > button:hover { background: #f5f6f8; }
.toolbar-menu > button:last-child { border-bottom: 0; }
.toolbar-menu button span, .toolbar-menu button strong { font-size: 10px; font-weight: 600; }
.toolbar-menu button small { overflow: hidden; color: var(--subtle); font-size: 8px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-menu-label { padding: 8px 12px; border-bottom: 1px solid var(--border); background: #f6f7f8; color: var(--muted); font-size: 9px; font-weight: 600; }
.toolbar-menu-group { display: grid; gap: 7px; padding: 10px 12px; border-bottom: 1px solid var(--border); color: #565b61; font-size: 9px; }
.toolbar-menu-group > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.toolbar-menu-group button { height: 29px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #5c6167; cursor: pointer; font-size: 9px; }
.toolbar-menu-group button:hover { border-color: #9bb0df; color: var(--blue); }

/* Fieldwire's plan-level task filter is a floating sheet on the left. */
.task-filter-panel {
  position: absolute;
  z-index: 64;
  top: 112px;
  left: 12px;
  width: 326px;
  max-height: calc(100dvh - 132px);
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  background: #fff;
  box-shadow: var(--shadow);
}
.task-filter-panel[hidden] { display: none; }
.floating-panel-header { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 10px 13px; border-bottom: 1px solid var(--border); }
.floating-panel-header h2 { margin: 0; font-size: 15px; font-weight: 500; }
.floating-panel-header > button { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; background: transparent; color: #7b8086; cursor: pointer; font-size: 20px; }
.task-filter-form { display: grid; gap: 12px; padding: 14px; }
.filter-control { display: grid; gap: 5px; color: #61666c; font-size: 10px; }
.filter-control select, .filter-control input { width: 100%; height: 36px; padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--ink); outline: 0; font-size: 11px; }
.filter-control select:focus, .filter-control input:focus { border-color: #89a5e2; }
.clear-filter-button { min-height: 34px; margin-top: 4px; border: 1px solid #d6d9de; border-radius: 2px; background: #fff; color: #6f747a; cursor: pointer; font-size: 10px; }
.clear-filter-button:hover { border-color: #b9c5dd; background: #f7f9fd; color: #315da8; }

.conflict-banner {
  position: relative;
  z-index: 26;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #ecc9c7;
  background: #fff1f0;
  color: #7f302e;
  font-size: 10px;
}
.conflict-banner[hidden] { display: none; }
.conflict-banner strong { display: block; }
.conflict-copy { min-width: 0; flex: 1 1 auto; }
.conflict-heading { display: flex; align-items: baseline; gap: 8px; }
.conflict-heading > span { color: #9a5a57; font-size: 8px; }
.conflict-field-list { display: grid; max-height: 170px; gap: 0; overflow: auto; margin-top: 5px; border-top: 1px solid rgba(155, 74, 70, .18); }
.conflict-field-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid rgba(155, 74, 70, .14); }
.conflict-field-row > strong { padding-top: 2px; font-size: 9px; }
.conflict-field-row > span { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 5px; }
.conflict-field-row i { color: #a46763; font-size: 8px; font-style: normal; }
.conflict-field-row b { overflow-wrap: anywhere; color: #6f2d2a; font-weight: 500; }
.conflict-internal-difference { grid-column: 2 / -1; color: #8e4f4b; line-height: 1.45; }
.conflict-decision-note { display: block; margin-top: 5px; color: #9a5a57; line-height: 1.4; }
.conflict-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.conflict-actions button { min-height: 32px; white-space: nowrap; }

/* Plan viewer. */
.plan-workspace { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.plan-viewport {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 18px 46px 28px;
  background: #eef0f3;
  scrollbar-width: thin;
}
body.has-plan-fullscreen { overflow: hidden; }
.plan-viewport.is-immersive {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  height: 100dvh;
  padding: 24px 56px 34px;
  background: #e7e9ec;
}
.plan-canvas {
  position: relative;
  --plan-zoom: 1;
  width: min(calc(100% * var(--plan-zoom)), calc(1140px * var(--plan-zoom)));
  min-width: calc(720px * var(--plan-zoom));
  aspect-ratio: 14 / 9;
  overflow: hidden;
  border: 1px solid #aeb3b7;
  background: #fff;
  box-shadow: 0 1px 4px rgba(36,41,46,.17);
  cursor: crosshair;
  user-select: none;
}
.plan-content { --plan-rotation: 0deg; --rotation-scale: 1; position: absolute; inset: 0; transform: rotate(var(--plan-rotation)) scale(var(--rotation-scale)); transform-origin: center; transition: transform .16s ease; }
.plan-drawing { display: block; width: 100%; height: 100%; }
.uploaded-plan-document { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; object-fit: contain; }
.uploaded-plan-document[hidden] { display: none; }
.plan-content.has-uploaded-document .plan-drawing,
.plan-content.has-uploaded-document .discipline-overlay { display: none; }
.plan-canvas[data-tool="select"] { cursor: default; }
.plan-canvas[data-tool="pen"], .plan-canvas[data-tool="shape"], .plan-canvas[data-tool="measure"] { cursor: crosshair; touch-action: none; }

/* Plans and Specifications libraries. */
.library-workspace, .spec-viewer { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; background: #f1f2f4; }
.library-workspace[hidden], .spec-viewer[hidden] { display: none; }
.library-toolbar, .spec-viewer-toolbar {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 64px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.library-title { display: flex; align-items: baseline; gap: 10px; }
.library-title h1 { margin: 0; font-size: 18px; font-weight: 600; }
.library-title span { color: var(--muted); font-size: 10px; }
.library-actions, .spec-viewer-actions { display: flex; min-width: 0; align-items: center; gap: 7px; }
.library-search { position: relative; display: flex; width: 250px; align-items: center; }
.library-search span { position: absolute; left: 10px; color: #656b71; font-size: 15px; }
.library-search input { width: 100%; height: 32px; padding: 6px 10px 6px 31px; border: 1px solid var(--border); border-radius: 2px; background: #f8f9fa; outline: 0; }
.library-search input:focus { border-color: #8ea8e1; background: #fff; }
.new-library-item { display: inline-flex; height: 32px; align-items: center; padding: 0 12px; border: 1px solid var(--blue-dark); border-radius: 2px; background: var(--blue); color: #fff; cursor: pointer; font-size: 10px; white-space: nowrap; }
.new-library-item:hover { background: var(--blue-dark); }
.new-library-item input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.view-switch { display: flex; height: 32px; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; background: #fff; }
.view-switch button { width: 32px; border: 0; border-right: 1px solid var(--border); background: #fff; color: #6d7278; cursor: pointer; }
.view-switch button:last-child { border-right: 0; }
.view-switch button.is-active { background: #e9eefc; color: var(--blue); }
.library-layout { display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: 205px minmax(0, 1fr); }
.library-folders { min-height: 0; overflow: auto; border-right: 1px solid var(--border); background: #fff; padding: 12px 0; }
.library-folders > button, .library-folders #plan-folder-list button { display: grid; width: 100%; min-height: 36px; grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 7px 14px; border: 0; background: transparent; color: #555b61; text-align: left; cursor: pointer; }
.library-folders > button:hover, .library-folders #plan-folder-list button:hover { background: #f3f4f6; }
.library-folders button.is-active { background: #e8edfa; color: var(--blue); font-weight: 600; }
.library-folders button b { font-size: 9px; font-weight: 500; }
.folder-separator { height: 1px; margin: 9px 14px; background: var(--border); }
.library-content { position: relative; min-width: 0; min-height: 0; overflow: auto; padding: 18px; }
.library-filter-panel { position: absolute; z-index: 12; top: 10px; right: 18px; display: grid; width: 286px; gap: 12px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.library-filter-panel[hidden] { display: none; }
.library-filter-panel header { display: flex; align-items: center; justify-content: space-between; }
.library-filter-panel header button { width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.library-filter-panel label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.library-filter-panel select { height: 32px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.library-filter-panel .checkbox-filter { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.plans-collection-heading { display: flex; min-height: 38px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.plans-collection-heading h2 { margin: 0 0 3px; font-size: 14px; }
.plans-collection-heading span { color: var(--muted); font-size: 9px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 14px; align-items: start; }
.plan-card { display: grid; min-width: 0; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(29,33,38,.06); color: inherit; text-align: left; cursor: pointer; }
.plan-card:hover { border-color: #8da6dc; box-shadow: 0 2px 8px rgba(34,49,78,.12); }
.plan-thumbnail { position: relative; height: 146px; overflow: hidden; border-bottom: 1px solid var(--border); background: #f8f9fa; }
.plan-thumbnail::before { position: absolute; inset: 10px; border: 1px solid #aab0b5; background: #fff; content: ""; }
.plan-thumbnail::after { position: absolute; top: 28px; right: 34px; bottom: 29px; left: 28px; border: 2px solid #5b6469; background: repeating-linear-gradient(90deg, transparent 0 28px, #cbd0d4 29px 30px), repeating-linear-gradient(0deg, transparent 0 22px, #d2d6da 23px 24px); content: ""; }
.plan-thumbnail.variant-2::after { inset: 28px 36px 34px 26px; border-width: 1px 3px 3px 1px; transform: skewY(-3deg); }
.plan-thumbnail.variant-3::after { inset: 24px 24px 37px 38px; border-radius: 50% 0 0; background: repeating-radial-gradient(circle at 25% 60%, transparent 0 14px, #c9ced2 15px 16px); }
.plan-thumbnail.variant-4::after { inset: 30px 30px; background: linear-gradient(45deg, transparent 48%, #c2c8cc 49% 51%, transparent 52%), repeating-linear-gradient(0deg, transparent 0 18px, #d0d5d8 19px 20px); }
.plan-thumbnail.variant-5::after { inset: 26px 30px; background: repeating-linear-gradient(90deg, transparent 0 16px, #c3c9cd 17px 18px); }
.plan-thumb-number { position: absolute; z-index: 2; right: 14px; bottom: 13px; padding: 2px 5px; background: #fff; font-size: 10px; font-weight: 700; }
.plan-card-body { display: grid; gap: 6px; padding: 10px 11px; }
.plan-card-title { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.plan-card-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.plan-card-tags { display: flex; min-height: 18px; flex-wrap: wrap; gap: 4px; }
.plan-card-tags span { padding: 2px 5px; border-radius: 2px; background: #eef0f3; color: #6b7177; font-size: 8px; }
.plans-grid.is-list { display: grid; gap: 0; border: 1px solid var(--border); background: #fff; }
.plans-list-header { display: none; }
.plans-grid.is-list .plans-list-header { display: grid; height: 34px; grid-template-columns: minmax(220px, 2fr) 90px minmax(120px, 1fr) 100px; align-items: center; border-bottom: 1px solid var(--border); background: #f7f8f9; color: var(--muted); font-size: 8px; }
.plans-grid.is-list .plans-list-header span { padding: 0 12px; }
.plans-grid.is-list .plan-card { display: grid; grid-template-columns: minmax(220px, 2fr) 90px minmax(120px, 1fr) 100px; align-items: center; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.plans-grid.is-list .plan-card:last-child { border-bottom: 0; }
.plans-grid.is-list .plan-thumbnail { display: none; }
.plans-grid.is-list .plan-card-body { display: contents; }
.plans-grid.is-list .plan-card-title { padding: 11px 12px; }
.plans-grid.is-list .plan-card-meta { display: contents; }
.plans-grid.is-list .plan-card-meta span { padding: 11px 12px; }
.plans-grid.is-list .plan-card-tags { padding: 8px 12px; }
.plans-grid.is-list .plan-list-version { display: block; padding: 11px 12px; color: var(--muted); font-size: 9px; }
.plan-list-version { display: none; }
.library-empty { grid-column: 1 / -1; padding: 68px 24px; border: 1px dashed var(--border-strong); background: rgba(255,255,255,.62); color: var(--muted); text-align: center; }

.spec-table-wrap { min-height: 0; flex: 1; overflow: auto; padding: 18px; }
.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); background: #fff; table-layout: fixed; }
.spec-table th { height: 36px; padding: 0 14px; border-bottom: 1px solid var(--border); background: #f7f8f9; color: var(--muted); font-size: 9px; font-weight: 600; text-align: left; }
.spec-table th:first-child { width: 145px; }
.spec-table th:nth-child(3) { width: 170px; }
.spec-table th:last-child { width: 42px; }
.spec-table td { height: 48px; padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 10px; }
.spec-table tr:last-child td { border-bottom: 0; }
.spec-table tbody tr { cursor: pointer; }
.spec-table tbody tr:hover { background: #f4f6fb; }
.spec-number { color: var(--blue); font-weight: 600; }
.spec-title-cell { font-weight: 600; }
.spec-version-date { color: var(--muted); }
.spec-row-open { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }
.spec-viewer-toolbar { min-height: 58px; }
.spec-viewer-title { min-width: 0; flex: 1; text-align: center; }
.spec-viewer-title p { margin: 0 0 2px; color: var(--muted); font-size: 8px; }
.spec-viewer-title h1 { margin: 0; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.spec-viewer-actions { flex: 1; justify-content: flex-end; }
.spec-viewer-toolbar > .toolbar-button { flex: 0 0 auto; }
.spec-viewer-body { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; }
.spec-document-stage { min-width: 0; min-height: 0; overflow: auto; padding: 24px; background: #e7e9ec; }
.spec-stored-document { display: block; width: min(980px, calc(100% - 8px)); height: auto; margin: 0 auto; border: 1px solid #b9bec3; background: #fff; box-shadow: 0 1px 4px rgba(32,36,41,.15); transform: scale(var(--spec-zoom, 1)); transform-origin: top center; }
.spec-stored-document[hidden] { display: none; }
.spec-document-stage.has-stored-document .spec-document-page { display: none; }
.spec-document-page { width: min(760px, calc(100% - 8px)); min-height: 980px; margin: 0 auto; padding: 70px 76px; border: 1px solid #b9bec3; background: #fff; box-shadow: 0 1px 4px rgba(32,36,41,.15); color: #2f3337; transform: scale(var(--spec-zoom, 1)); transform-origin: top center; }
.spec-document-page h2 { margin: 0 0 38px; font-size: 15px; text-align: center; text-transform: uppercase; }
.spec-document-page h3 { margin: 30px 0 12px; font-size: 12px; text-transform: uppercase; }
.spec-document-page p, .spec-document-page li { font-family: Georgia, "Songti SC", serif; font-size: 11px; line-height: 1.75; }
.spec-document-page ol { padding-left: 24px; }
.spec-document-page mark { padding: 0 1px; background: #ffe265; color: inherit; }
.spec-page-header { display: flex; justify-content: space-between; margin-bottom: 44px; padding-bottom: 8px; border-bottom: 1px solid #777; color: #555; font-size: 8px; }
.spec-page-footer { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 8px; border-top: 1px solid #777; color: #666; font-size: 8px; }
.spec-search-results { width: 260px; min-height: 0; overflow: auto; border-left: 1px solid var(--border); background: #fff; }
.spec-search-results[hidden] { display: none; }
.spec-search-results header { padding: 14px; border-bottom: 1px solid var(--border); }
.spec-search-results header strong { display: block; margin-bottom: 3px; font-size: 11px; }
.spec-search-results header span { color: var(--muted); font-size: 8px; }
.spec-result-item { display: grid; gap: 4px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: 9px; }
.spec-result-item small { color: var(--muted); }
.spec-viewer-footer { display: flex; min-height: 42px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 6px 14px; border-top: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 9px; }
.spec-viewer-footer label { display: flex; align-items: center; gap: 8px; }
.spec-viewer-footer select { height: 28px; padding: 3px 26px 3px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; font-size: 9px; }

/* Project Tasks workspace. */
.tasks-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.tasks-workspace[hidden] { display: none; }
.tasks-toolbar { display: flex; min-height: 72px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.tasks-heading { display: flex; flex: 0 0 auto; align-items: baseline; gap: 9px; }
.tasks-heading h1 { margin: 0; font-size: 18px; font-weight: 600; }
.tasks-heading span { color: var(--muted); font-size: 9px; }
.tasks-toolbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.task-workspace-search { width: 230px; }
.task-sort-control { display: flex; height: 32px; align-items: center; gap: 6px; padding-left: 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--muted); font-size: 9px; white-space: nowrap; }
.task-sort-control select { height: 30px; min-width: 92px; padding: 4px 22px 4px 2px; border: 0; background: #fff; color: var(--ink); font-size: 9px; outline: 0; }
.task-view-switch { display: flex; height: 40px; overflow: hidden; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.task-view-switch button { display: grid; width: 48px; place-items: center; align-content: center; gap: 1px; padding: 3px 2px; border: 0; border-right: 1px solid var(--border); background: #fff; color: #6b7076; cursor: pointer; }
.task-view-switch button:last-child { border-right: 0; }
.task-view-switch button > span { font-size: 14px; line-height: 14px; }
.task-view-switch button small { font-size: 7px; }
.task-view-switch button.is-active { background: var(--blue); color: #fff; }
.task-workspace-filter-panel { position: absolute; z-index: 45; top: 62px; right: 208px; width: 300px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.task-workspace-filter-panel[hidden] { display: none; }
.task-workspace-filter-panel header { display: flex; height: 42px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.task-workspace-filter-panel header strong { font-size: 11px; }
.task-workspace-filter-panel header button { width: 25px; height: 25px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }
.task-workspace-filter-panel form { display: grid; gap: 10px; padding: 12px; }
.task-workspace-filter-panel label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.task-workspace-filter-panel select { height: 31px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.task-workspace-filter-panel .checkbox-filter { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.task-workspace-filter-panel form { max-height: calc(100dvh - 138px); overflow: auto; }
.task-location-filter-fieldset { display: grid; min-width: 0; gap: 6px; margin: 0; padding: 0; border: 0; }
.task-location-filter-fieldset legend { margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.task-location-filter-tree { display: grid; max-height: 155px; overflow: auto; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.task-location-filter-tree > label { display: grid; min-height: 34px; grid-template-columns: 17px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; gap: 1px 3px; padding: 4px 7px 4px calc(7px + (var(--location-depth) - 1) * 13px); border-bottom: 1px solid #edf0f2; color: var(--ink); cursor: pointer; }
.task-location-filter-tree > label:last-child { border-bottom: 0; }
.task-location-filter-tree input { width: 13px; height: 13px; grid-row: 1 / 3; align-self: center; margin: 0; accent-color: var(--blue); }
.task-location-filter-tree span { overflow: hidden; font-size: 8px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.task-location-filter-tree small { overflow: hidden; color: var(--muted); font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.task-location-filter-empty { margin: 0; padding: 12px; color: var(--muted); font-size: 8px; text-align: center; }
.task-bulk-bar { display: flex; min-height: 40px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; border-bottom: 1px solid #b9c8eb; background: #e8edfa; color: #284f9f; }
.task-bulk-bar[hidden] { display: none; }
.task-bulk-bar strong { font-size: 10px; }
.task-bulk-bar div { display: flex; gap: 6px; }
.task-bulk-bar button { min-height: 27px; padding: 4px 8px; border: 1px solid #a6b7df; border-radius: 2px; background: #fff; color: #3156a2; cursor: pointer; font-size: 8px; }
.task-workspace-content { min-width: 0; min-height: 0; flex: 1; overflow: auto; }

.task-kanban { display: grid; width: max(100%, 1175px); height: 100%; min-height: 0; grid-template-columns: repeat(5, minmax(220px, 1fr)); background: #e7e9ec; }
.task-kanban-column { display: flex; min-width: 0; min-height: 0; flex-direction: column; border-right: 1px solid #cfd3d7; }
.task-kanban-column:last-child { border-right: 0; }
.task-kanban-column-header { display: flex; min-height: 42px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid #cfd3d7; background: #f7f8f9; }
.task-kanban-column-header strong { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.task-kanban-column-header strong::before { width: 8px; height: 8px; border-radius: 50%; background: var(--column-color, #7a8086); content: ""; }
.task-kanban-column-header span { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 10px; background: #e1e3e6; color: #656b71; font-size: 8px; }
.task-kanban-list { display: grid; min-height: 0; align-content: start; gap: 8px; overflow-y: auto; padding: 9px; }
.task-board-card { position: relative; min-width: 0; border: 1px solid #c7cbd0; border-left: 4px solid var(--card-color, #7e858b); border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(25,29,34,.07); }
.task-board-card:hover { border-color: #93a9d8; border-left-color: var(--card-color, #7e858b); }
.task-board-select { position: absolute; z-index: 2; top: 10px; right: 9px; margin: 0; accent-color: var(--blue); }
.task-board-open { display: grid; width: 100%; min-width: 0; gap: 6px; padding: 9px 31px 10px 10px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.task-board-reference { color: var(--muted); font-size: 8px; }
.task-board-title { min-height: 28px; font-size: 10px; font-weight: 600; line-height: 1.35; }
.task-board-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }
.task-board-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-board-location { overflow: hidden; color: #536a92; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.task-board-dates { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding-top: 6px; border-top: 1px solid #eceef0; color: #747a80; font-size: 8px; }
.task-board-dates time.is-overdue { color: #c3423d; font-weight: 700; }
.task-board-category { display: inline-flex; width: max-content; align-items: center; gap: 4px; padding: 2px 5px; border-radius: 2px; background: #eef0f3; color: #656b71; font-size: 7px; }
.task-board-category b { font-size: 7px; }
.task-empty-column { padding: 26px 10px; color: #8b9096; font-size: 9px; text-align: center; }

.task-calendar-shell, .task-gantt-shell, .task-analytics { min-width: 0; min-height: 100%; padding: 14px; }
.task-calendar-shell { min-width: 820px; }
.task-view-subtoolbar { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.task-view-subtoolbar h2 { margin: 0; font-size: 13px; font-weight: 600; }
.task-month-controls { display: flex; align-items: center; gap: 5px; }
.task-month-controls button { min-width: 29px; height: 28px; padding: 0 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; cursor: pointer; font-size: 9px; }
.task-calendar { display: grid; grid-template-columns: repeat(7, minmax(112px, 1fr)); border-top: 1px solid var(--border-strong); border-left: 1px solid var(--border-strong); background: #fff; }
.task-calendar-weekday { height: 30px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #f7f8f9; color: var(--muted); font-size: 8px; font-weight: 600; text-align: center; }
.task-calendar-day { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.task-calendar-day.is-outside { background: #f6f7f8; color: #a3a8ad; }
.task-calendar-day.is-nonworking { background: #f4f5f6; color: #999fa5; }
.task-calendar-day.is-nonworking .calendar-task-pill { opacity: .68; }
.task-calendar-day.is-today { box-shadow: inset 0 0 0 2px rgba(36,85,207,.35); }
.task-calendar-date { display: block; margin-bottom: 5px; font-size: 8px; text-align: right; }
.calendar-task-pill { display: block; width: 100%; margin-bottom: 3px; overflow: hidden; border: 0; border-left: 3px solid var(--task-color, var(--blue)); border-radius: 1px; background: #edf1fa; padding: 4px 5px; color: #3d4b69; cursor: pointer; font-size: 7px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.calendar-task-pill.is-complete { background: #edf5eb; color: #52714b; }

.task-gantt-shell { min-width: 980px; }
.task-gantt { overflow: hidden; border: 1px solid var(--border-strong); background: #fff; }
.gantt-header, .gantt-row { display: grid; grid-template-columns: 240px minmax(720px, 1fr); }
.gantt-header { min-height: 46px; border-bottom: 1px solid var(--border); background: #f7f8f9; }
.gantt-label-heading { display: flex; align-items: center; padding: 0 11px; border-right: 1px solid var(--border); color: var(--muted); font-size: 8px; font-weight: 600; }
.gantt-days { display: grid; grid-template-columns: repeat(20, 1fr); }
.gantt-day { display: grid; place-items: center; border-right: 1px solid #e3e5e7; color: #747a80; font-size: 7px; }
.gantt-day.is-weekend { background: #f0f1f3; }
.gantt-row { min-height: 46px; border-bottom: 1px solid var(--border); }
.gantt-row:last-child { border-bottom: 0; }
.gantt-task-label { display: grid; min-width: 0; align-content: center; gap: 2px; padding: 7px 10px; border-right: 1px solid var(--border); }
.gantt-task-label strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.gantt-task-label span { color: var(--muted); font-size: 7px; }
.gantt-track { display: grid; position: relative; grid-template-columns: repeat(20, 1fr); align-items: center; background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 1px), #eceef0 calc(5% - 1px) 5%); }
.gantt-bar { z-index: 1; height: 22px; overflow: hidden; border: 0; border-radius: 2px; background: var(--task-color, var(--blue)); color: #fff; cursor: pointer; font-size: 7px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }

.task-analytics { display: grid; align-content: start; gap: 14px; }
.task-metrics { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.task-metric { padding: 13px 14px; border: 1px solid var(--border); background: #fff; }
.task-metric span { display: block; color: var(--muted); font-size: 8px; }
.task-metric strong { display: block; margin-top: 7px; font-size: 24px; font-weight: 500; }
.task-metric small { color: var(--subtle); font-size: 7px; }
.task-analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.task-chart { padding: 14px; border: 1px solid var(--border); background: #fff; }
.task-chart h3 { margin: 0 0 15px; font-size: 11px; }
.task-chart-rows { display: grid; gap: 10px; }
.task-chart-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 24px; align-items: center; gap: 8px; font-size: 8px; }
.task-chart-bar { height: 12px; background: #e6e8eb; }
.task-chart-bar i { display: block; width: var(--bar-width, 0%); height: 100%; background: var(--bar-color, var(--blue)); }
.task-chart-row b { text-align: right; }

.task-create-dialog { width: min(560px, calc(100vw - 40px)); }
.task-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 16px; }
.task-create-form .task-create-wide { grid-column: 1 / -1; }
.task-create-form select, .task-create-form input { width: 100%; height: 33px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 10px; }
.task-bulk-edit-dialog { width: min(440px, calc(100vw - 32px)); }
.task-bulk-edit-form { display: grid; gap: 14px; padding: 16px; }
.task-bulk-edit-form > label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.task-bulk-edit-form select { width: 100%; height: 34px; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.task-bulk-edit-form small { color: #888f96; font-size: 7px; }
.field-link-button { justify-self: start; padding: 2px 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 7px; }

/* Project Photos workspace: chronological media folders, project filters and linked-item viewer. */
.photos-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.photos-workspace[hidden] { display: none; }
.photos-toolbar { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.photos-heading { display: flex; flex: 0 0 auto; align-items: baseline; gap: 9px; }
.photos-heading h1 { margin: 0; font-size: 18px; font-weight: 600; }
.photos-heading span { color: var(--muted); font-size: 9px; }
.photos-toolbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.photo-search { width: 260px; }
.photo-actions-wrap, .photo-new-wrap { position: relative; }
.photo-actions-button.has-selection { border-color: #7e9bdd; background: #edf1fb; color: var(--blue); }
.photo-actions-button:disabled { opacity: .46; cursor: default; }
.photo-actions-menu, .photo-upload-menu { position: absolute; z-index: 60; top: calc(100% + 5px); right: 0; min-width: 190px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.photo-actions-menu[hidden], .photo-upload-menu[hidden] { display: none; }
.photo-actions-menu button { display: block; width: 100%; min-height: 34px; padding: 8px 12px; border: 0; background: #fff; color: #4f555b; cursor: pointer; font-size: 9px; text-align: left; }
.photo-actions-menu button:hover { background: #f1f3f7; }
.photo-actions-menu button.is-danger { color: #bd3f3b; }
.photo-actions-menu > div { height: 1px; margin: 4px 0; background: var(--border); }
.photo-upload-menu { width: 232px; padding: 5px 0; }
.photo-upload-menu label { display: grid; position: relative; gap: 2px; padding: 9px 12px; cursor: pointer; }
.photo-upload-menu label:hover { background: #f1f3f7; }
.photo-upload-menu label > span { font-size: 10px; font-weight: 600; }
.photo-upload-menu label > small { color: var(--muted); font-size: 7px; }
.photo-upload-menu input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.photo-mobile-scopes { display: none; }
.photo-filter-panel { position: absolute; z-index: 55; top: 57px; right: 185px; width: 334px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.photo-filter-panel[hidden] { display: none; }
.photo-filter-panel > header { display: flex; height: 42px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.photo-filter-panel > header strong { font-size: 11px; }
.photo-filter-panel > header button { width: 25px; height: 25px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }
.photo-filter-panel form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.photo-filter-panel form > label, .photo-filter-panel fieldset label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.photo-filter-panel select, .photo-filter-panel input { width: 100%; height: 31px; min-width: 0; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.photo-filter-panel fieldset { grid-column: 1 / -1; margin: 0; padding: 8px; border: 1px solid var(--border); }
.photo-filter-panel legend { padding: 0 4px; color: var(--muted); font-size: 8px; }
.photo-filter-panel fieldset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.photo-filter-panel .clear-filter-button { grid-column: 1 / -1; }
.photo-bulk-bar { display: flex; min-height: 38px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 6px 18px; border-bottom: 1px solid #b9c8eb; background: #e8edfa; color: #284f9f; }
.photo-bulk-bar[hidden] { display: none; }
.photo-bulk-bar strong { font-size: 9px; }
.photo-bulk-bar button { min-height: 27px; padding: 4px 8px; border: 1px solid #a6b7df; border-radius: 2px; background: #fff; color: #3156a2; cursor: pointer; font-size: 8px; }
.photo-gallery { min-width: 0; min-height: 0; flex: 1; overflow: auto; padding: 18px 20px 30px; }
.photo-date-group { margin: 0 0 24px; }
.photo-date-group > header { display: flex; height: 34px; align-items: center; justify-content: space-between; margin-bottom: 8px; border-bottom: 1px solid #cdd1d5; }
.photo-date-group > header label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.photo-date-group > header input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.photo-date-group > header span { font-size: 11px; font-weight: 600; }
.photo-date-group > header small { color: var(--muted); font-size: 8px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 11px; }
.photo-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #bfc4c9; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(28,33,38,.08); }
.photo-card:hover { border-color: #7f9cd9; box-shadow: 0 2px 8px rgba(36,55,92,.15); }
.photo-card.is-selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(36,85,207,.18); }
.photo-card-open { display: block; width: 100%; padding: 0; border: 0; background: #fff; color: inherit; cursor: pointer; text-align: left; }
.photo-thumbnail { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #aeb4b7; }
.photo-thumbnail > img, .photo-thumbnail > video, .photo-thumbnail > .photo-art { width: 100%; height: 100%; object-fit: cover; }
.photo-card-caption { display: grid; gap: 3px; padding: 8px 9px 9px; border-top: 1px solid #d7dade; }
.photo-card-caption strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.photo-card-caption span { color: var(--muted); font-size: 7px; }
.photo-card-select { position: absolute; z-index: 5; top: 7px; left: 7px; display: grid; width: 19px; height: 19px; place-items: center; border-radius: 2px; background: rgba(255,255,255,.92); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; }
.photo-card-select input { position: absolute; opacity: 0; }
.photo-card-select span { width: 11px; height: 11px; border: 1px solid #777e84; border-radius: 1px; background: #fff; }
.photo-card-select input:checked + span { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 2px #fff; }
.photo-card-download { position: absolute; z-index: 5; top: 7px; right: 7px; display: grid; width: 23px; height: 23px; place-items: center; padding: 0; border: 0; border-radius: 2px; background: rgba(42,45,48,.78); color: #fff; cursor: pointer; opacity: 0; }
.photo-card:hover .photo-card-download, .photo-card-download:focus-visible { opacity: 1; }
.photo-card-tag { position: absolute; z-index: 4; right: 7px; bottom: 47px; max-width: calc(100% - 48px); overflow: hidden; padding: 3px 6px; border-radius: 2px; background: rgba(38,42,45,.78); color: #fff; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.photo-empty { display: grid; min-height: 320px; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.photo-empty div { font-size: 32px; }
.photo-empty strong { color: #565c62; font-size: 12px; }
.photo-empty p { margin: 0; font-size: 9px; }

.photo-art { --photo-light:#c4c7c6; --photo-dark:#535b5e; --photo-accent:#a27754; position: relative; width: 100%; height: 100%; overflow: hidden; background: linear-gradient(145deg, var(--photo-light), var(--photo-dark)); }
.photo-art-missing { display: grid; place-items: center; align-content: center; gap: 6px; background: #eef1f4; color: #65717b; text-align: center; }
.photo-art-missing::before, .photo-art-missing::after { display: none; }
.photo-art-missing strong { font-size: 12px; }
.photo-art-missing small { font-size: 8px; }
.photo-art::before { position: absolute; inset: -20%; background: repeating-linear-gradient(100deg, transparent 0 13%, rgba(255,255,255,.22) 13.4% 14.2%, transparent 14.6% 25%); content: ""; transform: perspective(500px) rotateX(12deg) rotate(-4deg); }
.photo-art::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.08), transparent 58%, rgba(15,18,20,.42)); content: ""; }
.photo-art-depth { position: absolute; top: 16%; right: 12%; bottom: 18%; left: 12%; border: 3px solid rgba(247,244,234,.65); box-shadow: 14px 12px 0 rgba(29,34,36,.18); transform: skew(-5deg); }
.photo-art-object { position: absolute; z-index: 1; display: block; background: var(--photo-accent); box-shadow: 0 2px 5px rgba(20,23,25,.32); }
.photo-art-object-a { top: 26%; left: 4%; width: 91%; height: 16%; transform: rotate(-2deg); }
.photo-art-object-b { top: 48%; left: 24%; width: 12%; height: 43%; transform: skew(-4deg); }
.photo-art-object-c { top: 54%; right: 11%; width: 39%; height: 9%; transform: rotate(5deg); }
.photo-art time { position: absolute; z-index: 3; right: 7px; bottom: 6px; color: rgba(255,255,255,.94); font-size: 6px; text-shadow: 0 1px 2px #222; }
.photo-360-badge { position: absolute; z-index: 3; top: 8px; right: 8px; padding: 4px 6px; border: 1px solid rgba(255,255,255,.8); border-radius: 12px; background: rgba(27,30,32,.48); color: #fff; font-size: 8px; font-weight: 700; }
.photo-art-ceiling { --photo-light:#d5d0c3; --photo-dark:#61686a; --photo-accent:#8a725d; }
.photo-art-sprinkler { --photo-light:#d5d1c4; --photo-dark:#5f6465; --photo-accent:#b33c35; }
.photo-art-sprinkler .photo-art-object-a { top: 17%; height: 7%; }
.photo-art-sprinkler .photo-art-object-b { left: 54%; width: 4%; background: #b22e2e; }
.photo-art-entry { --photo-light:#d2c1a4; --photo-dark:#6a625a; --photo-accent:#d4a34f; }
.photo-art-entry .photo-art-depth { top: 8%; right: 26%; left: 26%; border-width: 10px; }
.photo-art-duct { --photo-light:#c2c9ca; --photo-dark:#4e585b; --photo-accent:#849093; }
.photo-art-duct .photo-art-object-a { top: 20%; height: 27%; border-radius: 3px; }
.photo-art-electrical { --photo-light:#c9cdca; --photo-dark:#46585e; --photo-accent:#d2a342; }
.photo-art-electrical .photo-art-object-a { top: 18%; left: 26%; width: 49%; height: 62%; border: 7px solid #3f494d; }
.photo-art-corridor { --photo-light:#d1c5b4; --photo-dark:#665b51; --photo-accent:#a96c3b; }
.photo-art-corridor .photo-art-depth { inset: 8% 21% 11%; transform: perspective(400px) rotateX(-4deg); }
.photo-art-scaffold { --photo-light:#aec6cf; --photo-dark:#5f6b6e; --photo-accent:#d2a448; }
.photo-art-scaffold::before { background: repeating-linear-gradient(90deg, transparent 0 13%, rgba(43,48,50,.58) 13.3% 14%, transparent 14.3% 24%), repeating-linear-gradient(0deg, transparent 0 18%, rgba(43,48,50,.5) 18.4% 19.2%, transparent 19.5% 28%); }
.photo-art-concrete { --photo-light:#bbb9b4; --photo-dark:#64605b; --photo-accent:#8c7059; }
.photo-art-concrete .photo-art-object-a { top: 58%; left: 0; width: 100%; height: 36%; transform: skewY(-5deg); }
.photo-art-door { --photo-light:#d1c3ad; --photo-dark:#6c5c4d; --photo-accent:#947151; }
.photo-art-door .photo-art-depth { inset: 8% 29% 7%; border-width: 9px; }
.photo-art-plumbing { --photo-light:#c8cbc5; --photo-dark:#53666d; --photo-accent:#557f96; }
.photo-art-plumbing .photo-art-object-a { top: 38%; left: 4%; width: 92%; height: 9%; border-radius: 8px; }
.photo-art-plumbing .photo-art-object-b { top: 18%; left: 58%; width: 9%; height: 70%; border-radius: 8px; }
.photo-art-drywall { --photo-light:#d7d1c2; --photo-dark:#70665d; --photo-accent:#b19b75; }
.photo-art-drywall::before { background: repeating-linear-gradient(90deg, transparent 0 21%, rgba(50,54,54,.52) 21.4% 22.3%, transparent 22.7% 31%); }
.photo-art-model { --photo-light:#dfe7eb; --photo-dark:#596871; --photo-accent:#63a5bd; }
.photo-art-model::before { background: linear-gradient(30deg, transparent 47%, rgba(255,255,255,.22) 48% 49%, transparent 50%), linear-gradient(150deg, transparent 47%, rgba(255,255,255,.22) 48% 49%, transparent 50%); background-size: 34px 34px; }
.photo-art-model .photo-art-depth { inset: 15% 18% 22%; border-color: rgba(183,225,235,.85); box-shadow: 18px 14px 0 rgba(47,74,83,.3); transform: skewY(8deg) rotate(-5deg); }
.photo-art-model .photo-art-object-a { top: 34%; left: 15%; width: 72%; height: 20%; transform: skewY(8deg) rotate(-5deg); }
.photo-art-model .photo-art-object-b { top: 25%; left: 24%; width: 7%; height: 54%; }
.photo-art-model .photo-art-object-c { top: 25%; right: 28%; width: 7%; height: 48%; }
.photo-art-panorama { --photo-light:#c4d5d7; --photo-dark:#566668; --photo-accent:#cf9b55; }
.photo-art-panorama .photo-art-depth { inset: 14% 5% 18%; border-radius: 50% / 18%; }

.photo-viewer-modal { position: fixed; z-index: 105; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(21,23,26,.68); }
.photo-viewer-modal[hidden] { display: none; }
.photo-viewer-dialog { display: flex; width: min(1180px, calc(100vw - 56px)); height: min(790px, calc(100dvh - 56px)); flex-direction: column; overflow: hidden; border: 1px solid #979da3; border-radius: 3px; background: #fff; box-shadow: 0 18px 54px rgba(0,0,0,.36); }
.photo-viewer-header { display: flex; min-height: 52px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.photo-viewer-header > div:first-child { display: grid; min-width: 0; gap: 2px; }
.photo-viewer-header strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.photo-viewer-header span { color: var(--muted); font-size: 8px; }
.photo-viewer-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.photo-viewer-tools button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #585e64; cursor: pointer; font-size: 10px; }
.photo-viewer-tools #photo-zoom-label { min-width: 38px; text-align: center; }
.photo-viewer-tools .photo-viewer-close { border: 0; font-size: 20px; }
.photo-viewer-body { display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) 310px; }
.photo-media-stage { position: relative; display: grid; min-width: 0; min-height: 0; place-items: center; overflow: auto; background: #25282b; }
.photo-viewer-media { display: grid; width: 86%; height: 86%; place-items: center; }
.photo-viewer-transform { display: grid; width: min(100%, 820px); aspect-ratio: 3 / 2; place-items: center; transform: rotate(var(--photo-rotation, 0deg)) scale(var(--photo-zoom, 1)); transition: transform .14s ease; }
.photo-viewer-transform > img, .photo-viewer-transform > video, .photo-viewer-transform > .photo-art { width: 100%; height: 100%; object-fit: contain; box-shadow: 0 5px 24px rgba(0,0,0,.42); }
.photo-viewer-transform > .photo-art { object-fit: initial; }
.photo-viewer-step { position: absolute; z-index: 3; top: 50%; display: grid; width: 38px; height: 54px; place-items: center; padding: 0; border: 0; border-radius: 2px; background: rgba(20,22,24,.62); color: #fff; cursor: pointer; font-size: 30px; transform: translateY(-50%); }
.photo-viewer-prev { left: 12px; }
.photo-viewer-next { right: 12px; }
.photo-viewer-details { min-height: 0; overflow: auto; border-left: 1px solid var(--border); background: #fff; }
.photo-viewer-details section { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.photo-viewer-details h3 { margin: 0 0 11px; color: #575d63; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.photo-viewer-details dl { display: grid; gap: 8px; margin: 0; }
.photo-viewer-details dl > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; font-size: 8px; }
.photo-viewer-details dt { color: var(--muted); }
.photo-viewer-details dd { margin: 0; overflow-wrap: anywhere; }
.photo-map-link { color: var(--blue); font-size: 9px; text-decoration: none; }
.photo-link-list { display: grid; gap: 6px; }
.photo-link-list button, .photo-link-list > div { display: grid; gap: 3px; width: 100%; padding: 8px 9px; border: 1px solid var(--border); border-radius: 2px; background: #f8f9fa; color: inherit; text-align: left; }
.photo-link-list button { cursor: pointer; }
.photo-link-list button:hover { border-color: #98acd8; background: #f1f4fb; }
.photo-link-list span { color: var(--muted); font-size: 7px; }
.photo-link-list strong { font-size: 8px; }
.photo-unlinked { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.photo-detail-section-heading { display: flex; align-items: center; justify-content: space-between; }
.photo-detail-section-heading h3 { margin-bottom: 0; }
.photo-detail-section-heading button { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 8px; }
.photo-detail-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.photo-detail-tags > span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 2px; background: #eceff3; color: #555d65; font-size: 8px; }
.photo-detail-tags button { padding: 0; border: 0; background: transparent; color: #7b8187; cursor: pointer; }
.photo-detail-tags em { color: var(--muted); font-size: 8px; font-style: normal; }

.photo-task-dialog, .photo-tags-dialog { width: min(520px, calc(100vw - 40px)); }
#photo-task-modal, #photo-tags-modal { z-index: 110; }
.photo-task-form { display: flex; min-height: 0; max-height: min(620px, calc(100dvh - 140px)); flex-direction: column; }
.photo-task-search { display: grid; gap: 5px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 8px; }
.photo-task-search input, .photo-tags-form input { height: 34px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 10px; }
.photo-task-results { min-height: 180px; overflow: auto; padding: 6px 14px; }
.photo-task-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.photo-task-option input { accent-color: var(--blue); }
.photo-task-option span { display: grid; min-width: 0; gap: 3px; }
.photo-task-option strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.photo-task-option small { color: var(--muted); font-size: 7px; }
.photo-task-form .dialog-actions { padding: 10px 14px; border-top: 1px solid var(--border); }
.photo-tags-form { display: grid; gap: 12px; padding: 14px; }
.photo-tags-form > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.photo-tags-form > label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.photo-bulk-tags { display: flex; min-height: 32px; flex-wrap: wrap; align-items: center; gap: 5px; }
.photo-bulk-tags button { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; background: #eef0f3; color: #596067; cursor: pointer; font-size: 8px; }
.photo-bulk-tags > span { color: var(--muted); font-size: 8px; }

/* Fieldwire Forms: template folders, individual form table and document modal. */
.forms-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.forms-workspace[hidden] { display: none; }
.forms-toolbar { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.forms-heading { display: flex; flex: 0 0 auto; align-items: baseline; gap: 9px; }
.forms-heading h1 { margin: 0; font-size: 18px; font-weight: 600; }
.forms-heading span { color: var(--muted); font-size: 9px; }
.forms-toolbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.form-search { width: 258px; }
.form-actions-wrap { position: relative; }
.form-actions-button.has-selection { border-color: #7e9bdd; background: #edf1fb; color: var(--blue); }
.form-actions-button:disabled { opacity: .46; cursor: default; }
.form-actions-menu { position: absolute; z-index: 61; top: calc(100% + 5px); right: 0; min-width: 185px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.form-actions-menu[hidden] { display: none; }
.form-actions-menu button { display: block; width: 100%; min-height: 34px; padding: 8px 12px; border: 0; background: #fff; color: #4f555b; cursor: pointer; font-size: 9px; text-align: left; }
.form-actions-menu button:hover { background: #f1f3f7; }
.form-actions-menu button.is-danger { color: #bd3f3b; }
.form-mobile-scopes { display: none; }
.form-filter-panel { position: absolute; z-index: 58; top: 57px; right: 300px; width: 342px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.form-filter-panel[hidden] { display: none; }
.form-filter-panel > header { display: flex; height: 42px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.form-filter-panel > header strong { font-size: 11px; }
.form-filter-panel > header button { width: 25px; height: 25px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }
.form-filter-panel form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.form-filter-panel form > label, .form-filter-panel fieldset label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.form-filter-panel form > label[hidden] { display: none; }
.form-filter-panel select, .form-filter-panel input { width: 100%; height: 31px; min-width: 0; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.form-filter-panel fieldset { grid-column: 1 / -1; margin: 0; padding: 8px; border: 1px solid var(--border); }
.form-filter-panel legend { padding: 0 4px; color: var(--muted); font-size: 8px; }
.form-filter-panel fieldset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.form-filter-panel .clear-filter-button { grid-column: 1 / -1; }
.form-bulk-bar { display: flex; min-height: 38px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 6px 18px; border-bottom: 1px solid #b9c8eb; background: #e8edfa; color: #284f9f; }
.form-bulk-bar[hidden] { display: none; }
.form-bulk-bar strong { font-size: 9px; }
.form-bulk-bar button { min-height: 27px; padding: 4px 8px; border: 1px solid #a6b7df; border-radius: 2px; background: #fff; color: #3156a2; cursor: pointer; font-size: 8px; }
.forms-content { min-width: 0; min-height: 0; flex: 1; overflow: auto; padding: 18px 20px 30px; }
.form-content-header { display: flex; min-height: 52px; align-items: flex-start; gap: 10px; border-bottom: 1px solid #cbd0d5; }
.form-content-header > button { height: 29px; margin-top: 1px; padding: 0 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--blue); cursor: pointer; font-size: 9px; }
.form-content-header > button[hidden] { display: none; }
.form-content-header h2 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.form-content-header p { margin: 0; color: var(--muted); font-size: 8px; }
.form-table-wrap { min-width: 760px; margin-top: 10px; border: 1px solid #c8ccd1; background: #fff; box-shadow: 0 1px 2px rgba(26,30,35,.06); }
.form-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.form-table th, .form-table td { height: 48px; padding: 8px 11px; border-bottom: 1px solid #e0e3e6; color: #555b61; font-size: 9px; text-align: left; vertical-align: middle; }
.form-table th { height: 35px; background: #f6f7f8; color: #747a80; font-size: 8px; font-weight: 600; }
.form-table tbody tr:last-child td { border-bottom: 0; }
.form-table tbody tr:hover td { background: #fafbfd; }
.form-table .form-check-cell { width: 42px; padding-inline: 13px 4px; }
.form-table .form-check-cell input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.form-template-table th:nth-child(3), .form-template-table td:nth-child(3) { width: 120px; }
.form-template-table th:nth-child(4), .form-template-table td:nth-child(4) { width: 130px; }
.form-table .form-row-actions-cell { position: relative; width: 82px; padding-inline: 4px 9px; text-align: right; }
.form-folder-open, .form-item-open, .form-name-open { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.form-folder-open { display: flex; width: 100%; min-width: 0; align-items: center; gap: 10px; }
.form-folder-open > span:last-child, .form-item-open > span:last-child { display: grid; min-width: 0; gap: 3px; }
.form-folder-open strong, .form-item-open strong { overflow: hidden; color: #3f4449; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.form-folder-open small, .form-item-open small { color: var(--muted); font-size: 7px; }
.form-folder-icon { display: grid; width: 31px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 2px; background: color-mix(in srgb, var(--template-accent, #6d93ec) 15%, white); color: var(--template-accent, #6d93ec); font-size: 15px; }
.form-folder-icon.is-all { background: #edf0f4; color: #70777d; }
.form-filtered-count { color: var(--muted); font-size: 7px; }
.template-status { display: inline-flex; align-items: center; gap: 5px; color: #5c6268; font-size: 8px; }
.template-status::before { width: 7px; height: 7px; border-radius: 50%; background: #67a45b; content: ""; }
.template-status.is-unpublished::before { background: #a3a8ad; }
.form-row-icon { min-width: 28px; height: 27px; padding: 0 5px; border: 0; border-radius: 2px; background: transparent; color: #6f757b; cursor: pointer; font-size: 11px; }
.form-row-icon:hover { background: #eef1f5; color: var(--blue); }
.form-row-icon:disabled { opacity: .32; cursor: default; }
.form-row-menu { position: absolute; z-index: 20; top: 38px; right: 7px; display: grid; min-width: 145px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); text-align: left; }
.form-row-menu button { min-height: 32px; padding: 7px 10px; border: 0; border-bottom: 1px solid #eceef0; background: #fff; color: #50565c; cursor: pointer; font-size: 8px; text-align: left; }
.form-row-menu button:last-child { border-bottom: 0; }
.form-row-menu button:hover { background: #f2f4f7; }
.form-row-menu button.is-danger { color: #b83c38; }
.form-list-table th:nth-child(2) { width: 190px; }
.form-list-table th:nth-child(4) { width: 120px; }
.form-list-table th:nth-child(5) { width: 105px; }
.form-list-table th:nth-child(6) { width: 115px; }
.form-list-table th > button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: 600; }
.form-item-open { display: flex; width: 100%; min-width: 0; align-items: center; gap: 8px; }
.form-number-badge { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border: 2px solid var(--template-accent, #6d93ec); border-radius: 50%; background: #fff; color: var(--template-accent, #6d93ec); font-size: 8px; font-weight: 700; }
.form-name-open { display: block; width: 100%; overflow: hidden; color: #384a75; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.form-item-row.is-selected td { background: #f1f4fb; }
.form-status { display: inline-flex; align-items: center; gap: 6px; color: #575d63; font-size: 8px; white-space: nowrap; }
.form-status i { display: block; width: 8px; height: 8px; border-radius: 50%; background: #e2ad38; }
.form-status.is-final i { background: #64a25a; }
.form-empty { display: grid; min-height: 310px; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.form-empty div { font-size: 32px; }
.form-empty strong { color: #565c62; font-size: 12px; }
.form-empty p { margin: 0; font-size: 9px; }

.form-create-dialog { width: min(560px, calc(100vw - 40px)); }
.form-create-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 16px; }
.form-create-form label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.form-create-form .form-create-wide { grid-column: 1 / -1; }
.form-create-form select, .form-create-form input { width: 100%; height: 34px; min-width: 0; padding: 5px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 10px; }
.form-template-dialog { width: min(690px, calc(100vw - 40px)); max-height: min(690px, calc(100dvh - 70px)); }
.form-template-note { margin: 0; padding: 11px 15px; border-bottom: 1px solid var(--border); background: #f8f9fa; color: var(--muted); font-size: 8px; }
.form-template-manager-list { max-height: 560px; overflow: auto; }
.form-template-manager-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 76px; align-items: center; gap: 10px; min-height: 63px; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.form-template-manager-row:last-child { border-bottom: 0; }
.form-template-manager-row > div { display: grid; min-width: 0; gap: 3px; }
.form-template-manager-row strong { font-size: 10px; }
.form-template-manager-row small { color: var(--muted); font-size: 8px; }
.form-template-manager-row .secondary-button { min-height: 29px; font-size: 8px; }
.template-publish-button { min-height: 29px; border: 1px solid var(--blue); border-radius: 2px; background: var(--blue); color: #fff; cursor: pointer; font-size: 8px; }
.template-publish-button.is-published { border-color: #a9c6a3; background: #f0f7ee; color: #4f8248; }

.form-viewer-modal { position: fixed; z-index: 104; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(21,23,26,.64); }
.form-viewer-modal[hidden] { display: none; }
.form-viewer-dialog { display: flex; width: min(1180px, calc(100vw - 56px)); height: min(820px, calc(100dvh - 56px)); flex-direction: column; overflow: hidden; border: 1px solid #979da3; border-radius: 3px; background: #fff; box-shadow: 0 18px 54px rgba(0,0,0,.36); }
.form-viewer-header { display: flex; min-height: 54px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.form-viewer-header > div:first-child { display: grid; min-width: 0; gap: 3px; }
.form-viewer-header span { color: var(--muted); font-size: 8px; }
.form-viewer-header strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.form-viewer-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.form-viewer-tools button { min-height: 30px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #565c62; cursor: pointer; font-size: 9px; }
.form-viewer-tools button[hidden] { display: none; }
.form-viewer-tools .form-viewer-close { min-width: 30px; padding: 0; border: 0; font-size: 20px; }
.form-detail-content { min-width: 0; min-height: 0; flex: 1; }
#form-detail-form { display: grid; width: 100%; height: 100%; grid-template-columns: minmax(0, 1fr) 300px; }
.form-document-pane { min-width: 0; min-height: 0; overflow: auto; padding: 22px; background: #e6e8eb; }
.form-document { width: min(760px, 100%); min-height: 100%; margin: 0 auto; border: 1px solid #bfc4c9; background: #fff; box-shadow: 0 2px 6px rgba(27,31,35,.12); }
.form-document-header { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 84px; padding: 14px 18px; border-top: 7px solid var(--blue); border-bottom: 1px solid var(--border); }
.form-project-logo { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--yellow); color: #343536; font-size: 11px; font-weight: 800; }
.form-document-header > div:nth-child(2) { min-width: 0; }
.form-document-header span { color: var(--muted); font-size: 8px; }
.form-document-header h2 { margin: 4px 0 2px; font-size: 15px; }
.form-document-header p { margin: 0; color: var(--muted); font-size: 7px; }
.form-document-header > strong { align-self: start; color: #555c63; font-size: 11px; }
.form-document-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--border); }
.form-document-title h1 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.form-document-section { border-bottom: 1px solid var(--border); }
.form-document-section > header { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 18px; background: #f6f7f8; }
.form-document-section > header h3 { margin: 0; color: #4e545a; font-size: 10px; font-weight: 600; }
.form-document-section > header h3 b, .form-document-field > span b { margin-left: 3px; color: #c63f3a; }
.form-document-section > header button { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 8px; }
.form-document-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 0 18px 14px; }
.form-document-field { display: grid; gap: 5px; padding: 12px 12px 0 0; color: var(--muted); font-size: 8px; }
.form-document-field:nth-child(even) { padding-right: 0; padding-left: 12px; border-left: 1px solid #eceef0; }
.form-document-field.is-long { grid-column: 1 / -1; padding-right: 0; padding-left: 0; border-left: 0; }
.form-document-field input, .form-document-field select, .form-document-field textarea { width: 100%; min-width: 0; padding: 6px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; resize: vertical; }
.form-document-field.has-error { margin: 5px 0 0; padding: 8px; border: 1px solid #dc5258; border-radius: 3px; background: #fff5f5; }
.form-document-field.has-error > span { color: #b8323a; font-weight: 600; }
.form-document-field.has-error input, .form-document-field.has-error select, .form-document-field.has-error textarea,
.form-attributes-pane label.has-error input, .form-signature-section.has-error { border-color: #dc5258; box-shadow: 0 0 0 2px rgba(220,82,88,.12); }
.form-document-field input, .form-document-field select { height: 31px; }
.form-document-field :disabled, .form-entry-table :disabled { border-color: transparent; background: #f6f7f8; color: #555b61; opacity: 1; }
.form-weather-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 14px 18px; }
.form-weather-grid > div { display: grid; gap: 4px; padding: 3px 11px; border-right: 1px solid var(--border); }
.form-weather-grid > div:first-child { padding-left: 0; }
.form-weather-grid > div:last-child { border-right: 0; }
.form-weather-grid span { color: var(--muted); font-size: 7px; }
.form-weather-grid strong { font-size: 9px; }
.form-entry-table-wrap { width: 100%; overflow-x: auto; padding: 12px 18px 15px; }
.form-entry-table { width: 100%; min-width: 520px; border-collapse: collapse; table-layout: fixed; }
.form-entry-table th, .form-entry-table td { height: 34px; padding: 4px 5px; border: 1px solid var(--border); color: #5c6268; font-size: 7px; text-align: left; }
.form-entry-table th { background: #f3f4f5; font-weight: 600; }
.form-entry-table input, .form-entry-table select { width: 100%; height: 26px; min-width: 0; padding: 3px 4px; border: 1px solid transparent; background: #fff; color: var(--ink); font-size: 8px; }
.form-entry-table input:focus, .form-entry-table select:focus { border-color: #9eafd5; }
.form-entry-table th:last-child, .form-entry-table td:last-child:has(.form-remove-row) { width: 31px; }
.form-remove-row { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; color: #b74742; cursor: pointer; }
.form-entry-empty { color: var(--muted) !important; text-align: center !important; }
.form-attachment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 13px 18px 16px; }
.form-attachment-grid article { position: relative; min-width: 0; border: 1px solid var(--border); background: #fff; }
.form-attachment-grid article > button:first-child { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: pointer; text-align: left; }
.form-attachment-grid article > button:first-child > div { width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.form-attachment-grid article > button:first-child > div > * { width: 100%; height: 100%; object-fit: cover; }
.form-attachment-grid strong { display: block; padding: 6px; overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.form-attachment-remove { position: absolute; top: 4px; right: 4px; display: grid; width: 21px; height: 21px; place-items: center; padding: 0; border: 0; border-radius: 2px; background: rgba(42,45,48,.78); color: #fff; cursor: pointer; }
.form-section-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 8px; }
.form-signature-list { display: grid; gap: 8px; padding: 13px 18px 4px; }
.form-signature-list article { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 80px; padding: 9px 34px 9px 11px; border: 1px solid var(--border); background: #fff; }
.form-signature-script { color: #30466b; font-family: "Brush Script MT", cursive; font-size: 27px; font-style: italic; text-align: center; transform: rotate(-4deg); }
.form-signature-list p { display: grid; gap: 4px; margin: 0; }
.form-signature-list p strong { font-size: 9px; }
.form-signature-list p span, .form-signature-list p small { color: var(--muted); font-size: 7px; }
.form-signature-list article > button { position: absolute; top: 6px; right: 6px; width: 23px; height: 23px; padding: 0; border: 0; background: transparent; color: #b74742; cursor: pointer; }
.form-signature-actions { display: flex; gap: 6px; padding: 9px 18px 15px; }
.form-signature-actions button { min-height: 29px; font-size: 8px; }
.form-links-section > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 12px 18px 15px; }
.form-links-section button { display: grid; gap: 3px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 2px; background: #f8f9fa; cursor: pointer; text-align: left; }
.form-links-section button:hover { border-color: #98acd8; background: #f1f4fb; }
.form-links-section span { color: var(--muted); font-size: 7px; }
.form-links-section strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.form-attributes-pane { min-height: 0; overflow: auto; border-left: 1px solid var(--border); background: #fff; }
.form-attributes-pane section { display: grid; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--border); }
.form-attributes-pane h3 { margin: 0 0 2px; color: #575d63; font-size: 9px; text-transform: uppercase; }
.form-attributes-pane label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.form-attributes-pane input, .form-attributes-pane select, .form-attributes-pane textarea { width: 100%; min-width: 0; padding: 6px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; resize: vertical; }
.form-attributes-pane input, .form-attributes-pane select { height: 32px; }
.form-attributes-pane :disabled { border-color: #e1e3e6; background: #f6f7f8; color: #555b61; opacity: 1; }
.form-attributes-pane dl { display: grid; gap: 8px; margin: 0; }
.form-attributes-pane dl > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 7px; font-size: 8px; }
.form-attributes-pane dt { color: var(--muted); }
.form-attributes-pane dd { margin: 0; overflow-wrap: anywhere; }
.form-attributes-pane footer { padding: 13px 16px; }
.form-attributes-pane footer .primary-button { width: 100%; }
.form-readonly-note { margin: 13px 16px; padding: 9px; background: #f3f5f7; color: var(--muted); font-size: 8px; line-height: 1.4; }

#form-photo-modal { z-index: 112; }
.form-photo-dialog { width: min(620px, calc(100vw - 40px)); }
.form-photo-form { display: flex; max-height: min(650px, calc(100dvh - 120px)); flex-direction: column; }
.form-photo-options { display: grid; min-height: 220px; overflow: auto; padding: 7px 14px; }
.form-photo-options label { display: grid; grid-template-columns: 18px 72px minmax(0, 1fr); align-items: center; gap: 9px; min-height: 68px; padding: 7px 3px; border-bottom: 1px solid var(--border); cursor: pointer; }
.form-photo-options input { accent-color: var(--blue); }
.form-photo-options label > div { width: 70px; aspect-ratio: 4/3; overflow: hidden; background: #ddd; }
.form-photo-options label > div > * { width: 100%; height: 100%; object-fit: cover; }
.form-photo-options label > span { display: grid; min-width: 0; gap: 4px; }
.form-photo-options strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.form-photo-options small { color: var(--muted); font-size: 7px; }
.form-photo-form .dialog-actions { padding: 10px 14px; border-top: 1px solid var(--border); }
.form-delete-dialog { width: min(410px, calc(100vw - 40px)); }
.form-delete-dialog > p { margin: 0; padding: 18px 16px 8px; color: #555b61; font-size: 10px; line-height: 1.5; }
.form-delete-dialog > .dialog-actions { padding: 10px 16px 16px; }

/* Project Files workspace: folder tree, sortable document register and PDF tools. */
.files-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.files-workspace[hidden] { display: none; }
.files-toolbar { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.files-heading { display: flex; flex: 0 0 auto; align-items: baseline; gap: 9px; }
.files-heading h1 { margin: 0; font-size: 18px; font-weight: 600; }
.files-heading span { color: var(--muted); font-size: 9px; }
.files-toolbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.file-search { width: 260px; }
.file-actions-wrap { position: relative; }
.file-actions-button.has-selection { border-color: #7e9bdd; background: #edf1fb; color: var(--blue); }
.file-actions-button:disabled { opacity: .46; cursor: default; }
.file-actions-menu { position: absolute; z-index: 65; top: calc(100% + 5px); right: 0; min-width: 170px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.file-actions-menu[hidden] { display: none; }
.file-actions-menu button { display: block; width: 100%; min-height: 34px; padding: 8px 12px; border: 0; background: #fff; color: #4f555b; cursor: pointer; font-size: 9px; text-align: left; }
.file-actions-menu button:hover { background: #f1f3f7; }
.file-actions-menu button.is-danger { color: #bd3f3b; }
.file-actions-menu > div { height: 1px; margin: 4px 0; background: var(--border); }
.file-mobile-scopes { display: none; }
.file-filter-panel { position: absolute; z-index: 60; top: 57px; right: 265px; width: 334px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.file-filter-panel[hidden] { display: none; }
.file-filter-panel > header { display: flex; height: 42px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.file-filter-panel > header strong { font-size: 11px; }
.file-filter-panel > header button { width: 25px; height: 25px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 17px; }
.file-filter-panel form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.file-filter-panel form > label, .file-filter-panel fieldset label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.file-filter-panel .file-filter-wide, .file-filter-panel fieldset, .file-filter-panel .clear-filter-button { grid-column: 1 / -1; }
.file-filter-panel select, .file-filter-panel input { width: 100%; height: 31px; min-width: 0; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.file-filter-panel fieldset { margin: 0; padding: 8px; border: 1px solid var(--border); }
.file-filter-panel legend { padding: 0 4px; color: var(--muted); font-size: 8px; }
.file-filter-panel fieldset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.file-bulk-bar { display: flex; min-height: 38px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 6px 18px; border-bottom: 1px solid #b9c8eb; background: #e8edfa; color: #284f9f; }
.file-bulk-bar[hidden] { display: none; }
.file-bulk-bar strong { font-size: 9px; }
.file-bulk-bar button { min-height: 27px; padding: 4px 8px; border: 1px solid #a6b7df; border-radius: 2px; background: #fff; color: #3156a2; cursor: pointer; font-size: 8px; }
.files-content { min-width: 0; min-height: 0; flex: 1; overflow: auto; padding: 16px 18px 28px; }
.file-content-header { display: flex; min-height: 48px; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 3px 0 10px; border-bottom: 1px solid #cbd0d5; }
.file-breadcrumbs { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 5px; }
.file-breadcrumbs button { max-width: 240px; overflow: hidden; padding: 5px 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-breadcrumbs button[aria-current="page"] { color: #3f454b; cursor: default; }
.file-breadcrumbs span { color: #92979c; font-size: 13px; }
.file-content-header p { flex: 0 0 auto; margin: 7px 0 0; color: var(--muted); font-size: 8px; }
.file-table-wrap { position: relative; min-width: 760px; margin-top: 10px; border: 1px solid #c4c9ce; background: #fff; }
.file-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-table th, .file-table td { height: 52px; padding: 8px 11px; border-bottom: 1px solid #e0e3e6; color: #555b61; font-size: 9px; text-align: left; vertical-align: middle; }
.file-table th { height: 36px; background: #f5f6f7; color: #676d73; font-size: 8px; font-weight: 600; }
.file-table tbody tr:last-child td { border-bottom: 0; }
.file-table tbody tr:hover td { background: #f8f9fb; }
.file-table th > button { padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: 600; }
.file-table th:nth-child(2) { width: 150px; }
.file-table th:nth-child(4) { width: 112px; }
.file-table th:nth-child(5) { width: 145px; }
.file-table th:nth-child(6) { width: 70px; }
.file-check-cell { width: 42px; text-align: center !important; }
.file-check-cell input { width: 14px; height: 14px; accent-color: var(--blue); }
.file-row-actions-cell { position: relative; width: 48px; padding-inline: 6px !important; text-align: center !important; }
.file-folder-row td { background: #fcfcfd; }
.file-folder-type-icon { display: inline-grid; width: 26px; height: 22px; margin-right: 7px; place-items: center; border-radius: 2px; background: #e9edf5; color: #5577bd; font-size: 14px; }
.file-type-cell { display: inline-flex; align-items: center; gap: 8px; }
.file-type-icon { display: grid; position: relative; width: 27px; height: 33px; flex: 0 0 auto; place-items: end center; padding-bottom: 5px; border: 1px solid #aeb4ba; border-radius: 1px; background: #f4f5f6; color: #697178; }
.file-type-icon::after { position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; border-bottom: 1px solid #aeb4ba; border-left: 1px solid #aeb4ba; background: #fff; content: ""; }
.file-type-icon b { font-size: 5px; letter-spacing: .2px; }
.file-type-icon.is-pdf { border-color: #d56b68; background: #fff4f3; color: #b8403d; }
.file-type-icon.is-pdf::after { border-color: #d56b68; }
.file-type-icon.is-word { border-color: #6382c7; background: #f1f5ff; color: #315aa9; }
.file-type-icon.is-sheet { border-color: #67a170; background: #f1f8f2; color: #3e8249; }
.file-type-icon.is-cad { border-color: #8e72b1; background: #f6f1fb; color: #70509a; }
.file-type-icon.is-video { border-color: #cf8a45; background: #fff7ee; color: #a76729; }
.file-name-open { display: grid; width: 100%; min-width: 0; gap: 3px; padding: 0; overflow: hidden; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.file-name-open strong { overflow: hidden; color: #344873; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-folder-row .file-name-open strong { color: #41474d; font-size: 10px; }
.file-name-open small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.file-mobile-meta { display: none; }
.file-item-row.is-selected td { background: #f1f4fb; }
.file-link-count { display: grid; min-width: 25px; height: 25px; place-items: center; padding: 0; border: 1px solid #9db0dc; border-radius: 13px; background: #f3f6fd; color: var(--blue); cursor: pointer; font-size: 8px; }
.file-row-menu-button { width: 28px; height: 27px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #6f757b; cursor: pointer; font-size: 11px; }
.file-row-menu-button:hover { background: #eef1f5; color: var(--blue); }
.file-row-menu { position: absolute; z-index: 25; top: 40px; right: 7px; display: grid; min-width: 145px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); text-align: left; }
.file-row-menu button { min-height: 32px; padding: 7px 10px; border: 0; border-bottom: 1px solid #eceef0; background: #fff; color: #50565c; cursor: pointer; font-size: 8px; text-align: left; }
.file-row-menu button:last-child { border-bottom: 0; }
.file-row-menu button:hover { background: #f2f4f7; }
.file-row-menu button.is-danger { color: #b83c38; }
.file-empty { display: grid; min-height: 310px; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.file-empty div { font-size: 32px; }
.file-empty strong { color: #565c62; font-size: 12px; }
.file-empty p { margin: 0; font-size: 9px; }

.file-folder-dialog { width: min(430px, calc(100vw - 40px)); }
.file-folder-form, .file-move-form, .file-tags-form { display: grid; gap: 12px; padding: 16px; }
.file-folder-form label, .file-move-form label, .file-tags-form label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.file-folder-form input, .file-move-form select, .file-tags-form input { width: 100%; height: 34px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 10px; }
.file-folder-form > p, .file-move-form > p, .file-tags-form > p { margin: 0; color: var(--muted); font-size: 8px; }
.file-upload-dialog { width: min(620px, calc(100vw - 40px)); }
.file-upload-form { display: grid; gap: 11px; padding: 15px; }
.file-drop-zone { display: grid; position: relative; min-height: 150px; place-items: center; align-content: center; gap: 6px; border: 1px dashed #98a3b0; background: #f7f8fa; color: #59616a; cursor: pointer; text-align: center; }
.file-drop-zone:hover { border-color: var(--blue); background: #f2f5fc; }
.file-upload-icon { font-size: 26px; color: var(--blue); }
.file-drop-zone strong { font-size: 11px; }
.file-drop-zone small { color: var(--muted); font-size: 8px; }
.file-drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-upload-pending { display: grid; max-height: 150px; overflow: auto; border: 1px solid var(--border); }
.file-upload-pending > p { margin: 0; padding: 14px; color: var(--muted); font-size: 8px; text-align: center; }
.file-upload-pending article { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.file-upload-pending article:last-child { border-bottom: 0; }
.file-upload-pending article .file-type-icon { scale: .82; }
.file-upload-pending article div { display: grid; min-width: 0; gap: 3px; }
.file-upload-pending article strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.file-upload-pending article small { color: var(--muted); font-size: 7px; }
.file-more-upload { border: 1px solid var(--border); }
.file-more-upload summary { padding: 9px 10px; color: #4e5e7c; cursor: pointer; font-size: 9px; }
.file-more-upload > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 10px 10px; }
.file-more-upload label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.file-more-upload input { width: 100%; height: 32px; min-width: 0; padding: 5px 7px; border: 1px solid var(--border); font-size: 9px; }
.file-upload-location { margin: 0; color: var(--muted); font-size: 8px; }
.file-move-dialog, .file-tags-dialog { width: min(510px, calc(100vw - 40px)); }
.file-current-tags { display: flex; min-height: 34px; flex-wrap: wrap; align-items: center; gap: 5px; }
.file-current-tags > span { color: var(--muted); font-size: 8px; }
.file-current-tags button { min-height: 25px; padding: 4px 7px; border: 1px solid #b9c4dd; border-radius: 2px; background: #f3f6fc; color: #4e6495; cursor: pointer; font-size: 8px; }
.file-current-tags button span { color: #9c4945; }
.file-delete-dialog { width: min(420px, calc(100vw - 40px)); }
.file-delete-dialog > p { margin: 0; padding: 18px 16px 8px; color: #555b61; font-size: 10px; line-height: 1.5; }
.file-delete-dialog > .dialog-actions { padding: 10px 16px 16px; }
.file-links-dialog { width: min(580px, calc(100vw - 40px)); }
.file-links-list { display: grid; max-height: 480px; overflow: auto; padding: 8px 14px 14px; }
.file-links-list > button { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 8px 4px; border: 0; border-bottom: 1px solid var(--border); background: #fff; color: #4d5359; cursor: pointer; text-align: left; }
.file-links-list > button:hover { background: #f6f8fc; }
.file-plan-number { display: grid; height: 35px; place-items: center; border: 1px solid #a9b7d5; background: #f1f4fa; color: #405a92; font-size: 9px; font-weight: 700; }
.file-links-list > button > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.file-links-list strong { font-size: 9px; }
.file-links-list small { color: var(--muted); font-size: 7px; }
.file-links-list b { color: var(--blue); font-size: 8px; }

.file-viewer-modal { position: fixed; z-index: 108; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(20,22,24,.72); }
.file-viewer-modal[hidden] { display: none; }
.file-viewer-dialog { display: flex; width: min(1240px, calc(100vw - 36px)); height: min(850px, calc(100dvh - 36px)); flex-direction: column; overflow: hidden; border: 1px solid #7e848a; border-radius: 3px; background: #fff; box-shadow: 0 18px 56px rgba(0,0,0,.42); }
.file-viewer-dialog.is-fullscreen { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
.file-viewer-header { display: grid; min-height: 55px; flex: 0 0 auto; grid-template-columns: minmax(190px, 1fr) auto minmax(300px, 1fr); align-items: center; gap: 10px; padding: 7px 9px 7px 14px; border-bottom: 1px solid var(--border); background: #fff; }
.file-viewer-name { display: grid; min-width: 0; gap: 2px; }
.file-viewer-name span { color: var(--muted); font-size: 7px; }
.file-viewer-name strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-viewer-modes { display: flex; height: 34px; align-items: stretch; border: 1px solid var(--border); }
.file-viewer-modes button { min-width: 68px; padding: 4px 9px; border: 0; border-right: 1px solid var(--border); background: #fff; color: #5b6167; cursor: pointer; font-size: 8px; }
.file-viewer-modes button:last-child { border-right: 0; }
.file-viewer-modes button.is-active { background: #e9eef9; color: var(--blue); font-weight: 600; }
.file-viewer-modes button:disabled { opacity: .42; cursor: default; }
.file-viewer-tools { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 3px; }
.file-viewer-tools button { min-width: 29px; height: 30px; padding: 0 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #555b61; cursor: pointer; font-size: 8px; }
.file-viewer-tools span { min-width: 34px; color: var(--muted); font-size: 8px; text-align: center; }
.file-viewer-tools .file-viewer-close { min-width: 28px; padding: 0; border: 0; font-size: 20px; }
.file-viewer-subtools { display: flex; min-height: 39px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 4px; padding: 4px 10px; border-bottom: 1px solid var(--border); background: #f6f7f8; }
.file-viewer-subtools[hidden] { display: none; }
.file-viewer-subtools button { min-height: 29px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #555c62; cursor: pointer; font-size: 8px; }
.file-viewer-subtools button:hover { border-color: #8fa5d5; color: var(--blue); }
.file-viewer-subtools .file-sign-tool { border-color: var(--blue); background: var(--blue); color: #fff; }
.file-viewer-body { display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: 142px minmax(0, 1fr) 240px; }
.file-page-sidebar { min-height: 0; overflow: hidden; border-right: 1px solid #484d51; background: #2e3235; color: #fff; }
.file-page-sidebar > header { display: flex; height: 36px; border-bottom: 1px solid #454a4e; }
.file-page-sidebar > header button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #aeb4b9; cursor: pointer; font-size: 7px; }
.file-page-sidebar > header button.is-active { border-bottom-color: #6d93ec; color: #fff; }
.file-page-sidebar > div { display: grid; max-height: calc(100% - 36px); overflow: auto; padding: 8px; }
.file-page-thumb { display: grid; grid-template-columns: minmax(0, 1fr) 15px; align-items: end; gap: 4px; margin-bottom: 8px; padding: 5px; border: 1px solid transparent; background: transparent; color: #cbd0d4; cursor: pointer; }
.file-page-thumb.is-active { border-color: #6d93ec; background: #3d4348; }
.file-page-thumb > span { display: grid; height: 86px; align-content: start; gap: 8px; padding: 14px 8px; background: #fff; }
.file-page-thumb i { height: 3px; background: #d6d9dc; }
.file-page-thumb i:first-child { width: 70%; height: 6px; background: #a9b2bf; }
.file-page-thumb b { font-size: 7px; }
.file-bookmark { min-height: 32px; padding: 6px 7px; overflow: hidden; border: 0; border-left: 2px solid transparent; background: transparent; color: #c4c9cd; cursor: pointer; font-size: 7px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.file-bookmark.is-active { border-left-color: #6d93ec; background: #3b4044; color: #fff; }
.file-document-stage { min-width: 0; min-height: 0; overflow: auto; padding: 22px 24px 46px; background: #575b5e; }
.file-stored-document { display: block; width: min(100%, 920px); height: calc(100% - 4px); min-height: 760px; margin: 0 auto; border: 0; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.28); }
.file-native-preview { display: grid; min-height: 100%; grid-template-rows: auto minmax(0, 1fr); }
.file-native-preview > p { min-height: 0; margin: 0 auto 8px; color: #f2f4f6; font-size: 8px; text-align: center; }
.file-native-preview > p:empty { display: none; }
.file-derived-document-page { position: relative; width: var(--file-derived-page-width, 920px); min-width: 320px; min-height: 460px; margin: 0 auto; border: 0; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.28); }
.file-derived-document-page > img { display: block; width: 100%; height: auto; min-height: 460px; object-fit: contain; background: linear-gradient(110deg, #f7f8f9 25%, #fff 38%, #f7f8f9 52%); background-size: 220% 100%; }
.file-pdf-page-shell { width: 660px; min-height: 850px; margin: 0 auto; zoom: var(--file-pdf-zoom, 1); }
.file-pdf-page { position: relative; min-height: 850px; overflow: hidden; border: 1px solid #c9c9c9; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.35); color: #333a40; }
.file-pdf-page > header { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 28px; border-top: 7px solid #315fbd; border-bottom: 1px solid #cdd1d5; }
.file-pdf-brand { display: flex; align-items: center; gap: 10px; }
.file-pdf-brand > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--yellow); color: #303337; font-size: 10px; font-weight: 800; }
.file-pdf-brand p { display: grid; gap: 3px; margin: 0; }
.file-pdf-brand strong { font-size: 11px; }
.file-pdf-brand small { color: #788087; font-size: 6px; letter-spacing: .8px; }
.file-pdf-reference { display: grid; gap: 4px; text-align: right; }
.file-pdf-reference span { color: #3058aa; font-size: 9px; font-weight: 700; }
.file-pdf-reference b { color: #747b82; font-size: 7px; font-weight: 500; }
.file-pdf-title { padding: 27px 30px 21px; border-bottom: 1px solid #d7dade; }
.file-pdf-title > span { color: #315fbd; font-size: 7px; font-weight: 700; letter-spacing: 1px; }
.file-pdf-title h1 { margin: 7px 0 5px; font-size: 24px; font-weight: 500; letter-spacing: .5px; }
.file-pdf-title p { margin: 0; color: #6e757b; font-size: 9px; }
.file-pdf-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid #d7dade; background: #f4f6f8; }
.file-pdf-meta > div { display: grid; gap: 5px; padding: 12px 15px; border-right: 1px solid #d7dade; }
.file-pdf-meta > div:last-child { border-right: 0; }
.file-pdf-meta dt { color: #81878d; font-size: 6px; text-transform: uppercase; }
.file-pdf-meta dd { margin: 0; font-size: 8px; }
.file-pdf-summary, .file-pdf-section { margin: 0 30px; padding: 19px 0; border-bottom: 1px solid #e0e3e6; }
.file-pdf-summary h2, .file-pdf-section h2 { margin: 0 0 8px; color: #315fbd; font-size: 10px; }
.file-pdf-summary p, .file-pdf-section p { margin: 0; color: #50575d; font-size: 9px; line-height: 1.75; }
.file-pdf-table { width: calc(100% - 60px); margin: 19px 30px 64px; border-collapse: collapse; table-layout: fixed; }
.file-pdf-table th, .file-pdf-table td { height: 34px; padding: 7px 9px; border: 1px solid #cfd3d6; color: #555c62; font-size: 7px; text-align: left; }
.file-pdf-table th { background: #edf1f6; color: #3e527a; font-weight: 700; }
.file-pdf-page > footer { position: absolute; right: 30px; bottom: 20px; left: 30px; display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid #d5d8db; color: #7a8086; font-size: 6px; }
.file-pdf-markup-layer { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.file-pdf-markup { position: absolute; }
.file-pdf-markup.is-signature { min-width: 110px; color: #1f447f; font-family: "Brush Script MT", cursive; font-size: 27px; font-style: italic; transform: rotate(-5deg); }
.file-pdf-markup.is-text { padding: 5px 7px; border: 1px solid #d34b46; background: rgba(255,255,255,.86); color: #bc342f; font-size: 9px; }
.file-pdf-markup.is-highlight { width: 180px; height: 18px; background: rgba(255,221,73,.52); }
.file-pdf-markup.is-underline { width: 160px; height: 2px; border-bottom: 3px solid #d34b46; }
.file-pdf-markup.is-rectangle { width: 170px; height: 74px; border: 3px solid #d34b46; }
.file-pdf-markup.is-cloud { width: 170px; height: 74px; border: 4px dashed #d34b46; border-radius: 28px; }
.file-pdf-markup.is-arrow { color: #d34b46; font-size: 52px; line-height: 1; transform: rotate(-18deg); }
.file-pdf-markup.is-pen { width: 120px; height: 42px; overflow: visible; }
.file-pdf-markup.is-pen path { fill: none; stroke: #d34b46; stroke-linecap: round; stroke-width: 4; }
.file-comments-sidebar { min-height: 0; overflow: auto; border-left: 1px solid var(--border); background: #fff; }
.file-comments-sidebar > header { display: flex; min-height: 39px; align-items: center; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--border); background: #f7f8f9; }
.file-comments-sidebar > header strong { font-size: 8px; }
.file-comments-sidebar > header span { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 10px; background: #dfe3e8; color: #636a70; font-size: 7px; }
.file-comments-sidebar > div { display: grid; }
.file-comments-sidebar > div > p { margin: 0; padding: 18px 12px; color: var(--muted); font-size: 8px; text-align: center; }
.file-comments-sidebar article { display: grid; position: relative; gap: 4px; padding: 11px 34px 11px 12px; border-bottom: 1px solid var(--border); }
.file-comments-sidebar article > span { color: #315fbd; font-size: 7px; font-weight: 600; }
.file-comments-sidebar article strong { font-size: 8px; }
.file-comments-sidebar article small { color: var(--muted); font-size: 6px; }
.file-comments-sidebar article button { position: absolute; top: 8px; right: 8px; width: 21px; height: 21px; border: 0; background: transparent; color: #b3423d; cursor: pointer; }
.file-viewer-footer { display: flex; min-height: 42px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; border-top: 1px solid var(--border); background: #fff; }
.file-viewer-footer > span { color: var(--muted); font-size: 8px; }
.file-viewer-footer > div { display: flex; gap: 5px; }
.file-viewer-footer button { min-height: 29px; padding: 5px 9px; font-size: 8px; }
.file-viewer-footer button[hidden] { display: none; }
.file-viewer-footer #file-viewer-discard { border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #60666c; cursor: pointer; }
.file-preview-unavailable { display: grid; min-height: 100%; place-items: center; align-content: center; gap: 11px; padding: 30px; color: #e8eaec; text-align: center; }
.file-preview-unavailable .file-type-icon { width: 58px; height: 71px; scale: 1.25; background: #fff; }
.file-preview-unavailable h2 { max-width: 520px; margin: 7px 0 0; font-size: 17px; }
.file-preview-unavailable p { max-width: 480px; margin: 0; color: #c4c9cd; font-size: 9px; line-height: 1.6; }
.file-preview-unavailable button { min-height: 32px; margin-top: 6px; }
.file-unavailable-meta { display: grid; gap: 10px; margin: 0; padding: 14px; }
.file-unavailable-meta > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 7px; font-size: 8px; }
.file-unavailable-meta dt { color: var(--muted); }
.file-unavailable-meta dd { margin: 0; overflow-wrap: anywhere; }
.form-file-attachment-preview, .form-file-option { display: grid; place-items: center; background: #eef0f3; }
.form-file-attachment-preview .file-type-icon { scale: 1.45; }
.form-file-option .file-type-icon { scale: 1.15; }

.attachment-card > button { display: block; width: 100%; padding: 0; border: 0; background: #fff; color: inherit; cursor: pointer; text-align: left; }
.markup-toolbar, .view-controls {
  position: absolute;
  z-index: 10;
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 2px;
  background: #343638;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.markup-toolbar { top: 18px; left: 12px; }
.view-controls { top: 18px; right: 12px; }
.markup-toolbar button, .view-controls button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.11);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
}
.markup-toolbar button:hover, .view-controls button:hover, .markup-toolbar button.is-active, .view-controls button[aria-expanded="true"] { background: #4a4d50; }
.markup-toolbar button:disabled { color: #767a7e; cursor: default; }
.tool-divider { height: 5px; border-top: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(0,0,0,.28); background: #2b2d2f; }
.color-swatch { display: block; width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; background: #e43f3d; }
.discipline-overlay, .pin-layer, .markup-layer, .search-highlight-layer, .plan-auto-link-layer { position: absolute; inset: 0; }
.discipline-overlay { z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pin-layer { pointer-events: none; }
.pin-layer[hidden] { display: none; }
.markup-layer { z-index: 3; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.markup-layer.is-selecting [data-markup-id] { cursor: move; pointer-events: all; }
.plan-markup { transition: filter .12s, opacity .12s; }
.plan-markup.is-draft { opacity: .7; }
.plan-markup.is-selected { filter: drop-shadow(0 0 5px rgba(36,85,207,.85)); }
.search-highlight-layer { z-index: 2; pointer-events: none; }
.search-highlight { position: absolute; border: 2px solid #e6a800; background: rgba(255,219,79,.33); box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset; }
.search-highlight.is-current { border-color: #ed7d2d; background: rgba(255,185,60,.4); }
.plan-auto-link-layer { z-index: 4; pointer-events: none; }
.plan-auto-link-layer[hidden] { display: none; }
.plan-auto-link {
  position: absolute;
  min-width: 42px;
  min-height: 23px;
  padding: 0;
  border: 2px solid #2672d9;
  border-radius: 2px;
  background: rgba(54,132,231,.12);
  box-shadow: 0 0 0 1px rgba(255,255,255,.72) inset;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-4px, -3px);
}
.plan-auto-link::after { position: absolute; top: -8px; right: -8px; display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid #fff; border-radius: 50%; background: #2672d9; color: #fff; content: "↗"; font-size: 9px; line-height: 1; }
.plan-auto-link:hover, .plan-auto-link:focus-visible { border-color: #105dc1; background: rgba(54,132,231,.25); outline: 2px solid rgba(38,114,217,.28); outline-offset: 2px; }
.task-pin {
  position: absolute;
  z-index: 4;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(22,26,30,.35);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%) rotate(-45deg);
  transition: box-shadow .12s, scale .12s;
}
.task-pin:hover, .task-pin.is-selected { z-index: 5; outline: 2px solid rgba(32,73,181,.45); box-shadow: 0 3px 9px rgba(22,26,30,.42); scale: 1.12; }
.task-pin.status-in_progress { background: #5b86df; }
.task-pin.status-completed, .task-pin.status-verified { background: var(--green); }
.task-pin.category-safety { background: var(--red); }
.task-pin.is-local::after { position: absolute; top: -5px; right: -5px; width: 7px; height: 7px; border: 1px solid #fff; border-radius: 50%; background: var(--yellow); content: ""; }
.draft-pin {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 5px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 7px rgba(0,0,0,.3);
  font-size: 18px;
  transform: translate(-50%, -50%) rotate(-45deg);
}
.draft-pin span, .draft-marker span { transform: rotate(45deg); }
.draft-pin[hidden] { display: none; }
.sheet-nav, .sheet-title-pill { position: absolute; z-index: 9; bottom: 8px; height: 29px; border-radius: 2px; background: rgba(48,50,52,.93); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.sheet-nav { left: 12px; display: flex; overflow: hidden; }
.sheet-nav button, .sheet-title-pill button { width: 29px; border: 0; border-right: 1px solid rgba(255,255,255,.15); background: transparent; color: #fff; cursor: pointer; }
.sheet-title-pill { left: 50%; display: flex; align-items: center; transform: translateX(-50%); }
.sheet-title-pill span { max-width: 260px; padding: 0 13px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-title-pill button { border-right: 0; border-left: 1px solid rgba(255,255,255,.15); }
.sheet-version-control { position: absolute; z-index: 12; right: 12px; bottom: 8px; }
.sheet-version-pill { display: inline-flex; height: 29px; align-items: center; gap: 8px; padding: 0 10px; border: 0; border-radius: 2px; background: rgba(48,50,52,.93); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; font-size: 9px; }
.sheet-version-menu { position: absolute; right: 0; bottom: 35px; display: grid; width: 205px; overflow: hidden; border: 1px solid #202326; border-radius: 2px; background: #353739; box-shadow: 0 8px 22px rgba(0,0,0,.32); }
.sheet-version-menu[hidden] { display: none; }
.sheet-version-option { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border: 0; border-bottom: 1px solid rgba(255,255,255,.12); background: transparent; color: #f3f4f5; text-align: left; cursor: pointer; }
.sheet-version-option:last-child { border-bottom: 0; }
.sheet-version-option:hover, .sheet-version-option.is-active { background: #4a4d50; }
.sheet-version-option span { display: grid; gap: 2px; font-size: 9px; }
.sheet-version-option strong { font-size: 10px; }
.sheet-version-option small { color: #c7cbd0; font-size: 8px; white-space: nowrap; }

.plan-tool-panel, .tool-choice-panel, .link-choice-panel {
  position: absolute;
  z-index: 16;
  overflow: hidden;
  border: 1px solid #222528;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23,27,31,.26);
}
.plan-tool-panel[hidden], .tool-choice-panel[hidden], .link-choice-panel[hidden] { display: none; }
.plan-tool-panel { top: 18px; right: 50px; width: 244px; }
.plan-tool-panel header, .link-choice-panel header { display: flex; min-height: 39px; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--border); background: #f7f8f9; }
.plan-tool-panel header strong, .link-choice-panel header strong { font-size: 10px; }
.plan-tool-panel header button, .link-choice-panel header button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: #6e7379; cursor: pointer; font-size: 17px; }
.text-search-panel > label { display: flex; align-items: center; gap: 7px; margin: 10px; padding: 6px 8px; border: 1px solid var(--border-strong); }
.text-search-panel > label input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 10px; }
.text-search-panel > p { margin: 0; padding: 0 10px 11px; color: var(--muted); font-size: 9px; }
.layer-panel { display: grid; }
.layer-panel > label { display: flex; min-height: 36px; align-items: center; gap: 8px; padding: 7px 11px; border-bottom: 1px solid var(--border); color: #51565c; font-size: 10px; }
.layer-panel > label > span { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 8px; }
.layer-panel > label small { color: #7a8086; font-size: 8px; font-weight: 400; white-space: nowrap; }
.layer-panel > label small[hidden] { display: none; }
.layer-panel input { accent-color: var(--blue); }
.layer-hide-all { min-height: 35px; margin: 9px 10px 10px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--blue); cursor: pointer; font-size: 9px; }
.view-controls button.has-hidden-layers::after { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border: 1px solid #343638; border-radius: 50%; background: var(--orange); content: ""; }
.view-controls button { position: relative; }
.tool-choice-panel { left: 50px; display: flex; gap: 5px; padding: 7px; }
.color-panel { top: 386px; }
.tool-choice-panel > button { display: grid; min-width: 28px; min-height: 28px; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.color-panel > button::before { width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; background: var(--choice); box-shadow: 0 0 0 1px #aeb3b8; content: ""; }
.symbol-panel { top: 250px; }
.symbol-panel > button { gap: 3px; padding: 3px 6px; }
.symbol-panel b { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: #4e77c5; color: #fff; font-size: 8px; }
.symbol-panel span { color: var(--muted); font-size: 7px; }
.link-choice-panel { top: 151px; left: 50px; display: grid; width: 245px; }
.link-choice-panel > button { display: grid; min-height: 47px; gap: 3px; padding: 8px 11px; border: 0; border-bottom: 1px solid var(--border); background: #fff; text-align: left; cursor: pointer; }
.link-choice-panel > button:hover { background: #f4f6f8; }
.link-choice-panel > button span { color: var(--subtle); font-size: 8px; }
.link-choice-panel > button strong { color: #4c5157; font-size: 10px; }
.link-choice-panel > button.link-new-rfi { background: #edf2fc; }
.link-choice-panel > button.link-new-rfi span, .link-choice-panel > button.link-new-rfi strong { color: #3159ad; }

/* Task modal: current Fieldwire pattern, with activity left and attributes right. */
.inspector {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  place-items: center;
  padding: 28px;
  overflow: auto;
  background: rgba(25,27,30,.48);
}
.inspector.is-open { display: grid; }
.inspector-empty { display: none; }
.inspector-panel {
  display: flex;
  width: min(920px, calc(100vw - 56px));
  max-height: min(720px, calc(100dvh - 56px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #aaaeb3;
  border-radius: 3px;
  background: #fff;
  box-shadow: var(--shadow);
}
.inspector-header {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 54px 13px 18px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.inspector-title-block { min-width: 0; }
.inspector-kicker { display: flex; gap: 9px; color: var(--subtle); font-size: 9px; }
.sync-state { display: inline-flex; align-items: center; gap: 4px; }
.sync-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.sync-state.is-local i { background: var(--orange); }
.inspector-header h2 { margin: 5px 0 0; font-size: 17px; font-weight: 500; line-height: 1.3; }
.inspector-close {
  display: grid;
  place-items: center;
  position: absolute;
  top: 12px;
  right: 14px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: #666b71;
  cursor: pointer;
  font-size: 18px;
}
.inspector-body { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) 310px; flex: 1; overflow: hidden; }
.inspector-feed { min-width: 0; overflow: auto; border-right: 1px solid var(--border); background: #f7f8f9; }
.inspector-attributes { min-width: 0; overflow: auto; background: #fff; }
.inspector-section { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.inspector-feed .inspector-section { background: #fff; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; color: #4a4e53; font-size: 11px; font-weight: 600; }
.section-title span { color: var(--subtle); font-size: 9px; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.field { display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
.field-help { color: #8a6d35; font-size: 7px; line-height: 1.4; }
.field input, .field select, .composer input {
  width: 100%;
  min-width: 0;
  height: 33px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}
.field input:focus, .field select:focus, .composer input:focus { border-color: #8ca6df; outline: 0; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.coordinate-readout { color: var(--subtle); font-family: ui-monospace, SFMono-Regular, monospace; font-size: 8px; }
.primary-button, .secondary-button, .danger-button, .text-button {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 10px;
}
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button { border: 1px solid var(--border); background: #fff; color: #555a60; }
.danger-button { border: 1px solid #e7b3b0; background: #fff; color: #b13c37; }
.text-button { border: 0; background: transparent; color: var(--blue); }
.checklist, .activity-list, .attachment-grid { display: grid; gap: 6px; }
.check-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.check-row input { margin: 1px 0 0; accent-color: var(--green); }
.check-row span { flex: 1; font-size: 11px; line-height: 1.35; }
.check-row.is-complete span { color: var(--subtle); text-decoration: line-through; }
.composer { display: flex; gap: 6px; margin-top: 8px; }
.composer input { flex: 1; }
.activity-item { position: relative; padding: 10px 10px 10px 28px; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.activity-item::before { position: absolute; top: 13px; left: 11px; width: 7px; height: 7px; border-radius: 50%; background: var(--selected); content: ""; }
.activity-item p { margin: 0; font-size: 11px; line-height: 1.45; }
.activity-item time { display: block; margin-top: 4px; color: var(--subtle); font-size: 8px; }
.inspector-feed .composer + .activity-list { margin-top: 10px; }
.attachment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.attachment-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.attachment-preview { display: grid; width: 100%; aspect-ratio: 4/3; place-items: center; overflow: hidden; background: #e9ebee; color: var(--muted); }
.attachment-preview img { width: 100%; height: 100%; object-fit: cover; }
.attachment-meta { padding: 6px; }
.attachment-meta strong { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-meta span { color: var(--subtle); font-size: 8px; }
.photo-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.upload-button { color: var(--blue); cursor: pointer; font-size: 9px; font-weight: 400; }
.inspector-footer { display: flex; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.task-context p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.draft-panel {
  width: min(500px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid #aaaeb3;
  border-radius: 3px;
  background: #fff;
  box-shadow: var(--shadow);
}
.draft-marker { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 5px; background: var(--orange); color: #fff; font-size: 18px; transform: rotate(-45deg); }
.draft-panel h2 { margin: 15px 0 5px; font-size: 17px; font-weight: 500; }
.draft-panel > p { margin: 0 0 17px; color: var(--muted); font-size: 10px; }
.draft-panel .field-grid { grid-template-columns: 1fr 1fr; }
.draft-panel .field-wide { grid-column: 1 / -1; }

.compact-modal { position: fixed; z-index: 102; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(25,27,30,.48); }
.compact-modal[hidden] { display: none; }
.compact-dialog { width: min(450px, calc(100vw - 40px)); overflow: hidden; border: 1px solid #aaaeb3; border-radius: 3px; background: #fff; box-shadow: var(--shadow); }
.text-dialog { width: min(390px, calc(100vw - 40px)); }
.plan-details-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.plan-details-form label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.plan-details-form label:nth-child(n+3), .text-dialog .plan-details-form label { grid-column: 1 / -1; }
.plan-details-form input, .plan-details-form textarea { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 11px; resize: vertical; }
.plan-details-form input { height: 34px; }
.dialog-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 6px; padding-top: 3px; }

/* Sheet Version Control mirrors the plan-level Fieldwire dialog. */
.version-modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 28px; background: rgba(25,27,30,.48); }
.version-modal[hidden] { display: none; }
.version-dialog { display: flex; width: min(620px, calc(100vw - 56px)); max-height: min(760px, calc(100dvh - 56px)); flex-direction: column; overflow: hidden; border: 1px solid #aeb2b7; border-radius: 3px; background: #fff; box-shadow: var(--shadow); }
.version-dialog-header { flex: 0 0 auto; }
.version-dialog-toolbar { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: #fafbfc; }
.version-dialog-toolbar[hidden] { display: none; }
.version-dialog-toolbar > span { color: var(--muted); font-size: 9px; line-height: 1.35; }
.new-version-button { display: inline-flex; min-height: 32px; flex: 0 0 auto; align-items: center; padding: 6px 11px; border: 1px solid var(--blue); border-radius: 2px; background: var(--blue); color: #fff; cursor: pointer; font-size: 10px; }
.new-version-button input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.version-list { min-height: 0; overflow: auto; padding: 0 16px 16px; }
.version-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.version-card:last-child { border-bottom: 0; }
.version-card.is-viewed .version-thumbnail { border-color: var(--selected); box-shadow: 0 0 0 2px rgba(109,147,236,.18); }
.version-thumbnail { position: relative; display: grid; height: 92px; align-content: center; gap: 8px; padding: 12px; overflow: hidden; border: 1px solid var(--border-strong); background: #f8f9fa; color: #767c82; }
.version-thumbnail::before, .version-thumbnail::after { position: absolute; border: 1px solid #adb3b8; content: ""; }
.version-thumbnail::before { inset: 10px 9px; }
.version-thumbnail::after { top: 25px; right: 25px; bottom: 20px; left: 22px; border-width: 2px; }
.version-thumbnail span { position: relative; z-index: 1; align-self: end; justify-self: end; padding: 2px 4px; background: #fff; font-size: 8px; font-weight: 700; }
.version-thumbnail i { position: relative; z-index: 1; display: block; width: 54%; height: 1px; background: #b7bdc2; }
.version-card-main { min-width: 0; }
.version-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.version-card-heading > div:first-child { display: grid; min-width: 0; gap: 3px; }
.version-card-heading strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.version-card-heading span { color: var(--blue); font-size: 9px; }
.version-order-controls { display: flex; gap: 4px; }
.version-order-controls button { display: grid; width: 27px; height: 27px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #5b6066; cursor: pointer; }
.version-order-controls button:disabled { opacity: .35; cursor: default; }
.version-upload-meta { margin: 5px 0 10px; color: var(--subtle); font-size: 8px; }
.version-card-actions { display: flex; gap: 6px; margin: 0 0 10px; }
.version-card-actions button { min-width: 68px; min-height: 31px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--ink); cursor: pointer; font-size: 9px; }
.version-card-actions button:last-child { border-color: var(--blue); color: var(--blue); }
.version-card-actions .version-delete-button { border-color: #d9aeb2; color: #c82736; }
.version-card-actions button:disabled { border-color: var(--border); color: var(--subtle); cursor: default; opacity: .55; }
.version-edit-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; align-items: end; }
.version-edit-form label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.version-edit-form input, .version-edit-form textarea { width: 100%; min-width: 0; padding: 6px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; resize: vertical; }
.version-edit-form input { height: 31px; }
.version-edit-form textarea { min-height: 31px; max-height: 76px; }
.version-edit-form .secondary-button { min-height: 31px; }
.version-delete-dialog { width: min(430px, calc(100vw - 40px)); }
.version-delete-summary { display: grid; gap: 8px; padding: 18px 18px 6px; }
.version-delete-summary strong { color: #34393f; font-size: 13px; line-height: 1.4; }
.version-delete-summary span { color: #697078; font-size: 10px; line-height: 1.6; }
.version-delete-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px 18px; }
.version-delete-actions button { min-height: 36px; }
@media (max-width: 760px) {
  .version-delete-actions button { min-height: 44px; }
}
.project-version-group { margin-top: 14px; border: 1px solid #d7dce0; border-radius: 3px; background: #fff; }
.project-version-group > header { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #e1e4e7; background: #f8f9fa; }
.project-version-group > header > div { display: grid; gap: 2px; }
.project-version-group > header strong { color: #343a40; font-size: 11px; }
.project-version-group > header span { color: #747b82; font-size: 9px; }
.project-version-group > header b { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 12px; background: #e8edf3; color: #4d5965; font-size: 9px; }
.project-version-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid #eceff1; }
.project-version-row:last-child { border-bottom: 0; }
.project-version-thumbnail { width: 70px; height: 48px; overflow: hidden; border: 1px solid #d5d9dd; background: #fff; }
.project-version-thumbnail svg { width: 100%; height: 100%; }
.project-version-row > div:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.project-version-row strong, .project-version-row span, .project-version-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-version-row strong { color: #353b41; font-size: 10px; }
.project-version-row span { color: #626a72; font-size: 9px; }
.project-version-row small { color: #858c93; font-size: 8px; }
.project-version-row > button { min-height: 32px; padding: 6px 10px; border: 1px solid #b8bec4; border-radius: 2px; background: #fff; color: #1769f6; cursor: pointer; font-size: 9px; }
.version-history-empty { display: grid; place-items: center; gap: 6px; min-height: 220px; color: #7b838a; text-align: center; }
.version-history-empty strong { color: #454c52; font-size: 13px; }
.version-history-empty span { font-size: 10px; }

/* Project People: Field Management roles, invites and the official permission matrix. */
.people-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.people-workspace[hidden] { display: none; }
.people-toolbar { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.people-heading { display: flex; min-width: 0; align-items: baseline; gap: 9px; }
.people-heading h1 { margin: 0; font-size: 18px; font-weight: 600; }
.people-heading span { color: var(--muted); font-size: 9px; }
.people-toolbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.people-search { width: 248px; }
.people-sort-control { display: inline-flex; height: 32px; align-items: center; gap: 6px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--muted); font-size: 8px; }
.people-sort-control select { min-width: 68px; border: 0; background: transparent; color: var(--ink); font-size: 9px; outline: 0; }
.people-bulk-bar { display: flex; min-height: 44px; flex: 0 0 auto; align-items: center; gap: 12px; padding: 7px 18px; border-bottom: 1px solid #bfcbe6; background: #e8eefc; color: #3d4f79; }
.people-bulk-bar[hidden] { display: none; }
.people-bulk-bar strong { margin-right: auto; font-size: 9px; }
.people-bulk-bar label { display: inline-flex; align-items: center; gap: 6px; font-size: 8px; }
.people-bulk-bar select { height: 28px; padding: 3px 6px; border: 1px solid #b4bfd8; border-radius: 2px; background: #fff; color: var(--ink); font-size: 8px; }
.people-bulk-bar button { min-height: 28px; padding: 4px 8px; border: 0; background: transparent; color: #445878; cursor: pointer; font-size: 8px; }
.people-bulk-bar .danger-text-button { color: #b63d39; }
.people-content { min-width: 0; min-height: 0; flex: 1; overflow: auto; padding: 17px 18px 30px; }
.people-table-wrap { min-width: 780px; overflow: visible; border: 1px solid var(--border); background: #fff; }
.people-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.people-table th, .people-table td { height: 47px; padding: 7px 10px; border-bottom: 1px solid #e1e3e6; color: #555c62; font-size: 9px; text-align: left; vertical-align: middle; }
.people-table th { height: 36px; background: #f6f7f8; color: #767c82; font-size: 8px; font-weight: 600; }
.people-table tr:last-child td { border-bottom: 0; }
.people-table tr:hover td { background: #fafbfc; }
.people-table .people-checkbox-column { width: 42px; padding-inline: 13px 5px; text-align: center; }
.people-table .people-user-column { width: 34%; }
.people-table .people-phone-column { width: 18%; }
.people-table .people-access-column { width: 160px; }
.people-table .people-account-column { width: 118px; }
.people-table .people-action-column { width: 54px; text-align: center; }
.people-user-cell { display: grid; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 9px; }
.people-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #647db7; color: #fff; font-size: 9px; font-weight: 700; }
.people-avatar.is-pending { background: #a5a9ae; }
.people-user-copy { display: grid; min-width: 0; gap: 2px; }
.people-user-copy strong, .people-user-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-user-copy strong { color: #343b42; font-size: 9px; }
.people-user-copy span { color: var(--muted); font-size: 8px; }
.people-invite-status { display: inline-flex; align-items: center; gap: 4px; margin-left: 5px; color: #9a712f; font-size: 7px; font-weight: 500; }
.people-invite-status::before { display: inline-grid; width: 12px; height: 12px; place-items: center; border: 1px solid #bd9144; border-radius: 50%; content: "◷"; font-size: 7px; }
.people-access-select { width: 100%; height: 30px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #3f464c; font-size: 8px; }
.people-access-select:disabled { border-color: transparent; background: transparent; color: #444b52; opacity: 1; }
.people-table tr.is-selected td { background: #eef3fc; }
.people-remove-row:disabled, .people-bulk-bar button:disabled, .people-toolbar button:disabled { opacity: .38; cursor: default; }
.people-account-status { display: inline-flex; align-items: center; gap: 5px; color: #626970; font-size: 8px; }
.people-account-status i { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: #6da55f; color: #fff; font-size: 8px; font-style: normal; }
.people-account-status.is-own i { background: #9ba1a7; }
.people-remove-row { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #8a9096; cursor: pointer; font-size: 15px; }
.people-remove-row:hover { background: #f7e9e8; color: #b63d39; }
.people-empty { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 6px; color: var(--muted); font-size: 9px; }
.people-empty strong { color: #4b5258; font-size: 12px; }
.people-invite-dialog { width: min(520px, calc(100vw - 40px)); }
.people-invite-form { display: grid; gap: 12px; padding: 15px; }
.people-invite-form > label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.people-invite-form textarea, .people-invite-form select { width: 100%; padding: 7px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; resize: vertical; }
.people-invite-form select { height: 34px; }
.people-invite-form small { color: var(--subtle); font-size: 7px; }
.people-role-help { min-height: 54px; padding: 9px 10px; border: 1px solid #d5dbe7; background: #f3f6fb; color: #566274; font-size: 8px; line-height: 1.55; }
.people-role-help strong { display: block; margin-bottom: 2px; color: #3f4f6d; font-size: 9px; }
.people-invite-note { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.people-permissions-dialog { display: flex; width: min(900px, calc(100vw - 40px)); max-height: min(760px, calc(100dvh - 40px)); flex-direction: column; }
.people-permissions-dialog .floating-panel-header > div { display: grid; gap: 2px; }
.people-permissions-dialog .floating-panel-header h2 { margin: 0; }
.people-permissions-dialog .floating-panel-header span { color: var(--muted); font-size: 7px; }
.people-permissions-content { min-height: 0; overflow: auto; padding: 14px 15px; }
.permission-matrix { width: 100%; border: 1px solid var(--border); border-collapse: collapse; table-layout: fixed; }
.permission-matrix th, .permission-matrix td { height: 34px; padding: 5px 9px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 8px; text-align: center; }
.permission-matrix th:first-child, .permission-matrix td:first-child { width: 48%; text-align: left; }
.permission-matrix th { background: #f2f4f6; color: #646b72; font-weight: 600; }
.permission-matrix tr:last-child td { border-bottom: 0; }
.permission-matrix th:last-child, .permission-matrix td:last-child { border-right: 0; }
.permission-section-row td { height: 29px; background: #f7f8f9; color: #46505a; font-weight: 700; }
.permission-fixed { color: #4c8d46; font-size: 12px; }
.permission-fixed.is-denied { color: #a8adb2; }
.permission-fixed.is-limited { color: #626a72; font-size: 7px; font-weight: 500; }
.permission-editable { display: inline-flex; align-items: center; gap: 5px; color: #495464; }
.permission-editable input { width: 14px; height: 14px; accent-color: var(--blue); }
.permission-editable input:disabled { opacity: .72; }
.permission-editable em { color: #7c838a; font-size: 7px; font-style: normal; }
.permission-folder-access { margin-top: 14px; border: 1px solid var(--border); }
.permission-folder-access > header { display: flex; min-height: 38px; align-items: center; justify-content: space-between; padding: 7px 10px; border-bottom: 1px solid var(--border); background: #f6f7f8; }
.permission-folder-access > header strong { font-size: 9px; }
.permission-folder-access > header span { color: var(--muted); font-size: 7px; }
.permission-folder-row { display: grid; min-height: 36px; grid-template-columns: minmax(0, 1fr) 25% 25%; align-items: center; border-bottom: 1px solid #e7e9eb; }
.permission-folder-row:last-child { border-bottom: 0; }
.permission-folder-row > span, .permission-folder-row > label { padding: 6px 10px; font-size: 8px; }
.permission-folder-row > label { display: flex; justify-content: center; border-left: 1px solid var(--border); }
.permission-folder-row input { width: 14px; height: 14px; accent-color: var(--blue); }
.permission-pm-section { margin-top: 14px; border: 1px solid var(--border); background: #fff; }
.permission-pm-section > header { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: #f6f7f8; }
.permission-pm-section > header strong { font-size: 9px; }
.permission-pm-section > header span { color: var(--muted); font-size: 7px; text-align: right; }
.permission-pm-matrix { border: 0; }
.permission-pm-matrix th:first-child, .permission-pm-matrix td:first-child { width: 56%; }
.people-permissions-footer { display: flex; min-height: 62px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 15px; border-top: 1px solid var(--border); background: #f8f9fa; }
.people-permissions-footer p { max-width: 560px; margin: 0; color: var(--muted); font-size: 7px; line-height: 1.45; }
.people-permissions-footer > div { display: flex; flex: 0 0 auto; gap: 7px; }
.people-remove-dialog { width: min(470px, calc(100vw - 40px)); }
.people-remove-dialog > p { margin: 0; padding: 18px 16px 8px; color: #555b61; font-size: 9px; line-height: 1.55; }
.people-remove-dialog > .dialog-actions { padding: 10px 16px 16px; }

/* Project Settings v0.29 — Fieldwire reference structure and density. */
.settings-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #f2f3f5; }
.settings-workspace[hidden], .settings-card[hidden], .settings-working-days[hidden] { display: none; }
.settings-content { min-height: 0; flex: 1; overflow: auto; padding: 18px 16px 44px; scrollbar-gutter: stable; }
.project-settings-form { position: relative; display: grid; width: min(1014px, 100%); grid-template-columns: minmax(510px, 2fr) minmax(288px, 1fr); align-items: start; gap: 16px; margin: 0 auto; }
.settings-column { display: grid; min-width: 0; align-content: start; gap: 15px; }
.settings-card { overflow: hidden; border: 1px solid #cfd2d6; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(38,43,48,.035); }
.settings-card > summary { display: flex; min-height: 53px; align-items: center; justify-content: space-between; gap: 15px; padding: 0 31px; border-bottom: 1px solid #d9dcdf; background: #fff; cursor: pointer; list-style: none; }
.settings-card:not([open]) > summary { border-bottom: 0; }
.settings-card > summary::-webkit-details-marker { display: none; }
.settings-card h2 { margin: 0; color: #3e4247; font-size: 13px; font-weight: 600; }
.settings-card-caret { position: relative; width: 12px; height: 12px; flex: 0 0 auto; transition: transform .14s ease; }
.settings-card-caret::before { position: absolute; top: 2px; left: 3px; width: 6px; height: 6px; border-right: 1.5px solid #33383d; border-bottom: 1.5px solid #33383d; content: ""; transform: rotate(45deg); }
.settings-card:not([open]) .settings-card-caret { transform: rotate(-90deg); }
.settings-card p { margin: 0; color: #565c62; font-size: 11px; line-height: 1.5; }
.settings-card-body { padding: 22px 31px 26px; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.settings-fields > label, .settings-storage-body > label { display: grid; min-width: 0; gap: 7px; color: #444a50; font-size: 11px; font-weight: 600; }
.settings-field-wide { grid-column: 1 / -1; }
.settings-fields input, .settings-fields select, .settings-storage-body select { width: 100%; height: 35px; min-width: 0; padding: 5px 10px; border: 1px solid #c6cacf; border-radius: 2px; background: #fff; color: #42474d; font-size: 11px; font-weight: 400; }
.settings-fields input::placeholder { color: #a6abb0; }
.settings-fields input:focus, .settings-fields select:focus, .settings-storage-body select:focus { border-color: #6698f5; box-shadow: 0 0 0 1px rgba(23,105,246,.16); outline: 0; }
.settings-map-placeholder { display: grid; min-height: 105px; place-items: center; align-content: center; gap: 7px; background: #a5a6a8; color: #fff; }
.settings-map-placeholder strong { font-size: 12px; font-weight: 600; }
.settings-map-pin { position: relative; width: 18px; height: 22px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.settings-map-pin::before { position: absolute; top: 4px; left: 4px; width: 4px; height: 4px; border: 2px solid #fff; border-radius: 50%; content: ""; }
.settings-map-pin::after { position: absolute; top: -8px; right: -8px; width: 11px; height: 3px; background: #fff; box-shadow: 4px 4px 0 -1px #fff; content: ""; transform: rotate(45deg); }
.settings-working-days { display: grid; gap: 8px; margin: 14px 0 0; padding: 12px; border: 1px solid #d8dbdf; }
.settings-working-days legend { padding: 0 5px; color: #555b61; font-size: 10px; font-weight: 600; }
.settings-working-days > div { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.settings-working-days label { position: relative; display: grid; height: 31px; place-items: center; overflow: hidden; border: 1px solid #c9cdd1; border-radius: 2px; background: #fff; color: #61676d; cursor: pointer; font-size: 9px; }
.settings-working-days input { position: absolute; opacity: 0; }
.settings-working-days label:has(input:checked) { border-color: #6c9bf2; background: #eaf2ff; color: #1769f6; font-weight: 600; }
.settings-working-days small { color: #858b91; font-size: 9px; line-height: 1.45; }
.settings-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 16px; padding: 27px 31px 22px; }
.settings-action-item { display: grid; min-width: 0; gap: 9px; }
.settings-action-item strong, .settings-project-actions > strong, .settings-subsection > strong { color: #44494f; font-size: 11px; font-weight: 600; }
.settings-action-item strong { display: flex; align-items: center; justify-content: space-between; }
.settings-action-item em, .settings-single-action em { color: #8c9196; font-size: 10px; font-style: normal; font-weight: 400; }
.settings-wide-button { width: 100%; min-height: 35px; padding: 7px 11px; border: 1px solid #c5c9cd; border-radius: 2px; background: #fff; color: #42474c; cursor: pointer; font-size: 11px; }
.settings-wide-button:hover { border-color: #9eabb9; background: #f8f9fa; }
.settings-subsection { display: grid; gap: 6px; padding: 0 31px 24px; }
.settings-toggle-row { display: flex; min-height: 61px; align-items: center; justify-content: space-between; gap: 22px; padding: 13px 31px; border-bottom: 1px solid #e0e2e5; color: #565c62; cursor: pointer; font-size: 11px; line-height: 1.45; }
.settings-toggle-row:last-child { border-bottom: 0; }
.settings-toggle-row > span { display: grid; min-width: 0; gap: 4px; }
.settings-toggle-row strong { color: #454a50; font-size: 11px; }
.settings-toggle-row small { max-width: 310px; color: #585e64; font-size: 11px; line-height: 1.45; }
.settings-toggle-row a { color: #1769f6; text-decoration: none; }
.settings-toggle-row input { position: absolute; opacity: 0; }
.settings-toggle-row i { position: relative; width: 30px; height: 18px; flex: 0 0 auto; border: 1px solid #c1c5ca; border-radius: 11px; background: #d5d7da; box-shadow: inset 0 1px 1px rgba(0,0,0,.08); transition: background .14s ease, border-color .14s ease; }
.settings-toggle-row i::after { position: absolute; top: 1px; left: 1px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.28); content: ""; transition: transform .14s ease; }
.settings-toggle-row input:checked + i { border-color: #1769f6; background: #1769f6; }
.settings-toggle-row input:checked + i::after { transform: translateX(12px); }
.settings-subsection .settings-toggle-row { min-height: 51px; padding: 5px 0 0; border: 0; }
.settings-toggle-description { min-height: 132px; align-items: center; }
.settings-single-action { display: grid; gap: 16px; padding: 31px; }
.settings-single-action .settings-wide-button { width: min(292px, 100%); }
.settings-project-actions { display: grid; gap: 13px; padding: 31px; }
.settings-availability-note { margin-top: -5px; color: #767d84; font-size: 10px; font-weight: 400; line-height: 1.45; }
.settings-project-actions > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-project-actions .danger-button { width: 100%; min-height: 35px; border-color: #db001b; border-radius: 2px; background: #db001b; color: #fff; font-size: 11px; }
.settings-project-actions .danger-button:hover { border-color: #bd0017; background: #bd0017; }
.settings-project-actions button:disabled, .settings-project-actions button:disabled:hover { border-color: #d2d5d8; background: #f3f4f5; color: #8b9197; cursor: not-allowed; opacity: 1; }
.settings-storage-body { display: grid; gap: 14px; padding: 27px 31px 31px; }
.settings-storage-body > p { margin-bottom: 2px; }
.settings-disabled-field > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.settings-disabled-field > span em { padding: 2px 6px; border-radius: 10px; background: #eef0f2; color: #777e85; font-size: 9px; font-style: normal; font-weight: 500; }
.settings-disabled-field select:disabled { border-color: #d8dade; background: #f2f3f4; color: #8a9096; cursor: not-allowed; opacity: 1; }
.settings-disabled-field > small { color: #7c8389; font-size: 9px; font-weight: 400; line-height: 1.4; }
.settings-integrations-body { display: grid; padding: 27px 31px 13px; }
.settings-integrations-body > p { margin-bottom: 14px; }
.settings-integrations-body > button { display: grid; min-height: 66px; grid-template-columns: 47px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 0; border: 0; border-bottom: 1px solid #e4e6e8; background: #fff; cursor: pointer; text-align: left; }
.settings-integrations-body > button:last-child { border-bottom: 0; }
.settings-integrations-body > button strong { color: #555b61; font-size: 11px; font-weight: 400; }
.settings-integrations-body > button em { color: #1769f6; font-size: 10px; font-style: normal; }
.settings-integrations-body > button:disabled { cursor: not-allowed; opacity: 1; }
.settings-integrations-body > button:disabled strong, .settings-integrations-body > button:disabled em { color: #8a9096; }
.settings-integration-logo { display: grid; width: 44px; height: 32px; place-items: center; color: #1686c7; font-size: 20px; font-weight: 700; letter-spacing: -.08em; }
.settings-integration-logo.is-dropbox { position: relative; }
.settings-integration-logo.is-dropbox::before { width: 25px; height: 25px; background: linear-gradient(45deg, transparent 30%, #1769f6 31% 68%, transparent 69%), linear-gradient(-45deg, transparent 30%, #1769f6 31% 68%, transparent 69%); content: ""; transform: rotate(45deg) scale(.72); }
.settings-integration-logo.is-onedrive::before { width: 32px; height: 16px; border-radius: 14px 14px 5px 5px; background: #1774d1; box-shadow: -8px 3px 0 -3px #1774d1; content: ""; }
.settings-autosave-status { position: fixed; z-index: 5; right: 20px; bottom: 13px; color: #8b9095; font-size: 9px; pointer-events: none; }
.rail-footer-button.is-active { border-radius: 50%; background: #1769f6; color: #fff; }
@media (max-width: 1080px) {
  .project-settings-form { grid-template-columns: minmax(0, 1fr); }
  .settings-side-column { grid-row: 2; }
  .settings-autosave-status { right: 12px; }
}
@media (max-width: 720px) {
  .settings-content { padding: 10px 9px 34px; }
  .settings-card > summary { min-height: 49px; padding: 0 17px; }
  .settings-card-body, .settings-action-grid, .settings-single-action, .settings-project-actions, .settings-storage-body, .settings-integrations-body { padding: 18px 17px; }
  .settings-fields, .settings-action-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-field-wide { grid-column: auto; }
  .settings-toggle-row { padding-inline: 17px; }
  .settings-subsection { padding: 0 17px 18px; }
  .settings-working-days > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings-project-actions > div { grid-template-columns: minmax(0, 1fr); }
  .settings-autosave-status { display: none; }
}
.settings-tags-dialog { display: flex; width: min(760px, calc(100vw - 40px)); height: min(680px, calc(100dvh - 40px)); flex-direction: column; }
.settings-tags-dialog .floating-panel-header > div { display: grid; gap: 2px; }
.settings-tags-dialog .floating-panel-header h2 { margin: 0; }
.settings-tags-dialog .floating-panel-header span { color: var(--muted); font-size: 7px; }
.settings-tags-toolbar { display: flex; min-height: 51px; flex: 0 0 auto; align-items: center; gap: 7px; padding: 9px 11px; border-bottom: 1px solid var(--border); background: #f8f9fa; }
.settings-tags-toolbar .library-search { width: min(310px, 48%); margin-right: auto; }
.settings-tags-toolbar > label:not(.library-search) { display: inline-flex; height: 32px; align-items: center; gap: 5px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--muted); font-size: 8px; }
.settings-tags-toolbar select { border: 0; background: transparent; color: var(--ink); font-size: 8px; outline: 0; }
.settings-tags-table-wrap { min-height: 0; flex: 1; overflow: auto; padding: 11px; background: #fff; }
.settings-tags-table { width: 100%; border: 1px solid var(--border); border-collapse: collapse; table-layout: fixed; }
.settings-tags-table th, .settings-tags-table td { height: 42px; padding: 7px 10px; border-bottom: 1px solid var(--border); color: #555c62; font-size: 9px; text-align: left; }
.settings-tags-table th { height: 34px; background: #f5f6f7; color: #747b81; font-size: 8px; font-weight: 600; }
.settings-tags-table tr:last-child td { border-bottom: 0; }
.settings-tags-table tbody tr:hover td { background: #fafbfc; }
.settings-tags-table .tag-count-column { width: 110px; text-align: right; }
.settings-tags-table .tag-action-column { width: 82px; text-align: right; }
.settings-tag-name { display: flex; min-width: 0; align-items: center; gap: 8px; }
.settings-tag-name i { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #758cc2; }
.settings-tag-name strong { overflow: hidden; color: #42494f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.settings-tag-action { position: relative; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #65717d; cursor: pointer; vertical-align: middle; }
.settings-tag-action:hover { background: #edf1f7; color: var(--blue); }
.settings-tag-action.is-edit::before { position: absolute; top: 12px; left: 7px; width: 13px; height: 3px; border: 1px solid currentColor; border-radius: 1px; content: ""; transform: rotate(-45deg); }
.settings-tag-action.is-edit::after { position: absolute; top: 17px; left: 5px; width: 0; height: 0; border-top: 2px solid transparent; border-right: 4px solid currentColor; border-bottom: 2px solid transparent; content: ""; transform: rotate(-45deg); }
.settings-tag-action.is-danger { color: #9b6562; }
.settings-tag-action.is-danger:hover { background: #f8eae9; color: #b63d39; }
.settings-tag-action.is-danger::before { position: absolute; top: 9px; left: 9px; width: 9px; height: 11px; border: 1.3px solid currentColor; border-top: 0; border-radius: 0 0 1px 1px; content: ""; }
.settings-tag-action.is-danger::after { position: absolute; top: 6px; left: 7px; width: 13px; height: 2px; border-top: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; content: ""; }
.settings-tags-empty { display: grid; min-height: 230px; place-items: center; align-content: center; gap: 5px; color: var(--muted); font-size: 8px; }
.settings-tags-empty strong { color: #4d545a; font-size: 11px; }
.settings-tags-footer { display: flex; min-height: 48px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--border); background: #f8f9fa; }
.settings-tags-footer span { color: var(--muted); font-size: 8px; }
.settings-tag-editor-dialog, .settings-tag-delete-dialog { width: min(470px, calc(100vw - 40px)); }
.settings-tag-editor-form { display: grid; gap: 12px; padding: 15px; }
.settings-tag-editor-form > label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.settings-tag-editor-form > label[hidden] { display: none; }
.settings-tag-editor-form input, .settings-tag-editor-form textarea { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; resize: vertical; }
.settings-tag-editor-form input { height: 34px; }
.settings-tag-editor-form small { color: var(--subtle); font-size: 7px; }
.settings-tag-delete-dialog > p { margin: 0; padding: 18px 16px 8px; color: #555b61; font-size: 9px; line-height: 1.55; }
.settings-tag-delete-dialog > .dialog-actions { padding: 10px 16px 16px; }
.settings-management-row { display: grid; min-height: 58px; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.settings-management-row:last-child { border-bottom: 0; }
.settings-management-row > div { display: grid; min-width: 0; gap: 3px; }
.settings-management-row > div strong { color: #4b5258; font-size: 9px; }
.settings-management-row > div span { color: var(--muted); font-size: 7px; }
.settings-management-row em { display: inline-grid; min-width: 28px; height: 22px; place-items: center; border-radius: 12px; background: #e7ebf4; color: #3b568f; font-size: 8px; font-style: normal; }
.settings-locations-dialog { display: flex; width: min(850px, calc(100vw - 40px)); height: min(720px, calc(100dvh - 40px)); flex-direction: column; }
.settings-locations-dialog .floating-panel-header > div { display: grid; gap: 2px; }
.settings-locations-dialog .floating-panel-header h2 { margin: 0; }
.settings-locations-dialog .floating-panel-header span { color: var(--muted); font-size: 7px; }
.settings-locations-toolbar { display: flex; min-height: 53px; flex: 0 0 auto; align-items: center; gap: 7px; padding: 9px 11px; border-bottom: 1px solid var(--border); background: #f8f9fa; }
.settings-locations-toolbar .library-search { width: min(315px, 42%); margin-right: auto; }
.settings-location-import-button { position: relative; display: inline-grid; min-height: 31px; place-items: center; overflow: hidden; cursor: pointer; }
.settings-location-import-button input { position: absolute; inset: 0; cursor: pointer; opacity: 0; }
.settings-location-import-preview { display: grid; gap: 7px; padding: 10px 12px; border-bottom: 1px solid #d9caa8; background: #fff9ec; color: #665c48; font-size: 8px; }
.settings-location-import-preview[hidden] { display: none; }
.settings-location-import-preview > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.settings-location-import-preview strong { color: #4d4638; font-size: 9px; }
.settings-location-import-preview ul { margin: 0; padding-left: 17px; line-height: 1.45; }
.settings-location-import-preview ul.is-error { color: #a5443f; }
.settings-location-import-actions { display: flex; justify-content: flex-end; gap: 7px; }
.settings-locations-tree { min-height: 0; flex: 1; overflow: auto; padding: 11px; background: #fff; }
.settings-location-tree-heading, .settings-location-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 112px; align-items: center; }
.settings-location-tree-heading { min-height: 34px; border: 1px solid var(--border); background: #f5f6f7; color: #747b81; font-size: 8px; font-weight: 600; }
.settings-location-tree-heading > span { padding: 7px 10px; }
.settings-location-tree-heading > span:nth-child(2) { text-align: center; }
.settings-location-row { min-height: 45px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.settings-location-row:hover { background: #fafbfc; }
.settings-location-main { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 6px 8px 6px calc(8px + (var(--location-depth) - 1) * 21px); }
.settings-location-main > span:last-child { display: grid; min-width: 0; gap: 2px; }
.settings-location-main strong, .settings-location-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-location-main strong { color: #42494f; font-size: 9px; }
.settings-location-main small { color: var(--muted); font-size: 6px; }
.settings-location-pin { flex: 0 0 auto; color: #6f87bd; font-size: 8px; }
.settings-location-disclosure, .settings-location-disclosure-spacer { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; }
.settings-location-disclosure { padding: 0; border: 0; background: transparent; color: #717980; cursor: pointer; font-size: 12px; transition: transform .12s; }
.settings-location-disclosure.is-collapsed { transform: rotate(-90deg); }
.settings-location-task-count { color: #596168; font-size: 9px; text-align: center; }
.settings-location-actions { display: flex; justify-content: flex-end; gap: 2px; padding-right: 8px; }
.settings-location-actions button { position: relative; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #65717d; cursor: pointer; font-size: 14px; }
.settings-location-actions button:hover { background: #edf1f7; color: var(--blue); }
.settings-location-actions button.is-edit::before { position: absolute; top: 12px; left: 7px; width: 13px; height: 3px; border: 1px solid currentColor; border-radius: 1px; content: ""; transform: rotate(-45deg); }
.settings-location-actions button.is-edit::after { position: absolute; top: 17px; left: 5px; width: 0; height: 0; border-top: 2px solid transparent; border-right: 4px solid currentColor; border-bottom: 2px solid transparent; content: ""; transform: rotate(-45deg); }
.settings-location-actions button.is-danger { color: #9b6562; }
.settings-location-actions button.is-danger:hover { background: #f8eae9; color: #b63d39; }
.settings-location-actions button.is-danger::before { position: absolute; top: 9px; left: 9px; width: 9px; height: 11px; border: 1.3px solid currentColor; border-top: 0; border-radius: 0 0 1px 1px; content: ""; }
.settings-location-actions button.is-danger::after { position: absolute; top: 6px; left: 7px; width: 13px; height: 2px; border-top: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; content: ""; }
.settings-location-editor-dialog, .settings-location-delete-dialog { width: min(480px, calc(100vw - 40px)); }
.settings-location-editor-dialog .floating-panel-header > div { display: grid; gap: 2px; }
.settings-location-editor-dialog .floating-panel-header span { color: var(--muted); font-size: 7px; }
.settings-location-editor-form { display: grid; gap: 12px; padding: 15px; }
.settings-location-editor-form > label { display: grid; gap: 5px; color: var(--muted); font-size: 8px; }
.settings-location-editor-form input { width: 100%; height: 34px; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.settings-location-delete-dialog > p { margin: 0; padding: 18px 16px 8px; color: #555b61; font-size: 9px; line-height: 1.55; }
.settings-location-delete-dialog > .dialog-actions { padding: 10px 16px 16px; }

/* 3D Models: federated IFC viewer, tiled library and object inspection. */
.models-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #e8eaed; }
.models-workspace[hidden] { display: none; }
.models-toolbar { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.models-heading { display: flex; min-width: 0; align-items: center; gap: 9px; }
.models-heading > div { display: flex; min-width: 0; align-items: baseline; gap: 9px; }
.models-heading h1 { margin: 0; font-size: 18px; font-weight: 600; }
.models-heading span { color: var(--muted); font-size: 9px; }
.model-back-to-plan { color: var(--blue); }
.model-back-to-plan[hidden] { display: none; }
#open-linked-model[hidden] { display: none; }
.models-toolbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.model-view-switch { display: inline-flex; height: 32px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; }
.model-view-switch button { min-width: 50px; padding: 5px 9px; border: 0; border-right: 1px solid var(--border); background: #fff; color: #646a70; cursor: pointer; font-size: 9px; }
.model-view-switch button:last-child { border-right: 0; }
.model-view-switch button.is-active { background: #e9eefb; color: var(--blue); font-weight: 600; }
.model-breadcrumbs { display: flex; min-height: 40px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 6px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.model-breadcrumbs[hidden] { display: none; }
.model-breadcrumbs button { max-width: 260px; overflow: hidden; padding: 3px 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.model-breadcrumbs button[aria-current="page"] { color: var(--ink); cursor: default; }
.model-breadcrumbs span { color: var(--subtle); }
.model-tiled-view { min-height: 0; flex: 1; overflow: auto; padding: 18px; }
.model-tiled-view[hidden], .model-viewer[hidden] { display: none; }
.model-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 14px; align-content: start; }
.model-folder-card, .model-card { position: relative; min-height: 206px; overflow: hidden; border: 1px solid #c6cbd0; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(36,40,45,.07); }
.model-folder-card { min-height: 112px; }
.model-folder-open, .model-card-open { display: grid; width: 100%; height: 100%; min-height: inherit; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.model-folder-open { grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 12px; padding: 17px; }
.model-folder-icon { position: relative; width: 48px; height: 34px; border-radius: 2px; background: #7896cf; }
.model-folder-icon::before { position: absolute; top: -7px; left: 3px; width: 20px; height: 8px; border-radius: 2px 2px 0 0; background: #7896cf; content: ""; }
.model-folder-copy { display: grid; min-width: 0; gap: 5px; }
.model-folder-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.model-folder-copy span { color: var(--muted); font-size: 8px; }
.model-card-preview { position: relative; display: grid; height: 138px; place-items: center; overflow: hidden; border-bottom: 1px solid var(--border); background: linear-gradient(150deg, #dce3e8, #f5f7f8); }
.model-card-preview svg { width: 94%; height: 94%; filter: drop-shadow(0 7px 6px rgba(45,52,58,.18)); }
.model-card-preview span { position: absolute; top: 8px; left: 8px; padding: 3px 6px; border-radius: 2px; background: rgba(45,49,53,.76); color: #fff; font-size: 7px; }
.model-card-copy { display: grid; gap: 4px; padding: 10px 34px 10px 11px; }
.model-card-copy strong { overflow: hidden; color: #344873; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.model-card-copy span, .model-card-copy small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.model-card-menu-button { position: absolute; right: 6px; bottom: 15px; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #6e747a; cursor: pointer; }
.model-card-menu-button:hover { background: #eef1f5; }
.model-card-menu { position: absolute; z-index: 8; right: 6px; bottom: 43px; display: grid; min-width: 135px; overflow: hidden; border: 1px solid var(--border-strong); background: #fff; box-shadow: var(--shadow); }
.model-card-menu button { min-height: 32px; padding: 7px 10px; border: 0; border-bottom: 1px solid #eceef0; background: #fff; cursor: pointer; font-size: 8px; text-align: left; }
.model-card-menu button:last-child { border-bottom: 0; }
.model-card-menu button:hover { background: #f1f3f6; }
.model-card-menu button.is-danger { color: #b93d39; }
.model-empty { display: grid; min-height: 330px; grid-column: 1 / -1; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.model-empty b { font-size: 35px; font-weight: 400; }
.model-empty strong { color: #555b61; font-size: 12px; }
.model-empty p { margin: 0; font-size: 9px; }

.model-viewer { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #dfe3e6; }
.model-viewer-header { display: flex; min-height: 44px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1px solid #b9bec3; background: #f8f9fa; }
.model-viewer-header > div:first-child { display: flex; min-width: 0; align-items: baseline; gap: 9px; }
.model-viewer-header strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.model-viewer-header span { color: var(--muted); font-size: 8px; }
.model-viewer-status { display: flex; align-items: center; gap: 10px; }
.model-viewer-status > span { display: inline-flex; align-items: center; gap: 5px; }
.model-viewer-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.model-viewer.is-source-only .model-viewer-status i { background: #d69a2d; }
.model-viewer-status button { min-height: 28px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #4f5f7d; cursor: pointer; font-size: 8px; }
.model-viewer-canvas { position: relative; display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: 52px 226px minmax(0, 1fr) 236px; overflow: hidden; }
.model-viewer-canvas.is-tree-closed { grid-template-columns: 52px minmax(0, 1fr) 236px; }
.model-viewer-canvas.is-tasks-closed { grid-template-columns: 52px 226px minmax(0, 1fr); }
.model-viewer-canvas.is-tree-closed.is-tasks-closed { grid-template-columns: 52px minmax(0, 1fr); }
.model-toolstrip { position: relative; z-index: 12; display: flex; min-height: 0; flex-direction: column; align-items: stretch; gap: 2px; overflow-y: auto; padding: 6px 5px; border-right: 1px solid #b9bec3; background: #f8f9fa; }
.model-toolstrip button { display: grid; min-height: 43px; place-items: center; align-content: center; gap: 1px; padding: 3px 1px; border: 0; border-radius: 2px; background: transparent; color: #545b62; cursor: pointer; font-size: 16px; }
.model-toolstrip button span { color: inherit; font-size: 6px; }
.model-toolstrip button:hover { background: #e9ecf0; }
.model-toolstrip button.is-active { background: #dfe7fa; color: var(--blue); }
.model-toolstrip button:disabled { opacity: .35; cursor: not-allowed; }
.model-toolstrip hr { width: 30px; margin: 2px auto; border: 0; border-top: 1px solid var(--border); }
.model-object-tree { position: relative; z-index: 10; min-width: 0; min-height: 0; overflow: hidden; border-right: 1px solid #b9bec3; background: #fff; }
.model-object-tree[hidden], .model-task-panel[hidden], .model-object-properties[hidden] { display: none; }
.model-object-tree > header, .model-task-panel > header { display: flex; min-height: 40px; align-items: center; justify-content: space-between; padding: 7px 9px; border-bottom: 1px solid var(--border); }
.model-object-tree > header strong, .model-task-panel > header strong { font-size: 10px; }
.model-object-tree > header button, .model-task-panel > header button { width: 25px; height: 25px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; }
.model-tree-tabs { display: flex; height: 34px; border-bottom: 1px solid var(--border); }
.model-tree-tabs button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: #fff; color: var(--muted); cursor: pointer; font-size: 8px; }
.model-tree-tabs button.is-active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 600; }
.model-object-tree-content { height: calc(100% - 74px); overflow: auto; padding: 5px 0 18px; }
.model-tree-group { border-bottom: 1px solid #eef0f2; }
.model-tree-group > header { display: flex; min-height: 31px; align-items: center; gap: 6px; padding: 4px 8px; background: #f7f8f9; }
.model-tree-group > header span { color: #7c838a; font-size: 8px; }
.model-tree-group > header strong { flex: 1; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.model-tree-group > header button, .model-tree-object button:first-child { width: 24px; height: 22px; flex: 0 0 auto; padding: 0; border: 0; background: transparent; color: #677079; cursor: pointer; }
.model-tree-object { display: grid; min-height: 31px; grid-template-columns: 25px minmax(0, 1fr); align-items: center; padding: 3px 8px 3px 14px; }
.model-tree-object:hover { background: #f3f5f8; }
.model-tree-object.is-selected { background: #e9eefb; color: var(--blue); }
.model-tree-object > button:last-child { overflow: hidden; padding: 4px 2px; border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 8px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.model-tree-object.is-hidden { opacity: .42; }
.model-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: radial-gradient(circle at 62% 40%, #f5f7f8 0, #d9dfe3 64%, #cbd2d7 100%); }
.model-stage::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(91,105,116,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(91,105,116,.08) 1px, transparent 1px); background-size: 38px 38px; content: ""; mask-image: linear-gradient(to top, #000, transparent 72%); transform: perspective(360px) rotateX(65deg) scale(1.5); transform-origin: bottom; }
.model-webgl-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.model-webgl-canvas.is-walk { cursor: crosshair; }
.model-webgl-overlay { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }
.model-webgl-overlay[hidden], .model-scene[hidden] { display: none; }
.model-webgl-overlay .model-task-pin { pointer-events: auto; }
.model-scene { position: relative; z-index: 1; width: 100%; height: 100%; cursor: grab; filter: drop-shadow(0 14px 13px rgba(36,43,49,.18)); transform: scale(var(--model-zoom, 1)); transform-origin: center; transition: transform .16s ease; }
.model-scene.is-walk { cursor: crosshair; }
.model-scene [data-model-object] { cursor: pointer; transition: opacity .12s ease, filter .12s ease; }
.model-scene [data-model-object]:hover { filter: brightness(1.08) saturate(1.12); }
.model-scene [data-model-object].is-selected { filter: drop-shadow(0 0 4px rgba(255,195,0,.9)) brightness(1.14); }
.model-scene [data-model-object].is-selected > * { stroke: #f6c400 !important; stroke-width: 4px !important; }
.model-scene [data-model-object].is-muted { opacity: .08; pointer-events: none; }
.model-scene [data-model-object].is-hidden { display: none; }
.model-task-pin { cursor: pointer; filter: drop-shadow(0 2px 2px rgba(31,35,38,.28)); }
.model-task-pin circle { stroke: #fff; stroke-width: 3px; }
.model-measure-line { stroke: #2455cf; stroke-width: 4; stroke-dasharray: 7 5; }
.model-measure-guide { stroke: #2455cf; stroke-width: 2; stroke-dasharray: 3 4; opacity: .8; }
.model-measure-point { fill: #fff; stroke: #2455cf; stroke-width: 4; }
.model-measurement-readout { position: absolute; z-index: 7; top: 14px; left: 50%; display: grid; min-width: 240px; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #9ba8b4; border-radius: 2px; background: rgba(255,255,255,.96); box-shadow: 0 3px 12px rgba(31,36,41,.18); font-size: 8px; transform: translateX(-50%); }
.model-measurement-readout[hidden], .model-section-chip[hidden] { display: none; }
.model-measurement-readout b { display: block; color: #30363b; font-size: 9px; }
.model-measurement-readout span { color: var(--muted); }
.model-measurement-readout button { width: 23px; height: 23px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.model-section-chip { position: absolute; z-index: 7; top: 15px; right: 15px; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid #9da7b0; border-radius: 2px; background: rgba(255,255,255,.95); color: #4c535a; font-size: 8px; }
.model-section-chip button { width: 20px; height: 20px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.model-nav-cube { position: absolute; z-index: 7; right: 16px; bottom: 15px; display: grid; width: 74px; height: 58px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; filter: drop-shadow(0 3px 4px rgba(36,42,48,.2)); }
.model-nav-cube button { border: 1px solid #8f9aa3; background: rgba(255,255,255,.9); color: #58616a; cursor: pointer; font-size: 7px; }
.model-nav-cube button:first-child { grid-column: 1 / -1; background: #edf1f4; }
.model-nav-cube button:hover { background: #dce5f7; color: var(--blue); }
.model-object-properties { position: absolute; z-index: 20; top: 10px; right: 246px; width: 270px; max-height: calc(100% - 20px); overflow: auto; border: 1px solid #aeb5bc; border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.model-property-header { padding: 12px 12px 9px; border-bottom: 1px solid var(--border); }
.model-property-header > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.model-property-header strong { font-size: 11px; }
.model-property-header button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.model-property-header span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.model-coordinate-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: #f7f8f9; }
.model-coordinate-card div { display: grid; gap: 2px; color: var(--muted); font-size: 7px; }
.model-coordinate-card b { color: #40464c; font-size: 9px; }
.model-property-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.model-property-actions button { min-height: 29px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #4c596e; cursor: pointer; font-size: 8px; }
.model-property-actions button:hover { border-color: #98acd8; background: #f1f4fb; }
.model-property-list { margin: 0; }
.model-property-list > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 7px 12px; border-bottom: 1px solid #edf0f2; font-size: 8px; }
.model-property-list dt { color: var(--muted); }
.model-property-list dd { margin: 0; overflow-wrap: anywhere; color: #434a50; }
.model-task-panel { position: relative; z-index: 10; min-width: 0; min-height: 0; overflow: hidden; border-left: 1px solid #b9bec3; background: #fff; }
.model-task-panel > header > div { display: grid; gap: 2px; }
.model-task-panel > header span { color: var(--muted); font-size: 7px; }
.model-task-list { height: calc(100% - 40px); overflow: auto; padding-bottom: 12px; }
.model-task-group > header { display: flex; min-height: 30px; align-items: center; justify-content: space-between; padding: 5px 9px; background: #f5f6f7; color: #646b72; font-size: 8px; font-weight: 600; }
.model-task-card { display: grid; width: 100%; gap: 4px; padding: 9px 10px; border: 0; border-bottom: 1px solid #e2e4e7; background: #fff; cursor: pointer; text-align: left; }
.model-task-card:hover, .model-task-card.is-selected { background: #eef2fb; }
.model-task-card > span:first-child { color: var(--blue); font-size: 8px; }
.model-task-card strong { font-size: 9px; line-height: 1.35; }
.model-task-card small { color: var(--muted); font-size: 7px; }
.model-task-empty { margin: 24px 14px; color: var(--muted); font-size: 8px; line-height: 1.5; text-align: center; }
.model-folder-dialog { width: min(430px, calc(100vw - 40px)); }
.model-folder-form, .model-move-form, .model-upload-form, .model-task-form { display: grid; gap: 11px; padding: 15px; }
.model-folder-form label, .model-move-form label, .model-upload-form > label:not(.file-drop-zone), .model-task-form label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.model-folder-form input, .model-move-form select, .model-upload-form select, .model-task-form input, .model-task-form select { width: 100%; height: 34px; min-width: 0; padding: 5px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 10px; }
.model-upload-dialog { width: min(620px, calc(100vw - 40px)); }
.model-drop-zone { min-height: 164px; }
.model-move-form > p, .model-task-location { margin: 0; color: var(--muted); font-size: 8px; }
.model-delete-dialog { width: min(420px, calc(100vw - 40px)); }
.model-delete-dialog > p { margin: 0; padding: 18px 16px 8px; color: #555b61; font-size: 9px; line-height: 1.5; }
.model-delete-dialog > .dialog-actions { padding: 10px 16px 16px; }
.model-calibration-dialog { width: min(720px, calc(100vw - 40px)); }
.model-calibration-note { margin: 0; padding: 12px 15px; border-bottom: 1px solid var(--border); background: #f7f8f9; color: var(--muted); font-size: 9px; }
.model-calibration-list { display: grid; max-height: min(520px, calc(100dvh - 210px)); overflow: auto; padding: 7px 15px; }
.model-calibration-row { display: grid; min-height: 54px; grid-template-columns: minmax(0, 1fr) 120px 118px; align-items: center; gap: 9px; border-bottom: 1px solid var(--border); }
.model-calibration-row > div { display: grid; gap: 3px; }
.model-calibration-row strong { font-size: 9px; }
.model-calibration-row span { color: var(--muted); font-size: 7px; }
.model-calibration-row label { display: grid; gap: 3px; color: var(--muted); font-size: 7px; }
.model-calibration-row input { width: 100%; height: 29px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; font-size: 8px; }
.model-calibration-status { display: inline-flex; align-items: center; gap: 5px; color: #43843b !important; }
.model-calibration-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.model-calibration-dialog > .dialog-actions { padding: 10px 15px 15px; }
.model-task-dialog { width: min(470px, calc(100vw - 40px)); }
.model-task-form > div:not(.dialog-actions) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }

.sidebar-scrim { position: fixed; z-index: 44; inset: 0; background: rgba(23,25,28,.42); }
.sidebar-scrim[hidden] { display: none; }
.toast { position: fixed; z-index: 110; left: 50%; bottom: 22px; max-width: min(420px, calc(100vw - 32px)); padding: 9px 13px; border-radius: 2px; background: #303133; color: #fff; box-shadow: var(--shadow); font-size: 10px; transform: translateX(-50%); }
.toast[hidden] { display: none; }

/* Project Management / RFIs: compact register, document detail and auditable workflow. */
.rail-pm-section-title[hidden], .rail-primary-pm[hidden], .rail-primary-pm .rail-item[hidden] { display: none; }
.rail-primary-pm { display: grid; }
.icon-rfis { width: 15px; height: 13px; border: 1.4px solid currentColor; border-radius: 1px; }
.icon-rfis::before { position: absolute; right: 2px; bottom: -4px; width: 5px; height: 5px; border-left: 1.4px solid currentColor; background: var(--rail); content: ""; transform: skewY(-38deg); }
.icon-rfis::after { position: absolute; inset: 1px 0 0; content: "?"; font-size: 9px; font-weight: 700; line-height: 10px; text-align: center; }
.icon-submittals { width: 14px; height: 15px; border: 1.4px solid currentColor; border-radius: 1px; }
.icon-submittals::before { position: absolute; top: -4px; left: 3px; width: 8px; height: 4px; border: 1.4px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; background: var(--rail); content: ""; }
.icon-submittals::after { position: absolute; top: 4px; left: 3px; width: 7px; height: 1px; background: currentColor; box-shadow: 0 3px currentColor, 0 6px currentColor; content: ""; }

.rfi-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.rfi-workspace[hidden] { display: none; }
.rfi-toolbar { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.rfi-heading { display: flex; min-width: 0; align-items: baseline; gap: 9px; }
.rfi-heading h1 { margin: 0; color: #30363c; font-size: 18px; font-weight: 600; }
.rfi-heading span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.rfi-toolbar-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.rfi-scope-switch { display: inline-flex; height: 32px; border: 1px solid var(--border-strong); border-radius: 2px; overflow: hidden; background: #fff; }
.rfi-scope-switch button { min-width: 78px; padding: 0 9px; border: 0; border-right: 1px solid var(--border); background: #fff; color: #666c72; cursor: pointer; font-size: 9px; }
.rfi-scope-switch button:last-child { border-right: 0; }
.rfi-scope-switch button:hover { background: #f5f6f7; }
.rfi-scope-switch button.is-active { background: #eaf0fd; color: var(--blue); font-weight: 600; box-shadow: inset 0 -2px var(--selected); }
.rfi-search { width: min(235px, 22vw); }
.rfi-sort-control { display: inline-flex; height: 32px; align-items: center; gap: 6px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--muted); font-size: 8px; }
.rfi-sort-control select { min-width: 72px; border: 0; background: transparent; color: var(--ink); font-size: 9px; outline: 0; }

.rfi-status-summary { display: grid; min-height: 64px; flex: 0 0 auto; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 1px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #e2e4e7; }
.rfi-status-summary button { position: relative; display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 8px 14px; border: 0; background: #fff; color: #666c72; cursor: pointer; font-size: 9px; text-align: left; }
.rfi-status-summary button::before { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: #9fa5aa; content: ""; }
.rfi-status-summary button:hover { background: #f9fafb; }
.rfi-status-summary button.is-active { background: #eef3ff; box-shadow: inset 0 0 0 1px #9bb2e7; }
.rfi-status-summary button strong { color: #30363c; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rfi-status-summary .status-open::before { background: #4b80df; }
.rfi-status-summary .status-pending::before { background: #d99a3c; }
.rfi-status-summary .status-closed::before { background: #65a15b; }
.rfi-status-summary .status-void::before { background: #c15c57; }

.rfi-filter-panel { position: absolute; z-index: 65; top: 58px; right: 18px; width: 320px; max-height: calc(100dvh - 132px); overflow: auto; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: var(--shadow); }
.rfi-filter-panel[hidden] { display: none; }
.rfi-filter-panel > header { display: flex; min-height: 47px; align-items: center; justify-content: space-between; padding: 10px 13px; border-bottom: 1px solid var(--border); }
.rfi-filter-panel > header strong { font-size: 13px; font-weight: 500; }
.rfi-filter-panel > header button { display: grid; width: 28px; height: 28px; place-items: center; border: 0; background: transparent; color: #787e84; cursor: pointer; font-size: 20px; }
.rfi-filter-panel form { display: grid; gap: 11px; padding: 13px; }
.rfi-filter-panel form > label:not(.checkbox-filter) { display: grid; gap: 5px; color: #61676d; font-size: 9px; }
.rfi-filter-panel select { width: 100%; height: 34px; padding: 5px 8px; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.rfi-filter-panel .checkbox-filter { display: flex; min-height: 27px; align-items: center; gap: 8px; color: #4d545a; font-size: 9px; }
.rfi-filter-panel .checkbox-filter input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }

.rfi-table-wrap { min-width: 0; min-height: 0; flex: 1; overflow: auto; margin: 16px 18px 24px; border: 1px solid var(--border); background: #fff; scrollbar-width: thin; }
.rfi-table { width: 100%; min-width: 1240px; border-collapse: collapse; table-layout: fixed; }
.rfi-table th, .rfi-table td { height: 48px; padding: 7px 10px; border-right: 1px solid #e7e9eb; border-bottom: 1px solid #e1e3e6; color: #545b62; font-size: 8px; text-align: left; vertical-align: middle; }
.rfi-table th { position: sticky; z-index: 2; top: 0; height: 36px; background: #f6f7f8; color: #747b82; font-size: 8px; font-weight: 600; white-space: nowrap; }
.rfi-table th:last-child, .rfi-table td:last-child { border-right: 0; }
.rfi-table tbody tr:last-child td { border-bottom: 0; }
.rfi-table tbody tr:hover td { background: #fafbfc; }
.rfi-table tbody tr.is-action-required td:first-child { box-shadow: inset 3px 0 #6588d9; }
.rfi-table th:nth-child(1), .rfi-table td:nth-child(1) { width: 82px; }
.rfi-table th:nth-child(2), .rfi-table td:nth-child(2) { width: 235px; }
.rfi-table th:nth-child(3), .rfi-table td:nth-child(3) { width: 82px; }
.rfi-table th:nth-child(4), .rfi-table td:nth-child(4) { width: 115px; }
.rfi-table th:nth-child(5), .rfi-table td:nth-child(5) { width: 96px; }
.rfi-table th:nth-child(6), .rfi-table td:nth-child(6) { width: 125px; }
.rfi-table th:nth-child(7), .rfi-table td:nth-child(7) { width: 100px; }
.rfi-table th:nth-child(8), .rfi-table td:nth-child(8) { width: 92px; }
.rfi-table th:nth-child(n+9), .rfi-table td:nth-child(n+9) { width: 105px; }
.rfi-table td > strong, .rfi-table td > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfi-table td > strong { color: #353c43; font-size: 8px; }
.rfi-table td > small { margin-top: 2px; color: #8a9096; font-size: 7px; }
.rfi-number-link, .rfi-name-link { padding: 0; border: 0; background: transparent; color: var(--blue); cursor: pointer; text-align: left; }
.rfi-number-link { font-size: 8px; font-weight: 600; }
.rfi-name-link { display: grid; max-width: 100%; gap: 2px; }
.rfi-name-link strong, .rfi-name-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfi-name-link strong { color: #30383f; font-size: 9px; font-weight: 600; }
.rfi-name-link span { color: #868d93; font-size: 7px; }
.rfi-table-status, .rfi-status-badge { display: inline-flex; min-height: 21px; align-items: center; padding: 3px 7px; border: 1px solid #c7cbd0; border-radius: 11px; background: #f1f2f3; color: #62696f; font-size: 7px; font-weight: 600; white-space: nowrap; }
.rfi-table-status.status-open, .rfi-status-badge.status-open { border-color: #a7bce9; background: #eaf0fc; color: #365eaf; }
.rfi-table-status.status-pending, .rfi-status-badge.status-pending { border-color: #e1c18e; background: #fff5e5; color: #916323; }
.rfi-table-status.status-closed, .rfi-status-badge.status-closed { border-color: #b0d1a9; background: #edf7eb; color: #477d40; }
.rfi-table-status.status-void, .rfi-status-badge.status-void { border-color: #dfb2af; background: #f9eceb; color: #9d4a45; }
.rfi-reviewer-list { display: flex; align-items: center; min-height: 22px; color: var(--muted); }
.rfi-reviewer-list i { display: grid; width: 21px; height: 21px; place-items: center; margin-left: -4px; border: 1px solid #fff; border-radius: 50%; background: #687fb1; color: #fff; font-size: 7px; font-style: normal; }
.rfi-reviewer-list i:first-child { margin-left: 0; }
.rfi-table .is-overdue, .rfi-metadata-card .is-overdue { color: #b0443f; font-weight: 600; }
.rfi-empty { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 6px; color: var(--muted); font-size: 9px; }
.rfi-empty strong { color: #424950; font-size: 12px; }

.rfi-viewer-modal { position: fixed; z-index: 98; inset: 0; display: grid; place-items: stretch; background: rgba(25,27,30,.48); }
.rfi-viewer-modal[hidden] { display: none; }
.rfi-viewer-dialog { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; background: #eef0f3; }
.rfi-viewer-header { display: grid; min-height: 66px; flex: 0 0 auto; grid-template-columns: auto minmax(220px, 1fr) auto auto auto; align-items: center; gap: 11px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: #fff; }
.rfi-viewer-back { display: inline-flex; height: 32px; align-items: center; gap: 4px; padding: 0 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #535a60; cursor: pointer; font-size: 9px; }
.rfi-viewer-back span { font-size: 18px; line-height: 1; }
.rfi-viewer-heading { display: grid; min-width: 0; gap: 2px; }
.rfi-viewer-heading span { color: #80868c; font-size: 7px; letter-spacing: .03em; text-transform: uppercase; }
.rfi-viewer-heading h2 { margin: 0; overflow: hidden; color: #30363c; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rfi-status-badge { min-height: 24px; padding-inline: 9px; }
.rfi-viewer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.rfi-viewer-close { display: grid; width: 31px; height: 31px; place-items: center; padding: 0; border: 0; background: transparent; color: #747a80; cursor: pointer; font-size: 20px; }
.rfi-actions-wrap { position: relative; }
.rfi-actions-menu { position: absolute; z-index: 5; top: calc(100% + 5px); right: 0; display: grid; width: 165px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 2px; background: #fff; box-shadow: 0 10px 26px rgba(24,28,33,.22); }
.rfi-actions-menu button { min-height: 35px; padding: 7px 11px; border: 0; border-bottom: 1px solid #e5e7e9; background: #fff; color: #4e555b; cursor: pointer; font-size: 8px; text-align: left; }
.rfi-actions-menu button:hover { background: #f5f6f8; }
.rfi-actions-menu button:last-child { border-bottom: 0; }
.rfi-actions-menu button.is-danger { color: #b13f3a; }
.rfi-actions-empty { padding: 10px 11px; color: #858c92; font-size: 8px; }

.rfi-detail-content { display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) 290px; overflow: hidden; }
.rfi-document-column { min-width: 0; overflow: auto; padding: 18px 20px 34px; }
.rfi-metadata-column { min-width: 0; overflow: auto; padding: 18px 18px 34px 0; }
.rfi-question-form { display: grid; gap: 12px; width: min(880px, 100%); margin: 0 auto; }
.rfi-document-column > .rfi-document-card { width: min(880px, 100%); margin: 12px auto 0; }
.rfi-document-card, .rfi-metadata-card, .rfi-activity-card { border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.rfi-document-card > header { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 13px; border-bottom: 1px solid #e1e3e6; background: #fafbfc; }
.rfi-document-card > header > div { display: grid; gap: 2px; }
.rfi-document-card > header span { color: #3d444b; font-size: 10px; font-weight: 600; }
.rfi-document-card > header small { color: #858b91; font-size: 7px; font-weight: 400; }
.rfi-document-card > textarea { display: block; width: 100%; min-height: 144px; padding: 15px; border: 0; background: #fff; color: #373e45; font-size: 10px; line-height: 1.65; outline: 0; resize: vertical; }
.rfi-document-card > textarea:read-only { resize: none; }
.rfi-question-form > .rfi-document-card:first-child > label { display: grid; gap: 5px; padding: 12px 15px 0; color: #697078; font-size: 8px; }
.rfi-question-form > .rfi-document-card:first-child > label input,
.rfi-question-form > .rfi-document-card:first-child > label textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #373e45; font-size: 9px; line-height: 1.55; }
.rfi-question-form > .rfi-document-card:first-child > label input { height: 34px; }
.rfi-question-form > .rfi-document-card:first-child > label textarea { min-height: 70px; resize: vertical; }
.rfi-question-form > .rfi-document-card:first-child > label :disabled { border-color: transparent; background: #f7f8f9; color: #535b62; opacity: 1; }
.rfi-question-form > .rfi-document-card:first-child > label:last-child { padding-bottom: 15px; }
.rfi-detail-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 14px 15px 15px; }
.rfi-detail-fields label { display: grid; gap: 5px; color: #697078; font-size: 8px; }
.rfi-detail-fields input, .rfi-detail-fields select, .rfi-detail-fields textarea { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; resize: vertical; }
.rfi-detail-fields input, .rfi-detail-fields select { height: 34px; }
.rfi-detail-fields :disabled { border-color: transparent; background: #f7f8f9; color: #535b62; opacity: 1; }
.rfi-field-wide { grid-column: 1 / -1; }
.rfi-answer-card > p { margin: 0; padding: 16px 15px; color: #363d44; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.rfi-rejected-history { display: grid; gap: 6px; margin: 0 15px 15px; padding: 11px; border-left: 3px solid #d58c55; background: #fff7ef; color: #62584f; }
.rfi-rejected-history > strong { font-size: 8px; }
.rfi-rejected-history article { display: grid; gap: 4px; padding: 7px 0; border-top: 1px solid #edd9c8; }
.rfi-rejected-history article:first-of-type { border-top: 0; }
.rfi-rejected-history p { display: grid; gap: 3px; margin: 0; font-size: 8px; line-height: 1.45; }
.rfi-rejected-history small { color: #91867d; font-size: 7px; }

.rfi-attachment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 13px 15px 15px; }
.rfi-attachment-card { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 2px; background: #fff; }
.rfi-attachment-card > button { display: grid; width: 100%; padding: 0; border: 0; background: #fff; cursor: pointer; text-align: left; }
.rfi-photo-preview, .rfi-file-preview { display: grid; height: 84px; place-items: center; overflow: hidden; background: #eceef0; color: #687079; }
.rfi-photo-preview > * { width: 100%; height: 100%; object-fit: cover; }
.rfi-file-preview > * { transform: scale(.86); }
.rfi-attachment-card button > span { display: grid; min-width: 0; gap: 2px; padding: 7px 8px; }
.rfi-attachment-card strong, .rfi-attachment-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfi-attachment-card strong { color: #3d444b; font-size: 8px; }
.rfi-attachment-card small { color: #858c92; font-size: 7px; }
.rfi-project-links { display: grid; gap: 1px; padding: 7px 0; background: #eceef0; }
.rfi-project-link { display: grid; min-height: 48px; grid-template-columns: 50px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; padding: 8px 13px; border: 0; background: #fff; cursor: pointer; text-align: left; }
.rfi-project-link:hover { background: #f8fafc; }
.rfi-link-kind { grid-row: 1 / 3; align-self: center; padding: 4px 5px; border: 1px solid #b8c7e5; border-radius: 2px; background: #edf2fb; color: #4566a5; font-size: 7px; font-weight: 600; text-align: center; }
.rfi-project-link strong, .rfi-project-link small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfi-project-link strong { color: #3a4249; font-size: 8px; }
.rfi-project-link small { color: #838a91; font-size: 7px; }
.rfi-section-empty { grid-column: 1 / -1; margin: 0; padding: 19px 15px; color: #858c92; font-size: 8px; text-align: center; }

.rfi-metadata-card, .rfi-activity-card { margin-bottom: 12px; }
.rfi-metadata-card h3, .rfi-activity-card h3 { margin: 0; padding: 12px 13px; border-bottom: 1px solid var(--border); background: #fafbfc; color: #3e454c; font-size: 10px; font-weight: 600; }
.rfi-metadata-card dl { margin: 0; }
.rfi-metadata-card dl > div { display: grid; min-height: 44px; grid-template-columns: 84px minmax(0, 1fr); align-items: start; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #e9ebed; }
.rfi-metadata-card dl > div:last-child { border-bottom: 0; }
.rfi-metadata-card dt { color: #878d93; font-size: 7px; }
.rfi-metadata-card dd { display: grid; gap: 2px; margin: 0; color: #3f464d; font-size: 8px; line-height: 1.4; }
.rfi-metadata-card dd small { color: #858c92; font-size: 7px; }
.rfi-activity-card > div { display: grid; padding: 6px 12px 13px; }
.rfi-activity-card article { display: grid; min-height: 48px; grid-template-columns: 13px minmax(0, 1fr); gap: 8px; padding-top: 12px; }
.rfi-activity-card article > i { position: relative; display: block; width: 9px; height: 9px; margin-top: 2px; border-radius: 50%; background: #6c8fdc; }
.rfi-activity-card article > i::after { position: absolute; top: 11px; bottom: -39px; left: 4px; width: 1px; background: #d9dde1; content: ""; }
.rfi-activity-card article:last-of-type > i::after { display: none; }
.rfi-activity-card article > i.activity-voided { background: #c35f59; }
.rfi-activity-card article > i.activity-closed { background: #69a35e; }
.rfi-activity-card article > i.activity-rejected { background: #d58c55; }
.rfi-activity-card article p { margin: 0; color: #535a61; font-size: 8px; line-height: 1.4; }
.rfi-activity-card article p strong { display: block; color: #363d44; font-size: 8px; }
.rfi-activity-card article time { display: block; margin-top: 3px; color: #91979d; font-size: 7px; }

.rfi-create-dialog { width: min(480px, calc(100vw - 40px)); }
.rfi-create-form, .rfi-transition-form { display: grid; gap: 12px; padding: 15px; }
.rfi-create-form > label:not(.checkbox-filter), .rfi-transition-form > label { display: grid; gap: 5px; color: #626970; font-size: 9px; }
.rfi-create-form input, .rfi-transition-form input, .rfi-transition-form select, .rfi-transition-form textarea { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; resize: vertical; }
.rfi-create-form input, .rfi-transition-form input, .rfi-transition-form select { height: 35px; }
.rfi-create-form > p, .rfi-transition-form > p, .rfi-transition-dialog > p { margin: 0; color: #70777e; font-size: 8px; line-height: 1.5; }
.rfi-transition-dialog { width: min(520px, calc(100vw - 40px)); }
.rfi-transition-dialog > p { padding: 17px 16px 7px; }
.rfi-transition-dialog > .dialog-actions { padding: 10px 16px 16px; }
.rfi-transition-form fieldset { display: grid; gap: 7px; margin: 0; padding: 9px 10px 10px; border: 1px solid var(--border); }
.rfi-transition-form legend { padding: 0 5px; color: #626970; font-size: 8px; }
.rfi-member-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.rfi-member-options label { display: flex; min-width: 0; align-items: center; gap: 6px; color: #485057; font-size: 8px; }
.rfi-member-options input { width: 13px; height: 13px; margin: 0; accent-color: var(--blue); }
.rfi-link-dialog { display: flex; width: min(600px, calc(100vw - 40px)); max-height: min(740px, calc(100dvh - 40px)); flex-direction: column; }
.rfi-link-dialog form { display: flex; min-height: 0; flex-direction: column; }
.rfi-option-list { min-height: 0; overflow: auto; padding: 7px 14px 0; }
.rfi-option-list h3 { margin: 12px 0 7px; color: #4b5259; font-size: 9px; }
.rfi-option-list label { display: grid; min-height: 39px; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 7px; border-bottom: 1px solid #e7e9eb; color: #444b52; font-size: 8px; }
.rfi-option-list input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.rfi-option-list span, .rfi-option-list small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfi-option-list small { max-width: 160px; color: #868d93; font-size: 7px; }
.rfi-link-dialog .dialog-actions { flex: 0 0 auto; padding: 12px 14px 14px; border-top: 1px solid var(--border); }

/* Submittals: Fieldwire-style register and seven-stage PM workflow. */
.submittal-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.submittal-workspace[hidden] { display: none; }
.submittal-status-summary { display: grid; min-height: 64px; flex: 0 0 auto; grid-template-columns: repeat(7, minmax(90px, 1fr)); gap: 1px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #e2e4e7; }
.submittal-status-summary button { position: relative; display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 10px 8px 13px; border: 0; background: #fff; color: #666c72; cursor: pointer; font-size: 8px; text-align: left; }
.submittal-status-summary button::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: #9fa5aa; content: ""; }
.submittal-status-summary button:hover { background: #f9fafb; }
.submittal-status-summary button.is-active { background: #eef3ff; box-shadow: inset 0 0 0 1px #9bb2e7; }
.submittal-status-summary button strong { color: #30363c; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.submittal-status-summary .status-requested::before { background: #4b80df; }
.submittal-status-summary .status-pending_review::before { background: #4d9a9d; }
.submittal-status-summary .status-pending_approval::before { background: #d99a3c; }
.submittal-status-summary .status-pending_close::before { background: #8a72ba; }
.submittal-status-summary .status-closed::before { background: #65a15b; }
.submittal-status-summary .status-void::before { background: #c15c57; }
.submittal-bulk-bar { display: flex; min-height: 42px; flex: 0 0 auto; align-items: center; gap: 14px; padding: 6px 18px; border-bottom: 1px solid #b9c8eb; background: #e8edfa; color: #284f9f; }
.submittal-bulk-bar[hidden] { display: none; }
.submittal-bulk-bar strong { font-size: 9px; white-space: nowrap; }
.submittal-bulk-bar > span { margin-right: auto; color: #607198; font-size: 8px; }
.submittal-bulk-controls { display: flex; align-items: center; gap: 6px; }
.submittal-bulk-bar button { min-height: 28px; padding: 4px 9px; border: 1px solid #a6b7df; border-radius: 2px; background: #fff; color: #3156a2; cursor: pointer; font-size: 8px; }
.submittal-bulk-bar button:disabled { opacity: .4; cursor: default; }
.submittal-bulk-bar .submittal-bulk-actions-menu { top: calc(100% + 4px); right: 0; left: auto; width: 150px; }
.submittal-bulk-bar .submittal-bulk-actions-menu[hidden] { display: none; }
.submittal-bulk-bar .submittal-bulk-actions-menu button { min-height: 35px; padding: 7px 11px; border: 0; border-bottom: 1px solid #e5e7e9; border-radius: 0; color: #4e555b; text-align: left; }
.submittal-bulk-bar .submittal-bulk-actions-menu button:last-child { border-bottom: 0; }
.submittal-bulk-bar .submittal-bulk-actions-menu button.is-danger { color: #b13f3a; }
.submittal-table { min-width: 2362px; table-layout: auto; }
.submittal-table th, .submittal-table td { min-width: 118px; white-space: nowrap; }
.submittal-table .submittal-checkbox-column { width: 42px; min-width: 42px; max-width: 42px; box-sizing: border-box; padding-inline: 12px; text-align: center; }
.submittal-table .submittal-checkbox-column input { width: 14px; height: 14px; margin: 0; accent-color: #2455cf; cursor: pointer; }
.submittal-table tbody tr.is-selected > td { background: #edf3ff; }
.submittal-table tbody tr.is-selected:hover > td { background: #e4edff; }
.submittal-table .submittal-cell-number { min-width: 88px; }
.submittal-table .submittal-cell-specification { min-width: 190px; }
.submittal-table .submittal-cell-name { min-width: 235px; }
.submittal-table .submittal-cell-status { min-width: 100px; }
.submittal-table .submittal-cell-reviewers { min-width: 105px; }
.submittal-request-summary { margin: 0; padding: 9px 11px; border-radius: 3px; background: #eef3ff; color: #415986; font-size: 9px; line-height: 1.5; }
.rfi-table-status.status-requested, .rfi-status-badge.status-requested { border-color: #a7bce9; background: #eaf0fc; color: #365eaf; }
.rfi-table-status.status-pending_review, .rfi-status-badge.status-pending_review { border-color: #9fcaca; background: #ebf7f7; color: #397b7d; }
.rfi-table-status.status-pending_approval, .rfi-status-badge.status-pending_approval { border-color: #e1c18e; background: #fff5e5; color: #916323; }
.rfi-table-status.status-pending_close, .rfi-status-badge.status-pending_close { border-color: #c7b8df; background: #f3eff9; color: #705799; }
.rfi-table-status.status-rejected, .rfi-status-badge.status-rejected { border-color: #dfb2af; background: #f9eceb; color: #9d4a45; }
.rfi-table-status.status-pending_revision, .rfi-status-badge.status-pending_revision { border-color: #c7b8df; background: #f3eff9; color: #705799; }
.rfi-table-status.status-approved, .rfi-status-badge.status-approved { border-color: #b0d1a9; background: #edf7eb; color: #477d40; }
.change-order-status-summary { grid-template-columns: repeat(7, minmax(100px, 1fr)); overflow-x: auto; }
.change-order-status-summary button { min-width: 105px; }
.change-order-status-summary button small { position: absolute; right: 10px; bottom: 3px; color: #56804f; font-size: 6px; white-space: nowrap; }
.change-order-status-summary .status-requested::before { background: #4b80df; }
.change-order-status-summary .status-pending_approval::before { background: #d99a3c; }
.change-order-status-summary .status-rejected::before { background: #c15c57; }
.change-order-status-summary .status-pending_revision::before { background: #8b6eb2; }
.change-order-status-summary .status-approved::before { background: #65a15b; }
.change-order-status-summary .status-void::before { background: #7d8388; }
.change-order-table { min-width: 1180px; }
.change-order-table th:nth-child(1), .change-order-table td:nth-child(1) { width: 90px; }
.change-order-table th:nth-child(2), .change-order-table td:nth-child(2) { width: 240px; }
.change-order-table th:nth-child(3), .change-order-table td:nth-child(3) { width: 105px; }
.change-order-table th:nth-child(4), .change-order-table td:nth-child(4) { width: 110px; }
.change-order-table th:nth-child(5), .change-order-table td:nth-child(5) { width: 125px; }
.change-order-table th:nth-child(6), .change-order-table td:nth-child(6) { width: 145px; }
.change-order-table th:nth-child(7), .change-order-table td:nth-child(7) { width: 115px; }
.change-order-table th:nth-child(8), .change-order-table td:nth-child(8) { width: 90px; }
.change-order-table th:nth-child(9), .change-order-table td:nth-child(9) { width: 130px; }
.change-order-document-column > form { width: min(980px, 100%); margin: 0 auto; }
.change-order-document-column > form + form { margin-top: 12px; }
.change-order-document-column > form > .rfi-document-card { width: 100%; }
.change-order-cost-card > label { display: grid; gap: 5px; padding: 12px 15px 15px; color: #697078; font-size: 8px; }
.change-order-cost-card > label textarea { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #373e45; font-size: 9px; line-height: 1.5; resize: vertical; }
.change-order-cost-card h4 { margin: 17px 15px 8px; color: #3d444b; font-size: 9px; }
.change-order-cost-summary { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); gap: 1px; padding: 12px 15px; background: #e6e8eb; }
.change-order-cost-summary > span { display: grid; gap: 3px; padding: 9px 10px; background: #fff; }
.change-order-cost-summary small { color: #858c92; font-size: 7px; }
.change-order-cost-summary strong { color: #343b42; font-size: 11px; font-weight: 600; }
.change-order-cost-summary .is-total { background: #eef3ff; }
.change-order-cost-summary .is-total strong { color: #2455cf; }
.change-order-cost-table-wrap { overflow-x: auto; margin: 0 15px; border: 1px solid var(--border); }
.change-order-cost-table { width: 100%; min-width: 690px; border-collapse: collapse; }
.change-order-cost-table th, .change-order-cost-table td { height: 38px; padding: 5px 7px; border-right: 1px solid #e4e6e8; border-bottom: 1px solid #e4e6e8; color: #555c63; font-size: 8px; text-align: left; }
.change-order-cost-table th { background: #f5f6f7; color: #737a81; font-weight: 600; }
.change-order-cost-table th:last-child, .change-order-cost-table td:last-child { border-right: 0; }
.change-order-cost-table tbody tr:last-child td { border-bottom: 0; }
.change-order-cost-table input, .change-order-cost-table select { width: 100%; min-width: 72px; height: 28px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #3f464d; font-size: 8px; }
.change-order-cost-table input:disabled, .change-order-cost-table select:disabled { padding-inline: 0; border-color: transparent; background: transparent; color: #555c63; opacity: 1; }
.change-order-cost-table td > button { width: 25px; height: 25px; border: 0; background: transparent; color: #b04b45; cursor: pointer; font-size: 15px; }
.change-order-cost-table .checkbox-filter { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.change-order-cost-table .checkbox-filter input { width: 13px; min-width: 13px; height: 13px; }
.change-order-add-row { margin: 8px 15px 0; padding: 5px 8px; border: 0; background: transparent; color: #2455cf; cursor: pointer; font-size: 8px; }
.change-order-action-summary { margin: 0; padding: 10px 12px; border-radius: 3px; background: #eef3ff; color: #51627f; font-size: 9px; }
.change-order-action-summary strong { display: block; margin-top: 3px; color: #2455cf; font-size: 15px; }
.change-order-response-card > p { margin: 0; padding: 14px 15px; color: #4d555c; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }
.submittal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.submittal-form-grid label { display: grid; gap: 5px; color: #626970; font-size: 9px; }
.submittal-form-grid select { width: 100%; height: 35px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }
.submittal-block > p { margin: 0; padding: 13px 15px 0; color: #535b62; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }
.submittal-response-label { padding: 5px 8px; border-radius: 2px; background: #edf7eb; color: #477d40; font-size: 8px; }
.submittal-columns-dialog { display: flex; width: min(520px, calc(100vw - 40px)); max-height: min(760px, calc(100dvh - 40px)); flex-direction: column; }
.submittal-columns-dialog > p { margin: 0; padding: 12px 15px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 8px; }
.submittal-column-options { min-height: 0; overflow: auto; padding: 6px 15px; }
.submittal-column-option { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e5e7e9; }
.submittal-column-option > label { display: flex; flex: 1; align-items: center; gap: 8px; color: #444b52; font-size: 9px; }
.submittal-column-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.submittal-column-option > div { display: flex; gap: 4px; }
.submittal-column-option button { width: 27px; height: 27px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #626970; cursor: pointer; }
.submittal-column-option button:disabled { opacity: .35; cursor: default; }
.submittal-columns-dialog > .dialog-actions { padding: 12px 15px 15px; border-top: 1px solid var(--border); }
.rfi-table .rfi-cell-number { width: 92px; }
.rfi-table .rfi-cell-name { width: 235px; }
.rfi-table .rfi-cell-status { width: 105px; }
.rfi-table .rfi-cell-assignee { width: 135px; }
.pm-report-dialog { width: min(560px, calc(100vw - 40px)); }
.pm-report-summary { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: #f7f8fa; }
.pm-report-summary strong { color: #30363c; font-size: 11px; }
.pm-report-summary span { overflow: hidden; color: #737a82; font-size: 8px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.pm-report-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px; }
.pm-report-options > button { display: grid; min-height: 128px; grid-template-columns: 50px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; gap: 4px 12px; padding: 15px; border: 1px solid var(--border-strong); border-radius: 3px; background: #fff; color: #3e454c; cursor: pointer; text-align: left; }
.pm-report-options > button:hover { border-color: #8fa7d9; background: #f7f9fd; box-shadow: 0 4px 14px rgba(44,67,112,.09); }
.pm-report-options > button:disabled { opacity: .48; cursor: wait; }
.pm-report-options strong { align-self: end; font-size: 11px; }
.pm-report-options small { align-self: start; color: #7a8189; font-size: 8px; line-height: 1.45; }
.pm-report-file-icon { display: grid; width: 48px; height: 58px; grid-row: 1 / 3; place-items: end center; padding-bottom: 9px; clip-path: polygon(0 0, 72% 0, 100% 24%, 100% 100%, 0 100%); color: #fff; font-size: 8px; font-weight: 750; }
.pm-report-file-icon.is-pdf { background: #c74f49; }
.pm-report-file-icon.is-csv { background: #4e8f65; }
.pm-report-dialog > p { margin: 0; padding: 0 16px 16px; color: #858c93; font-size: 8px; line-height: 1.5; }
.submittal-import-dialog { display: flex; width: min(1020px, calc(100vw - 36px)); max-height: min(820px, calc(100dvh - 36px)); flex-direction: column; overflow: hidden; }
.submittal-import-dialog > .floating-panel-header > div { display: grid; gap: 2px; }
.submittal-import-dialog > .floating-panel-header small { color: #868d94; font-size: 7px; font-weight: 400; }
.submittal-import-modes { display: grid; flex: 0 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: #f7f8fa; }
.submittal-import-modes button { display: grid; min-height: 64px; gap: 5px; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: 3px; background: #fff; color: #424950; cursor: pointer; text-align: left; }
.submittal-import-modes button:hover { border-color: #9aadda; background: #f7f9fe; }
.submittal-import-modes button.is-active { border-color: #6f8fda; background: #edf3ff; box-shadow: inset 3px 0 #4f75cf; }
.submittal-import-modes strong { font-size: 10px; }
.submittal-import-modes span { color: #7b8289; font-size: 8px; line-height: 1.4; }
.submittal-import-content { min-height: 240px; flex: 1; overflow: auto; background: #fff; }
.submittal-import-empty { display: grid; min-height: 270px; place-items: center; padding: 30px; color: #848b92; font-size: 9px; text-align: center; }
.submittal-import-panel { display: grid; gap: 13px; padding: 16px; }
.submittal-import-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.submittal-import-intro > div { display: grid; gap: 4px; }
.submittal-import-intro strong { color: #363d44; font-size: 11px; }
.submittal-import-intro p { max-width: 650px; margin: 0; color: #747b82; font-size: 8px; line-height: 1.55; }
.submittal-import-template { min-height: 30px; padding: 6px 10px; border: 1px solid #aab8d8; border-radius: 2px; background: #fff; color: #365baf; cursor: pointer; font-size: 8px; white-space: nowrap; }
.submittal-import-drop { position: relative; display: grid; min-height: 104px; overflow: hidden; place-items: center; padding: 18px; border: 1px dashed #aeb6bf; border-radius: 3px; background: #fafbfc; color: #69717a; cursor: pointer; text-align: center; }
.submittal-import-drop:hover, .submittal-import-drop.is-dragging { border-color: #6e8cd0; background: #f2f6ff; }
.submittal-import-drop input { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.submittal-import-drop strong { display: block; margin-bottom: 5px; color: #3e4750; font-size: 10px; }
.submittal-import-drop span { color: #858c93; font-size: 8px; }
.submittal-import-feedback { display: grid; gap: 5px; margin: 0; padding: 10px 12px; border-radius: 3px; background: #f4f6f8; color: #59616a; font-size: 8px; line-height: 1.5; }
.submittal-import-feedback.is-error { border-left: 3px solid #c45a55; background: #fff4f3; color: #93423d; }
.submittal-import-feedback.is-warning { border-left: 3px solid #d29a3d; background: #fff8eb; color: #865f20; }
.submittal-import-feedback strong { font-size: 9px; }
.submittal-import-feedback ul { margin: 0; padding-left: 16px; }
.submittal-import-table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 3px; }
.submittal-import-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 8px; }
.submittal-import-table th { position: sticky; top: 0; z-index: 1; padding: 8px 9px; border-bottom: 1px solid #cfd3d7; background: #f1f2f4; color: #626970; font-weight: 650; text-align: left; white-space: nowrap; }
.submittal-import-table td { padding: 7px 9px; border-bottom: 1px solid #e3e5e8; color: #424950; vertical-align: middle; }
.submittal-import-table tr:last-child td { border-bottom: 0; }
.submittal-import-table small { display: block; margin-top: 2px; color: #8a9198; font-size: 7px; }
.submittal-import-table input, .submittal-import-table select { width: 100%; min-width: 118px; height: 30px; padding: 5px 7px; border: 1px solid #cfd3d7; border-radius: 2px; background: #fff; color: #3f464d; font: inherit; }
.submittal-import-table input:invalid, .submittal-import-table select:invalid { border-color: #c96560; background: #fff8f7; }
.submittal-import-table .import-number-cell { min-width: 88px; color: #365baf; font-weight: 650; font-variant-numeric: tabular-nums; }
.submittal-import-table .import-file-cell { min-width: 180px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submittal-import-table .import-name-cell { min-width: 190px; }
.submittal-import-table .import-remove-cell { width: 42px; min-width: 42px; text-align: center; }
.submittal-import-table .import-remove-cell button { width: 27px; height: 27px; border: 1px solid #ddb6b3; border-radius: 2px; background: #fff; color: #ad4842; cursor: pointer; }
.submittal-import-company { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #d7dce2; border-radius: 3px; background: #f8f9fa; color: #555d65; font-size: 8px; }
.submittal-import-company strong { margin-right: auto; color: #363d44; font-size: 9px; }
.submittal-import-company select { min-width: 230px; height: 31px; padding: 5px 8px; border: 1px solid #c9ced4; border-radius: 2px; background: #fff; color: #3f464d; font-size: 8px; }
.submittal-import-dialog > .dialog-actions { flex: 0 0 auto; padding: 12px 16px 15px; border-top: 1px solid var(--border); }
#submittal-import-button[aria-disabled="true"] { color: #8b9197; }

.task-rfi-section .section-title button { min-height: 27px; font-size: 8px; }
.task-rfi-links { display: grid; gap: 5px; }
.task-rfi-links > button { display: grid; min-height: 45px; grid-template-columns: 62px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 8px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; cursor: pointer; text-align: left; }
.task-rfi-links > button:hover { border-color: #a8b9dc; background: #f7f9fd; }
.task-rfi-links > button span { grid-row: 1 / 3; align-self: center; color: var(--blue); font-size: 8px; font-weight: 600; }
.task-rfi-links > button strong, .task-rfi-links > button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-rfi-links > button strong { color: #3c434a; font-size: 8px; }
.task-rfi-links > button small { color: #858c92; font-size: 7px; }

.people-table-wrap:has(.people-company-column) { min-width: 1120px; }
.people-table .people-company-column { width: 170px; }
.people-table .people-pm-column { width: 125px; }
.people-company-select, .people-pm-select { width: 100%; height: 30px; padding: 4px 7px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: #3f464c; font-size: 8px; }
.people-company-select:disabled, .people-pm-select:disabled { border-color: transparent; background: transparent; opacity: 1; }
.people-invite-pm-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.people-invite-pm-fields[hidden] { display: none; }
.people-invite-pm-fields label { display: grid; gap: 5px; color: var(--muted); font-size: 9px; }
.people-invite-pm-fields select { width: 100%; height: 34px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--ink); font-size: 9px; }

/* v0.19: screenshot-calibrated Fieldwire project shell, Plans and Specifications. */
:root { --selected: #1769f6; --blue: #1769f6; --blue-dark: #0d57d5; --rail: #303234; --rail-deep: #2c2e30; }
@media (min-width: 1121px) {
  .app-shell { grid-template-columns: 233px minmax(0, 1fr) 236px; }
  .app-shell.is-wide-workspace { grid-template-columns: 233px minmax(0, 1fr); }
}
.project-switcher { height: 43px; grid-template-columns: 27px minmax(0, 1fr) 18px; gap: 6px; padding: 6px 15px; background: #2c2e30; }
.project-mark { width: 24px; height: 24px; border: 2px solid #e5b92e; background: transparent; color: #e5b92e; font-size: 7px; }
.project-name { font-size: 12px; }
.rail-section-title { min-height: 36px; padding: 16px 20px 7px; color: #a8abad; font-size: 9px; font-weight: 600; letter-spacing: .16em; }
.rail-item, .rail-filter { min-height: 31px; grid-template-columns: 27px minmax(0, 1fr) auto; padding: 4px 19px; color: #f0f1f2; font-size: 12px; }
.rail-item.is-active, .rail-filter.is-active { background: #1769f6; }
.rail-divider { margin: 8px 0 0; background: rgba(255,255,255,.12); }
.rail-task-title { min-height: 38px; padding-top: 14px; color: #f2f3f4; font-size: 12px; letter-spacing: 0; }
.rail-filter b { font-size: 10px; }
.rail-dev-badge { padding: 1px 4px; border: 1px solid rgba(255,255,255,.32); border-radius: 2px; color: #c8cbce; font-size: 7px; font-style: normal; line-height: 1.3; }
.rail-item-unavailable { color: #f0f1f2; }
.rail-new-category { color: #f0f1f2; }
.rail-new-category > span:first-child { font-size: 16px; }
.icon-change-orders::before { position: absolute; inset: 2px 1px; border: 1px solid currentColor; border-radius: 1px; content: ""; }
.icon-change-orders::after { position: absolute; top: 6px; right: 4px; left: 4px; height: 1px; background: currentColor; box-shadow: 0 3px currentColor; content: ""; }
.icon-budget { border: 1px solid currentColor; border-radius: 1px; }
.icon-budget::before { position: absolute; top: 3px; right: 2px; left: 2px; height: 2px; background: currentColor; box-shadow: 0 4px currentColor, 0 8px currentColor; content: ""; }
.rail-footer { height: 51px; justify-content: space-around; padding: 8px 20px; border-top: 0; background: var(--rail); }
.rail-footer::before { position: absolute; right: 20px; bottom: 50px; left: 20px; height: 1px; background: rgba(255,255,255,.16); content: ""; }
.rail-footer-button { width: 34px; height: 32px; justify-content: center; padding: 0; }
.icon-trash::before { position: absolute; top: 3px; right: 3px; bottom: 1px; left: 3px; border: 1px solid currentColor; border-top: 0; content: ""; }
.icon-trash::after { position: absolute; top: 0; left: 2px; width: 11px; height: 2px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; content: ""; }

.global-topbar { min-height: 42px; height: 42px; padding: 5px 14px; }
.topbar-leading, .topbar-actions { gap: 7px; }
.topbar-menu { width: 27px; height: 30px; font-size: 17px; }
.global-search { width: 209px; }
.global-search input { height: 30px; padding: 5px 31px 5px 12px; border-color: #bdc1c6; background: #f8f8f8; font-size: 12px; }
.global-search span { right: 9px; font-size: 15px; }
.topbar-icon { width: 26px; height: 30px; }
.notification-count { position: absolute; top: 0; right: -2px; display: grid; min-width: 16px; height: 16px; place-items: center; padding: 0 4px; border-radius: 9px; background: #e03232; color: #fff; font-size: 9px; }
.topbar-plan { display: grid; min-width: 92px; gap: 0; padding: 0 8px; border: 0; border-left: 1px solid #e0e2e4; background: transparent; color: #34393e; cursor: pointer; text-align: left; }
.topbar-plan strong { font-size: 10px; font-weight: 500; }
.topbar-plan span { font-size: 10px; }
.account-button { height: 30px; font-size: 11px; }
.topbar-locale { padding-left: 5px; border-left: 1px solid #e0e2e4; font-size: 12px; }

.fieldwire-library-toolbar { min-height: 51px; height: 51px; padding: 8px 17px; border-bottom-color: #cfd2d5; }
.fieldwire-library-toolbar .library-actions { gap: 8px; }
.fieldwire-library-toolbar .toolbar-button, .fieldwire-library-toolbar .new-library-item { height: 34px; padding: 0 13px; border-color: #c3c7cc; border-radius: 2px; font-size: 12px; }
.fieldwire-library-toolbar .new-library-item { border-color: #1769f6; background: #1769f6; }
.plans-toolbar-leading { margin-right: auto; }
.plans-toolbar-trailing { margin-left: auto; }
.plan-order-button { width: 35px; padding: 0 !important; line-height: 8px; }
.view-switch { height: 34px; border-color: #c3c7cc; }
.view-switch button { width: 34px; font-size: 15px; }
.view-switch button.is-active { background: #1769f6; color: #fff; }
.plan-library-actions-wrap { position: relative; }
.plan-library-actions-menu { position: absolute; z-index: 35; top: 39px; left: 0; display: grid; width: 190px; overflow: hidden; border: 1px solid #bdc1c6; border-radius: 2px; background: #fff; box-shadow: 0 7px 18px rgba(28,32,37,.18); }
.plan-library-actions-menu[hidden] { display: none; }
.plan-library-actions-menu button { min-height: 34px; padding: 8px 11px; border: 0; border-bottom: 1px solid #e3e5e7; background: #fff; color: #454a50; cursor: pointer; font-size: 11px; text-align: left; }
.plan-library-actions-menu button:last-child { border-bottom: 0; }
.plan-library-actions-menu button:hover { background: #f4f5f7; }
.plan-library-actions-menu button:disabled { color: #acb0b4; cursor: default; }

.plan-filter-strip { display: flex; min-height: 60px; flex: 0 0 auto; align-items: center; gap: 9px; padding: 10px 17px; border-bottom: 1px solid #d5d8db; background: #fff; box-shadow: 0 3px 8px rgba(33,37,42,.08); }
.plan-filter-strip[hidden] { display: none; }
.plan-filter-strip label { position: relative; display: inline-flex; height: 34px; align-items: center; border: 1px solid #ccd0d4; border-radius: 18px; background: #fff; color: #4d5257; }
.plan-filter-strip label > span { position: absolute; left: 12px; z-index: 1; pointer-events: none; font-size: 11px; }
.plan-filter-strip select { height: 32px; min-width: 82px; padding: 0 27px 0 12px; border: 0; border-radius: 17px; background: transparent; color: transparent; cursor: pointer; font-size: 11px; }
.plan-filter-strip option { color: #3f454b; }
.plan-filter-strip label:has(select) { min-width: 84px; }
.plan-filter-strip label:nth-child(3), .plan-filter-strip label:nth-child(4) { min-width: 126px; }
.plan-filter-strip .plan-3d-filter-chip { min-width: 80px; padding: 0 12px; cursor: pointer; }
.plan-3d-filter-chip input { position: absolute; opacity: 0; }
.plan-3d-filter-chip span { position: static !important; }
.plan-3d-filter-chip:has(input:checked) { border-color: #7e9fe8; background: #edf3ff; color: #1769f6; }
.plan-clear-filters { border: 0; background: transparent; color: #98a9d3; cursor: pointer; font-size: 11px; }
.plan-clear-filters:hover { color: #1769f6; }

.fieldwire-plans-content { position: relative; min-height: 0; flex: 1; overflow: auto; padding: 22px 17px 42px; background: #f5f6f8; }
.plans-collection-heading { min-height: 38px; margin: 0 0 10px; }
.plans-collection-heading[hidden] { display: none; }
.plans-collection-heading > div { display: flex; align-items: baseline; gap: 9px; }
.plans-root-back { padding: 0; border: 0; background: transparent; color: #1769f6; cursor: pointer; font-size: 12px; }
.plans-collection-heading h2 { font-size: 13px; }
.plans-grid.is-folder-root { display: block; padding-bottom: 40px; border: 0; background: transparent; }
.plan-folder-row { display: grid; width: min(100%, 1020px); min-height: 51px; grid-template-columns: 25px minmax(0, 1fr) 38px; align-items: center; border-bottom: 0; color: #3f4449; }
.plan-folder-row:hover { background: rgba(255,255,255,.48); }
.plan-folder-row.is-selected { background: #edf3ff; }
.plan-folder-check { display: grid; width: 25px; height: 25px; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.plan-folder-check span { position: relative; display: block; width: 15px; height: 15px; border: 1px solid #c9cdd2; border-radius: 3px; background: #fff; }
.plan-folder-check[aria-pressed="true"] span { border-color: #1769f6; background: #1769f6; }
.plan-folder-check[aria-pressed="true"] span::after { position: absolute; top: 2px; left: 4px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; content: ""; transform: rotate(45deg); }
.plan-folder-open { display: flex; min-width: 0; height: 51px; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.plan-folder-open strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.plan-folder-open small { font-size: 11px; font-weight: 400; }
.plan-folder-icon { position: relative; display: block; width: 15px; height: 11px; flex: 0 0 auto; border-radius: 1px; background: #42474c; }
.plan-folder-icon::before { position: absolute; top: -3px; left: 1px; width: 7px; height: 4px; border-radius: 1px 1px 0 0; background: #42474c; content: ""; }
.plan-folder-row-action { width: 25px; height: 25px; border: 1px solid #ccd0d4; border-radius: 2px; background: #fff; color: #363b40; cursor: pointer; font-size: 12px; }
.plans-count-footer { position: absolute; right: 17px; bottom: 0; left: 17px; height: 34px; padding-top: 10px; border-top: 1px solid #c7cacf; color: #555b61; font-size: 11px; pointer-events: none; }

.specs-library-toolbar { min-height: 68px; height: 68px; }
.spec-library-search { width: 317px; }
.spec-library-search input { height: 34px; background: #fff; font-size: 11px; }
.spec-library-search > .spec-search-icon { position: absolute; top: 50%; left: 12px; width: 11px; height: 11px; border: 1.5px solid #5f656a; border-radius: 50%; font-size: 0; transform: translateY(-58%); }
.spec-library-search > .spec-search-icon::after { position: absolute; right: -4px; bottom: -3px; width: 5px; height: 1.5px; border-radius: 1px; background: #5f656a; content: ""; transform: rotate(45deg); transform-origin: left center; }
.spec-table-wrap { position: relative; display: flex; min-height: 0; flex: 1; padding: 0; background: #f5f6f8; }
.spec-table { align-self: flex-start; margin: 18px; }
.spec-empty-state { display: grid; width: 100%; min-height: 100%; place-items: center; align-content: center; gap: 14px; padding: 40px 24px 55px; color: #70767c; text-align: center; }
.spec-empty-state[hidden] { display: none; }
.spec-empty-state strong { margin-top: 20px; color: #303438; font-size: 19px; font-weight: 600; }
.spec-empty-state p { margin: 0; font-size: 12px; }
.spec-empty-state > button { display: inline-flex; height: 35px; align-items: center; gap: 8px; margin-top: 7px; padding: 0 15px; font-size: 12px; }
.spec-empty-state > a { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: #1769f6; font-size: 11px; text-decoration: none; }
.spec-empty-state > a:hover { text-decoration: underline; }
.external-link-icon { position: relative; display: inline-block; width: 11px; height: 11px; flex: 0 0 auto; border: 1.3px solid currentColor; }
.external-link-icon::before { position: absolute; top: -2px; right: -2px; width: 6px; height: 6px; border-top: 1.3px solid currentColor; border-right: 1.3px solid currentColor; background: #f5f6f8; content: ""; }
.external-link-icon::after { position: absolute; top: 1px; right: 0; width: 6px; height: 1.3px; background: currentColor; content: ""; transform: rotate(-45deg); transform-origin: right center; }
.spec-empty-state.is-search-empty .spec-empty-illustration, .spec-empty-state.is-search-empty > button, .spec-empty-state.is-search-empty > a { display: none; }
.spec-empty-illustration { position: relative; display: grid; width: 170px; height: 170px; place-items: center; border-radius: 50%; background: #edf0f5; }
.spec-empty-illustration span { position: relative; display: block; width: 52px; height: 72px; border: 2px solid #aeb6c1; border-left-width: 4px; background: #f8f9fb; box-shadow: inset 0 13px #e5e9ef; }
.spec-empty-illustration span::before { position: absolute; top: 27px; right: 10px; left: 10px; height: 2px; background: #aeb6c1; box-shadow: 0 11px #aeb6c1, 0 22px #aeb6c1; content: ""; }
.spec-empty-illustration span::after { position: absolute; top: 7px; left: 11px; width: 28px; height: 10px; border: 1px solid #aeb6c1; background: #edf0f5; content: ""; }
.spec-empty-illustration i { position: absolute; top: 11px; right: 17px; display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: #aeb7c4; color: #fff; font-size: 27px; font-style: normal; font-weight: 200; }
.plan-folder-create-dialog { width: min(440px, calc(100vw - 40px)); }
.plan-upload-modal { z-index: 116; }
.plan-upload-dialog { display: flex; width: min(980px, calc(100vw - 40px)); height: min(720px, calc(100dvh - 40px)); flex-direction: column; overflow: hidden; }
.plan-upload-header { flex: 0 0 auto; align-items: flex-start; }
.plan-upload-header > div { display: grid; min-width: 0; gap: 5px; }
.plan-upload-header h2, .plan-upload-header p { margin: 0; }
.plan-upload-header p { color: var(--muted); font-size: 9px; font-weight: 400; }
#plan-upload-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.plan-upload-processing { display: grid; min-height: 390px; flex: 1; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.plan-upload-processing > span { width: 38px; height: 38px; border: 3px solid #d9dfe8; border-top-color: var(--blue); border-radius: 50%; animation: spec-review-spin .8s linear infinite; }
.plan-upload-processing strong { color: #3f464d; font-size: 15px; }
.plan-upload-processing p { margin: 0; font-size: 10px; }
.plan-upload-processing.is-error > span { display: grid; border: 0; background: #f8e9e8; color: #b13d39; animation: none; place-items: center; }
.plan-upload-processing.is-error > span::before { content: "!"; font-size: 20px; font-weight: 700; }
.plan-upload-processing.is-error strong { color: #a33a36; }
.plan-upload-review { display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: minmax(330px, 1.05fr) minmax(390px, .95fr); }
.plan-upload-review[hidden], .plan-upload-processing[hidden] { display: none; }
.plan-upload-preview { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 8px; padding: 16px; border-right: 1px solid var(--border); background: #eceff2; }
.plan-upload-preview-shell { display: grid; min-width: 0; min-height: 0; flex: 1; overflow: hidden; place-items: center; border: 1px solid #c6cbd0; background: #d7dadd; }
.plan-upload-preview-shell > * { grid-area: 1 / 1; }
.plan-upload-preview-shell canvas { display: block; max-width: calc(100% - 20px); max-height: calc(100% - 20px); background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); object-fit: contain; }
.plan-upload-preview-shell canvas[hidden], .plan-upload-preview-fallback[hidden] { display: none; }
.plan-upload-preview-fallback { z-index: 1; display: grid; justify-items: center; gap: 9px; padding: 20px; color: #78808a; background: #d7dadd; text-align: center; }
.plan-upload-preview-fallback span { display: grid; width: 58px; height: 72px; place-items: center; border: 2px solid #adb6c2; border-radius: 2px; background: #f7f8fa; color: #7e8997; font-size: 13px; font-weight: 700; }
.plan-upload-preview-fallback strong { max-width: 260px; font-size: 9px; font-weight: 500; }
.plan-upload-preview > p { min-height: 18px; margin: 0; color: #626a73; font-size: 9px; text-align: center; }
.plan-upload-review-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; padding: 14px 14px 0; background: #fff; }
.plan-upload-review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-upload-review-toolbar strong { color: #3d444b; font-size: 13px; }
.plan-upload-review-toolbar button { min-height: 30px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--blue); cursor: pointer; font-size: 8px; }
.plan-upload-review-panel > p { margin: 8px 0 11px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.plan-upload-list { min-height: 0; flex: 1; overflow: auto; border-top: 1px solid var(--border); }
.plan-upload-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 9px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.plan-upload-row.is-active { background: #f5f7fc; }
.plan-upload-row.has-issues { background: #fff8f7; }
.plan-upload-page-select { display: grid; width: 48px; height: 54px; align-content: center; justify-items: center; gap: 3px; padding: 4px; border: 1px solid #c8cdd3; border-radius: 2px; background: #fff; color: #6f767e; cursor: pointer; }
.plan-upload-row.is-active .plan-upload-page-select { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); color: var(--blue); }
.plan-upload-page-select b { font-size: 12px; }
.plan-upload-page-select small { font-size: 7px; }
.plan-upload-row-fields { display: grid; min-width: 0; grid-template-columns: minmax(105px, .72fr) minmax(130px, 1fr); gap: 7px; }
.plan-upload-row-fields label { display: grid; min-width: 0; gap: 4px; color: var(--muted); font-size: 7px; }
.plan-upload-row-fields input { width: 100%; min-width: 0; height: 31px; padding: 5px 7px; border: 1px solid var(--border); border-radius: 2px; color: #40474e; font-size: 9px; }
.plan-upload-row.has-issues input[name="number"] { border-color: #c8524d; }
.plan-upload-row-status { display: flex; grid-column: 1 / -1; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 18px; }
.plan-upload-row-status span { padding: 3px 6px; border-radius: 9px; background: #edf2fb; color: #46639e; font-size: 7px; }
.plan-upload-row-status span.is-version { background: #fff1dd; color: #9a621f; }
.plan-upload-row-status span.is-bookmark { background: #eaf5ed; color: #3c7b4a; }
.plan-upload-row-status span.is-text-scan { background: #e8f2ff; color: #2868a8; }
.plan-upload-row-status em { color: #b3423d; font-size: 7px; font-style: normal; }
.plan-upload-footer { display: flex; min-height: 58px; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 15px; border-top: 1px solid var(--border); background: #fff; }
.plan-upload-footer button { min-width: 92px; }
.plan-upload-footer button[hidden] { display: none; }

.plan-rescan-modal { z-index: 117; }
.plan-rescan-dialog { display: flex; width: min(1060px, calc(100vw - 42px)); height: min(760px, calc(100dvh - 42px)); flex-direction: column; overflow: hidden; }
.plan-rescan-header { flex: 0 0 auto; align-items: flex-start; }
.plan-rescan-header > div { display: grid; min-width: 0; gap: 4px; }
.plan-rescan-header h2, .plan-rescan-header p { margin: 0; }
.plan-rescan-header p { color: var(--muted); font-size: 9px; font-weight: 400; }
#plan-rescan-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.plan-rescan-calibration { display: grid; min-width: 0; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) 250px; }
.plan-rescan-calibration[hidden], .plan-rescan-processing[hidden], .plan-rescan-review[hidden] { display: none; }
.plan-rescan-preview-pane { display: flex; min-width: 0; min-height: 0; flex-direction: column; padding: 14px; background: #e9ecef; }
.plan-rescan-sheet-shell { display: flex; min-width: 0; min-height: 0; flex: 1; align-items: center; justify-content: center; overflow: auto; border: 1px solid #c3c8cd; background: #cfd3d7; }
.plan-rescan-sheet { position: relative; display: grid; flex: 0 0 auto; background: #fff; box-shadow: 0 2px 12px rgba(18,22,27,.24); }
.plan-rescan-sheet[hidden], .plan-rescan-fallback[hidden] { display: none; }
.plan-rescan-sheet > * { grid-area: 1 / 1; }
.plan-rescan-sheet canvas { display: block; width: 100%; height: 100%; background: #fff; }
.plan-rescan-regions { position: relative; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.plan-rescan-region { position: absolute; min-width: 24px; min-height: 20px; border: 2px solid #df3e36; background: rgba(223,62,54,.08); box-shadow: 0 0 0 1px rgba(255,255,255,.8) inset; cursor: move; pointer-events: auto; touch-action: none; }
.plan-rescan-region.is-description { border-color: #ca332c; background: rgba(223,62,54,.06); }
.plan-rescan-region-label { position: absolute; top: -23px; left: -2px; display: inline-flex; height: 20px; align-items: center; gap: 7px; padding: 0 7px; border-radius: 2px 2px 0 0; background: #df3e36; color: #fff; font-size: 9px; font-weight: 600; white-space: nowrap; }
.plan-rescan-region-label i { font-size: 13px; font-style: normal; font-weight: 400; }
.plan-rescan-handle { position: absolute; z-index: 2; width: 12px; height: 12px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #df3e36; box-shadow: 0 0 0 1px #b62d27; touch-action: none; }
.plan-rescan-handle.is-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.plan-rescan-handle.is-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.plan-rescan-handle.is-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.plan-rescan-handle.is-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.plan-rescan-fallback { display: grid; justify-items: center; gap: 10px; padding: 24px; color: #737b84; text-align: center; }
.plan-rescan-fallback span { display: grid; width: 58px; height: 72px; place-items: center; border: 2px solid #aab3bd; background: #f7f8f9; font-size: 12px; font-weight: 700; }
.plan-rescan-fallback strong { max-width: 320px; font-size: 10px; font-weight: 500; }
.plan-rescan-preview-nav { display: grid; min-height: 41px; grid-template-columns: 31px minmax(0, 1fr) auto 31px; align-items: center; gap: 7px; padding-top: 9px; }
.plan-rescan-preview-nav button { width: 31px; height: 29px; border: 1px solid #bfc5ca; border-radius: 2px; background: #fff; color: #4c5359; cursor: pointer; font-size: 17px; }
.plan-rescan-preview-nav strong { overflow: hidden; color: #454b51; font-size: 10px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.plan-rescan-preview-nav span { color: #747b82; font-size: 9px; }
.plan-rescan-guidance { padding: 22px 19px; border-left: 1px solid var(--border); background: #fff; }
.plan-rescan-guidance h3 { margin: 0 0 11px; color: #343a40; font-size: 15px; }
.plan-rescan-guidance p { margin: 0 0 17px; color: #6d747b; font-size: 10px; line-height: 1.55; }
.plan-rescan-guidance ul { display: grid; gap: 10px; margin: 0; padding: 0; color: #5b6269; font-size: 10px; list-style: none; }
.plan-rescan-guidance li { padding-left: 12px; border-left: 3px solid #df3e36; }
.plan-rescan-zoom { display: grid; grid-template-columns: minmax(0, 1fr) 31px 48px 31px; align-items: center; gap: 5px; margin-top: 27px; padding-top: 14px; border-top: 1px solid var(--border); color: #555c63; font-size: 10px; }
.plan-rescan-zoom button { width: 31px; height: 29px; border: 1px solid #c6cbd0; border-radius: 2px; background: #fff; cursor: pointer; font-size: 16px; }
.plan-rescan-zoom output { text-align: center; }
.plan-rescan-processing { display: grid; min-height: 360px; flex: 1; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.plan-rescan-processing > span { width: 40px; height: 40px; border: 3px solid #d9dfe8; border-top-color: var(--blue); border-radius: 50%; animation: spec-review-spin .8s linear infinite; }
.plan-rescan-processing strong { color: #3f464d; font-size: 15px; }
.plan-rescan-processing p { margin: 0; font-size: 10px; }
.plan-rescan-review { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 16px; background: #f5f6f8; }
.plan-rescan-review-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 0 2px 12px; }
.plan-rescan-review-heading h3, .plan-rescan-review-heading p { margin: 0; }
.plan-rescan-review-heading h3 { color: #343a40; font-size: 15px; }
.plan-rescan-review-heading p { margin-top: 4px; color: #70777e; font-size: 9px; }
.plan-rescan-results { min-height: 0; flex: 1; overflow: auto; border: 1px solid #cfd3d7; background: #fff; }
.plan-rescan-result { display: grid; min-height: 76px; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 12px; padding: 11px 13px; border-bottom: 1px solid #dde0e3; }
.plan-rescan-result:last-child { border-bottom: 0; }
.plan-rescan-result.has-issues { background: #fff8f7; }
.plan-rescan-result header { display: grid; gap: 4px; padding-top: 17px; }
.plan-rescan-result header strong { overflow: hidden; color: #3e454b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.plan-rescan-result header span { color: #7a8188; font-size: 8px; }
.plan-rescan-result > div { display: grid; grid-template-columns: minmax(130px, .65fr) minmax(190px, 1fr); gap: 9px; }
.plan-rescan-result label { display: grid; gap: 4px; color: #6c737a; font-size: 8px; }
.plan-rescan-result input { width: 100%; height: 33px; padding: 6px 8px; border: 1px solid #c8cdd2; border-radius: 2px; color: #40474d; font-size: 10px; }
.plan-rescan-result input:disabled { background: #f1f2f3; color: #888f95; }
.plan-rescan-result-feedback { display: grid; grid-column: 2; gap: 3px; }
.plan-rescan-result-feedback:empty { display: none; }
.plan-rescan-result-feedback p { margin: -4px 0 0; color: #9b712b; font-size: 8px; }
.plan-rescan-result-feedback p.is-error { color: #bd3e38; }
.plan-rescan-footer { display: grid; min-height: 59px; flex: 0 0 auto; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 10px 15px; border-top: 1px solid var(--border); background: #fff; }
.plan-rescan-field-toggles { display: flex; align-items: center; gap: 16px; }
.plan-rescan-field-toggles label { display: flex; align-items: center; gap: 6px; color: #4d545a; font-size: 10px; }
.plan-rescan-field-toggles input { accent-color: #1769f6; }
.plan-rescan-footer button[hidden] { display: none; }

@media (max-width: 760px) {
  .plan-rescan-dialog { width: calc(100vw - 20px); height: calc(100dvh - 20px); }
  .plan-rescan-calibration { grid-template-columns: 1fr; grid-template-rows: minmax(260px, 1fr) auto; }
  .plan-rescan-guidance { padding: 12px 15px; border-top: 1px solid var(--border); border-left: 0; }
  .plan-rescan-guidance p, .plan-rescan-guidance ul { display: none; }
  .plan-rescan-zoom { margin-top: 10px; padding-top: 9px; }
  .plan-rescan-result { grid-template-columns: 100px minmax(0, 1fr); }
  .plan-rescan-result > div { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .plan-upload-dialog { width: calc(100vw - 24px); height: calc(100dvh - 24px); }
  .plan-upload-review { grid-template-columns: 1fr; grid-template-rows: minmax(210px, 42%) minmax(0, 1fr); }
  .plan-upload-preview { padding: 10px; border-right: 0; border-bottom: 1px solid var(--border); }
  .plan-upload-row-fields { grid-template-columns: minmax(95px, .68fr) minmax(120px, 1fr); }
}
.plan-folder-create-form { display: grid; gap: 14px; padding: 16px; }
.plan-folder-create-form label { display: grid; gap: 5px; color: #686e74; font-size: 10px; }
.plan-folder-create-form input { width: 100%; height: 35px; padding: 6px 9px; border: 1px solid #c7cbd0; border-radius: 2px; font-size: 11px; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 178px minmax(0, 1fr) 220px; }
  .app-shell.is-wide-workspace { grid-template-columns: 178px minmax(0, 1fr); }
  .toolbar-button { padding-inline: 7px; }
  .plan-heading { display: none; }
  .workspace-toolbar { grid-template-columns: 1fr auto; }
  .toolbar-actions { grid-column: 2; }
  .tasks-toolbar { align-items: stretch; flex-direction: column; }
  .tasks-toolbar-actions { flex-wrap: wrap; justify-content: flex-start; }
  .task-workspace-search { flex: 1; }
  .photos-toolbar { align-items: stretch; flex-direction: column; }
  .photos-toolbar-actions { justify-content: flex-start; }
  .photo-search { flex: 1; }
  .forms-toolbar { align-items: stretch; flex-direction: column; }
  .forms-toolbar-actions { justify-content: flex-start; }
  .models-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .models-toolbar-actions { justify-content: flex-start; }
  .model-viewer-canvas { grid-template-columns: 48px 205px minmax(0, 1fr) 205px; }
  .model-object-properties { right: 214px; width: 248px; }
  .form-search { flex: 1; }
  .files-toolbar { align-items: stretch; flex-direction: column; }
  .files-toolbar-actions { flex-wrap: wrap; justify-content: flex-start; }
  .file-search { flex: 1; }
  .people-toolbar { align-items: stretch; flex-direction: column; }
  .people-toolbar-actions { flex-wrap: wrap; justify-content: flex-start; }
  .people-search { flex: 1; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 174px minmax(0, 1fr); grid-template-areas: "rail workspace"; }
  .context-sidebar {
    position: fixed;
    z-index: 55;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, calc(100vw - 54px));
    box-shadow: var(--shadow);
    transform: translateX(105%);
    transition: transform .18s ease;
  }
  .context-sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .sidebar-filter-open, .mobile-only { display: grid; }
  .inspector-body { grid-template-columns: minmax(0, 1fr) 280px; }
  .model-viewer-canvas, .model-viewer-canvas.is-tree-closed, .model-viewer-canvas.is-tasks-closed, .model-viewer-canvas.is-tree-closed.is-tasks-closed { grid-template-columns: 48px minmax(0, 1fr); }
  .model-stage { grid-column: 2; }
  .model-object-tree { position: absolute; z-index: 18; top: 0; bottom: 0; left: 48px; width: 218px; box-shadow: 6px 0 18px rgba(38,43,48,.16); }
  .model-task-panel { position: absolute; z-index: 18; top: 0; right: 0; bottom: 0; width: 220px; box-shadow: -6px 0 18px rgba(38,43,48,.16); }
  .model-object-properties { right: 12px; width: 248px; }
}

@media (max-width: 720px) {
  .app-shell, .app-shell.is-wide-workspace { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 58px; grid-template-areas: "workspace" "rail"; min-height: 0; }
  .global-rail {
    grid-area: rail;
    position: relative;
    display: block;
    overflow: visible;
    background: var(--rail-deep);
  }
  .project-switcher, .rail-section-title, .rail-divider, .rail-filters, .rail-footer { display: none; }
  .rail-primary { display: grid; height: 58px; grid-template-columns: repeat(7, 1fr); }
  .rail-item { display: none; height: 58px; grid-template-columns: 1fr; grid-template-rows: 22px 13px; gap: 2px; justify-items: center; padding: 6px 4px 5px; font-size: 9px; }
  .rail-item:nth-child(1), .rail-item:nth-child(2), .rail-item:nth-child(3), .rail-item:nth-child(4), .rail-item:nth-child(5), .rail-item:nth-child(6), .rail-item:nth-child(7) { display: grid; }
  .rail-item.is-active { box-shadow: inset 0 3px var(--selected); }
  .rail-icon { font-size: 16px; }
  .workspace { grid-area: workspace; }
  .global-topbar { min-height: 45px; padding: 6px 8px; }
  .global-search, .topbar-icon, .account-button { display: none; }
  .topbar-actions { margin-left: auto; }
  .workspace-toolbar { min-height: 48px; grid-template-columns: 1fr auto; padding: 6px 8px; }
  .back-button, .toolbar-leading .toolbar-button:not(.mobile-only), .version-button { display: none; }
  .plan-heading { display: block; grid-column: 1; grid-row: 1; text-align: left; }
  .toolbar-leading { grid-column: 2; grid-row: 1; order: 2; }
  .toolbar-actions { display: none; }
  .plan-heading p { display: none; }
  .plan-heading h1 { font-size: 12px; }
  .plan-viewport { justify-content: flex-start; padding: 8px 8px 35px 40px; }
  .plan-viewport.is-immersive { padding: 12px 12px 38px 44px; }
  .plan-canvas { width: calc(800px * var(--plan-zoom)); min-width: calc(800px * var(--plan-zoom)); }
  .markup-toolbar { top: 8px; left: 5px; }
  .markup-toolbar button:nth-of-type(n+8), .markup-toolbar .tool-divider:nth-of-type(n+2) { display: none; }
  .view-controls { top: 8px; right: 8px; }
  .plan-tool-panel { top: 8px; right: 47px; }
  .link-choice-panel { top: 141px; left: 43px; }
  .symbol-panel { top: 240px; left: 43px; }
  .color-panel { top: 376px; left: 43px; }
  .sheet-title-pill { max-width: 190px; }
  .sheet-version-control { display: none; }
  .task-filter-panel { position: fixed; top: 56px; right: 8px; left: auto; width: min(326px, calc(100vw - 16px)); max-height: calc(100dvh - 122px); }
  .context-sidebar { bottom: 58px; width: min(320px, calc(100vw - 42px)); }
  .inspector { inset: 0 0 58px; padding: 0; place-items: stretch; }
  .inspector-panel { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; }
  .inspector-body { display: flex; flex-direction: column; overflow: auto; }
  .inspector-feed, .inspector-attributes { overflow: visible; border-right: 0; }
  .inspector-attributes { order: -1; }
  .inspector-header { padding-top: max(14px, env(safe-area-inset-top)); }
  .draft-panel { align-self: center; margin: auto; }
  .attachment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .version-modal { inset: 0 0 58px; padding: 0; place-items: stretch; }
  .compact-modal { inset: 0 0 58px; padding: 12px; }
  .plan-details-form { grid-template-columns: 1fr; }
  .plan-details-form label, .plan-details-form label:nth-child(n+3) { grid-column: 1; }
  .dialog-actions { grid-column: 1; }
  .version-dialog { width: 100%; max-height: none; height: 100%; border: 0; border-radius: 0; }
  .version-dialog-toolbar { align-items: flex-start; flex-direction: column; }
  .version-card { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  .version-thumbnail { height: 72px; }
  .version-edit-form { grid-template-columns: 1fr; }
  .version-edit-form .secondary-button { justify-self: end; }
  .version-card-actions button { min-width: 92px; min-height: 44px; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .library-toolbar { min-height: auto; align-items: stretch; flex-direction: column; gap: 8px; padding: 10px; }
  .library-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .library-search { width: 100%; grid-column: 1 / -1; }
  .library-layout { grid-template-columns: 1fr; }
  .library-folders { display: flex; min-height: 43px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 4px; }
  .library-folders > button, .library-folders #plan-folder-list button { width: auto; min-width: max-content; grid-template-columns: auto auto; gap: 6px; padding: 6px 10px; }
  .library-folders #plan-folder-list { display: flex; }
  .folder-separator { width: 1px; height: 25px; margin: 5px 4px; }
  .library-content { padding: 10px; }
  .library-filter-panel { position: fixed; top: 108px; right: 8px; left: 8px; width: auto; }
  .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .plan-thumbnail { height: 105px; }
  .plans-grid.is-list .plans-list-header { display: none; }
  .plans-grid.is-list .plan-card { grid-template-columns: minmax(0, 1fr) 64px; }
  .plans-grid.is-list .plan-card-tags, .plans-grid.is-list .plan-list-version { display: none; }
  .spec-table-wrap { padding: 8px; }
  .spec-table th:first-child { width: 98px; }
  .spec-table th:nth-child(3), .spec-table td:nth-child(3) { display: none; }
  .spec-viewer-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr); padding: 8px; }
  .spec-viewer-title { text-align: left; }
  .spec-viewer-actions { grid-column: 1 / -1; }
  .spec-viewer-actions .library-search { flex: 1; }
  .spec-document-stage { padding: 10px; }
  .spec-document-page { min-height: 760px; padding: 42px 32px; }
  .spec-search-results { position: fixed; z-index: 40; right: 0; bottom: 100px; width: min(280px, calc(100vw - 42px)); max-height: 54vh; box-shadow: var(--shadow); }
  .tasks-toolbar { min-height: auto; gap: 8px; padding: 9px 10px; }
  .tasks-heading h1 { font-size: 17px; }
  .tasks-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .task-workspace-search { width: 100%; grid-column: 1 / 3; grid-row: 1; }
  .task-sort-control { min-width: 0; grid-column: 1 / 3; grid-row: 2; }
  .task-sort-control select { min-width: 78px; }
  #task-workspace-filter-button { grid-column: 3; grid-row: 2; }
  .task-view-switch { grid-column: 1 / -1; grid-row: 3; justify-self: stretch; }
  .task-view-switch button { width: auto; flex: 1; }
  .tasks-toolbar-actions > .new-library-item { position: static; grid-column: 3; grid-row: 1; }
  .task-workspace-filter-panel { position: fixed; z-index: 70; top: 112px; right: 8px; left: 8px; width: auto; max-height: calc(100dvh - 180px); overflow: auto; }
  .task-bulk-bar { align-items: flex-start; flex-direction: column; }
  .task-kanban { width: max-content; grid-template-columns: repeat(5, 260px); }
  .task-calendar-shell, .task-gantt-shell, .task-analytics { padding: 9px; }
  .task-calendar-shell { min-width: 790px; }
  .task-gantt-shell { min-width: 940px; }
  .task-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-analytics-grid { grid-template-columns: 1fr; }
  .task-create-form { grid-template-columns: 1fr; overflow: auto; }
  .task-create-form .task-create-wide { grid-column: 1; }
  .photos-toolbar { min-height: auto; gap: 8px; padding: 9px 10px; }
  .photos-heading h1 { font-size: 17px; }
  .photos-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .photo-search { width: 100%; grid-column: 1 / -1; grid-row: 1; }
  #photo-filter-button { grid-column: 1; grid-row: 2; }
  .photo-actions-wrap { grid-column: 2; grid-row: 2; }
  .photo-new-wrap { grid-column: 3; grid-row: 2; }
  .photo-mobile-scopes { display: flex; min-height: 39px; flex: 0 0 auto; padding: 4px 8px; border-bottom: 1px solid var(--border); background: #fff; }
  .photo-mobile-scopes button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: #fff; color: var(--muted); font-size: 9px; }
  .photo-mobile-scopes button.is-active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 600; }
  .photo-filter-panel { position: fixed; z-index: 70; top: 124px; right: 8px; left: 8px; width: auto; max-height: calc(100dvh - 194px); overflow: auto; }
  .photo-filter-panel form { grid-template-columns: 1fr; }
  .photo-filter-panel fieldset, .photo-filter-panel .clear-filter-button { grid-column: 1; }
  .photo-gallery { padding: 10px 9px 22px; }
  .photo-date-group { margin-bottom: 18px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .photo-card-download { opacity: 1; }
  .photo-card-caption { padding: 7px; }
  .photo-card-caption strong { font-size: 8px; }
  .photo-card-tag { bottom: 42px; }
  .photo-bulk-bar { padding-inline: 10px; }
  .photo-actions-menu { right: -42px; }
  .photo-upload-menu { right: 0; }
  .photo-viewer-modal { inset: 0 0 58px; padding: 0; place-items: stretch; }
  .photo-viewer-dialog { width: 100%; height: 100%; border: 0; border-radius: 0; }
  .photo-viewer-header { min-height: 98px; align-items: stretch; flex-direction: column; gap: 5px; padding: 8px 9px; }
  .photo-viewer-header > div:first-child { padding-inline: 4px; }
  .photo-viewer-tools { width: 100%; justify-content: space-between; }
  .photo-viewer-tools button { min-width: 40px; height: 40px; padding-inline: 6px; }
  .photo-viewer-tools #photo-zoom-label { min-width: 31px; }
  .photo-viewer-body { display: flex; flex-direction: column; }
  .photo-media-stage { flex: 0 0 49%; }
  .photo-viewer-media { width: 78%; height: 82%; }
  .photo-viewer-step { width: 31px; height: 48px; }
  .photo-viewer-prev { left: 5px; }
  .photo-viewer-next { right: 5px; }
  .photo-viewer-details { flex: 1; border-top: 1px solid var(--border); border-left: 0; }
  .photo-task-dialog, .photo-tags-dialog { width: min(520px, calc(100vw - 24px)); }
  .forms-toolbar { min-height: auto; gap: 8px; padding: 9px 10px; }
  .forms-heading h1 { font-size: 17px; }
  .forms-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .form-search { width: 100%; grid-column: 1 / -1; grid-row: 1; }
  #form-filter-button { grid-column: 1; grid-row: 2; }
  .form-actions-wrap { grid-column: 2; grid-row: 2; }
  #manage-form-templates { display: none; }
  #new-form-button { grid-column: 3; grid-row: 2; }
  .form-mobile-scopes { display: flex; min-height: 39px; flex: 0 0 auto; padding: 4px 8px; border-bottom: 1px solid var(--border); background: #fff; }
  .form-mobile-scopes button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: #fff; color: var(--muted); font-size: 9px; }
  .form-mobile-scopes button.is-active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 600; }
  .form-filter-panel { position: fixed; z-index: 70; top: 124px; right: 8px; left: 8px; width: auto; max-height: calc(100dvh - 194px); overflow: auto; }
  .form-filter-panel form { grid-template-columns: 1fr; }
  .form-filter-panel fieldset, .form-filter-panel .clear-filter-button { grid-column: 1; }
  .forms-content { padding: 10px 9px 22px; }
  .form-content-header { min-height: 48px; }
  .form-table-wrap { min-width: 690px; }
  .form-bulk-bar { padding-inline: 10px; }
  .form-actions-menu { right: -44px; }
  .form-create-form { grid-template-columns: 1fr; }
  .form-create-form .form-create-wide { grid-column: 1; }
  .form-viewer-modal { inset: 0 0 58px; padding: 0; place-items: stretch; }
  .form-viewer-dialog { width: 100%; height: 100%; border: 0; border-radius: 0; }
  .form-viewer-header { min-height: 58px; padding: 8px 9px 8px 12px; }
  .form-viewer-tools button:not(.form-viewer-close) { padding-inline: 6px; font-size: 8px; }
  #form-detail-form { display: flex; flex-direction: column; overflow: auto; }
  .form-document-pane { flex: 0 0 auto; overflow: visible; padding: 9px; }
  .form-document { width: 100%; }
  .form-document-header { grid-template-columns: 38px minmax(0, 1fr) auto; min-height: 72px; padding: 10px 12px; }
  .form-project-logo { width: 35px; height: 35px; }
  .form-document-header h2 { font-size: 13px; }
  .form-document-title { padding: 13px 12px; }
  .form-document-title h1 { font-size: 13px; }
  .form-document-section > header { padding-inline: 12px; }
  .form-document-fields { grid-template-columns: 1fr; padding-inline: 12px; }
  .form-document-field, .form-document-field:nth-child(even) { padding-right: 0; padding-left: 0; border-left: 0; }
  .form-weather-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 12px; }
  .form-weather-grid > div { padding: 6px; border-bottom: 1px solid var(--border); }
  .form-weather-grid > div:nth-child(2) { border-right: 0; }
  .form-entry-table-wrap { padding-inline: 12px; }
  .form-attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 12px; }
  .form-signature-list { padding-inline: 12px; }
  .form-signature-list article { grid-template-columns: 110px minmax(0, 1fr); }
  .form-signature-script { font-size: 22px; }
  .form-signature-actions { padding-inline: 12px; }
  .form-links-section > div { grid-template-columns: 1fr; padding-inline: 12px; }
  .form-attributes-pane { flex: 0 0 auto; overflow: visible; border-top: 7px solid #e6e8eb; border-left: 0; }
  .form-photo-dialog { width: min(620px, calc(100vw - 24px)); }
  .files-toolbar { min-height: auto; gap: 8px; padding: 9px 10px; }
  .files-heading h1 { font-size: 17px; }
  .files-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .file-search { width: 100%; grid-column: 1 / -1; grid-row: 1; }
  #file-filter-button { grid-column: 1; grid-row: 2; }
  .file-actions-wrap { grid-column: 2; grid-row: 2; }
  #new-file-folder-button { display: none; }
  #new-file-button { grid-column: 3; grid-row: 2; }
  .file-mobile-scopes { display: flex; min-height: 39px; flex: 0 0 auto; padding: 4px 8px; border-bottom: 1px solid var(--border); background: #fff; }
  .file-mobile-scopes button { flex: 1; border: 0; border-bottom: 2px solid transparent; background: #fff; color: var(--muted); font-size: 9px; }
  .file-mobile-scopes button.is-active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 600; }
  .file-filter-panel { position: fixed; z-index: 70; top: 124px; right: 8px; left: 8px; width: auto; max-height: calc(100dvh - 194px); overflow: auto; }
  .file-filter-panel form { grid-template-columns: 1fr; }
  .file-filter-panel .file-filter-wide, .file-filter-panel fieldset, .file-filter-panel .clear-filter-button { grid-column: 1; }
  .files-content { padding: 10px 9px 22px; }
  .file-content-header { min-height: 48px; }
  .file-content-header p { display: none; }
  .file-breadcrumbs button { max-width: 170px; font-size: 11px; }
  .file-table-wrap { min-width: 720px; }
  .file-bulk-bar { padding-inline: 10px; }
  .file-actions-menu { right: -42px; }
  .file-more-upload > div { grid-template-columns: 1fr; }
  .file-viewer-modal { inset: 0 0 58px; padding: 0; place-items: stretch; }
  .file-viewer-dialog, .file-viewer-dialog.is-fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; }
  .file-viewer-header { min-height: 103px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px; padding: 7px 7px 6px 10px; }
  .file-viewer-name { grid-column: 1; grid-row: 1; }
  .file-viewer-tools { grid-column: 2; grid-row: 1; }
  .file-viewer-tools #file-viewer-fullscreen, .file-viewer-tools #file-viewer-print, .file-viewer-tools #file-viewer-download { display: none; }
  .file-viewer-modes { width: 100%; height: 34px; grid-column: 1 / -1; grid-row: 2; }
  .file-viewer-modes button { min-width: 0; flex: 1; padding-inline: 4px; }
  .file-viewer-subtools { min-height: 43px; justify-content: flex-start; overflow-x: auto; padding-inline: 7px; }
  .file-viewer-subtools button { flex: 0 0 auto; }
  .file-viewer-body { grid-template-columns: 56px minmax(0, 1fr); }
  .file-page-sidebar > header { height: 32px; }
  .file-page-sidebar > header button { font-size: 0; }
  .file-page-sidebar > header button::before { font-size: 8px; content: "页"; }
  .file-page-sidebar > div { max-height: calc(100% - 32px); padding: 4px; }
  .file-page-thumb { grid-template-columns: 1fr; gap: 2px; padding: 3px; }
  .file-page-thumb > span { height: 58px; gap: 5px; padding: 8px 4px; }
  .file-page-thumb b { display: none; }
  .file-bookmark { min-height: 30px; padding-inline: 4px; font-size: 6px; }
  .file-document-stage { padding: 10px 10px 28px; }
  .file-stored-document { min-height: 620px; }
  .file-pdf-page-shell { width: 660px; zoom: calc(var(--file-pdf-zoom, 1) * .43); }
  .file-comments-sidebar { display: none; }
  .file-viewer-footer { min-height: 39px; padding: 5px 8px; }
  .file-viewer-footer button { min-height: 27px; padding-inline: 7px; }
  .models-toolbar { min-height: auto; gap: 7px; padding: 8px 9px; }
  .models-heading { justify-content: space-between; }
  .models-heading h1 { font-size: 17px; }
  .models-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  #model-calibration-button, #new-model-folder-button { display: none; }
  .model-view-switch { width: 100%; }
  .model-view-switch button { flex: 1; }
  #new-model-button { min-width: 86px; }
  .model-breadcrumbs { padding-inline: 10px; }
  .model-tiled-view { padding: 10px; }
  .model-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .model-folder-card { min-height: 88px; }
  .model-folder-open { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; padding: 10px; }
  .model-folder-icon { width: 37px; height: 27px; }
  .model-folder-icon::before { width: 17px; height: 6px; top: -5px; }
  .model-folder-copy strong { font-size: 9px; }
  .model-card { min-height: 166px; }
  .model-card-preview { height: 103px; }
  .model-card-copy { padding: 7px 28px 7px 8px; }
  .model-card-copy strong { font-size: 8px; }
  .model-card-menu-button { right: 3px; bottom: 10px; }
  .model-viewer-header { min-height: 39px; padding: 5px 8px; }
  .model-viewer-status > span { display: none; }
  .model-viewer-canvas { display: block; }
  .model-stage { position: absolute; inset: 0 0 52px; }
  .model-toolstrip { position: absolute; z-index: 25; right: 0; bottom: 0; left: 0; display: flex; height: 52px; min-height: 52px; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 4px; border-top: 1px solid #b9bec3; border-right: 0; background: #f8f9fa; }
  .model-toolstrip button { min-width: 44px; min-height: 43px; flex: 0 0 44px; }
  .model-toolstrip hr { width: 1px; height: 31px; margin: 6px 2px; border-top: 0; border-left: 1px solid var(--border); }
  .model-object-tree { top: 0; bottom: 52px; left: 0; width: min(238px, calc(100vw - 54px)); }
  .model-task-panel { bottom: 52px; width: min(238px, calc(100vw - 54px)); }
  .model-object-properties { top: 7px; right: 7px; width: min(260px, calc(100vw - 67px)); max-height: calc(100% - 68px); }
  .model-measurement-readout { top: 7px; min-width: 220px; gap: 5px; padding: 6px 7px; }
  .model-nav-cube { right: 8px; bottom: 8px; scale: .82; transform-origin: right bottom; }
  .model-section-chip { top: auto; right: 7px; bottom: 7px; }
  .model-calibration-row { grid-template-columns: minmax(0, 1fr) 98px; }
  .model-calibration-status { display: none; }
  .model-task-form > div:not(.dialog-actions) { grid-template-columns: 1fr; }
  .people-toolbar { min-height: auto; gap: 8px; padding: 9px 10px; }
  .people-heading h1 { font-size: 17px; }
  .people-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .people-search { width: 100%; grid-column: 1 / -1; }
  .people-sort-control { grid-column: 1; }
  #manage-project-permissions { display: none; }
  #new-project-user { grid-column: 2; grid-row: 2; }
  .people-content { padding: 10px 9px 22px; }
  .people-bulk-bar { padding-inline: 10px; }
  .people-permissions-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 74px); }
  .people-permissions-footer { align-items: stretch; flex-direction: column; }
  .people-permissions-footer > div { justify-content: flex-end; }
}

@media (max-width: 900px) {
  .settings-content { padding: 12px 11px 34px; }
  .settings-fields { grid-template-columns: 1fr; }
  .settings-field-wide { grid-column: auto; }
  .settings-tags-toolbar { flex-wrap: wrap; }
  .settings-tags-toolbar .library-search { width: 100%; flex: 1 0 100%; }
  .settings-locations-toolbar { flex-wrap: wrap; }
  .settings-locations-toolbar .library-search { width: 100%; flex: 1 0 100%; }
}

@media (max-width: 560px) {
  .settings-toolbar { min-height: 52px; padding-inline: 12px; }
  .settings-toolbar span, .settings-card p, .settings-save-bar span { display: none; }
  .settings-working-days > div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .settings-card > header { min-height: 51px; }
  .settings-tags-dialog { width: calc(100vw - 20px); height: calc(100dvh - 20px); }
  .settings-locations-dialog { width: calc(100vw - 20px); height: calc(100dvh - 20px); }
  .settings-location-tree-heading, .settings-location-row { grid-template-columns: minmax(0, 1fr) 42px 84px; }
  .settings-location-main { padding-left: calc(6px + (var(--location-depth) - 1) * 13px); }
  .settings-location-actions { padding-right: 4px; }
  .settings-location-actions button { width: 24px; }
  .settings-tags-table .tag-count-column { width: 78px; }
  .settings-tags-table .tag-action-column { width: 76px; }
}

@media (max-width: 1220px) {
  .rfi-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .rfi-toolbar-actions { justify-content: flex-start; }
  .rfi-search { min-width: 180px; flex: 1; }
  .submittal-status-summary { overflow-x: auto; }
}

@media (max-width: 900px) {
  .rfi-status-summary { padding-inline: 11px; }
  .rfi-table-wrap { margin: 12px 11px 22px; }
  .rfi-filter-panel { right: 11px; }
  .rfi-detail-content { grid-template-columns: minmax(0, 1fr) 250px; }
  .rfi-document-column { padding: 13px 13px 30px; }
  .rfi-metadata-column { padding: 13px 13px 30px 0; }
  .rfi-attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submittal-status-summary { padding-inline: 11px; }
}

@media (max-width: 720px) {
  .rail-primary { grid-template-columns: repeat(7, 1fr); }
  .rail-primary-pm { position: absolute; right: 0; bottom: 0; width: calc(200% / 7); height: 58px; grid-template-columns: repeat(2, 1fr); }
  .rail-primary-pm .rail-item { display: grid; }
  .rail-primary > .rail-item:nth-child(7) { display: none; }
  .rfi-workspace { padding-bottom: 0; }
  .rfi-toolbar { min-height: auto; gap: 8px; padding: 9px 10px; }
  .rfi-heading h1 { font-size: 17px; }
  .rfi-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .rfi-scope-switch { grid-column: 1 / -1; }
  .rfi-scope-switch button { min-width: 0; flex: 1; }
  .rfi-search { width: 100%; min-width: 0; grid-column: 1 / -1; }
  .rfi-sort-control { grid-column: 1; min-width: 0; }
  #rfi-filter-button { grid-column: 2; }
  #rfi-columns-button { display: none; }
  #rfi-generate-report { grid-column: 1 / 3; grid-row: 4; }
  #new-rfi { grid-column: 3; grid-row: 3; }
  #submittal-filter-button { grid-column: 2; }
  #submittal-columns-button { display: none; }
  #submittal-generate-report { grid-column: 1 / 3; grid-row: 4; }
  #submittal-import-button { grid-column: 1 / 4; grid-row: 5; }
  #new-submittal { grid-column: 3; grid-row: 3; }
  .rfi-status-summary { min-height: 53px; grid-template-columns: repeat(5, minmax(74px, 1fr)); overflow-x: auto; padding: 7px 9px; }
  .rfi-status-summary button { min-height: 38px; padding: 6px 9px 6px 11px; }
  .rfi-status-summary button strong { font-size: 14px; }
  .submittal-status-summary { min-height: 53px; grid-template-columns: repeat(7, minmax(74px, 1fr)); overflow-x: auto; padding: 7px 9px; }
  .submittal-status-summary button { min-height: 38px; padding: 6px 9px 6px 11px; }
  .submittal-status-summary button strong { font-size: 14px; }
  .submittal-bulk-bar { flex-wrap: wrap; gap: 6px 10px; padding: 7px 10px; }
  .submittal-bulk-bar > span { order: 3; width: 100%; flex: 1 0 100%; }
  .submittal-bulk-controls { margin-left: auto; }
  .rfi-filter-panel { position: fixed; top: 145px; right: 8px; left: 8px; width: auto; max-height: calc(100dvh - 220px); }
  .rfi-table-wrap { margin: 9px 8px 18px; }
  .rfi-viewer-modal { inset: 0 0 58px; }
  .rfi-viewer-header { min-height: 94px; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px; padding: 7px 8px; }
  .rfi-viewer-back { grid-column: 1; grid-row: 1; }
  .rfi-viewer-heading { grid-column: 2; grid-row: 1; }
  .rfi-viewer-status { grid-column: 3; grid-row: 1; }
  .rfi-viewer-actions { grid-column: 1 / 4; grid-row: 2; justify-content: flex-end; }
  .rfi-viewer-close { display: none; }
  .rfi-detail-content { display: flex; flex-direction: column; overflow: auto; }
  .rfi-document-column, .rfi-metadata-column { flex: 0 0 auto; overflow: visible; padding: 9px; }
  .rfi-metadata-column { padding-top: 0; }
  .rfi-question-form { width: 100%; }
  .rfi-attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rfi-detail-fields { grid-template-columns: 1fr; }
  .rfi-field-wide { grid-column: 1; }
  .rfi-member-options { grid-template-columns: 1fr; }
  .rfi-link-dialog { max-height: calc(100dvh - 82px); }
  .submittal-form-grid { grid-template-columns: 1fr; }
  .submittal-import-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 74px); }
  .submittal-import-modes { grid-template-columns: 1fr; padding: 10px; }
  .submittal-import-intro { flex-direction: column; }
  .submittal-import-company { align-items: stretch; flex-direction: column; }
  .submittal-import-company select { width: 100%; min-width: 0; }
  .people-invite-pm-fields { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .pm-report-options { grid-template-columns: 1fr; }
  .rfi-status-summary button span { display: none; }
  .rfi-status-summary button { justify-content: center; padding: 5px 8px; }
  .rfi-attachment-grid { grid-template-columns: 1fr; }
  .rfi-viewer-actions .secondary-button { display: none; }
  .rfi-viewer-actions { overflow-x: auto; }
  .rfi-option-list small { display: none; }
  .rfi-option-list label { grid-template-columns: 18px minmax(0, 1fr); }
  .submittal-status-summary button span { display: none; }
  .submittal-status-summary button { justify-content: center; padding: 5px 8px; }
  .submittal-bulk-bar > span { display: none; }
}

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

/* v0.20: Plans calibrated against the supplied Fieldwire folder, sheet and overlay references. */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

@media (min-width: 1121px) {
  .app-shell:not(.is-wide-workspace) { grid-template-columns: 233px minmax(0, 1fr) 190px; }
  .app-shell:not(.is-wide-workspace) .workspace { overflow: visible; }
  .app-shell:not(.is-wide-workspace) .global-topbar, .app-shell:not(.is-wide-workspace) #single-plan-toolbar { width: calc(100% + 190px); }
  .app-shell:not(.is-wide-workspace) .context-sidebar { height: calc(100dvh - 128px); margin-top: 128px; }
  .plans-grid:not(.is-list):not(.is-folder-root) { grid-template-columns: repeat(4, 193px); }
}

#single-plan-toolbar { height: 86px; min-height: 86px; grid-template-columns: minmax(0, 1fr) auto; padding: 19px 17px 32px; background: #fff; }
#single-plan-toolbar .toolbar-leading { grid-column: 1; }
#single-plan-toolbar .toolbar-actions { grid-column: 2; }
#single-plan-toolbar .toolbar-button { height: 35px; padding-inline: 13px; border-color: #c6c9cd; background: #fff; font-size: 12px; }
#single-plan-toolbar .icon-only { width: 35px; padding: 0; }
#all-plans-button { min-width: 99px; }
#actions-button { min-width: 94px; }
#single-plan-toolbar [data-open-task-filter] { min-width: 114px; }
#version-control-button { min-width: 119px; }
#single-plan-toolbar .actions-menu { top: 64px; left: 125px; width: 211px; }
#single-plan-toolbar .actions-menu > button { display: block; min-height: 32px; padding: 6px 16px; border-bottom: 0; color: #4c5156; font-size: 12px; font-weight: 400; }
#single-plan-toolbar .actions-menu > button:hover { background: #f3f4f6; }
#single-plan-toolbar .actions-menu > button.is-danger { color: #d43e48; }
.rotation-menu { top: 96px; left: 337px; width: 166px; }
.rotation-menu > button { display: block; min-height: 34px; padding: 7px 12px; border: 0; border-bottom: 1px solid #eceef0; background: #fff; color: #4c5156; cursor: pointer; font-size: 11px; text-align: left; }
.rotation-menu > button:last-child { border-bottom: 0; }
.rotation-menu > button:hover { background: #f3f4f6; }
.toolbar-menu-separator { height: 1px; margin: 5px 0; background: #e1e3e6; }
#single-plan-toolbar .recent-plans-menu { top: 57px; left: 226px; width: 332px; }
#recent-plans-list { display: grid; padding: 6px 0; }
#recent-plans-list > button { display: grid; min-height: 31px; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 7px; padding: 5px 12px; border: 0; background: #fff; color: #4b5055; cursor: pointer; text-align: left; }
#recent-plans-list > button:hover { background: #f3f4f6; }
#recent-plans-list strong { overflow: hidden; font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.recent-plan-icon { position: relative; display: block; width: 17px; height: 19px; border: 2px solid #f16770; background: #f16770; }
.recent-plan-icon::after { position: absolute; inset: 3px; border: 1px solid #fff; content: ""; }

.task-filter-overlay { position: fixed; z-index: 96; inset: 0; display: grid; place-items: start center; overflow: hidden; background: rgba(26,28,30,.51); }
.task-filter-overlay[hidden] { display: none; }
.task-filter-overlay > .task-filter-panel { position: relative; top: auto; left: auto; width: 422px; height: 100dvh; min-height: 100dvh; max-height: none; overflow: auto; border: 0; border-radius: 0; background: #fff; box-shadow: 0 0 28px rgba(0,0,0,.23); }
.task-filter-panel > header { padding: 11px 33px 7px; }
.task-filter-panel > header h2 { margin: 0; color: #2d3237; font-size: 21px; font-weight: 600; }
.task-filter-panel .task-filter-form { gap: 16px; padding: 10px 33px 25px; }
.task-filter-panel .filter-control { gap: 5px; color: #3e4348; font-size: 12px; }
.task-filter-panel .filter-control > span, .task-filter-panel fieldset legend { color: #3f4449; font-size: 12px; font-weight: 600; }
.task-filter-panel .filter-control select, .task-filter-panel .filter-control input, .task-filter-panel fieldset > input, .task-filter-panel fieldset select { height: 36px; padding: 7px 10px; border: 1px solid #c8ccd0; border-radius: 2px; background: #fff; color: #4b5055; font-size: 12px; }
.task-filter-panel .filter-control select { text-align: center; text-align-last: center; }
.task-filter-panel fieldset { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.task-filter-panel .filter-location-group { gap: 10px; margin-top: 1px; }
.task-filter-panel .filter-time-group { gap: 14px; margin-top: 2px; }
.filter-check { display: flex; align-items: flex-start; gap: 6px; color: #4f555a; font-size: 11px; line-height: 1.35; }
.filter-check input { width: 17px; height: 17px; flex: 0 0 auto; margin: -1px 0 0; accent-color: #1497f3; }
.verified-filter { margin: 5px 0 6px; }
.apply-task-filter-button, .task-filter-panel .clear-filter-button { min-height: 35px; border-radius: 2px; font-size: 12px; }
.apply-task-filter-button { border: 1px solid #79a0ef; background: #8fb0f3; color: #fff; cursor: pointer; }
.task-filter-panel .clear-filter-button { margin: 0; border: 1px solid #e0e2e5; background: #fff; color: #9b9fa4; }

.plan-viewport { align-items: flex-start; justify-content: center; padding: 72px 45px 44px; background: #f3f4f5; }
.plan-canvas { width: min(calc(100% * var(--plan-zoom)), calc(754px * var(--plan-zoom))); min-width: calc(640px * var(--plan-zoom)); aspect-ratio: 14 / 10; box-shadow: none; }
.markup-toolbar { top: 13px; left: 10px; display: grid; gap: 8px; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
.markup-tool-group { display: grid; overflow: hidden; border-radius: 2px; background: #343638; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.markup-toolbar .markup-tool-group button { width: 31px; height: 31px; border-bottom: 1px solid rgba(255,255,255,.12); }
.markup-toolbar .markup-tool-group button:last-child { border-bottom: 0; }
.view-controls { top: 13px; right: 10px; }
#plan-text-search-button { display: none; }
.color-panel { top: 424px; }
.symbol-panel { top: 254px; }
.link-choice-panel { top: 160px; }

.context-sidebar .sidebar-header { min-height: 39px; justify-content: center; padding: 7px 10px; }
.context-sidebar .sidebar-header > div:first-child { justify-content: center; }
.context-sidebar .sidebar-header h2 { font-size: 12px; }
.context-sidebar .sidebar-header #visible-count, .context-sidebar .sidebar-actions { display: none; }
.context-sidebar .sidebar-footer { order: 1; padding: 26px 8px 9px; border-top: 0; }
.context-sidebar .task-list { order: 2; }
.context-sidebar .new-task-row { font-size: 11px; }

.plan-folder-grid-header { display: grid; width: 360px; min-height: 43px; grid-column: 1 / -1; grid-template-columns: 20px 17px minmax(0, 1fr) 30px; align-items: center; gap: 7px; margin-bottom: 2px; color: #40454a; }
.plan-folder-grid-header strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.plan-folder-grid-header small { font-size: 11px; font-weight: 400; }
.plan-folder-grid-header button { width: 24px; height: 24px; border: 1px solid #cbd0d4; border-radius: 2px; background: #fff; cursor: pointer; }
.plan-folder-check-static { display: block; width: 15px; height: 15px; border: 1px solid #cbd0d4; border-radius: 3px; background: #fff; }
.plans-grid:not(.is-list) { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 13px; }
.plans-grid:not(.is-folder-root) { padding-left: 11px; }
.plans-grid:not(.is-list) .plan-card { min-height: 148px; }
.plans-grid:not(.is-list) .plan-thumbnail { display: block; height: 108px; border-bottom-color: #d7dadd; background: #fff; }
.plans-grid:not(.is-list) .plan-thumbnail::before, .plans-grid:not(.is-list) .plan-thumbnail::after { display: none; }
.plan-thumbnail-svg { display: block; width: 100%; height: 100%; }
.plan-thumbnail-derived { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; background: #fff; object-fit: contain; }
.plan-version-corner { position: absolute; z-index: 2; top: 4px; right: 4px; width: 10px; height: 10px; border: 1px solid #a7adb3; background: repeating-linear-gradient(135deg,#8d949a 0 1px,#fff 1px 3px); }
.plans-grid:not(.is-list) .plan-card-body { min-height: 40px; gap: 0; padding: 10px 9px 8px; }
.plans-grid:not(.is-list) .plan-card-title { font-size: 12px; font-weight: 600; }
.plans-grid:not(.is-list) .plan-card-meta, .plans-grid:not(.is-list) .plan-card-tags, .plans-grid:not(.is-list) .plan-list-version { display: none; }
.plans-grid.is-list .plan-folder-grid-header, .plans-grid.is-list .plans-list-header, .plans-grid.is-list .plan-card, .plans-grid.is-list .library-empty { grid-column: 1 / -1; }

.version-dialog { width: min(632px, calc(100vw - 56px)); min-height: 320px; max-height: min(690px, calc(100dvh - 56px)); }
.version-modal { place-items: start center; padding-top: 36px; }
.version-dialog-header { min-height: 63px; padding: 29px 32px 9px; border-bottom: 0; }
.version-dialog-header h2 { font-size: 20px; font-weight: 600; }
.version-dialog-toolbar { min-height: 58px; justify-content: center; padding: 7px 16px 13px; border-bottom: 0; background: #fff; }
.new-version-button { min-height: 35px; padding: 7px 13px; font-size: 12px; }
.version-list { padding: 0 33px 28px; }
.version-card { grid-template-columns: 160px minmax(0, 1fr); gap: 21px; padding: 0 0 22px; border-bottom: 0; }
.version-thumbnail { display: block; height: 160px; padding: 0; border-color: #aeb3b8; background: #fff; }
.version-thumbnail::before, .version-thumbnail::after { display: none; }
.version-thumbnail-svg { display: block; width: 100%; height: 100%; }
.version-card.is-viewed .version-thumbnail { border-color: #aeb3b8; box-shadow: 0 2px 3px rgba(0,0,0,.12); }
.version-card-main { padding-top: 13px; }
.version-file-name { display: block; overflow-wrap: anywhere; color: #363b40; font-size: 12px; line-height: 1.5; }
.version-upload-meta { margin: 2px 0 15px; color: #8a8f94; font-size: 11px; }
.version-meta { display: grid; gap: 7px; margin: 0; }
.version-meta > div { display: flex; gap: 6px; font-size: 11px; }
.version-meta dt { color: #555b60; }
.version-meta dd { margin: 0; color: #555b60; }

.notifications-drawer { position: fixed; z-index: 82; top: 42px; right: 0; bottom: 0; display: flex; width: 478px; flex-direction: column; border-left: 1px solid #d5d8dc; background: #fff; box-shadow: -8px 0 22px rgba(25,29,33,.14); }
.notifications-drawer[hidden] { display: none; }
.notifications-drawer > header { display: flex; min-height: 54px; align-items: center; justify-content: space-between; padding: 11px 17px; }
.notifications-drawer h2 { margin: 0; font-size: 21px; font-weight: 600; }
.notifications-drawer h2 span { font-weight: 600; }
.notifications-drawer > header button { width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; font-size: 20px; }
.notifications-menu-wrap { position: relative; }
.notifications-menu-popover { position: absolute; z-index: 2; top: 31px; right: 0; width: 155px; border: 1px solid #cbd0d4; background: #fff; box-shadow: 0 6px 16px rgba(25,29,33,.18); }
.notifications-menu-popover[hidden] { display: none; }
.notifications-menu-popover > button { width: 100% !important; height: 38px !important; padding: 8px 12px; font-size: 11px !important; text-align: left; }
.notifications-menu-popover > button:hover { background: #f4f6f8; }
.notification-filters { display: flex; gap: 9px; padding: 2px 17px 14px; }
.notification-filter-chip, .notification-filters select { height: 35px; padding: 0 14px; border: 1px solid #cdd1d5; border-radius: 18px; background: #fff; color: #4e5459; cursor: pointer; font-size: 12px; }
.notification-filter-chip { width: 84px; }
.notification-filters label:nth-of-type(1) { width: 101px; }
.notification-filters label:nth-of-type(2) { width: 82px; }
.notification-filters select { width: 100%; }
.notification-filter-chip.is-active { border-color: #7d9fe5; background: #edf3ff; color: #1769f6; }
.notification-filters select { padding-right: 27px; }
.notifications-list { min-height: 0; flex: 1; overflow: auto; padding-bottom: 20px; }
.notification-group h3 { margin: 0; padding: 4px 17px 8px; color: #7b8085; font-size: 12px; font-weight: 400; }
.notification-row { position: relative; display: grid; width: 100%; min-height: 76px; grid-template-columns: 24px minmax(0, 1fr) 52px; gap: 9px; padding: 10px 23px 10px 18px; border: 0; background: #fff; color: #454a4f; cursor: pointer; text-align: left; }
.notification-row:hover { background: #f7f8f9; }
.notification-copy { display: grid; min-width: 0; gap: 2px; }
.notification-copy strong { font-size: 12px; }
.notification-copy > span, .notification-copy small { overflow: hidden; color: #676d72; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.notification-date { align-self: end; color: #70767b; font-size: 11px; text-align: right; }
.notification-unread-dot { position: absolute; top: 12px; right: 13px; width: 9px; height: 9px; border-radius: 50%; background: #126df5; }
.notification-type-icon { position: relative; width: 18px; height: 18px; margin-top: 2px; color: #1770ef; }
.notification-type-icon.is-version::before, .notification-type-icon.is-version::after { position: absolute; width: 11px; height: 9px; border: 1.5px solid currentColor; content: ""; }
.notification-type-icon.is-version::before { top: 2px; left: 4px; }
.notification-type-icon.is-version::after { top: 5px; left: 1px; background: #fff; }
.notification-type-icon.is-task::before { position: absolute; top: 0; left: 3px; width: 11px; height: 14px; border: 2px solid currentColor; border-radius: 9px 9px 9px 2px; content: ""; transform: rotate(45deg); }
.notifications-empty { padding: 60px 20px; color: #858a8f; text-align: center; }

.plan-compare-dialog { width: min(820px, calc(100vw - 40px)); }
.plan-compare-content { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 13px 18px; padding: 18px; }
.plan-compare-preview { position: relative; min-height: 410px; grid-row: 1 / 7; display: grid; place-items: center; overflow: hidden; border: 1px solid #b9bec3; background: #f7f8f9; }
.plan-compare-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
#plan-compare-baseline-image { z-index: 2; opacity: var(--compare-opacity,.52); mix-blend-mode: multiply; cursor: grab; touch-action: none; user-select: none; }
#plan-compare-baseline-image.is-dragging { cursor: grabbing; }
#plan-compare-current-image { z-index: 1; }
#plan-compare-difference-image { z-index: 3; opacity: var(--compare-opacity,.82); }
.plan-compare-state { z-index: 1; display: grid; max-width: 310px; place-items: center; gap: 7px; padding: 24px; color: #777e85; text-align: center; }
.plan-compare-state[hidden] { display: none; }
.plan-compare-state > span { width: 42px; height: 42px; border: 2px solid #c5cbd1; border-radius: 50%; }
.plan-compare-state.is-loading > span { border-color: #c5d8fa; border-top-color: #1769f6; animation: compare-spin .8s linear infinite; }
.plan-compare-state.is-error > span { position: relative; border-color: #e1b4b6; }
.plan-compare-state.is-error > span::before, .plan-compare-state.is-error > span::after { position: absolute; top: 19px; left: 9px; width: 22px; height: 2px; background: #bd454c; content: ""; transform: rotate(45deg); }
.plan-compare-state.is-error > span::after { transform: rotate(-45deg); }
.plan-compare-state strong { color: #41474c; font-size: 12px; }
.plan-compare-state small { font-size: 9px; line-height: 1.5; }
@keyframes compare-spin { to { transform: rotate(360deg); } }
.plan-compare-content label { display: grid; align-content: start; gap: 6px; color: #5b6167; font-size: 10px; }
.plan-compare-content label[hidden], .plan-compare-legend[hidden] { display: none; }
.plan-compare-content select { height: 34px; padding: 6px 8px; border: 1px solid #c8ccd0; background: #fff; }
.plan-compare-content p { margin: 0; color: #7b8187; font-size: 9px; line-height: 1.45; }
.plan-compare-align-tools { display: grid; gap: 7px; padding: 10px; border: 1px solid #d2d5d8; background: #f8f9fa; }
.plan-compare-align-tools[hidden] { display: none; }
.plan-compare-align-tools strong { color: #41474c; font-size: 10px; }
.plan-compare-align-tools small, .plan-compare-align-tools output { color: #777e85; font-size: 8px; line-height: 1.4; }
.plan-compare-nudge { display: grid; grid-template-columns: repeat(3, 30px); grid-template-areas: ". up ." "left reset right" ". down ."; justify-content: center; gap: 3px; }
.plan-compare-nudge button { width: 30px; height: 26px; padding: 0; border: 1px solid #c8ccd0; background: #fff; color: #4f555a; }
.plan-compare-nudge [data-compare-nudge="up"] { grid-area: up; }
.plan-compare-nudge [data-compare-nudge="left"] { grid-area: left; }
.plan-compare-nudge [data-compare-nudge="reset"] { grid-area: reset; }
.plan-compare-nudge [data-compare-nudge="right"] { grid-area: right; }
.plan-compare-nudge [data-compare-nudge="down"] { grid-area: down; }
.plan-compare-legend { display: grid; gap: 7px; color: #656b70; font-size: 9px; }
.plan-compare-legend span { display: flex; align-items: center; gap: 7px; }
.plan-compare-legend span::before { width: 10px; height: 10px; border-radius: 2px; background: #dc2e39; content: ""; }
.plan-compare-legend .is-current::before { background: #1e69eb; }
.plan-compare-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; padding-top: 4px; }
.plan-compare-footer button { min-height: 32px; padding: 7px 11px; }
.plan-compare-footer button[hidden] { display: none; }

@media (max-width: 1120px) {
  .task-filter-overlay > .task-filter-panel { width: min(422px, 100vw); }
  .notifications-drawer { width: min(478px, 100vw); }
}

@media (max-width: 720px) {
  #single-plan-toolbar { min-height: 58px; padding: 7px 8px; }
  #single-plan-toolbar .toolbar-button { height: 32px; padding-inline: 8px; font-size: 10px; }
  .plan-viewport { padding: 40px 8px 38px 40px; }
  .plan-canvas { min-width: calc(800px * var(--plan-zoom)); }
  .task-filter-overlay { inset: 0 0 58px; }
  .task-filter-overlay > .task-filter-panel { min-height: calc(100dvh - 58px); }
  .notifications-drawer { top: 0; bottom: 58px; }
  .version-modal { inset: 0 0 58px; padding: 0; place-items: stretch; }
  .version-dialog { width: 100%; max-height: none; min-height: 0; height: 100%; border: 0; border-radius: 0; }
  .version-dialog-header { min-height: 56px; padding: 18px 18px 8px; }
  .version-dialog-toolbar { min-height: 48px; justify-content: flex-start; align-items: center; flex-direction: row; padding: 6px 18px 10px; }
  .version-list { padding: 0 18px 24px; overflow-x: hidden; }
  .version-card { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 8px 0 24px; border-bottom: 1px solid var(--border); }
  .version-thumbnail { width: min(100%, 280px); height: 164px; justify-self: center; }
  .version-card-main { width: 100%; min-width: 0; padding-top: 0; }
  .version-card-heading strong { white-space: normal; overflow-wrap: anywhere; }
  .version-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .version-card-actions button { width: 100%; min-width: 0; min-height: 44px; }
  .project-version-row { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .project-version-thumbnail { width: 64px; height: 46px; }
  .project-version-row > button { grid-column: 1 / -1; min-height: 44px; }
  .version-edit-form { grid-template-columns: 1fr; }
  .version-edit-form input, .version-edit-form textarea { min-height: 44px; font-size: 12px; }
  .version-edit-form .secondary-button { min-height: 44px; justify-self: stretch; }
  .plan-compare-content { grid-template-columns: 1fr; }
  .plan-compare-preview { min-height: 230px; grid-row: auto; }
}

/* v0.21: Fieldwire Plans grouped thumbnail/list switch. */
.plan-order-button { display: grid; grid-template-rows: 8px 8px; place-content: center; gap: 0; }
.plan-order-button > span { display: block; height: 8px; font-size: 12px; line-height: 8px; }
.view-switch button { display: grid; place-items: center; padding: 0; }
.view-icon-grid { display: block; width: 3px; height: 3px; background: currentColor; box-shadow: 5px 0 currentColor, 10px 0 currentColor, 0 5px currentColor, 5px 5px currentColor, 10px 5px currentColor, 0 10px currentColor, 5px 10px currentColor, 10px 10px currentColor; transform: translate(-5px,-5px); }
.view-icon-list { display: block; width: 14px; height: 2px; background: currentColor; box-shadow: 0 5px currentColor, 0 10px currentColor; transform: translateY(-5px); }

.plans-grid.is-grouped, .plans-grid.is-grouped:not(.is-list) { display: block; padding: 0 0 34px; border: 0; background: transparent; }
.plans-browser .plans-count-footer { z-index: 6; background: #f5f6f8; }
.plan-folder-section { width: 100%; margin: 0 0 2px; }
.plan-folder-section.is-selected > .plan-folder-grid-header { background: #edf3ff; }
.plan-folder-grid-header { display: flex; width: 100%; min-height: 43px; align-items: center; margin: 0; color: #40454a; }
.plan-folder-title-cell { display: flex; min-width: 0; align-items: center; gap: 7px; }
.plan-folder-title-cell > strong { max-width: min(580px, 66vw); overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.plan-folder-title-cell > strong small { font-size: 11px; font-weight: 400; }
.plan-folder-column-label { display: none; }
.plan-folder-toggle, .plan-folder-toggle-placeholder { width: 24px; height: 24px; flex: 0 0 24px; }
.plan-folder-toggle { display: grid; place-items: center; padding: 0; border: 1px solid #ccd0d4; border-radius: 2px; background: #fff; color: #454b50; cursor: pointer; }
.plan-folder-toggle span { display: block; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.plan-folder-toggle[aria-expanded="false"] span { transform: translateX(-2px) rotate(-45deg); }
.plan-folder-plan-content { display: grid; grid-template-columns: repeat(4, 193px); gap: 13px; padding: 0 11px 12px; }
.plan-card-wrap { position: relative; width: 193px; min-width: 0; }
.plan-card-wrap > .plan-card { width: 100% !important; }
.plan-card-wrap.is-selected > .plan-card { border-color: #1769f6; box-shadow: 0 0 0 1px #1769f6; }
.plan-card-check { position: absolute; z-index: 5; top: 7px; left: 7px; display: grid; width: 22px; height: 22px; place-items: center; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.94); box-shadow: 0 1px 4px rgba(24,29,35,.2); cursor: pointer; opacity: 0; transition: opacity .12s ease; }
.plan-card-wrap:hover .plan-card-check, .plan-card-check:focus-visible, .plan-card-check[aria-pressed="true"] { opacity: 1; }
.plan-card-check span { position: relative; display: block; width: 14px; height: 14px; border: 1px solid #aeb4ba; border-radius: 2px; background: #fff; }
.plan-card-check[aria-pressed="true"] span { border-color: #1769f6; background: #1769f6; }
.plan-card-check[aria-pressed="true"] span::after { position: absolute; top: 1px; left: 4px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; content: ""; transform: rotate(45deg); }
.plan-new-tile { display: grid; width: 193px; min-height: 148px; place-items: center; border: 2px dashed #ccd0d4; background: rgba(255,255,255,.3); color: #a2a7ac; cursor: pointer; font-size: 12px; }
.plan-new-tile:hover { border-color: #8fa9df; background: #fff; color: #1769f6; }
.plan-folder-empty { grid-column: 1 / -1; padding: 24px 10px; color: #979ca1; font-size: 11px; }
.plans-grid.is-grouped:not(.is-list) .plan-card { width: 193px; min-height: 148px; }
.plans-grid.is-grouped:not(.is-list) .plan-card-body { min-height: 43px; padding: 7px 9px 6px; }
.plans-grid.is-grouped:not(.is-list) .plan-card-title { display: grid; min-width: 0; gap: 1px; line-height: 1.15; }
.plans-grid.is-grouped:not(.is-list) .plan-card-title strong, .plans-grid.is-grouped:not(.is-list) .plan-card-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plans-grid.is-grouped:not(.is-list) .plan-card-title strong { color: #3d4247; font-size: 12px; font-weight: 600; }
.plans-grid.is-grouped:not(.is-list) .plan-card-title small { color: #565c62; font-size: 11px; font-weight: 400; }

.plans-grid.is-grouped.is-list { display: block; min-width: 850px; padding: 0 0 34px; overflow: visible; border: 0; background: transparent; }
.plans-grid.is-list .plan-folder-section { margin-bottom: 7px; }
.plans-grid.is-list .plan-folder-grid-header { display: grid; min-height: 45px; grid-template-columns: 26px minmax(280px, 1.7fr) 105px minmax(160px, .9fr) minmax(130px, .8fr) 110px; align-items: center; border-bottom: 1px solid #d5d8dc; }
.plans-grid.is-list .plan-folder-title-cell { grid-column: 1 / 3; }
.plans-grid.is-list .plan-folder-title-cell > strong { max-width: none; }
.plans-grid.is-list .plan-folder-column-label { display: block; padding: 0 8px; color: #999ea3; font-size: 10px; }
.plans-grid.is-list .plan-folder-plan-content { display: block; padding: 0; }
.plan-list-row { display: grid; min-height: 46px; grid-template-columns: 26px minmax(280px, 1.7fr) 105px minmax(160px, .9fr) minmax(130px, .8fr) 110px; align-items: center; border-bottom: 1px solid #dadddf; background: rgba(255,255,255,.38); color: #4d5358; }
.plan-list-row:hover { background: #fff; }
.plan-list-row.is-selected { background: #edf3ff; }
.plan-row-check { display: grid; width: 26px; height: 100%; place-items: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
.plan-row-check span { position: relative; display: block; width: 14px; height: 14px; border: 1px solid #cbd0d4; border-radius: 3px; background: #fff; }
.plan-row-check[aria-pressed="true"] span { border-color: #1769f6; background: #1769f6; }
.plan-row-check[aria-pressed="true"] span::after { position: absolute; top: 1px; left: 4px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; content: ""; transform: rotate(45deg); }
.plan-row-name { min-width: 0; height: 100%; padding: 0 9px 0 0; overflow: hidden; border: 0; background: transparent; color: #4a5055; cursor: pointer; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.plan-row-name strong { font-size: 12px; font-weight: 500; }
.plan-row-task-count, .plan-row-version, .plan-row-tags { min-width: 0; padding: 0 8px; overflow: hidden; color: #8e9499; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.plan-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1px; padding-right: 6px; }
.plan-row-actions button { display: grid; width: 20px; height: 27px; place-items: center; padding: 0; border: 0; background: transparent; color: #a0a5aa; cursor: pointer; }
.plan-row-actions button:hover { color: #1769f6; }
.plan-row-actions button.is-danger { color: #e05b60; }
.plan-row-actions button:disabled { cursor: default; opacity: .35; }
.plan-row-actions svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }

@media (max-width: 860px) {
  .plan-folder-plan-content { grid-template-columns: repeat(2, minmax(0, 193px)); }
}

/* v0.22: Specifications actions and upload dialog calibrated to supplied references. */
#new-specification-button { font-family: inherit; }
.button-plus { position: relative; display: inline-block; width: 12px; height: 12px; flex: 0 0 auto; }
.button-plus::before, .button-plus::after { position: absolute; top: 50%; left: 50%; border-radius: 1px; background: currentColor; content: ""; transform: translate(-50%, -50%); }
.button-plus::before { width: 12px; height: 1.5px; }
.button-plus::after { width: 1.5px; height: 12px; }
#new-specification-button { gap: 8px; }
.menu-caret { display: inline-block; width: 0; height: 0; margin-left: 7px; border-top: 5px solid currentColor; border-right: 4px solid transparent; border-left: 4px solid transparent; }
.spec-library-actions-wrap { position: relative; }
.spec-library-actions-menu { position: absolute; z-index: 42; top: 39px; left: 0; display: grid; width: 180px; overflow: hidden; border: 1px solid #c2c6ca; border-radius: 2px; background: #fff; box-shadow: 0 6px 16px rgba(28,32,37,.2); }
.spec-library-actions-menu[hidden] { display: none; }
.spec-library-actions-menu button { min-height: 40px; padding: 9px 25px; border: 0; background: #fff; color: #50555a; cursor: pointer; font-size: 12px; text-align: left; }
.spec-library-actions-menu button.has-divider { border-top: 1px solid #e0e2e4; }
.spec-library-actions-menu button:hover:not(:disabled) { background: #f4f5f6; }
.spec-library-actions-menu button:disabled { color: #c8cbce; cursor: default; }
.spec-library-actions-menu button.is-danger { color: #d85c66; }

.spec-table th.spec-select-column { width: 42px; padding: 0; }
.spec-table th:nth-child(2) { width: 145px; }
.spec-table th:nth-child(3) { width: auto; }
.spec-table th:nth-child(4) { width: 170px; }
.spec-table th:nth-child(5) { width: 42px; }
.spec-table .spec-select-cell { width: 42px; padding: 0; text-align: center; }
.spec-select-cell input { width: 15px; height: 15px; accent-color: #1769f6; cursor: pointer; }
.spec-table tbody tr.is-selected { background: #edf3ff; }
.spec-empty-state strong { font-size: 20px; }

.spec-upload-modal { z-index: 108; place-items: start center; padding-top: 34px; background: rgba(28,30,33,.5); }
.spec-upload-dialog { width: min(632px, calc(100vw - 44px)); min-height: 542px; max-height: calc(100vh - 68px); overflow: auto; border-color: #9da2a7; box-shadow: 0 8px 22px rgba(25,28,31,.27); }
.spec-upload-dialog:focus { outline: 0; }
.spec-upload-header { min-height: 69px; padding: 25px 32px 8px; border-bottom: 0; }
.spec-upload-header h2 { font-size: 20px; font-weight: 600; }
.spec-upload-header > button { align-self: flex-start; margin-top: -7px; color: #8c9196; font-size: 22px; }
#spec-upload-form { display: flex; min-height: 470px; flex-direction: column; }
.spec-upload-intro { min-height: 72px; margin: 0; padding: 7px 33px 21px; color: #454a50; font-size: 12px; line-height: 1.5; }
.spec-upload-intro a { color: #1769f6; }
.spec-upload-dropzone { display: grid; min-height: 288px; margin: 12px 33px 0; place-items: center; align-content: center; gap: 8px; padding: 24px; overflow: auto; border: 2px dashed #a7acb1; border-radius: 2px; background: #f8f9fa; color: #52575c; cursor: pointer; text-align: center; }
.spec-upload-dropzone:hover, .spec-upload-dropzone.is-dragging { border-color: #1769f6; background: #f3f7ff; }
.spec-upload-icon { position: relative; display: block; width: 20px; height: 21px; margin-bottom: 4px; border-bottom: 1.5px solid #5e646a; }
.spec-upload-icon::before { position: absolute; top: 2px; left: 9px; width: 2px; height: 11px; background: #5e646a; content: ""; }
.spec-upload-icon::after { position: absolute; top: 1px; left: 6px; width: 6px; height: 6px; border-top: 2px solid #5e646a; border-left: 2px solid #5e646a; content: ""; transform: rotate(45deg); }
.spec-upload-dropzone > strong { font-size: 13px; font-weight: 600; }
.spec-upload-dropzone > span:not(.spec-upload-icon), .spec-upload-dropzone > small { font-size: 12px; }
.spec-upload-dropzone > small { color: #767c81; }
#spec-select-files { min-width: 91px; min-height: 35px; margin-top: 4px; padding: 7px 13px; font-size: 12px; }
.spec-upload-pending { display: grid; width: min(370px, 100%); max-height: 74px; gap: 3px; margin-top: 6px; overflow: auto; }
.spec-upload-pending[hidden] { display: none; }
.spec-upload-pending > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 7px; border: 1px solid #d7dadd; background: #fff; text-align: left; }
.spec-upload-pending strong { min-width: 0; overflow: hidden; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.spec-upload-pending small { flex: 0 0 auto; color: #898f95; font-size: 9px; }
.spec-upload-pending > span.is-invalid { border-color: #e6b5b8; background: #fff7f7; color: #c94e56; }
.spec-upload-footer { display: flex; min-height: 97px; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 27px 33px 32px; }
.spec-upload-more-wrap { position: relative; }
.spec-upload-more { display: flex; height: 35px; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; color: #1769f6; cursor: pointer; font-size: 12px; }
.spec-upload-more > span { position: relative; width: 18px; height: 13px; border: 1.5px solid currentColor; border-radius: 8px; }
.spec-upload-more > span::before { position: absolute; top: -5px; left: 4px; width: 8px; height: 8px; border: 1.5px solid currentColor; border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; background: #fff; content: ""; transform: rotate(36deg); }
.spec-upload-options { position: absolute; z-index: 3; bottom: 38px; left: 0; display: grid; width: 226px; gap: 8px; padding: 12px; border: 1px solid #c8ccd0; background: #fff; box-shadow: 0 5px 14px rgba(28,32,37,.18); color: #4d5359; font-size: 11px; }
.spec-upload-options[hidden] { display: none; }
.spec-upload-options label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.spec-upload-options input { accent-color: #1769f6; }
.spec-upload-submit { min-width: 124px; min-height: 35px; font-size: 12px; }
.spec-upload-submit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.spec-upload-submit-icon { position: relative; display: inline-block; width: 14px; height: 15px; flex: 0 0 auto; border-bottom: 1.5px solid currentColor; }
.spec-upload-submit-icon::before { position: absolute; top: 2px; left: 6px; width: 1.5px; height: 9px; border-radius: 1px; background: currentColor; content: ""; }
.spec-upload-submit-icon::after { position: absolute; top: 2px; left: 4px; width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; content: ""; transform: rotate(45deg); }
.spec-upload-submit:disabled { border-color: #9ab8f3; background: #9ab8f3; cursor: default; }

@media (max-width: 720px) {
  .spec-upload-modal { inset: 0 0 58px; padding: 8px; }
  .spec-upload-dialog { width: 100%; max-height: 100%; overflow: auto; }
  .spec-upload-header { padding: 18px 18px 8px; }
  .spec-upload-intro { min-height: 0; padding: 6px 18px 15px; }
  .spec-upload-dropzone { min-height: 250px; margin: 8px 18px 0; }
  .spec-upload-footer { align-items: stretch; flex-direction: column; padding: 18px; }
  .spec-upload-more, .spec-upload-submit { width: 100%; justify-content: center; }
}

/* v0.23: Specifications processing, review and version-conflict flow. */
.spec-table th.spec-select-column input { width: 15px; height: 15px; margin: 0; accent-color: #1769f6; }
.spec-row-action-cell { position: relative; width: 42px; padding: 0 !important; text-align: center; }
.spec-row-menu-button { width: 34px; height: 36px; padding: 0; border: 0; background: transparent; color: #676d72; cursor: pointer; font-size: 18px; line-height: 1; }
.spec-row-menu-button:hover { color: #1769f6; }
.spec-row-menu { position: absolute; z-index: 20; top: 35px; right: 8px; display: grid; width: 116px; overflow: hidden; border: 1px solid #c5c9cd; border-radius: 2px; background: #fff; box-shadow: 0 5px 14px rgba(29,33,37,.2); }
.spec-row-menu[hidden] { display: none; }
.spec-row-menu button { min-height: 34px; padding: 7px 13px; border: 0; border-bottom: 1px solid #e2e4e6; background: #fff; color: #50565b; cursor: pointer; font-size: 11px; text-align: left; }
.spec-row-menu button:last-child { border-bottom: 0; }
.spec-row-menu button:hover { background: #f4f5f6; }
.spec-row-menu button.is-danger { color: #d85861; }

.spec-upload-options { width: 235px; gap: 0; padding: 4px 0; }
.spec-upload-options button { display: grid; min-height: 39px; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 13px; border: 0; background: #fff; color: #4d5359; cursor: pointer; font-size: 11px; text-align: left; }
.spec-upload-options button:hover:not(:disabled) { background: #f3f5f7; }
.spec-upload-options button > span:first-child { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 3px; background: #eef2f8; color: #315fae; font-size: 9px; font-weight: 700; }
.spec-upload-options button > span:last-child { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.spec-upload-options button small { color: #8a9096; font-size: 9px; }
.spec-upload-options button:disabled { color: #7e858b; cursor: not-allowed; opacity: 1; }

.spec-review-modal { z-index: 109; padding: 28px 32px; background: rgba(25,27,29,.58); }
.spec-review-dialog { display: flex; width: min(1180px, calc(100vw - 64px)); height: min(680px, calc(100dvh - 56px)); flex-direction: column; overflow: hidden; border-color: #91969b; box-shadow: 0 12px 34px rgba(22,25,28,.34); }
.spec-review-header { min-height: 70px; align-items: flex-start; padding: 17px 24px 13px; }
.spec-review-header > div { display: grid; gap: 5px; }
.spec-review-header h2 { max-width: 900px; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.spec-review-header p { margin: 0; color: #747a80; font-size: 10px; }
#spec-review-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.spec-review-content { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #f1f2f4; }
.spec-review-processing { display: grid; min-height: 100%; place-items: center; align-content: center; gap: 9px; color: #50565c; text-align: center; }
.spec-review-processing > span { width: 34px; height: 34px; border: 3px solid #d8dde3; border-top-color: #1769f6; border-radius: 50%; animation: spec-review-spin .8s linear infinite; }
.spec-review-processing strong { margin-top: 5px; font-size: 15px; }
.spec-review-processing p { margin: 0; color: #83898f; font-size: 10px; }
@keyframes spec-review-spin { to { transform: rotate(360deg); } }
.spec-review-source-tabs { display: flex; min-height: 38px; flex: 0 0 auto; gap: 2px; overflow-x: auto; padding: 5px 8px; border-bottom: 1px solid #d4d7da; background: #fff; }
.spec-review-source-tabs button { display: flex; min-width: 0; max-width: 260px; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: #666d73; cursor: pointer; font-size: 9px; white-space: nowrap; }
.spec-review-source-tabs button.is-active { border-color: #b9c9e8; background: #edf4ff; color: #1769f6; }
.spec-review-source-tabs span { display: grid; width: 17px; height: 17px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #e6e9ec; font-size: 8px; }
.spec-review-workspace { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) 340px; }
.spec-review-preview { position: relative; display: grid; min-width: 0; min-height: 0; place-items: center; overflow: hidden; padding: 12px 14px 34px; border-right: 1px solid #cdd1d5; background: #eef0f2; }
.spec-review-pdf-shell { display: grid; width: 100%; height: 100%; overflow: hidden; place-items: center; border: 1px solid #c6c9cc; background: #fff; box-shadow: 0 1px 3px rgba(31,34,37,.12); }
.spec-review-pdf-shell canvas { display: block; max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 0 0 1px #eceeef; }
.spec-review-pdf-shell canvas[hidden] { display: none; }
.spec-review-preview-fallback { display: grid; height: 100%; place-items: center; align-content: center; gap: 12px; color: #6f767c; }
.spec-review-preview-fallback span { display: grid; width: 66px; height: 82px; place-items: center; border: 1px solid #e8a3a8; background: #fff4f5; color: #d95660; font-size: 13px; font-weight: 700; }
.spec-review-preview-fallback strong { max-width: 70%; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.spec-review-page-indicator { position: absolute; bottom: 10px; left: 50%; display: flex; height: 28px; align-items: center; gap: 13px; padding: 0 11px; border-radius: 2px; background: rgba(58,62,66,.92); color: #fff; transform: translateX(-50%); }
.spec-review-page-indicator span { color: #ccd0d3; font-size: 15px; }
.spec-review-page-indicator b { min-width: 34px; font-size: 9px; font-weight: 500; text-align: center; }
.spec-review-sidebar { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow-y: auto; padding: 16px 18px 12px; background: #fff; }
.spec-review-version { display: grid; gap: 7px; padding-bottom: 14px; border-bottom: 1px solid #dddfe1; color: #555b61; font-size: 10px; font-weight: 600; }
.spec-review-version input { width: 100%; height: 34px; padding: 6px 9px; border: 1px solid #c8ccd0; border-radius: 2px; color: #50565b; font: inherit; font-size: 10px; }
.spec-review-conflict-banner { display: grid; gap: 9px; margin: 12px 0 0; padding: 10px; border: 1px solid #e6b7bb; background: #fff0f1; color: #a9424a; }
.spec-review-conflict-banner > div { display: grid; gap: 3px; }
.spec-review-conflict-banner strong { font-size: 10px; }
.spec-review-conflict-banner span { color: #8f676a; font-size: 8px; line-height: 1.45; }
.spec-review-conflict-banner > div:last-child { display: flex; justify-content: flex-end; }
.spec-review-conflict-banner button { min-height: 29px; padding: 5px 9px; border: 1px solid #c8ccd0; background: #fff; color: #555b61; cursor: pointer; font-size: 8px; }
.spec-review-conflict-banner .primary-button { border-color: #1769f6; background: #1769f6; color: #fff; }
.spec-review-sections-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 7px; }
.spec-review-sections-heading strong { font-size: 10px; }
.spec-review-sections-heading button { border: 0; background: transparent; color: #1769f6; cursor: pointer; font-size: 9px; }
.spec-review-section-list { flex: 0 0 auto; border-top: 1px solid #e1e3e5; }
.spec-review-section-row { position: relative; border-bottom: 1px solid #e1e3e5; }
.spec-review-section-row > button:first-child { display: grid; width: 100%; min-height: 53px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 30px 8px 9px; border: 0; border-left: 3px solid transparent; background: #fff; color: #50565b; cursor: pointer; text-align: left; }
.spec-review-section-row.is-active > button:first-child { border-left-color: #1769f6; background: #f1f6ff; }
.spec-review-section-row.needs-review:not(.is-active) > button:first-child { border-left-color: #e6a13e; }
.spec-review-section-row > button:first-child > span { display: grid; min-width: 0; gap: 3px; }
.spec-review-section-row strong, .spec-review-section-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spec-review-section-row strong { font-size: 9px; }
.spec-review-section-row small { color: #747b81; font-size: 8px; }
.spec-review-section-row b { color: #7b8288; font-size: 8px; font-weight: 500; white-space: nowrap; }
.spec-review-section-remove { position: absolute; top: 16px; right: 4px; width: 24px; height: 24px; border: 0; background: transparent; color: #a1a6aa; cursor: pointer; font-size: 14px; }
.spec-review-editor { display: grid; gap: 10px; margin-top: 13px; padding: 12px; border: 1px solid #cfd3d7; background: #f7f8f9; }
.spec-review-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.spec-review-editor > header > div { display: grid; gap: 2px; }
.spec-review-editor > header strong { font-size: 10px; }
.spec-review-editor > header span { color: #858b90; font-size: 7px; }
.spec-review-editor > header button { border: 0; background: transparent; color: #d2525c; cursor: pointer; font-size: 8px; }
.spec-review-editor-fields { display: grid; gap: 8px; }
.spec-review-editor-fields label { display: grid; gap: 4px; color: #676d72; font-size: 8px; }
.spec-review-editor-fields input { width: 100%; min-width: 0; height: 31px; padding: 5px 7px; border: 1px solid #c8ccd0; border-radius: 2px; background: #fff; color: #40464b; font: inherit; font-size: 9px; }
.spec-review-editor-fields input:focus, .spec-review-version input:focus { border-color: #1769f6; outline: 2px solid rgba(23,105,246,.12); }
.spec-review-page-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 7px; }
.spec-review-page-range span { color: #80868c; text-align: center; }
.spec-review-editor-fields label > small { color: #92979c; font-size: 7px; text-align: right; }
.spec-review-conflict-detail { display: grid; gap: 7px; padding: 9px; border: 1px solid #ebc2c5; background: #fff6f6; }
.spec-review-conflict-detail > strong { color: #bd454e; font-size: 9px; }
.spec-review-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.spec-review-compare article { display: grid; min-width: 0; gap: 2px; padding: 7px; border: 1px solid #e0d2d3; background: #fff; }
.spec-review-compare span, .spec-review-compare small { overflow: hidden; color: #878c91; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.spec-review-compare b { font-size: 8px; }
.spec-review-conflict-detail label { display: flex; align-items: center; gap: 5px; color: #585e63; cursor: pointer; font-size: 8px; }
.spec-review-conflict-detail input { accent-color: #1769f6; }
.spec-review-issues { display: grid; gap: 3px; margin: 0; padding: 7px 7px 7px 23px; border: 1px solid #f0d1d4; background: #fff8f8; color: #bd444d; font-size: 7px; }
.spec-review-editor > footer { display: flex; justify-content: flex-end; }
.spec-review-editor > footer button { min-height: 30px; padding: 5px 12px; font-size: 8px; }
.spec-review-editor-empty { display: grid; min-height: 92px; place-items: center; align-content: center; gap: 6px; color: #93999e; text-align: center; }
.spec-review-editor-empty span { color: #b4bac0; font-size: 21px; }
.spec-review-editor-empty p { max-width: 220px; margin: 0; font-size: 8px; line-height: 1.5; }
.spec-review-global-conflicts { margin-top: 8px; color: #a84b52; font-size: 7px; }
.spec-review-footer { display: flex; width: 340px; min-height: 56px; flex: 0 0 auto; align-self: flex-end; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 18px; border-top: 1px solid #cdd1d5; border-left: 1px solid #cdd1d5; background: #fff; }
.spec-review-footer button { min-width: 92px; min-height: 34px; font-size: 9px; }
.spec-review-footer .primary-button:disabled { border-color: #a8bfea; background: #a8bfea; cursor: default; }

.spec-document-search-wrap { width: 245px; }
.spec-document-search-wrap[hidden] { display: none; }
.spec-document-page { position: relative; }
.spec-old-version-watermark { position: absolute; z-index: 2; top: 44%; left: 50%; color: rgba(205,45,45,.22); font-size: 74px; font-weight: 700; letter-spacing: 8px; pointer-events: none; transform: translate(-50%, -50%) rotate(-28deg); white-space: nowrap; }

@media (max-width: 720px) {
  .spec-review-modal { inset: 0 0 58px; padding: 8px; }
  .spec-review-dialog { width: 100%; height: 100%; }
  .spec-review-header { padding: 15px 15px 11px; }
  .spec-review-header h2 { max-width: calc(100vw - 88px); font-size: 14px; }
  .spec-review-workspace { grid-template-columns: 1fr; grid-template-rows: minmax(220px, 43%) minmax(0, 1fr); overflow-y: auto; }
  .spec-review-preview { min-height: 220px; border-right: 0; border-bottom: 1px solid #cdd1d5; }
  .spec-review-sidebar { overflow: visible; padding: 13px; }
  .spec-review-footer { width: 100%; border-left: 0; }
}

/* Tasks v0.26 — Fieldwire reference alignment. */
.tasks-toolbar { position: relative; min-height: 62px; justify-content: space-between; gap: 10px; padding: 10px 16px; }
.tasks-toolbar-leading, .tasks-toolbar-actions { display: flex; min-width: 0; align-items: center; gap: 8px; }
.tasks-toolbar-leading { flex: 0 0 auto; }
.tasks-toolbar-actions { justify-content: flex-end; }
.tasks-toolbar .toolbar-button, .tasks-toolbar .new-library-item { min-height: 35px; padding: 7px 12px; border-radius: 2px; font-size: 10px; white-space: nowrap; }
.tasks-toolbar .new-library-item { position: static; }
.task-report-icon { position: relative; width: 13px; height: 10px; border: 1px solid currentColor; }
.task-report-icon::before { position: absolute; top: -5px; left: 2px; width: 7px; height: 5px; border: 1px solid currentColor; background: #fff; content: ""; }
.task-workspace-search { width: 180px; }
.task-workspace-search input { height: 34px; font-size: 9px; }
.task-actions-wrap, .task-sort-wrap { position: relative; }
.task-actions-menu, .task-sort-menu { position: absolute; z-index: 62; top: calc(100% + 6px); left: 0; display: grid; width: 182px; overflow: hidden; border: 1px solid #c8ccd0; border-radius: 2px; background: #fff; box-shadow: 0 8px 22px rgba(35,39,43,.18); }
.task-sort-menu { right: 0; left: auto; width: 168px; }
.task-actions-menu[hidden], .task-sort-menu[hidden] { display: none; }
.task-actions-menu button, .task-sort-menu button { min-height: 34px; padding: 7px 15px; border: 0; background: #fff; color: #494e53; cursor: pointer; font-size: 10px; text-align: left; }
.task-actions-menu button:hover, .task-sort-menu button:hover { background: #f2f4f6; }
.task-actions-menu button:disabled { color: #c7cace; cursor: default; }
.task-actions-menu button.is-danger { color: #e25b61; }
.task-actions-menu > div, .task-sort-menu > div { height: 1px; background: #e1e3e5; }
.task-sort-menu button.is-active { color: #4b7ddc; }
.task-sort-icon { position: relative; width: 13px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.task-sort-icon::after { position: absolute; top: 3px; left: 0; width: 7px; height: 2px; background: currentColor; content: ""; }
.task-view-switch { height: 35px; border-color: #cbd0d4; }
.task-view-switch button { width: 35px; padding: 0; }
.task-view-switch button > span { display: block; position: relative; width: 15px; height: 15px; }
.task-view-kanban { background: radial-gradient(circle, currentColor 1.5px, transparent 2px) 0 0 / 5px 5px; }
.task-view-calendar { border: 1.5px solid currentColor; border-radius: 1px; }
.task-view-calendar::before { position: absolute; top: 3px; right: 1px; left: 1px; height: 1px; background: currentColor; content: ""; }
.task-view-calendar::after { position: absolute; inset: 6px 3px 3px; background: linear-gradient(90deg, transparent 42%, currentColor 43% 52%, transparent 53%), linear-gradient(transparent 42%, currentColor 43% 52%, transparent 53%); content: ""; opacity: .75; }
.task-view-gantt::before { position: absolute; inset: 1px 2px; background: linear-gradient(#0000 0 2px, currentColor 2px 4px, #0000 4px 7px, currentColor 7px 9px, #0000 9px 12px, currentColor 12px 14px); content: ""; }
.task-view-gantt::after { position: absolute; top: 0; left: 5px; width: 1px; height: 15px; background: currentColor; content: ""; }
.task-view-analytics::before { position: absolute; inset: 2px 1px 1px; border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; content: ""; }
.task-view-analytics::after { position: absolute; top: 4px; left: 3px; width: 11px; height: 8px; border-top: 2px solid currentColor; content: ""; transform: skewY(-28deg); }

.task-filter-strip { display: flex; min-height: 54px; flex: 0 0 auto; align-items: center; gap: 8px; padding: 9px 16px; overflow-x: auto; border-bottom: 1px solid #d7dadd; background: #fff; box-shadow: 0 3px 8px rgba(38,41,44,.08); }
.task-filter-strip[hidden] { display: none; }
.task-filter-strip button { min-height: 31px; flex: 0 0 auto; padding: 6px 11px; border: 1px solid #cbd0d4; border-radius: 17px; background: #fff; color: #50555a; cursor: pointer; font-size: 9px; }
.task-filter-strip button.is-active { border-color: #78a2eb; background: #eef4ff; color: #2f69cf; }
.task-filter-strip .task-clear-filters { border-color: transparent; background: transparent; color: #a7b8dc; }
.task-workspace-filter-panel { position: fixed; z-index: 84; top: 48px; right: auto; left: calc(194px + (100vw - 194px)/2 - 190px); width: 380px; max-height: calc(100dvh - 48px); overflow: auto; border: 0; box-shadow: 0 0 0 100vmax rgba(31,34,37,.48), 0 8px 26px rgba(25,29,34,.24); }
.task-workspace-filter-panel header { height: 52px; padding: 12px 18px; }
.task-workspace-filter-panel header strong { font-size: 16px; }
.task-workspace-filter-panel form { gap: 12px; max-height: none; padding: 13px 34px 26px; }
.task-workspace-filter-panel label, .task-location-filter-fieldset legend { font-size: 10px; }
.task-workspace-filter-panel select, .task-workspace-filter-panel input:not([type="checkbox"]) { width: 100%; height: 34px; padding: 6px 9px; border: 1px solid #cbd0d4; border-radius: 2px; background: #fff; font-size: 9px; }
.task-workspace-filter-panel select { text-align: center; }
.task-workspace-filter-panel fieldset { display: grid; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.task-time-filter-fieldset select + select { margin-top: 3px; }
.task-workspace-filter-panel .primary-button { margin-top: 4px; }

.task-workspace-content { background: #f4f5f7; }
.task-kanban { width: max(100%, 1040px); height: auto; min-height: 100%; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 9px; padding: 14px 16px; background: #f4f5f7; }
.task-kanban-column { display: block; min-height: 0; border-right: 0; }
.task-kanban-column-header, .task-kanban-subheader { display: grid; min-height: 28px; place-items: center; padding: 5px 6px; border: 0; border-bottom: 1px solid #cfd3d6; background: transparent; text-align: center; }
.task-kanban-column-header strong, .task-kanban-subheader strong { font-size: 9px; font-weight: 600; }
.task-kanban-column-header strong::before { display: none; }
.task-kanban-column-header.is-overdue { border-bottom: 0; background: #ff5656; color: #fff; }
.task-kanban-subheader { margin-top: 13px; }
.task-kanban-list { display: grid; min-height: 0; align-content: start; gap: 0; overflow: visible; padding: 0; }
.task-board-card { min-height: 51px; border: 1px solid #d4d7da; border-left-width: 1px; border-radius: 0; box-shadow: none; }
.task-board-card + .task-board-card { border-top: 0; }
.task-board-card:hover, .task-board-card.is-selected { border-color: #7fa5ec; }
.task-board-open { display: grid; min-height: 50px; grid-template-columns: 27px minmax(0, 1fr); align-items: center; gap: 7px; padding: 5px 7px; }
.task-board-marker { display: block; width: 21px; height: 21px; background: var(--card-color, #ff8a33); }
.task-board-marker.is-diamond { transform: rotate(45deg); }
.task-board-copy { display: grid; min-width: 0; gap: 2px; }
.task-board-reference, .task-board-title { overflow: hidden; color: #8a8f94; font-size: 7px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.task-board-title { min-height: 0; font-style: italic; }
.task-board-select { top: 3px; right: 3px; width: 11px; height: 11px; margin: 0; opacity: 0; }
.task-board-card:hover .task-board-select, .task-board-card.is-selected .task-board-select { opacity: 1; }
.task-column-new { width: 100%; min-height: 35px; border: 0; background: transparent; color: #9da2a6; cursor: pointer; font-size: 8px; }
.task-kanban-due-today { min-height: 36px; }

.task-calendar-shell, .task-gantt-shell, .task-analytics { min-height: 100%; padding: 12px 15px; }
.task-view-subtoolbar { min-height: 34px; margin-bottom: 0; }
.task-view-subtoolbar h2 { font-size: 11px; }
.task-view-subtoolbar > div, .task-view-subtoolbar > div > div { display: flex; align-items: center; }
.task-month-controls { gap: 0; }
.task-month-controls h2 { margin-left: 9px; }
.task-month-controls button, .task-download-button, .task-range-switch button { min-width: 27px; height: 27px; padding: 0 7px; border: 1px solid #cbd0d4; border-radius: 0; background: #fff; font-size: 8px; }
.task-download-button { margin-right: 9px; cursor: pointer; }
.task-range-switch { display: inline-flex; }
.task-range-switch button + button { border-left: 0; }
.task-range-switch button.is-active { background: #e9ecef; }
.task-calendar-layout, .task-gantt-layout { display: grid; min-height: 0; grid-template-columns: minmax(720px, 1fr) 180px; }
.task-calendar { grid-template-columns: repeat(7, minmax(100px, 1fr)); }
.task-calendar-weekday { height: 27px; padding: 7px; background: transparent; color: #41464b; }
.task-calendar-day { min-height: 88px; padding: 5px; }
.task-calendar-day.is-outside { background: #fafafa; color: #b7bbc0; }
.task-calendar-day.is-today { background: #eef4ff; box-shadow: inset 0 0 0 1px #5f8ee8; }
.task-calendar-date { margin: 0; font-size: 7px; text-align: left; }
.calendar-task-pill { display: flex; position: relative; width: 100%; height: 23px; align-items: center; gap: 4px; margin-top: 3px; padding: 2px 4px; overflow: visible; border: 1px solid #d6d9dc; border-radius: 0; background: #fff; color: #7a8085; cursor: grab; touch-action: none; }
.calendar-task-pill.is-range-start { border-left-color: #aeb3b8; border-radius: 2px 0 0 2px; }
.calendar-task-pill.is-range-end { border-right-color: #aeb3b8; border-radius: 0 2px 2px 0; }
.calendar-task-pill.is-dragging, .gantt-bar.is-dragging, .task-board-card.is-dragging { opacity: .55; cursor: grabbing; }
.calendar-task-pill i { width: 12px; height: 12px; flex: 0 0 12px; background: var(--task-color, #ff8a33); }
.calendar-task-pill > button { min-width: 0; flex: 1; padding: 0; overflow: hidden; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.calendar-task-pill > button span { display: block; overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.task-schedule-handle { position: absolute; z-index: 4; top: 0; width: 8px; height: 100%; cursor: ew-resize; touch-action: none; }
.task-schedule-handle.is-start { left: -4px; }
.task-schedule-handle.is-end { right: -4px; }
.task-schedule-handle::after { position: absolute; top: 4px; bottom: 4px; left: 3px; width: 2px; border-radius: 1px; background: rgba(37,43,49,.45); content: ""; opacity: 0; }
.calendar-task-pill:hover .task-schedule-handle::after, .gantt-bar:hover .task-schedule-handle::after, .task-schedule-handle:focus::after { opacity: 1; }
.task-calendar-day.is-schedule-target, .gantt-track.is-schedule-target { outline: 2px solid #1769f6; outline-offset: -2px; background-color: #eaf2ff; }
.task-schedule-rail { min-width: 0; border-left: 1px solid #d5d8db; background: #fff; }
.task-schedule-rail > strong { display: block; min-height: 31px; padding: 9px 8px; border-bottom: 1px solid #d5d8db; font-size: 8px; text-align: center; }
.task-schedule-rail > div { padding: 7px; }
.task-schedule-rail .task-board-card { margin-bottom: 0; }
.task-schedule-rail .task-board-card.is-schedule-draggable { cursor: grab; touch-action: none; }
.task-schedule-empty { margin: 12px 5px; color: #92979c; font-size: 8px; line-height: 1.5; text-align: center; }

.task-gantt-shell { min-width: 880px; }
.task-gantt-layout { grid-template-columns: minmax(700px, 1fr) 180px; }
.task-gantt { position: relative; overflow: hidden; border: 1px solid #d3d7da; background: #fff; }
.gantt-date-range { display: flex; height: 58px; align-items: center; gap: 7px; padding: 10px; border-bottom: 1px solid #d7dadd; font-size: 8px; }
.gantt-date-range button, .gantt-date-range input { border: 0; background: transparent; color: #575d62; font-size: 8px; }
.gantt-date-range input { width: 86px; padding: 0; }
.gantt-manpower { display: grid; position: absolute; top: 0; right: 0; left: 315px; height: 58px; place-items: center; overflow: hidden; border-bottom: 1px solid #d7dadd; }
.gantt-manpower div { position: absolute; inset: 22px 0 0; background: linear-gradient(170deg, transparent 0 25%, #eaf2ff 26% 78%, transparent 79%); }
.gantt-manpower p { z-index: 1; margin: 0; padding: 6px 14px; background: rgba(255,255,255,.76); color: #6f757a; font-size: 7px; }
.gantt-header, .gantt-row { grid-template-columns: 315px minmax(500px, 1fr); }
.gantt-header { min-height: 38px; }
.gantt-table-head { display: grid; grid-template-columns: 26px 74px 74px minmax(0, 1fr); align-items: center; border-right: 1px solid #d7dadd; color: #575d62; font-size: 7px; }
.gantt-table-head::before { content: ""; }
.gantt-days, .gantt-track { grid-template-columns: repeat(var(--gantt-weeks, 5), 1fr); }
.gantt-day { border-right: 1px solid #e2e4e6; font-size: 7px; }
.gantt-row { min-height: 33px; }
.gantt-task-label { display: grid; grid-template-columns: 26px 74px 74px minmax(0,1fr); align-items: center; gap: 0; padding: 0; }
.gantt-task-label input { justify-self: center; }
.gantt-task-label span, .gantt-task-label strong { padding: 0 6px; overflow: hidden; font-size: 7px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.gantt-track { display: block; position: relative; background: repeating-linear-gradient(90deg, transparent 0 calc(var(--gantt-column, 20%) - 1px), #eceef0 calc(var(--gantt-column, 20%) - 1px) var(--gantt-column, 20%)); }
.gantt-bar { display: flex; position: absolute; z-index: 1; top: 10px; left: var(--gantt-left); width: max(12px, var(--gantt-width)); height: 13px; align-items: stretch; margin: 0; overflow: visible; border-radius: 1px; background: var(--task-color, #ff8a33); cursor: grab; touch-action: none; }
.gantt-bar > button { width: 100%; border: 0; background: transparent; cursor: pointer; }
.gantt-bar .task-schedule-handle::after { background: rgba(255,255,255,.85); }
.gantt-today-line { position: absolute; z-index: 2; top: 58px; bottom: 0; left: calc(315px + (100% - 315px) * var(--gantt-today)); width: 1px; background: #ec413e; pointer-events: none; }

.task-shift-dates-dialog { width: min(450px, calc(100vw - 32px)); }
.task-shift-dates-form { display: grid; gap: 18px; padding: 18px 24px 22px; }
.task-shift-dates-form > p { margin: 0; color: #6f757a; font-size: 9px; line-height: 1.55; }
.task-shift-dates-form > div:not(.dialog-actions) { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task-shift-dates-form label { display: grid; gap: 6px; color: #444a4f; font-size: 9px; font-weight: 600; }
.task-shift-dates-form select, .task-shift-dates-form input { height: 34px; padding: 6px 9px; border: 1px solid #cbd0d4; border-radius: 2px; background: #fff; font: inherit; font-weight: 400; }

.task-analytics { gap: 9px; padding: 12px 15px; }
.task-analytics-panel { border: 1px solid #cfd3d6; background: #fff; }
.task-analytics-panel > header { height: 34px; padding: 8px 13px; border-bottom: 1px solid #cfd3d6; }
.task-analytics-panel h2 { margin: 0; font-size: 11px; font-weight: 500; }
.task-current-chart { display: grid; min-height: 280px; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: 35px; padding: 25px 40px 7px; }
.task-stacked-chart { display: grid; gap: 58px; }
.task-chart-axis { display: flex; justify-content: space-between; border-bottom: 1px solid #e6e8ea; color: #777d82; font-size: 8px; }
.task-chart-axis span { padding-bottom: 6px; }
.task-stacked-bar { display: flex; height: 82px; background: #f0f1f2; }
.task-stacked-bar i { display: block; width: var(--segment-width); height: 100%; background: var(--segment-color); }
.task-donut { display: grid; position: relative; width: 190px; height: 190px; place-items: center; border-radius: 50%; background: conic-gradient(var(--donut)); }
.task-donut::before { width: 92px; height: 92px; border-radius: 50%; background: #fff; content: ""; }
.task-donut span { display: grid; position: absolute; gap: 3px; text-align: center; }
.task-donut strong { font-size: 23px; font-weight: 400; }
.task-donut span { font-size: 9px; }
.task-chart-legend { display: flex; justify-content: center; gap: 28px; padding: 6px 15px 15px; color: #50565b; font-size: 8px; }
.task-chart-legend span { display: flex; align-items: center; gap: 5px; }
.task-chart-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--legend-color); }
.task-raw-data { display: block; margin: 0 auto 16px; border: 0; background: transparent; color: #4f7bd3; cursor: pointer; font-size: 8px; }
.task-lifetime-panel { min-height: 180px; }
.task-lifetime-chart { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 18px; align-items: center; padding: 35px 50px; }
.task-lifetime-chart div { display: grid; gap: 5px; }
.task-lifetime-chart div::before, .task-lifetime-chart div::after { display: block; width: 100%; height: 20px; background: #eef0f2; content: ""; }
.task-lifetime-chart span, .task-lifetime-chart i { display: block; width: var(--lifetime-width); height: 20px; background: #b9dcf5; }
.task-lifetime-chart i { background: #c6efca; }
.task-lifetime-chart strong { font-size: 24px; font-weight: 400; }
.task-lifetime-chart small { grid-column: 2; color: #8a9095; }

.task-import-modal, .task-report-editor-modal { padding: 24px 30px; }
.task-import-dialog { display: flex; width: min(1198px, calc(100vw - 60px)); height: min(600px, calc(100dvh - 48px)); flex-direction: column; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.task-import-dialog > header, .task-report-editor-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; padding: 17px 27px 11px; }
.task-import-dialog h2, .task-report-editor-dialog h2 { margin: 0 0 10px; font-size: 17px; font-weight: 500; }
.task-import-dialog p { margin: 0; color: #52585d; font-size: 8px; }
.task-import-dialog > header button, .task-report-editor-dialog > header button { border: 0; background: transparent; color: #8c9196; cursor: pointer; font-size: 21px; }
.task-import-dialog form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.task-import-grid-wrap { min-width: 0; flex: 1; overflow: auto; margin: 0 27px; border: 1px solid #d1d5d8; }
.task-import-grid { width: 1500px; border-collapse: collapse; table-layout: fixed; }
.task-import-grid th, .task-import-grid td { height: 23px; padding: 0; border-right: 1px solid #d6d9dc; border-bottom: 1px solid #d6d9dc; }
.task-import-grid thead th { height: 24px; background: #eff0f1; color: #656b70; font-size: 7px; font-weight: 400; white-space: nowrap; }
.task-import-grid thead th:first-child, .task-import-grid tbody th { width: 42px; text-align: center; }
.task-import-grid thead th:nth-child(2) { width: 128px; }
.task-import-grid input { width: 100%; height: 22px; padding: 2px 4px; border: 0; background: #fff; font-size: 7px; outline: 0; }
.task-import-grid input:focus { box-shadow: inset 0 0 0 2px #5d9bec; }
.task-import-dialog footer { display: flex; min-height: 70px; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 27px; }
.task-reports-dialog { width: 430px; padding-bottom: 15px; }
.task-report-search { display: flex; height: 35px; align-items: center; gap: 7px; margin: 0 28px 10px; padding: 0 10px; border: 1px solid #cbd0d4; }
.task-report-search input { width: 100%; border: 0; outline: 0; font-size: 10px; }
.task-report-list { display: grid; max-height: 330px; overflow: auto; margin: 0 28px 14px; border-top: 1px solid #e1e3e5; }
.task-report-row { display: grid; min-height: 52px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid #e1e3e5; background: #fff; }
.task-report-row-open { display: grid; min-width: 0; gap: 3px; padding: 9px 8px 9px 13px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.task-report-row-open strong { overflow: hidden; color: #34393e; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.task-report-row-open small { overflow: hidden; color: #8a9096; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.task-report-row-open .task-report-delivery-state { color: #51606f; }
.task-report-row-open .task-report-delivery-state.is-queued,
.task-report-row-open .task-report-delivery-state.is-running { color: #1769e8; }
.task-report-row-open .task-report-delivery-state.is-delivered { color: #23814c; }
.task-report-row-open .task-report-delivery-state.is-dead_letter,
.task-report-row-open .task-report-delivery-state.is-cancelled { color: #c33f48; }
.task-report-row-actions { display: flex; gap: 2px; padding-right: 6px; opacity: 0; transition: opacity .15s ease; }
.task-report-row:hover .task-report-row-actions, .task-report-row:focus-within .task-report-row-actions { opacity: 1; }
.task-report-row-actions button { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #7d848a; cursor: pointer; font-size: 12px; text-align: center; }
.task-report-row-actions button:hover { background: #edf2fa; color: #1769e8; }
.task-report-row-actions .is-delete:hover { background: #fff0f0; color: #dd3f4a; }
.task-report-row-actions .is-delete { width: auto; padding-inline: 7px; }
@media (hover: none) {
  .task-report-row-actions { opacity: 1; }
  .task-report-row-actions button { min-width: 36px; height: 36px; }
}
.task-report-list-empty { padding: 26px 12px; border-bottom: 1px solid #e1e3e5; color: #8a9096; font-size: 9px; text-align: center; }
.task-new-report { width: calc(100% - 56px); margin: 0 28px; }
.task-report-history-dialog { width: 500px; padding-bottom: 18px; }
.task-report-history-dialog .floating-panel-header > div { min-width: 0; }
.task-report-history-dialog h2 { margin: 0; }
.task-report-history-dialog header p { margin: 4px 0 0; color: #858c93; font-size: 8px; }
.task-report-history-list { display: grid; max-height: min(470px, 65dvh); overflow: auto; margin: 0 28px; border-top: 1px solid #e1e3e5; }
.task-report-history-row { display: grid; gap: 5px; padding: 12px 10px; border-bottom: 1px solid #e1e3e5; }
.task-report-history-row > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.task-report-history-row strong { color: #44505c; font-size: 10px; }
.task-report-history-row.is-queued strong, .task-report-history-row.is-running strong { color: #1769e8; }
.task-report-history-row.is-delivered strong { color: #23814c; }
.task-report-history-row.is-dead_letter strong, .task-report-history-row.is-cancelled strong { color: #c33f48; }
.task-report-history-row span, .task-report-history-row small { color: #858c93; font-size: 8px; }
.task-report-history-row p { margin: 2px 0; padding: 7px 8px; border-radius: 2px; background: #fff1f1; color: #a6343c; font-size: 8px; }
.task-report-history-row button { justify-self: start; }
.task-report-editor-dialog { display: flex; width: min(790px, calc(100vw - 52px)); max-height: calc(100dvh - 48px); flex-direction: column; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.task-report-name-label { display: flex; min-width: 0; align-items: center; gap: 7px; }
.task-report-name-label input { width: min(440px, 55vw); padding: 2px 4px; border: 1px solid transparent; color: #30353a; font: 500 17px/1.3 inherit; outline: 0; }
.task-report-name-label input:hover { border-color: #d8dce0; }
.task-report-name-label input:focus { border-color: #1769e8; box-shadow: 0 0 0 1px #1769e8; }
.task-report-editor-dialog form { min-height: 0; overflow: auto; }
.task-report-editor-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; padding: 0 28px 16px; }
.task-report-editor-column { display: grid; align-content: start; gap: 10px; }
.task-report-editor-column > label, .task-report-editor-column fieldset { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; color: #555b60; font-size: 8px; }
.task-report-editor-column input, .task-report-editor-column select, .task-report-editor-column textarea { width: 100%; min-height: 31px; padding: 5px 8px; border: 1px solid #cbd0d4; border-radius: 2px; background: #fff; font-size: 8px; }
.task-report-editor-column textarea { resize: vertical; }
.task-report-editor-column label > small { color: #92989d; font-size: 7px; }
.task-report-editor-column fieldset > label, .task-report-editor-column .checkbox-filter { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.task-report-editor-column fieldset input, .task-report-editor-column .checkbox-filter input { width: 13px; min-height: 13px; }
.task-report-includes { grid-template-columns: 1fr 1fr; }
.task-report-includes legend { grid-column: 1 / -1; }
.task-report-sort-fields { display: grid; grid-template-columns: repeat(3, 1fr); }
.task-report-sort-fields select + select { border-left: 0; }
.task-report-weekly-days { grid-template-columns: repeat(7, 1fr); gap: 3px !important; }
.task-report-weekly-days[hidden], #task-report-monthly-day[hidden], [data-task-report-detailed-option][hidden] { display: none !important; }
.task-report-weekly-days legend { grid-column: 1 / -1; }
.task-report-weekly-days > label { justify-content: center; gap: 3px !important; border: 1px solid #d3d7db; border-radius: 2px; }
.task-report-weekly-days input { width: 11px !important; min-height: 11px !important; }
.task-report-schedule-status { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid #d8e1ef; border-radius: 3px; background: #f5f8fd; color: #566678; font-size: 8px; }
.task-report-schedule-status strong { color: #355a91; font-size: 9px; }
.task-report-editor-dialog footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 28px 16px; }
.task-report-editor-dialog footer span { display: flex; gap: 7px; }
.task-report-delete { border: 0; background: transparent; color: #df5c61; cursor: pointer; font-size: 8px; }

.inspector { grid-template-columns: auto minmax(0, 920px) auto; gap: 18px; }
.inspector-panel { width: min(920px, calc(100vw - 150px)); height: min(640px, calc(100dvh - 70px)); max-height: none; border-radius: 0; }
.inspector-header { min-height: 42px; align-items: center; padding: 10px 45px 9px 12px; }
.inspector-header h2 { margin: 0; font-size: 12px; font-weight: 400; }
.inspector-close { top: 6px; right: 8px; border: 0; font-size: 19px; }
.inspector-body { grid-template-columns: minmax(0, 1fr) 300px; }
.inspector-feed { position: relative; display: flex; min-height: 0; flex-direction: column; overflow: auto; border-right: 1px solid #d5d8db; background: #fff; }
.inspector-attributes { overflow: auto; background: #f5f6f7; }
.inspector-attributes > h3 { margin: 0; padding: 21px 18px 13px; color: #5f656b; font-size: 13px; font-weight: 400; }
.task-detail-title-row { display: grid; min-height: 83px; grid-template-columns: 36px minmax(0, 1fr) 28px; align-items: start; gap: 8px; padding: 12px 14px; border-bottom: 1px solid #d7dade; }
.task-detail-marker { width: 29px; height: 29px; margin-top: 1px; background: var(--card-color, #ff8a33); }
.task-detail-title-row > div { display: grid; gap: 4px; color: #777d82; font-size: 9px; }
.task-detail-title-row strong { color: #4b5055; font-size: 10px; font-weight: 500; }
.task-detail-title-row > button { border: 0; background: transparent; color: #3476d7; cursor: pointer; }
.task-detail-mobile-summary { display: none; }
.task-detail-section { padding: 13px 14px 2px; }
.task-detail-section h3 { margin: 0 0 14px; font-size: 10px; }
.task-detail-links, .task-checklist-composer { display: flex; align-items: center; justify-content: center; gap: 7px; }
.task-detail-links button, .task-checklist-composer button, .task-activity-controls button { border: 0; background: transparent; color: #2770d7; cursor: pointer; font-size: 9px; }
.task-detail-links i, .task-checklist-composer i { width: 1px; height: 13px; background: #d4d7da; }
.task-related-section { border-bottom: 1px solid #e1e3e5; padding-bottom: 11px; }
.task-related-none { margin: -3px 0 10px; color: #9a9fa4; font-size: 8px; text-align: center; }
.task-related-records { display: grid; gap: 5px; margin: -4px 0 11px; }
.task-related-record { display: grid; min-height: 42px; grid-template-columns: minmax(0, 1fr) 30px; align-items: stretch; border: 1px solid #d7dade; background: #fff; }
.task-related-record > button:first-child { display: grid; min-width: 0; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 8px; padding: 6px 8px; border: 0; background: transparent; color: #4c5257; cursor: pointer; text-align: left; }
.task-related-record > button:last-child { border: 0; border-left: 1px solid #e2e4e6; background: transparent; color: #a0a5aa; cursor: pointer; font-size: 15px; }
.task-related-record > button:last-child:hover { background: #fff5f5; color: #db4d58; }
.task-related-record-marker { width: 20px; height: 20px; background: var(--card-color, #ff8a33); }
.task-related-record span:nth-child(2), .task-related-option > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.task-related-record strong, .task-related-option strong { overflow: hidden; font-size: 8px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.task-related-record small, .task-related-option small { overflow: hidden; color: #8a9095; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.task-related-dialog { width: min(480px, calc(100vw - 32px)); }
.task-related-dialog .floating-panel-header > div { display: grid; gap: 2px; }
.task-related-dialog .floating-panel-header span { color: #8a9095; font-size: 8px; }
.task-related-search { display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; margin: 14px; border: 1px solid #bfc5ca; background: #fff; color: #6e747a; }
.task-related-search:focus-within { border-color: #1769f6; box-shadow: 0 0 0 1px #1769f6; }
.task-related-search > span { text-align: center; }
.task-related-search input { min-width: 0; height: 36px; border: 0; outline: 0; font-size: 10px; }
.task-related-list { min-height: 170px; max-height: min(420px, calc(100dvh - 260px)); margin: 0 14px; overflow: auto; border: 1px solid #d8dcdf; }
.task-related-option { display: grid; width: 100%; min-height: 50px; grid-template-columns: 26px minmax(0, 1fr) 24px; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-bottom: 1px solid #e2e4e6; background: #fff; color: #42484d; cursor: pointer; text-align: left; }
.task-related-option:last-child { border-bottom: 0; }
.task-related-option:hover, .task-related-option:focus-visible { background: #f2f6ff; outline: 0; }
.task-related-option-marker { width: 22px; height: 22px; background: var(--card-color, #ff8a33); }
.task-related-option > i { color: #1769f6; font-size: 15px; font-style: normal; text-align: center; }
.task-related-empty { display: grid; min-height: 168px; place-content: center; gap: 5px; color: #7f858b; text-align: center; }
.task-related-empty strong { font-size: 11px; font-weight: 500; }
.task-related-empty span { font-size: 8px; }
.task-checklist-composer { margin: 4px 0 5px; }
.task-checklist-composer input { width: 150px; height: 27px; padding: 4px 7px; border: 1px solid #d3d7da; font-size: 8px; }
.task-activity-section { flex: 1; }
.task-activity-controls { display: flex; align-items: center; justify-content: space-between; color: #565c61; font-size: 9px; }
.task-activity-user { display: flex; align-items: center; gap: 9px; margin-top: 15px; }
.task-activity-user span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #d8e5f7; color: #4f75a3; font-size: 10px; }
.task-activity-user strong { font-size: 10px; }
.task-activity-list { display: grid; gap: 9px; margin: 9px 8px 0 42px; }
.task-activity-list p { display: flex; justify-content: space-between; margin: 0; color: #979ca1; font-size: 8px; }
.task-activity-list em { font-weight: 400; }
.task-message-composer { display: grid; position: sticky; bottom: 0; min-height: 54px; grid-template-columns: 34px minmax(0,1fr) 74px; gap: 7px; align-items: center; margin-top: auto; padding: 8px 12px; border-top: 1px solid #d7dade; background: #fff; }
.task-message-composer label, .task-message-composer button { display: grid; height: 33px; place-items: center; border: 1px solid #1769f6; border-radius: 2px; background: #1769f6; color: #fff; cursor: pointer; }
.task-message-composer input:not(.photo-input) { width: 100%; height: 33px; padding: 5px 9px; border: 1px solid #cfd3d6; font-size: 9px; }
.task-message-composer button { font-size: 9px; }
.inspector-attributes form { padding: 0 17px 15px; }
.task-attribute-row { display: grid; min-height: 42px; grid-template-columns: 112px minmax(0,1fr) auto; align-items: center; gap: 6px; border-bottom: 1px solid #d8dbde; color: #666c71; font-size: 9px; }
.task-attribute-row > span { display: flex; align-items: center; gap: 8px; }
.task-attribute-row i { width: 16px; color: #777d82; font-style: normal; text-align: center; }
.task-attribute-row input, .task-attribute-row select, .task-attribute-row output { width: 100%; min-width: 0; height: 31px; padding: 4px; border: 0; background: transparent; color: #3f4449; font-size: 9px; text-align: right; outline: 0; }
.task-attribute-row select { text-align-last: right; }
.task-attribute-row small { color: #6f757a; font-size: 7px; }
.task-attributes-save { display: none; }
.task-detail-step { width: 48px; height: 90px; border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 70px; line-height: 1; text-shadow: 0 2px 3px rgba(0,0,0,.7); }
.task-detail-step.is-previous { grid-column: 1; }
.inspector-panel { grid-column: 2; }
.task-detail-step.is-next { grid-column: 3; }

@media (max-width: 980px) {
  .tasks-toolbar { align-items: stretch; flex-direction: column; }
  .tasks-toolbar-leading, .tasks-toolbar-actions { justify-content: flex-start; overflow-x: auto; }
  .task-filter-strip { padding-inline: 10px; }
  .task-kanban { grid-template-columns: repeat(6, 170px); }
  .task-workspace-filter-panel { left: 50%; transform: translateX(-50%); }
  .inspector.is-open { display: block; padding: 0; }
  .inspector-panel { width: 100%; height: 100%; max-height: none; }
  .task-detail-step { display: none; }
}

/* Photos v0.27 — Fieldwire reference alignment. */
.photos-workspace { background: #f4f5f7; }
.photos-toolbar { min-height: 68px; padding: 0 16px; border-bottom: 1px solid #d1d5d9; background: #fff; }
.photos-toolbar-leading { display: flex; min-width: 0; align-items: center; gap: 9px; }
.photos-toolbar .new-library-item, .photos-toolbar .toolbar-button { min-height: 36px; padding: 7px 14px; border-radius: 2px; font-size: 12px; }
.photos-toolbar .new-library-item { min-width: 105px; }
.photos-toolbar .photo-actions-button { min-width: 94px; background: #fff; }
.photos-toolbar .photo-filter-button { min-width: 82px; margin-left: auto; }
.photo-actions-wrap, .photo-new-wrap { position: relative; }
.photo-upload-menu, .photo-actions-menu { top: calc(100% + 8px); right: auto; left: 0; width: 220px; min-width: 220px; padding: 0; border-color: #bfc4c9; box-shadow: 0 8px 20px rgba(28,32,36,.22); }
.photo-upload-menu button, .photo-actions-menu button { display: block; width: 100%; min-height: 43px; padding: 10px 20px; border: 0; background: #fff; color: #494e53; cursor: pointer; font-size: 13px; text-align: left; }
.photo-upload-menu button:hover, .photo-actions-menu button:hover:not(:disabled) { background: #f3f5f7; }
.photo-actions-menu button:disabled { color: #c3c7ca; cursor: default; }
.photo-actions-menu > div { margin: 0; }
.photo-filter-panel { position: static; z-index: auto; width: auto; flex: 0 0 auto; overflow: visible; border: 0; border-bottom: 1px solid #d4d7da; border-radius: 0; background: #fff; box-shadow: 0 3px 9px rgba(36,40,44,.13); }
.photo-filter-panel form { display: flex; min-height: 66px; grid-template-columns: none; align-items: center; gap: 9px; padding: 13px 16px; }
.photo-filter-pill { display: block !important; flex: 0 0 auto; }
.photo-filter-pill select { width: auto; min-width: 116px; height: 36px; padding: 5px 31px 5px 14px; border: 1px solid #c9cdd1; border-radius: 18px; background-color: #fff; color: #4f555a; cursor: pointer; font-size: 12px; }
.photo-filter-pill:nth-child(2) select { min-width: 104px; }
.photo-filter-pill:nth-child(3) select { min-width: 88px; }
.photo-filter-pill:nth-child(4) select { min-width: 111px; }
.photo-filter-pill:nth-child(5) select { min-width: 119px; }
.photo-clear-filters { min-height: 34px; padding: 0 4px; border: 0; background: transparent; color: #8eaeea; cursor: pointer; font-size: 12px; }
.photo-gallery { padding: 18px 20px 32px; background: #f4f5f7; }
.photo-library-empty { min-height: calc(100dvh - 178px); gap: 13px; }
.photo-library-empty .photo-empty-illustration { position: relative; display: grid; width: 142px; height: 142px; margin-bottom: 8px; place-items: center; border-radius: 50%; background: #f0f2f6; }
.photo-empty-illustration::after { position: absolute; z-index: 3; top: 13px; right: 11px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #b9c3d4; color: #fff; content: "+"; font-size: 24px; font-weight: 300; }
.photo-empty-illustration > span { position: relative; width: 69px; height: 47px; border: 2px solid #b8c1cf; border-radius: 3px; background: transparent; }
.photo-empty-illustration > span::before { position: absolute; top: -12px; left: 16px; width: 34px; height: 13px; border: 2px solid #b8c1cf; border-bottom: 0; border-radius: 4px 4px 0 0; content: ""; transform: skew(-16deg); }
.photo-empty-illustration > span::after { position: absolute; top: 9px; left: 23px; width: 22px; height: 22px; border: 3px double #b8c1cf; border-radius: 50%; content: ""; }
.photo-library-empty strong { color: #34393e; font-size: 18px; font-weight: 600; }
.photo-library-empty p { color: #7c8288; font-size: 12px; }
.photo-library-empty > button { min-width: 95px; min-height: 34px; margin-top: 2px; font-size: 12px; }
.photo-library-empty > a { margin-top: 5px; color: #1769f6; font-size: 11px; text-decoration: none; }

.photo-upload-modal { position: fixed; z-index: 125; inset: 0; display: grid; place-items: start center; padding: 40px 24px; background: rgba(29,31,34,.5); }
.photo-upload-modal[hidden] { display: none; }
.photo-upload-dialog { display: flex; width: min(848px, calc(100vw - 48px)); min-height: 650px; max-height: calc(100dvh - 80px); flex-direction: column; overflow: auto; border: 1px solid #92979c; border-radius: 2px; background: #fff; box-shadow: 0 10px 28px rgba(24,27,30,.34); }
.photo-upload-dialog:focus { outline: 0; }
.photo-upload-dialog > header { display: flex; min-height: 94px; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; padding: 43px 45px 12px; }
.photo-upload-dialog > header h2 { margin: 0; color: #2f3439; font-size: 23px; font-weight: 600; }
.photo-upload-dialog > header button { width: 34px; height: 34px; margin-top: -19px; margin-right: -21px; border: 0; background: transparent; color: #a0a5aa; cursor: pointer; font-size: 28px; font-weight: 300; }
.photo-upload-dropzone { display: grid; min-height: 384px; margin: 18px 45px 0; place-items: center; align-content: center; gap: 12px; padding: 30px; overflow: auto; border: 2px dashed #aeb3b8; border-radius: 2px; background: #f8f9fa; color: #444a4f; text-align: center; }
.photo-upload-dropzone.is-dragging { border-color: #1769f6; background: #f2f6ff; }
.photo-upload-icon { position: relative; display: block; width: 22px; height: 21px; margin-bottom: 5px; border-bottom: 2px solid #555b60; }
.photo-upload-icon::before { position: absolute; top: 2px; left: 10px; width: 2px; height: 12px; background: #555b60; content: ""; }
.photo-upload-icon::after { position: absolute; top: 1px; left: 6px; width: 7px; height: 7px; border-top: 2px solid #555b60; border-left: 2px solid #555b60; content: ""; transform: rotate(45deg); }
.photo-upload-dropzone > strong { font-size: 14px; font-weight: 600; }
.photo-upload-dropzone > p { margin: 0; font-size: 13px; }
.photo-upload-dropzone > span:not(.photo-upload-icon) { font-size: 13px; }
.photo-upload-dropzone > button { min-width: 104px; min-height: 39px; margin-top: 5px; font-size: 13px; }
.photo-upload-pending { display: grid; width: min(480px, 100%); max-height: 100px; gap: 4px; margin-top: 10px; overflow: auto; }
.photo-upload-pending[hidden] { display: none; }
.photo-upload-pending > div { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; border: 1px solid #d6dade; background: #fff; text-align: left; }
.photo-upload-pending > div > span { display: grid; min-width: 0; gap: 2px; }
.photo-upload-pending strong { overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.photo-upload-pending small { color: #868c91; font-size: 9px; }
.photo-upload-pending button { width: 27px; height: 27px; flex: 0 0 auto; border: 0; background: transparent; color: #8b9196; cursor: pointer; font-size: 18px; }
.photo-upload-dialog > footer { display: flex; min-height: 134px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 18px; padding: 31px 45px 35px; }
.photo-upload-more-wrap { position: relative; }
.photo-upload-more { display: flex; min-height: 36px; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #1769f6; cursor: pointer; font-size: 13px; }
.photo-cloud-icon { position: relative; width: 19px; height: 12px; border: 1.5px solid currentColor; border-radius: 8px; }
.photo-cloud-icon::before { position: absolute; top: -6px; left: 4px; width: 9px; height: 9px; border: 1.5px solid currentColor; border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; background: #fff; content: ""; transform: rotate(36deg); }
.photo-upload-more-menu { position: absolute; z-index: 3; bottom: 40px; left: 0; display: grid; width: 220px; overflow: hidden; border: 1px solid #c8ccd0; background: #fff; box-shadow: 0 5px 14px rgba(28,32,37,.18); }
.photo-upload-more-menu[hidden] { display: none; }
.photo-upload-more-menu button { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border: 0; background: #fff; color: #4d5359; cursor: pointer; font-size: 12px; text-align: left; }
.photo-upload-more-menu button:hover:not(:disabled) { background: #f3f5f7; }
.photo-upload-more-menu button:disabled { color: #7e858b; cursor: not-allowed; opacity: 1; }
.photo-upload-more-menu button small { color: #979da2; font-size: 9px; }
.photo-upload-submit { display: inline-flex; min-width: 126px; min-height: 40px; align-items: center; justify-content: center; gap: 7px; font-size: 13px; }
.photo-upload-submit:disabled { border-color: #9bb9f3; background: #9bb9f3; cursor: default; }
.photo-submit-icon { position: relative; display: inline-block; width: 14px; height: 15px; border-bottom: 1.5px solid currentColor; }
.photo-submit-icon::before { position: absolute; top: 2px; left: 6px; width: 1.5px; height: 9px; border-radius: 1px; background: currentColor; content: ""; }
.photo-submit-icon::after { position: absolute; top: 2px; left: 4px; width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; content: ""; transform: rotate(45deg); }

@media (max-width: 760px) {
  .photos-toolbar { align-items: center; padding-inline: 10px; }
  .photo-filter-panel form { overflow-x: auto; padding-inline: 10px; }
  .photo-filter-pill select { min-width: 110px; }
  .photo-upload-modal { inset: 0 0 58px; padding: 8px; }
  .photo-upload-dialog { width: 100%; min-height: 100%; max-height: 100%; }
  .photo-upload-dialog > header { min-height: 70px; padding: 26px 22px 8px; }
  .photo-upload-dialog > header button { margin: -12px -10px 0 0; }
  .photo-upload-dropzone { min-height: 300px; margin: 12px 20px 0; }
  .photo-upload-dialog > footer { align-items: stretch; flex-direction: column; padding: 22px 20px; }
  .photo-upload-more, .photo-upload-submit { width: 100%; justify-content: center; }
}

/* Files v0.28 — Fieldwire reference alignment. */
.files-workspace { background: #f4f5f7; }
.files-toolbar { min-height: 68px; padding: 0 16px; border-bottom: 1px solid #d1d5d9; background: #fff; }
.files-toolbar-primary, .files-toolbar-secondary { display: flex; min-width: 0; align-items: center; gap: 9px; }
.files-toolbar-secondary { margin-left: auto; }
.files-toolbar .files-heading[hidden], .files-toolbar .file-search[hidden] { display: none; }
.files-toolbar .new-library-item, .files-toolbar .toolbar-button { min-height: 36px; padding: 7px 14px; border-radius: 2px; font-size: 12px; }
.files-toolbar #new-file-button { min-width: 93px; }
.files-toolbar #new-file-folder-button { min-width: 103px; background: #fff; }
.files-toolbar #file-actions-button { min-width: 84px; background: #fff; }
.files-toolbar #file-filter-button { min-width: 101px; background: #fff; }
.file-actions-wrap { position: relative; }
.file-actions-button:disabled { opacity: 1; }
.file-actions-menu { top: calc(100% + 8px); right: auto; left: 0; width: 210px; min-width: 210px; padding: 0; border-color: #bfc4c9; box-shadow: 0 8px 20px rgba(28,32,36,.22); }
.file-actions-menu button { min-height: 42px; padding: 10px 19px; font-size: 12px; }
.file-actions-menu button:disabled { color: #c2c6ca; cursor: default; }
.file-actions-menu button:hover:not(:disabled) { background: #f3f5f7; }
.file-actions-menu > div { margin: 0; }
.file-bulk-bar { display: none !important; }

.files-content.is-empty { padding: 0; overflow: hidden; }
.files-content.is-empty .file-content-header { display: none; }
.file-table-wrap.is-empty-state { min-width: 0; margin: 0; border: 0; background: transparent; }
.file-library-empty { display: grid; min-height: calc(100dvh - 109px); place-items: center; align-content: center; gap: 13px; color: #7c8288; text-align: center; }
.file-empty-illustration { position: relative; display: grid; width: 142px; height: 142px; margin-bottom: 8px; place-items: center; border-radius: 50%; background: #eef1f5; }
.file-empty-illustration::after { position: absolute; z-index: 3; top: 13px; right: 11px; display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #b9c3d4; color: #fff; content: "+"; font-size: 24px; font-weight: 300; }
.file-empty-illustration > span { position: relative; width: 70px; height: 52px; margin-top: 7px; border: 2px solid #b8c1cf; border-radius: 3px; }
.file-empty-illustration > span::before { position: absolute; top: -12px; left: -2px; width: 31px; height: 12px; border: 2px solid #b8c1cf; border-bottom: 0; border-radius: 4px 5px 0 0; content: ""; }
.file-empty-illustration > span::after { position: absolute; top: 12px; left: 27px; width: 13px; height: 27px; border: 3px solid #b8c1cf; border-top: 0; border-radius: 0 0 9px 9px; content: ""; transform: rotate(42deg); }
.file-library-empty h2 { margin: 0; color: #34393e; font-size: 18px; font-weight: 600; }
.file-library-empty p { margin: 0; font-size: 12px; }
.file-library-empty > button { min-width: 94px; min-height: 34px; margin-top: 2px; font-size: 12px; }
.file-library-empty > a { margin-top: 5px; color: #1769f6; font-size: 11px; text-decoration: none; }

.file-filter-modal { position: fixed; z-index: 126; inset: 0; display: grid; place-items: start center; padding: 27px 24px; background: rgba(29,31,34,.5); }
.file-filter-modal[hidden] { display: none; }
.file-filter-dialog { width: min(380px, calc(100vw - 48px)); min-height: 461px; overflow: hidden; border: 1px solid #8d9297; border-radius: 2px; background: #fff; box-shadow: 0 8px 24px rgba(25,28,31,.34); }
.file-filter-dialog > header { display: flex; min-height: 66px; align-items: center; justify-content: space-between; padding: 18px 25px 10px; }
.file-filter-dialog h2 { margin: 0; color: #31363b; font-size: 17px; font-weight: 600; }
.file-filter-dialog > header button { width: 30px; height: 30px; margin-right: -11px; border: 0; background: transparent; color: #9aa0a5; cursor: pointer; font-size: 23px; font-weight: 300; }
.file-filter-dialog form { display: grid; gap: 12px; padding: 0 26px 24px; }
.file-filter-dialog form > label { display: grid; gap: 7px; color: #4b5156; font-size: 11px; font-weight: 600; }
.file-filter-dialog input, .file-filter-dialog select { width: 100%; height: 36px; min-width: 0; padding: 6px 11px; border: 1px solid #c7ccd0; border-radius: 2px; background-color: #fff; color: #5a6065; font-size: 11px; font-weight: 400; }
.file-filter-dialog input::placeholder { color: #a2a7ac; }
.file-filter-time { margin-top: -3px; }
.file-filter-actions { display: grid; gap: 9px; margin-top: 6px; }
.file-filter-actions button { width: 100%; min-height: 38px; font-size: 11px; }
.file-filter-actions .secondary-button { background: #fff; color: #555b60; }

#file-folder-modal, #file-upload-modal { place-items: start center; padding: 35px 20px; }
.file-folder-dialog { width: min(508px, calc(100vw - 40px)); min-height: 346px; border-color: #858a8f; border-radius: 2px; box-shadow: 0 9px 25px rgba(24,27,30,.35); }
.file-folder-dialog > header { min-height: 81px; align-items: flex-start; padding: 38px 37px 10px; border-bottom: 0; }
.file-folder-dialog > header h2 { color: #30353a; font-size: 22px; font-weight: 600; }
.file-folder-dialog > header button { margin-top: -24px; margin-right: -22px; color: #9ca1a6; font-size: 25px; }
.file-folder-form { display: grid; gap: 20px; padding: 8px 37px 39px; }
.file-folder-form .file-folder-name input, .file-folder-form .file-folder-access select { width: 100%; height: 42px; padding: 7px 13px; border: 1px solid #bfc4c8; border-radius: 2px; background: #fff; color: #4d5358; font-size: 13px; }
.file-folder-form .file-folder-name input:focus { border-color: #1769f6; box-shadow: 0 0 0 2px rgba(23,105,246,.15); outline: 0; }
.file-folder-form .file-folder-access { display: grid; gap: 8px; color: #464c51; font-size: 12px; font-weight: 600; }
.file-folder-access > span { display: flex; align-items: center; gap: 7px; }
.file-folder-access-help { display: grid; width: 23px; height: 23px; place-items: center; padding: 0; border: 1px solid #aeb4b9; border-radius: 50%; background: #fff; color: #777e84; cursor: help; font-size: 12px; }
.file-folder-form > .primary-button { width: 100%; min-height: 42px; margin-top: 1px; font-size: 13px; }
.file-folder-form > .primary-button:disabled { border-color: #9cb9f2; background: #9cb9f2; cursor: default; }

#file-upload-modal { padding-top: 32px; }
.file-upload-dialog { width: min(615px, calc(100vw - 40px)); min-height: 614px; max-height: calc(100dvh - 64px); overflow: auto; border-color: #858a8f; border-radius: 2px; box-shadow: 0 9px 25px rgba(24,27,30,.35); }
.file-upload-dialog > header { min-height: 89px; align-items: flex-start; padding: 36px 32px 10px; border-bottom: 0; }
.file-upload-dialog > header h2 { color: #30353a; font-size: 21px; font-weight: 600; }
.file-upload-dialog > header button { margin-top: -23px; margin-right: -20px; color: #9ca1a6; font-size: 25px; }
.file-upload-form { display: flex; min-height: 524px; flex-direction: column; gap: 0; padding: 5px 32px 30px; }
.file-drop-zone { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 11px; padding: 25px; border: 2px dashed #c1c5ca; border-radius: 2px; background: #f8f9fa; color: #42484d; cursor: default; text-align: center; }
.file-drop-zone.is-dragging { border-color: #1769f6; background: #f2f6ff; }
.file-drop-zone > input[hidden] { display: none; }
.file-upload-icon { position: relative; display: block; width: 22px; height: 21px; margin-bottom: 3px; border-bottom: 2px solid #555b60; color: transparent; font-size: 0; }
.file-upload-icon::before { position: absolute; top: 2px; left: 10px; width: 2px; height: 12px; background: #555b60; content: ""; }
.file-upload-icon::after { position: absolute; top: 1px; left: 6px; width: 7px; height: 7px; border-top: 2px solid #555b60; border-left: 2px solid #555b60; content: ""; transform: rotate(45deg); }
.file-drop-zone > strong { font-size: 13px; font-weight: 600; }
.file-drop-zone > span:not(.file-upload-icon) { font-size: 12px; }
.file-drop-zone > button { min-width: 103px; min-height: 38px; margin-top: 3px; font-size: 12px; }
.file-upload-pending { display: grid; max-height: 91px; margin-top: 10px; overflow: auto; border: 1px solid #d3d7da; }
.file-upload-pending[hidden] { display: none; }
.file-upload-pending article { grid-template-columns: 34px minmax(0,1fr) 26px; min-height: 52px; }
.file-upload-pending article > button { width: 25px; height: 25px; padding: 0; border: 0; background: transparent; color: #8b9196; cursor: pointer; font-size: 18px; }
.file-integration-intro { margin: 31px 0 15px; color: #444a4f; font-size: 11px; }
.file-upload-integrations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.file-upload-integrations button { display: flex; min-width: 0; height: 72px; align-items: center; justify-content: center; gap: 8px; padding: 8px; border: 1px solid #d1d5d8; border-radius: 2px; background: #fff; color: #555b60; cursor: pointer; }
.file-upload-integrations button:hover:not(:disabled) { border-color: #91aae1; background: #f8faff; }
.file-upload-integrations button:disabled { border-color: #d8dbde; background: #f5f6f7; color: #7d848a; cursor: not-allowed; opacity: 1; }
.file-upload-integrations button > span:last-child { display: grid; min-width: 0; gap: 3px; text-align: left; }
.file-upload-integrations button small { color: #92989d; font-size: 9px; font-weight: 400; }
.file-upload-integrations strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-integration-mark { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; font-size: 13px; font-weight: 700; }
.file-integration-mark.is-drive { background: conic-gradient(from 210deg, #34a853 0 33%, #fbbc04 0 66%, #4285f4 0); clip-path: polygon(50% 0,100% 88%,78% 100%,22% 100%,0 88%); }
.file-integration-mark.is-sharepoint { border-radius: 50%; background: #108a87; color: #fff; }
.file-integration-mark.is-egnyte { color: #4e555b; font-size: 19px; }
.file-upload-link-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid #d1d5d8; background: #f8f9fa; }
.file-upload-link-options[hidden] { display: none; }
.file-upload-link-options label { display: grid; gap: 5px; color: #555b60; font-size: 10px; }
.file-upload-link-options input { width: 100%; height: 34px; min-width: 0; padding: 5px 8px; border: 1px solid #c8cdd1; background: #fff; font-size: 10px; }
.file-upload-footer { display: flex; min-height: 76px; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: auto; }
.file-more-upload-button { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #1769f6; cursor: pointer; font-size: 11px; }
.file-more-upload-button.is-active { font-weight: 600; }
.file-cloud-icon { position: relative; width: 18px; height: 11px; border: 1.5px solid currentColor; border-radius: 8px; }
.file-cloud-icon::before { position: absolute; top: -6px; left: 4px; width: 8px; height: 8px; border: 1.5px solid currentColor; border-right-color: transparent; border-bottom-color: transparent; border-radius: 50%; background: #fff; content: ""; transform: rotate(36deg); }
#file-upload-submit { display: inline-flex; min-width: 118px; min-height: 38px; align-items: center; justify-content: center; gap: 7px; font-size: 11px; }
#file-upload-submit:disabled { border-color: #9cb9f2; background: #9cb9f2; cursor: default; }
.file-submit-icon { position: relative; display: inline-block; width: 14px; height: 15px; border-bottom: 1.5px solid currentColor; }
.file-submit-icon::before { position: absolute; top: 2px; left: 6px; width: 1.5px; height: 9px; border-radius: 1px; background: currentColor; content: ""; }
.file-submit-icon::after { position: absolute; top: 2px; left: 4px; width: 5px; height: 5px; border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; content: ""; transform: rotate(45deg); }

@media (max-width: 760px) {
  .files-toolbar { padding-inline: 10px; overflow-x: auto; }
  .files-toolbar-primary, .files-toolbar-secondary { flex: 0 0 auto; }
  .file-filter-modal, #file-folder-modal, #file-upload-modal { inset: 0 0 58px; padding: 8px; }
  .file-filter-dialog, .file-folder-dialog, .file-upload-dialog { width: 100%; max-height: 100%; }
  .file-filter-dialog { min-height: 0; }
  .file-upload-dialog { min-height: 100%; }
  .file-upload-form { min-height: 0; }
  .file-upload-integrations { grid-template-columns: 1fr; }
  .file-upload-link-options { grid-template-columns: 1fr; }
  .file-upload-footer { align-items: stretch; flex-direction: column; padding-top: 18px; }
  .file-more-upload-button, #file-upload-submit { width: 100%; justify-content: center; }
}

/* Interaction audit v0.30 — complete top-level navigation and task category flows. */
#task-category-rail-items { display: contents; }
.project-switcher-menu {
  position: absolute;
  z-index: 85;
  top: 43px;
  right: 9px;
  left: 9px;
  display: grid;
  overflow: hidden;
  border: 1px solid #55595d;
  border-radius: 2px;
  background: #fff;
  color: #373c41;
  box-shadow: 0 8px 22px rgba(18, 21, 24, .28);
}
.project-switcher-menu[hidden] { display: none; }
.project-switcher-menu > strong, .project-switcher-menu > span { padding-inline: 13px; }
.project-switcher-menu > strong { padding-top: 13px; font-size: 12px; }
.project-switcher-menu > span { padding-block: 3px 10px; border-bottom: 1px solid #e0e3e6; color: #858b91; font-size: 10px; }
.project-switcher-menu > button { min-height: 38px; padding: 8px 13px; border: 0; border-bottom: 1px solid #eceef0; background: #fff; cursor: pointer; text-align: left; }
.project-switcher-menu > button:hover { background: #f4f6f8; }

.topbar-actions { position: relative; }
.topbar-popover {
  position: absolute;
  z-index: 90;
  top: 38px;
  right: 18px;
  display: grid;
  width: 190px;
  overflow: hidden;
  border: 1px solid #c7cbd0;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 28, 32, .2);
}
.topbar-popover[hidden] { display: none; }
.topbar-popover > strong, .topbar-popover > span { padding-inline: 14px; }
.topbar-popover > strong { padding-top: 13px; }
.topbar-popover > span { padding-block: 3px 11px; border-bottom: 1px solid #e1e4e7; color: #858b91; font-size: 10px; }
.topbar-popover > button { min-height: 38px; padding: 8px 14px; border: 0; border-bottom: 1px solid #eceef0; background: #fff; cursor: pointer; text-align: left; }
.topbar-popover > button:hover { background: #f5f7f9; }

.app-shell.is-rail-collapsed { grid-template-columns: 0 minmax(0, 1fr) 236px; }
.app-shell.is-wide-workspace.is-rail-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.app-shell.is-rail-collapsed .global-rail { visibility: hidden; }

.help-dialog, .plan-info-dialog { width: min(530px, calc(100vw - 40px)); }
.help-dialog-content { display: grid; gap: 9px; padding: 16px 20px 22px; }
.help-dialog-content > button { display: grid; gap: 4px; min-height: 64px; padding: 12px 14px; border: 1px solid #d3d7db; border-radius: 2px; background: #fff; cursor: pointer; text-align: left; }
.help-dialog-content > button:hover { border-color: #94afe5; background: #f5f8ff; }
.help-dialog-content span { color: #777e85; font-size: 11px; }
.plan-info-content { padding: 14px 22px 22px; }
.plan-info-content > p { margin: 0 0 14px; color: #686f76; line-height: 1.6; }
.plan-info-content dl { margin: 0; border: 1px solid #d8dce0; }
.plan-info-content dl > div { display: flex; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #e5e7e9; }
.plan-info-content dl > div:last-child { border-bottom: 0; }
.plan-info-content dt { color: #666d73; }
.plan-info-content dd { margin: 0; font-weight: 600; }

.task-categories-dialog { width: min(650px, calc(100vw - 48px)); max-height: min(690px, calc(100dvh - 48px)); }
.task-categories-toolbar { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid #dadddf; }
.task-categories-toolbar .library-search { flex: 1; }
.task-categories-list { min-height: 170px; max-height: 430px; overflow: auto; padding: 0 20px; }
.task-category-row { display: grid; min-height: 58px; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; border-bottom: 1px solid #e2e5e8; }
.task-category-badge { display: grid; width: 34px; height: 27px; place-items: center; border-radius: 2px; background: #f18b37; color: #fff; font-size: 10px; font-weight: 700; }
.task-category-row > div { display: grid; min-width: 0; gap: 3px; }
.task-category-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-category-row small { color: #8a9096; }
.task-category-row > button { min-height: 30px; padding: 5px 10px; border: 1px solid #c9cdd1; border-radius: 2px; background: #fff; cursor: pointer; font-size: 11px; }
.task-category-row > button:hover { background: #f3f5f7; }
.task-category-row > button.is-danger { border-color: transparent; color: #d94450; }
.settings-tags-footer { display: flex; min-height: 53px; align-items: center; justify-content: space-between; padding: 10px 20px; border-top: 1px solid #dadddf; color: #7a8086; }
.task-category-editor-dialog { width: min(440px, calc(100vw - 40px)); }
.task-category-editor-dialog form { display: grid; gap: 14px; padding: 16px 22px 22px; }
.task-category-editor-dialog form > label { display: grid; gap: 7px; color: #4f555a; font-size: 11px; font-weight: 600; }
.task-category-editor-dialog input { width: 100%; height: 38px; padding: 7px 10px; border: 1px solid #c6cbd0; border-radius: 2px; }
.task-category-delete-dialog { width: min(440px, calc(100vw - 40px)); }
.task-category-delete-dialog > p { margin: 0; padding: 18px 22px 10px; color: #555c62; line-height: 1.55; }
.task-customization-dialog { width: min(720px, calc(100vw - 48px)); max-height: min(760px, calc(100dvh - 48px)); }
.task-customization-toolbar, .task-attribute-manager-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.task-customization-toolbar { min-height: 64px; padding: 12px 20px; border-bottom: 1px solid #dadddf; }
.task-customization-toolbar p { margin: 0; color: #737a81; font-size: 11px; line-height: 1.45; }
.task-customization-list { min-height: 120px; max-height: 430px; overflow: auto; padding: 0 20px; }
.task-customization-row { display: grid; min-height: 62px; grid-template-columns: 18px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-bottom: 1px solid #e1e4e7; }
.task-customization-row > i { width: 14px; height: 14px; border-radius: 2px; background: var(--status-color, #7a8086); }
.task-customization-row > span { display: grid; min-width: 0; gap: 3px; }
.task-customization-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-customization-row small { color: #858b91; }
.task-customization-row > button { min-height: 30px; padding: 5px 10px; border: 1px solid #c9cdd1; border-radius: 2px; background: #fff; cursor: pointer; font-size: 11px; }
.task-customization-row > button.is-danger { border-color: transparent; color: #d94450; }
.task-customization-row > button:disabled { color: #b3b7bb; cursor: not-allowed; }
.task-customization-editor { width: min(470px, calc(100vw - 40px)); }
.task-customization-editor form { display: grid; gap: 14px; padding: 18px 22px 22px; }
.task-customization-editor form > label { display: grid; gap: 7px; color: #4f555a; font-size: 11px; font-weight: 600; }
.task-customization-editor input:not([type="checkbox"]), .task-customization-editor select, .task-customization-editor textarea { width: 100%; box-sizing: border-box; min-height: 38px; padding: 8px 10px; border: 1px solid #c6cbd0; border-radius: 2px; background: #fff; color: #353a3f; font: inherit; }
.task-customization-editor textarea { resize: vertical; line-height: 1.45; }
.task-customization-editor label > small { color: #8a9096; font-weight: 400; }
.task-default-status-control { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px !important; }
.task-default-status-control input { margin: 0; }
.task-attribute-manager { max-height: 540px; overflow: auto; padding: 4px 20px 18px; }
.task-attribute-manager section { padding: 14px 0 4px; }
.task-attribute-manager h3 { margin: 0 0 10px; color: #42484e; font-size: 12px; }
.task-attribute-manager h3 small { margin-left: 4px; color: #92989e; font-weight: 400; }
.task-default-attribute-row { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e3e6e8; }
.task-default-attribute-row label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.task-attribute-manager-heading h3 { margin: 0; }
.checklist-template-editor { width: min(560px, calc(100vw - 40px)); }
.task-checklist-picker-dialog { width: min(520px, calc(100vw - 40px)); }
.task-checklist-picker-list { display: grid; max-height: 460px; overflow: auto; padding: 12px 20px; }
.task-checklist-picker-list > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 58px; padding: 10px 12px; border: 0; border-bottom: 1px solid #e3e6e8; background: #fff; cursor: pointer; text-align: left; }
.task-checklist-picker-list > button:hover { background: #f4f7fb; }
.task-checklist-picker-list span { display: grid; gap: 3px; }
.task-checklist-picker-list small { color: #888f96; }
.task-checklist-picker-list i { color: #096ce7; font-style: normal; font-size: 18px; }
.task-custom-attribute > span { min-width: 108px; }
.task-custom-attribute-filters { display: contents; }

.task-calendar.is-week { grid-template-columns: repeat(7, minmax(100px, 1fr)); }
.task-calendar.is-day { grid-template-columns: minmax(420px, 1fr); }
.task-calendar.is-week .task-calendar-day { min-height: 430px; }
.task-calendar.is-day .task-calendar-day { min-height: 500px; }
.task-raw-data-table { width: min(520px, calc(100% - 30px)); margin: 0 auto 18px; overflow: hidden; border: 1px solid #d8dce0; }
.task-raw-data-table table { width: 100%; border-collapse: collapse; }
.task-raw-data-table th, .task-raw-data-table td { padding: 8px 10px; border-bottom: 1px solid #e5e8ea; font-size: 10px; text-align: left; }
.task-raw-data-table th { background: #f5f6f7; color: #666d73; }
.task-raw-data-table tr:last-child td { border-bottom: 0; }

/* Budget: dense financial table, forecast strip and right-side line-item sheet. */
.budget-workspace { position: relative; display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; background: #eef0f3; }
.budget-workspace[hidden], .budget-viewer-modal[hidden] { display: none; }
.budget-toolbar { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.budget-toolbar-primary, .budget-toolbar-secondary { display: flex; align-items: center; gap: 8px; }
.budget-import-control { position: relative; }
.budget-import-menu { position: absolute; z-index: 45; top: calc(100% + 5px); left: 0; display: grid; width: 230px; overflow: hidden; border: 1px solid #c7cbd0; border-radius: 2px; background: #fff; box-shadow: 0 8px 22px rgba(24,28,32,.2); }
.budget-import-menu[hidden] { display: none; }
.budget-import-menu button { display: grid; gap: 3px; min-height: 56px; padding: 10px 13px; border: 0; border-bottom: 1px solid #e5e7e9; background: #fff; color: #3f464c; cursor: pointer; text-align: left; }
.budget-import-menu button:last-child { border-bottom: 0; }
.budget-import-menu button:hover { background: #f4f7fc; }
.budget-import-menu strong { font-size: 10px; font-weight: 600; }
.budget-import-menu span { color: #858b91; font-size: 8px; }
.budget-content { min-width: 0; min-height: 0; flex: 1; overflow: auto; padding: 20px 18px 0; }
.budget-heading { display: flex; align-items: baseline; gap: 11px; margin: 0 0 14px; }
.budget-heading h1 { margin: 0; color: #343a40; font-size: 19px; font-weight: 600; }
.budget-heading span { color: #858b92; font-size: 10px; }
.budget-analytics { display: grid; grid-template-columns: minmax(130px, 1fr) 24px minmax(130px, 1fr) 24px minmax(150px, 1fr) 1px minmax(130px, .8fr); align-items: stretch; margin-bottom: 16px; border: 1px solid #d2d6da; border-radius: 2px; background: #fff; box-shadow: 0 2px 5px rgba(35,41,47,.05); }
.budget-analytics > div { display: grid; gap: 5px; min-height: 76px; align-content: center; padding: 12px 18px; }
.budget-analytics > span { display: grid; place-items: center; color: #a0a5aa; font-size: 22px; }
.budget-analytics > i { width: 1px; margin: 14px 0; background: #dfe2e5; }
.budget-analytics small { color: #777e85; font-size: 9px; }
.budget-analytics strong { color: #343a40; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.budget-analytics .is-positive strong { color: #3a8751; }
.budget-analytics .is-negative strong { color: #c74349; }
.budget-table-wrap { min-width: 100%; overflow: auto; border: 1px solid #cfd3d7; background: #fff; }
.budget-table { width: 100%; min-width: 1640px; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.budget-table th, .budget-table td { min-width: 92px; height: 38px; padding: 7px 9px; border-right: 1px solid #e2e5e8; border-bottom: 1px solid #e2e5e8; color: #50575e; font-size: 9px; text-align: right; white-space: nowrap; }
.budget-table th { background: #f3f4f5; color: #626970; font-size: 8px; font-weight: 600; text-align: center; }
.budget-table thead tr:first-child th[colspan] { border-bottom-color: #cfd3d7; color: #3f464d; font-size: 9px; }
.budget-table tbody td:first-child { position: sticky; left: 0; z-index: 2; min-width: 140px; text-align: left; }
.budget-table tbody td:nth-child(2) { position: sticky; left: 140px; z-index: 2; min-width: 190px; text-align: left; box-shadow: 4px 0 7px rgba(43,49,55,.05); }
.budget-table thead tr:first-child > th:first-child { position: sticky; left: 0; z-index: 5; min-width: 140px; background: #f3f4f5; text-align: left; }
.budget-table thead tr:first-child > th:nth-child(2) { position: sticky; left: 140px; z-index: 5; min-width: 190px; background: #f3f4f5; text-align: left; box-shadow: 4px 0 7px rgba(43,49,55,.05); }
.budget-line-row { cursor: pointer; }
.budget-mobile-card { display: none; }
.budget-line-row:hover td { background: #f5f8ff; }
.budget-line-row td:first-child, .budget-line-row td:nth-child(2) { background: #fff; }
.budget-line-row:hover td:first-child, .budget-line-row:hover td:nth-child(2) { background: #f5f8ff; }
.budget-line-row strong, .budget-line-row span { display: block; color: #3d444b; font-weight: 600; }
.budget-line-row small { display: block; max-width: 180px; overflow: hidden; margin-top: 2px; color: #8a9096; font-size: 7px; text-overflow: ellipsis; }
.budget-line-row .is-negative, .budget-line-row.is-over-budget .is-negative, .budget-table tfoot .is-negative { color: #c74349; background: #fff5f5; }
.budget-group-row td { position: static !important; height: 34px; padding: 0; background: #eceef0; text-align: left !important; box-shadow: none !important; }
.budget-group-row button { display: flex; width: 100%; height: 100%; align-items: center; gap: 8px; padding: 6px 10px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.budget-group-row button span { width: 12px; color: #70777e; }
.budget-group-row button strong { color: #3c4349; font-size: 9px; }
.budget-group-row button small { color: #8a9096; font-size: 8px; }
.budget-subtotal-row td { position: static !important; height: 32px; background: #fafafa; color: #646b71; font-weight: 600; box-shadow: none !important; }
.budget-table tfoot td { position: sticky !important; bottom: 0; z-index: 4; height: 43px; border-bottom: 0; background: #353a3f; color: #fff; font-weight: 600; }
.budget-table tfoot td:first-child { left: 0; z-index: 6; text-align: left; }
.budget-progress { display: inline-block; width: 48px; height: 5px; margin-right: 5px; overflow: hidden; border-radius: 4px; background: #e0e3e6; vertical-align: middle; }
.budget-progress i { display: block; height: 100%; background: #5a91e7; }
.budget-empty, .budget-empty-state { padding: 60px 20px !important; color: #82888e; text-align: center !important; }
.budget-empty-state { display: grid; gap: 7px; border: 1px solid #d5d9dd; background: #fff; }
.budget-empty-state strong { color: #434a50; font-size: 16px; }
.budget-viewer-modal { position: fixed; inset: 0; z-index: 960; background: rgba(27,31,35,.35); }
#budget-line-modal,
#budget-cost-codes-modal,
#budget-settings-modal,
#budget-actual-cost-modal,
#budget-production-modal,
#budget-confirm-modal,
#budget-import-modal { z-index: 970; }
.budget-viewer-dialog { position: absolute; top: 0; right: 0; display: flex; width: min(560px, calc(100vw - 220px)); height: 100%; flex-direction: column; background: #f3f4f5; box-shadow: -10px 0 28px rgba(24,28,32,.24); }
.budget-viewer-header { display: flex; min-height: 77px; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; border-bottom: 1px solid #d4d8dc; background: #fff; }
.budget-viewer-header > div { display: grid; gap: 4px; min-width: 0; }
.budget-viewer-header span { color: #858b91; font-size: 9px; }
.budget-viewer-header h2 { overflow: hidden; margin: 0; color: #343a3f; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.budget-viewer-header > button { width: 31px; height: 31px; border: 0; background: transparent; color: #747b81; cursor: pointer; font-size: 25px; }
.budget-detail-content { min-height: 0; overflow: auto; padding: 14px; }
.budget-detail-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 12px; border: 1px solid #d5d9dc; background: #dfe2e5; }
.budget-detail-summary > div { display: grid; gap: 5px; padding: 12px; background: #fff; }
.budget-detail-summary small { color: #858b91; font-size: 8px; }
.budget-detail-summary strong { color: #363d43; font-size: 13px; }
.budget-detail-summary .is-negative strong { color: #c74349; }
.budget-detail-summary .is-positive strong { color: #3a8751; }
.budget-detail-summary > button { grid-column: 1 / -1; margin: 8px; justify-self: end; }
.budget-detail-card { margin-top: 12px; border: 1px solid #d4d8dc; background: #fff; }
.budget-detail-card > header { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; border-bottom: 1px solid #e2e5e7; }
.budget-detail-card header > div { display: grid; gap: 3px; }
.budget-detail-card h3 { margin: 0; color: #3b4248; font-size: 11px; }
.budget-detail-card header small { color: #8a9096; font-size: 8px; }
.budget-detail-card header > button { padding: 5px 8px; border: 0; background: transparent; color: #2455cf; cursor: pointer; font-size: 9px; }
.budget-detail-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.budget-detail-card dl > div { display: grid; gap: 4px; padding: 11px 13px; border-right: 1px solid #eceeef; border-bottom: 1px solid #eceeef; }
.budget-detail-card dt { color: #888e94; font-size: 8px; }
.budget-detail-card dd { margin: 0; color: #434a50; font-size: 10px; font-weight: 600; }
.budget-entry-list { display: grid; }
.budget-entry-list > button { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 13px; border: 0; border-bottom: 1px solid #eceeef; background: #fff; cursor: pointer; text-align: left; }
.budget-entry-list > button:hover { background: #f5f8ff; }
.budget-entry-list > button span { display: grid; gap: 4px; }
.budget-entry-list strong { color: #444b51; font-size: 9px; }
.budget-entry-list small, .budget-entry-list > p { color: #8a9096; font-size: 8px; }
.budget-entry-list b { color: #3e464c; font-size: 10px; }
.budget-entry-list > p { margin: 0; padding: 18px 13px; }
.budget-activity-list { margin: 0; padding: 7px 13px 13px; list-style: none; }
.budget-activity-list li { display: grid; grid-template-columns: 25px 1fr; gap: 9px; padding: 9px 0; }
.budget-activity-list li > span { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: #e5ebf8; color: #315aa9; font-size: 9px; }
.budget-activity-list li div { display: grid; gap: 3px; }
.budget-activity-list strong { font-size: 9px; }
.budget-activity-list p { margin: 0; color: #626970; font-size: 8px; }
.budget-activity-list time { color: #979ca1; font-size: 7px; }
.budget-line-dialog { width: min(650px, calc(100vw - 40px)); }
.budget-line-form { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 16px 20px 20px; }
.budget-line-form > label, .budget-entry-form > label, .budget-cost-code-form > label { display: grid; gap: 6px; color: #4e555b; font-size: 10px; font-weight: 600; }
.budget-line-form input, .budget-line-form select, .budget-entry-form input, .budget-entry-form textarea, .budget-cost-code-form input, .budget-cost-code-form select { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #c8cdd1; border-radius: 2px; background: #fff; color: #353c42; }
.budget-field-wide { grid-column: 1 / -1; }
.budget-quantity-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 12px; border: 1px solid #d9dde0; }
.budget-quantity-fields[hidden] { display: none; }
.budget-quantity-fields label { display: grid; gap: 5px; color: #636a70; font-size: 9px; }
.budget-cost-codes-dialog { width: min(720px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); }
.budget-modal-header-actions { display: flex; align-items: center; gap: 8px; }
.budget-modal-header-actions > button:last-child { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; background: transparent; color: #7b8086; cursor: pointer; font-size: 20px; }
.budget-cost-codes-content { min-height: 170px; max-height: 430px; overflow: auto; padding: 12px 20px; background: #f5f6f7; }
.budget-cost-codes-content section { margin-bottom: 10px; border: 1px solid #d8dcdf; background: #fff; }
.budget-cost-codes-content section > header, .budget-cost-codes-content section > div { display: flex; min-height: 39px; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-bottom: 1px solid #e6e8ea; }
.budget-cost-codes-content section > div span { display: flex; gap: 9px; color: #565d63; font-size: 9px; }
.budget-cost-codes-content button { border: 0; background: transparent; color: #c6474d; cursor: pointer; font-size: 8px; }
.budget-cost-codes-content button:disabled { color: #b5b9bd; cursor: not-allowed; }
.budget-cost-code-form { display: grid; grid-template-columns: 100px 1fr 110px 1fr auto; align-items: end; gap: 9px; padding: 14px 20px 20px; border-top: 1px solid #d9dde0; }
.budget-settings-dialog { width: min(480px, calc(100vw - 40px)); }
.budget-settings-form { display: grid; gap: 8px; padding: 15px 20px 20px; }
.budget-settings-form .settings-toggle-row { min-height: 72px; }
.budget-settings-form .settings-toggle-row span { display: grid; gap: 4px; }
.budget-settings-form small { color: #858b91; font-weight: 400; }
.budget-entry-dialog { width: min(460px, calc(100vw - 40px)); }
.budget-entry-form { display: grid; gap: 12px; padding: 15px 20px 20px; }
.budget-confirm-dialog { width: min(440px, calc(100vw - 40px)); }
.budget-confirm-dialog > p { margin: 0; padding: 18px 22px 8px; color: #5c6369; line-height: 1.55; }
.budget-import-dialog { display: flex; width: min(710px, calc(100vw - 40px)); max-height: min(780px, calc(100dvh - 48px)); flex-direction: column; }
.budget-import-header { flex: 0 0 auto; min-height: 68px; padding: 13px 18px; }
.budget-import-header > div { display: grid; gap: 4px; }
.budget-import-header h2 { color: #343a40; font-size: 18px; font-weight: 600; }
.budget-import-header p { margin: 0; color: #858b91; font-size: 9px; }
.budget-import-body { min-height: 0; overflow: auto; padding: 17px 20px 20px; }
.budget-import-guidance { margin: 0 0 15px; color: #555c62; font-size: 10px; line-height: 1.55; }
.budget-import-guidance button { padding: 0; border: 0; background: transparent; color: #1769f6; cursor: pointer; font: inherit; text-decoration: underline; }
.budget-import-drop { display: grid; min-height: 245px; place-content: center; justify-items: center; gap: 7px; border: 2px dashed #c9cdd2; background: #f7f8fa; color: #666d73; cursor: pointer; text-align: center; transition: border-color .12s ease, background .12s ease; }
.budget-import-drop:hover, .budget-import-drop.is-dragging { border-color: #6e9be8; background: #f1f5fc; }
.budget-import-drop.is-busy { cursor: wait; opacity: .72; }
.budget-import-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.budget-import-upload-icon { color: #596169; font-size: 23px; line-height: 1; }
.budget-import-drop strong { max-width: 520px; overflow: hidden; color: #343a40; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.budget-import-drop > span { color: #7b8288; font-size: 9px; }
.budget-import-drop em { display: grid; min-width: 100px; min-height: 35px; place-items: center; margin-top: 4px; border: 1px solid #0864df; border-radius: 2px; background: #1769f6; color: #fff; font-size: 9px; font-style: normal; }
.budget-import-result { display: grid; gap: 12px; margin-top: 14px; }
.budget-import-result:empty { display: none; }
.budget-import-feedback { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; padding: 11px 13px; border: 1px solid; border-radius: 2px; font-size: 9px; line-height: 1.5; }
.budget-import-feedback > div { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 700; }
.budget-import-feedback span { display: grid; gap: 5px; }
.budget-import-feedback strong { font-size: 10px; }
.budget-import-feedback ul { display: grid; gap: 3px; margin: 0; padding-left: 18px; }
.budget-import-feedback.is-error { border-color: #e14452; background: #fff5f6; color: #cf3442; }
.budget-import-feedback.is-warning { border-color: #d5a84c; background: #fffaf0; color: #765a20; }
.budget-import-preview { overflow: hidden; border: 1px solid #d6dade; border-radius: 2px; background: #fff; }
.budget-import-preview > header { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #dfe2e5; }
.budget-import-preview > header strong { color: #3d444a; font-size: 10px; }
.budget-import-preview > header span { color: #858b91; font-size: 8px; }
.budget-import-preview > div { max-height: 260px; overflow: auto; }
.budget-import-preview table { width: 100%; border-collapse: collapse; font-size: 8px; white-space: nowrap; }
.budget-import-preview th, .budget-import-preview td { padding: 8px 9px; border-right: 1px solid #e4e6e8; border-bottom: 1px solid #e4e6e8; text-align: left; }
.budget-import-preview th { position: sticky; z-index: 1; top: 0; background: #f2f4f6; color: #626970; font-weight: 600; }
.budget-import-preview td { color: #4b5258; }
.budget-import-footer { display: flex; min-height: 59px; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; padding: 11px 20px; border-top: 1px solid #d9dde0; background: #fff; }
.budget-import-footer .primary-button { min-width: 130px; }

@media (max-width: 900px) {
  .budget-toolbar { align-items: flex-start; flex-direction: column; }
  .budget-toolbar-primary, .budget-toolbar-secondary { flex-wrap: wrap; }
  .budget-analytics { grid-template-columns: 1fr 18px 1fr; }
  .budget-analytics > div:nth-of-type(3), .budget-analytics > i, .budget-analytics > div:nth-of-type(4) { border-top: 1px solid #e1e4e6; }
  .budget-viewer-dialog { width: min(560px, 100vw); }
  .budget-cost-code-form { grid-template-columns: 1fr 1fr; }
  .budget-import-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .budget-import-drop { min-height: 190px; }
}

/* Authenticated remote mode */
.startup-gate[hidden], .auth-gate[hidden] { display: none; }
.startup-gate { position: fixed; inset: 0; z-index: 10001; display: grid; place-content: center; justify-items: center; gap: 18px; background: #f4f5f7; color: #30343a; font: 14px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.startup-gate-mark { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: #f6bd2a; color: #2f3134; font-size: 16px; font-weight: 800; letter-spacing: -.06em; box-shadow: 0 6px 18px rgba(33, 39, 46, .12); }
.startup-gate strong { font-size: 15px; font-weight: 600; }
.app-shell[hidden] { display: none; }
.auth-gate { position: fixed; inset: 0; z-index: 10000; display: grid; grid-template-rows: 72px minmax(0, 1fr) 48px; overflow: auto; background: #f4f5f7; color: #2e3135; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.auth-brand { display: flex; align-items: center; gap: 12px; padding: 0 32px; border-bottom: 1px solid #dfe2e6; background: #fff; font-size: 16px; }
.auth-brand-mark, .auth-card-mark { display: grid; place-items: center; border-radius: 50%; background: #f6bd2a; color: #2f3134; font-weight: 800; letter-spacing: -.06em; }
.auth-brand-mark { width: 38px; height: 38px; font-size: 13px; }
.auth-stage { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: min(410px, calc(100vw - 40px)); box-sizing: border-box; padding: 36px 40px 30px; border: 1px solid #d8dce1; border-radius: 3px; background: #fff; box-shadow: 0 10px 30px rgba(33, 39, 46, .1); }
.auth-card-heading { display: grid; justify-items: center; margin-bottom: 28px; text-align: center; }
.auth-card-mark { width: 52px; height: 52px; margin-bottom: 18px; font-size: 16px; }
.auth-card h1 { margin: 0; color: #2c3034; font-size: 25px; font-weight: 600; }
.auth-card-heading p { margin: 9px 0 0; color: #777e86; font-size: 13px; }
.auth-card > label { display: grid; gap: 7px; margin-top: 16px; color: #4a5056; font-size: 12px; font-weight: 600; }
.auth-card input { width: 100%; height: 42px; box-sizing: border-box; padding: 9px 11px; border: 1px solid #bfc5cb; border-radius: 2px; background: #fff; color: #24282c; font: inherit; font-weight: 400; outline: none; }
.auth-card input:focus { border-color: #0b69ed; box-shadow: 0 0 0 1px #0b69ed; }
.auth-error { margin: 15px 0 0; padding: 10px 12px; border-left: 3px solid #d63f4b; background: #fff1f2; color: #a52e37; font-size: 12px; line-height: 1.45; }
.auth-submit { width: 100%; min-height: 42px; margin-top: 22px; border: 1px solid #075dcc; border-radius: 2px; background: #086fe8; color: #fff; cursor: pointer; font-size: 14px; font-weight: 600; }
.auth-submit:hover { background: #075fc8; }
.auth-submit:disabled { border-color: #8eb9f2; background: #9fc5f7; cursor: wait; }
.auth-development-hint { display: grid; gap: 3px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #e4e7ea; color: #737a82; font-size: 11px; line-height: 1.45; }
.auth-development-hint strong { margin-bottom: 2px; color: #555c63; }
.auth-footer { display: grid; place-items: center; color: #899098; font-size: 11px; }
.account-popover #account-logout { margin-top: 5px; border-top: 1px solid #e2e5e8; color: #be3540; }

@media (max-width: 760px) {
  .app-shell.is-rail-collapsed, .app-shell.is-wide-workspace.is-rail-collapsed { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 0; }
  .task-category-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .task-category-row > button.is-danger { grid-column: 3; }
  .auth-gate { grid-template-rows: 58px minmax(0, 1fr) 38px; }
  .auth-brand { padding: 0 18px; }
  .auth-stage { padding: 24px 16px; }
  .auth-card { padding: 28px 24px 24px; }
}

/* Responsive release hardening: every enabled module remains reachable on phones. */
@media (max-width: 720px) {
  :root { --mobile-nav-height: calc(64px + env(safe-area-inset-bottom)); }
  .app-shell, .app-shell.is-wide-workspace {
    --mobile-nav-height: calc(58px + env(safe-area-inset-bottom));
    grid-template-rows: minmax(0, 1fr) var(--mobile-nav-height);
  }
  .global-rail {
    display: flex;
    height: var(--mobile-nav-height);
    flex-direction: row;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .global-rail::-webkit-scrollbar { display: none; }
  .global-rail .rail-primary, .global-rail .rail-primary-pm, .global-rail .rail-footer {
    display: flex;
    width: auto;
    height: 58px;
    flex: 0 0 auto;
  }
  .global-rail .rail-primary-pm { position: static; }
  .global-rail .rail-item,
  .global-rail .rail-primary > .rail-item:nth-child(7),
  .global-rail .rail-primary-pm .rail-item {
    display: grid;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    flex: 0 0 64px;
  }
  .global-rail .rail-footer-button {
    display: grid;
    width: 64px;
    min-width: 64px;
    height: 58px;
    flex: 0 0 64px;
    grid-template-rows: 22px 13px;
    place-items: center;
    gap: 2px;
    padding: 6px 4px 5px;
    border-radius: 0;
    color: var(--rail-muted);
    font-size: 9px;
  }
  .global-rail .rail-footer-button::after { overflow: hidden; max-width: 58px; content: attr(aria-label); text-overflow: ellipsis; white-space: nowrap; }
  .global-rail .rail-footer-button.is-active { border-radius: 0; box-shadow: inset 0 3px var(--selected); }
  .global-rail .rail-footer-button[data-unavailable-module] { display: none; }
  .global-rail .rail-footer-icon { margin: auto; }
  .context-sidebar, .inspector, .version-modal, .photo-viewer-modal, .form-viewer-modal, .file-viewer-modal { bottom: var(--mobile-nav-height); }
}

/* v0.58 mobile information architecture: field use is not a compressed desktop. */
.mobile-more-button, .mobile-module-sheet, .mobile-page-heading { display: none; }

@media (max-width: 720px) {
  .app-shell, .app-shell.is-wide-workspace {
    --mobile-nav-height: calc(64px + env(safe-area-inset-bottom));
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) var(--mobile-nav-height);
  }

  .global-rail {
    display: grid;
    height: var(--mobile-nav-height);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    overflow: hidden;
    padding: 0 0 env(safe-area-inset-bottom);
  }
  .global-rail .rail-primary, .global-rail .rail-primary-pm { display: contents; }
  .global-rail .rail-footer { display: none; }
  .global-rail .rail-item,
  .global-rail .rail-primary > .rail-item:nth-child(7),
  .global-rail .rail-primary-pm .rail-item { display: none; }
  .global-rail .rail-item[data-mobile-primary] {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 64px;
    grid-template-rows: 25px 16px;
    align-content: center;
    justify-items: center;
    gap: 2px;
    padding: 7px 3px 5px;
    font-size: 10px;
  }
  .global-rail .rail-item[data-mobile-primary].is-active { background: #1769f6; box-shadow: none; }
  .global-rail .rail-icon { font-size: 19px; }
  .mobile-more-button {
    display: grid;
    width: 100%;
    height: 64px;
    grid-template-rows: 25px 16px;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 7px 3px 5px;
    border: 0;
    background: transparent;
    color: var(--rail-muted);
    cursor: pointer;
    font-size: 10px;
  }
  .mobile-more-button.is-active, .mobile-more-button[aria-expanded="true"] { background: #1769f6; color: #fff; }
  .mobile-more-icon { font-size: 17px; font-weight: 700; letter-spacing: 2px; line-height: 20px; }

  .mobile-module-sheet {
    position: fixed;
    z-index: 150;
    inset: 0 0 var(--mobile-nav-height);
    display: grid;
    align-items: end;
  }
  .mobile-module-sheet[hidden] { display: none; }
  .mobile-module-scrim { position: absolute; inset: 0; border: 0; background: rgba(20, 24, 29, .46); }
  .mobile-module-panel {
    position: relative;
    z-index: 1;
    max-height: min(74dvh, 620px);
    overflow: auto;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -10px 34px rgba(24, 29, 35, .24);
  }
  .mobile-module-panel > header { display: flex; min-height: 66px; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid #e1e4e7; }
  .mobile-module-panel > header div { display: grid; gap: 3px; }
  .mobile-module-panel > header small { color: #7a8188; font-size: 11px; }
  .mobile-module-panel > header strong { color: #30363c; font-size: 18px; }
  .mobile-module-panel > header button { width: 40px; height: 40px; border: 0; border-radius: 20px; background: #eef0f3; color: #60676e; font-size: 24px; }
  .mobile-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px; }
  .mobile-module-grid > button { display: grid; min-height: 82px; place-items: center; align-content: center; gap: 8px; padding: 9px 5px; border: 1px solid #d9dde1; border-radius: 10px; background: #fff; color: #4d545b; font-size: 11px; }
  .mobile-module-grid > button.is-active { border-color: #1769f6; background: #eef5ff; color: #1769f6; }
  .mobile-module-grid .rail-icon, .mobile-module-grid .rail-footer-icon { width: 24px; height: 24px; margin: 0; font-size: 20px; }

  .global-topbar { min-height: 56px; padding: max(7px, env(safe-area-inset-top)) 15px 7px; }
  .global-topbar .topbar-menu, .global-topbar .topbar-actions, .global-topbar .global-search { display: none; }
  .topbar-leading { width: 100%; }
  .mobile-page-heading { display: grid; min-width: 0; gap: 1px; }
  .mobile-page-heading small { overflow: hidden; color: #8a9096; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-page-heading strong { color: #30363c; font-size: 17px; font-weight: 600; }

  #single-plan-toolbar { min-height: 48px; }
  #single-plan-toolbar #sidebar-open { width: 70px; height: 36px; color: transparent; font-size: 0; }
  #single-plan-toolbar #sidebar-open::before { color: #4f565d; content: "☷ 任务"; font-size: 12px; }

  .plans-browser .fieldwire-library-toolbar {
    display: flex;
    min-height: 52px;
    height: 52px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .plans-browser .plans-toolbar-leading, .plans-browser .plans-toolbar-trailing { display: flex; width: auto; align-items: center; gap: 8px; }
  .plans-browser .plans-toolbar-trailing { margin-left: auto; }
  .plans-browser #new-plan-folder-button,
  .plans-browser [data-plan-folder="recent"],
  .plans-browser #plan-library-version-control,
  .plans-browser #plan-folder-expansion-toggle,
  .plans-browser .view-switch { display: none; }
  .plans-browser #plan-library-actions-button, .plans-browser #plan-library-filter-button { min-width: 88px; height: 36px; }
  .plans-browser .library-content { padding: 12px 12px 86px; }
  .plans-browser .plans-collection-heading { display: none; }
  .plans-browser .plans-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .plans-browser .plan-card-wrap { width: 100%; }
  .plans-browser .plans-grid:not(.is-list) .plan-card,
  .plans-browser .plans-grid.is-grouped:not(.is-list) .plan-card {
    display: grid;
    width: 100%;
    min-height: 96px;
    grid-template-columns: 128px minmax(0, 1fr);
  }
  .plans-browser .plans-grid:not(.is-list) .plan-thumbnail { height: 94px; border-right: 1px solid #d9dde1; border-bottom: 0; }
  .plans-browser .plans-grid:not(.is-list) .plan-card-body { min-height: 94px; align-content: center; padding: 12px; }
  .plans-browser .plan-card-title { white-space: normal; }
  .plans-browser .plan-card-check { opacity: 1; }
  .plans-browser .plan-folder-grid-header, .plans-browser .library-empty { grid-column: 1; }

  .plans-browser .new-library-item,
  .tasks-workspace #new-project-task,
  .photos-workspace #photo-new-button,
  .files-workspace #new-file-button {
    position: fixed;
    z-index: 82;
    right: 16px;
    bottom: calc(var(--mobile-nav-height) + 16px);
    display: grid;
    width: 54px;
    min-width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1769f6;
    color: #fff;
    box-shadow: 0 5px 16px rgba(23, 105, 246, .34);
    font-size: 0;
  }
  .plans-browser .new-library-item::before,
  .tasks-workspace #new-project-task::before,
  .photos-workspace #photo-new-button::before,
  .files-workspace #new-file-button::before { content: "+"; font-size: 30px; font-weight: 300; line-height: 1; }

  .plan-filter-strip:not([hidden]) {
    position: fixed;
    z-index: 95;
    right: 0;
    bottom: var(--mobile-nav-height);
    left: 0;
    display: grid;
    max-height: 58dvh;
    grid-template-columns: 1fr;
    gap: 9px;
    overflow: auto;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -10px 30px rgba(25, 30, 36, .22);
  }
  .plan-filter-strip label { width: 100%; min-width: 0; }
  .plan-filter-strip select { width: 100%; }

  .tasks-toolbar { display: block; min-height: 54px; padding: 8px 12px; }
  .conflict-banner { align-items: stretch; flex-direction: column; gap: 9px; padding: 10px 12px; font-size: 11px; line-height: 1.45; }
  .conflict-copy { min-width: 0; overflow-wrap: anywhere; }
  .conflict-heading { align-items: flex-start; flex-direction: column; gap: 1px; }
  .conflict-heading > span { font-size: 10px; }
  /* The phone banner is a routing notice, not a second version-comparison
     workspace. The full record remains available from version control or the
     sync details screen, while the current page keeps enough room to work. */
  .conflict-field-list { display: none; }
  .conflict-field-row { grid-template-columns: 1fr 1fr; gap: 5px 8px; padding: 8px 0; }
  .conflict-field-row > strong { grid-column: 1 / -1; padding: 0; font-size: 11px; }
  .conflict-field-row > span { grid-template-columns: 1fr; gap: 1px; padding: 6px 7px; border-radius: 3px; background: rgba(255,255,255,.58); }
  .conflict-field-row i { font-size: 9px; }
  .conflict-internal-difference { grid-column: 1 / -1; font-size: 10px; }
  .conflict-decision-note { font-size: 10px; }
  .conflict-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .conflict-actions button { width: 100%; min-width: 0; min-height: 44px; }
  .tasks-toolbar-leading #task-import-button,
  .tasks-toolbar-leading #task-reports-button,
  .tasks-toolbar-leading .task-actions-wrap,
  .tasks-workspace .task-filter-strip,
  .tasks-workspace .task-view-switch,
  .tasks-workspace .task-sort-control { display: none; }
  .tasks-toolbar-actions { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) 42px 42px; gap: 8px; }
  .task-workspace-search { grid-column: 1; grid-row: 1; height: 38px; }
  .tasks-workspace .task-sort-wrap { display: block; grid-column: 2; grid-row: 1; }
  .tasks-workspace #task-sort-button { width: 42px; min-width: 42px; overflow: hidden; padding: 0; font-size: 0; }
  .tasks-workspace #task-sort-button .task-sort-icon { margin: auto; }
  #task-workspace-filter-button { width: 42px; min-width: 42px; grid-column: 3; grid-row: 1; overflow: hidden; padding: 0; font-size: 0; }
  #task-workspace-filter-button .filter-icon { margin: auto; }
  .task-workspace-content { overflow-x: hidden; }
  .task-kanban { display: block; width: 100%; min-width: 0; padding: 10px 12px 86px; background: #f2f4f6; }
  .task-kanban-column { margin-bottom: 12px; overflow: hidden; border: 1px solid #d8dce0; border-radius: 9px; background: #fff; }
  .task-kanban-column-header, .task-kanban-subheader { min-height: 42px; justify-items: start; padding: 10px 12px; text-align: left; }
  .task-kanban-column-header strong, .task-kanban-subheader strong { font-size: 12px; }
  .task-kanban-column-header.is-overdue { background: #ef5757; }
  .task-board-card { min-height: 60px; }
  .task-board-open { min-height: 59px; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; padding: 8px 11px; }
  .task-board-marker { width: 24px; height: 24px; }
  .task-board-copy { gap: 4px; }
  .task-board-reference { font-size: 10px; }
  .task-board-title { color: #596168; font-size: 11px; font-style: normal; }
  .task-column-new { min-height: 44px; font-size: 11px; }
  .task-kanban-list { gap: 0; }
  .task-workspace-filter-panel { top: auto; right: 0; bottom: var(--mobile-nav-height); left: 0; width: auto; max-height: 74dvh; border-radius: 18px 18px 0 0; transform: none; }

  #task-create-modal {
    display: flex;
    inset: 0 0 var(--mobile-nav-height);
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
    padding: 10px 8px 8px;
  }
  #task-create-modal[hidden] { display: none; }
  #task-create-modal .task-create-dialog {
    width: min(560px, calc(100vw - 16px));
    max-height: calc(100dvh - var(--mobile-nav-height) - 18px);
    overflow: auto;
    border-radius: 16px 16px 4px 4px;
  }
  #task-create-modal .task-create-form { overflow: visible; }

  .photos-workspace .photos-toolbar { min-height: 52px; padding: 8px 12px; }
  .photos-workspace .photo-actions-wrap { display: none; }
  .photos-workspace .photo-filter-button { width: 88px; margin-left: 0; }
  .photos-workspace .photo-filter-panel { top: auto; right: 0; bottom: var(--mobile-nav-height); left: 0; max-height: 68dvh; border-radius: 18px 18px 0 0; }
  .photo-gallery { padding-bottom: 86px; }

  /* Mobile document registers use touch-friendly cards instead of compressed desktop tables. */
  .files-toolbar {
    min-height: 52px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .files-toolbar-primary, .files-toolbar-secondary { display: flex; width: auto; align-items: center; gap: 8px; }
  .files-toolbar-secondary { margin-left: auto; }
  .files-toolbar .file-actions-button, .files-toolbar #file-filter-button { min-width: 88px; height: 36px; }
  .files-content { overflow-x: hidden; padding: 10px 12px 86px; }
  .file-table-wrap { min-width: 0; margin-top: 8px; overflow: visible; border: 0; background: transparent; }
  .file-table, .file-table tbody { display: block; width: 100%; }
  .file-table thead { display: none; }
  .file-table tbody tr {
    display: grid;
    min-height: 76px;
    grid-template-columns: 36px 42px minmax(0, 1fr) 42px;
    align-items: center;
    margin-bottom: 8px;
    overflow: visible;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  .file-table tbody tr:hover td, .file-folder-row td, .file-item-row.is-selected td { background: transparent; }
  .file-table tbody tr.is-selected { border-color: #8fb2f8; background: #f3f7ff; }
  .file-table td { display: none; box-sizing: border-box; height: auto; min-width: 0; padding: 8px 4px; border: 0; }
  .file-table td:nth-child(1), .file-table td:nth-child(2), .file-table td:nth-child(3), .file-table td:nth-child(7) { display: block; }
  .file-table td:nth-child(1) { width: auto; grid-column: 1; padding-inline: 10px 2px; }
  .file-table td:nth-child(2) { grid-column: 2; padding-inline: 2px; }
  .file-table td:nth-child(3) { grid-column: 3; padding-inline: 7px; }
  .file-table td:nth-child(7) { width: auto; grid-column: 4; padding: 0 !important; }
  .file-check-cell input { width: 18px; height: 18px; }
  .file-type-cell { display: grid; justify-items: center; gap: 3px; color: #7b8289; font-size: 7px; }
  .file-type-cell > span:last-child { display: none; }
  .file-type-icon { width: 29px; height: 35px; }
  .file-folder-type-icon { width: 34px; height: 29px; margin: 0; }
  .file-folder-row td:nth-child(2) > span:last-child { display: none; }
  .file-name-open { min-height: 50px; align-content: center; gap: 4px; }
  .file-name-open strong, .file-folder-row .file-name-open strong { color: #343b43; font-size: 12px; white-space: normal; }
  .file-name-open small { font-size: 9px; }
  .file-mobile-meta { display: block; overflow: hidden; color: #8a9096; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .file-row-menu-button { width: 42px; height: 48px; font-size: 16px; }
  .file-row-menu { top: 50px; right: 4px; min-width: 164px; }
  .file-row-menu button { min-height: 44px; font-size: 11px; }

  .specs-library .fieldwire-library-toolbar {
    display: flex;
    min-height: 52px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
  }
  .specs-library .library-actions { display: flex; width: auto; align-items: center; }
  .specs-library .spec-library-search { width: auto; min-width: 0; flex: 1; grid-column: auto; }
  .specs-library #new-specification-button {
    position: fixed;
    z-index: 82;
    right: 16px;
    bottom: calc(var(--mobile-nav-height) + 16px);
    display: grid;
    width: 54px;
    min-width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1769f6;
    color: #fff;
    box-shadow: 0 5px 16px rgba(23, 105, 246, .34);
    font-size: 0;
  }
  .specs-library #new-specification-button .button-plus { width: auto; height: auto; }
  .specs-library #new-specification-button .button-plus::before { width: 22px; height: 2px; background: #fff; }
  .specs-library #new-specification-button .button-plus::after { width: 2px; height: 22px; background: #fff; }
  .spec-table-wrap { overflow-x: hidden; padding: 10px 12px 86px; }
  .spec-table { display: block; width: 100%; margin: 0; border: 0; background: transparent; }
  .spec-table thead { display: none; }
  .spec-table tbody { display: block; }
  .spec-table tbody tr {
    display: grid;
    min-height: 82px;
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    grid-template-rows: auto auto auto;
    align-content: center;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  .spec-table td { display: block; width: auto; height: auto; min-width: 0; padding: 2px 8px; border: 0; }
  .spec-table td:nth-child(1) { grid-column: 1; grid-row: 1 / 4; padding: 0 10px; }
  .spec-table td:nth-child(2) { grid-column: 2; grid-row: 1; color: #1769f6; font-size: 12px; }
  .spec-table td:nth-child(3) { display: block; grid-column: 2; grid-row: 2; overflow: hidden; color: #343b43; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .spec-table td:nth-child(4) { grid-column: 2; grid-row: 3; color: #8a9096; font-size: 9px; }
  .spec-table td:nth-child(5) { position: relative; grid-column: 3; grid-row: 1 / 4; padding: 0; text-align: center; }
  .spec-select-cell input { width: 18px; height: 18px; }
  .spec-row-menu-button { width: 42px; height: 48px; font-size: 20px; }
  .spec-row-menu { top: 48px; right: 4px; min-width: 150px; }
  .spec-row-menu button { min-height: 44px; font-size: 11px; }

  .forms-content { overflow-x: hidden; padding: 10px 12px 86px; }
  .form-content-header { min-height: 46px; }
  .form-table-wrap { min-width: 0; margin-top: 8px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .form-table, .form-table tbody { display: block; width: 100%; }
  .form-table thead { display: none; }
  .form-table tbody tr {
    display: grid;
    min-height: 82px;
    grid-template-columns: 36px minmax(0, 1fr) 68px 64px;
    grid-template-rows: auto auto;
    align-items: center;
    margin-bottom: 8px;
    padding: 7px 0;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  .form-table tbody tr:hover td { background: transparent; }
  .form-table td { box-sizing: border-box; width: auto; height: auto; min-width: 0; padding: 3px 7px; border: 0; }
  .form-table td:nth-child(1) { grid-column: 1; grid-row: 1 / 3; padding-inline: 10px 2px; }
  .form-table td:nth-child(2) { grid-column: 2; grid-row: 1 / 3; }
  .form-table td:nth-child(3) { grid-column: 3; grid-row: 1; color: #535b63; font-size: 11px; text-align: center; }
  .form-table td:nth-child(4) { grid-column: 3; grid-row: 2; text-align: center; }
  .form-table td:nth-child(5) { width: auto; grid-column: 4; grid-row: 1 / 3; padding: 0 4px; }
  .form-table .form-check-cell { width: auto; padding-inline: 10px 2px; }
  .form-table .form-check-cell input { width: 18px; height: 18px; }
  .form-folder-open { min-height: 54px; gap: 9px; }
  .form-folder-open strong, .form-item-open strong { font-size: 12px; white-space: normal; }
  .form-folder-open small, .form-item-open small { font-size: 9px; }
  .form-folder-icon { width: 34px; height: 31px; }
  .template-status { justify-content: center; font-size: 8px; }
  .form-table .form-row-actions-cell { width: auto; padding: 0 4px; text-align: center; }
  .form-row-icon { min-width: 28px; height: 42px; font-size: 14px; }
  .form-row-menu { top: 48px; right: 3px; min-width: 154px; }
  .form-row-menu button { min-height: 44px; font-size: 11px; }

  #rfi-table-wrap, #submittal-table-wrap { overflow: visible; margin: 10px 12px 86px; border: 0; background: transparent; }
  #rfi-table-wrap .rfi-table, #rfi-table-wrap .rfi-table tbody,
  #submittal-table-wrap .rfi-table, #submittal-table-wrap .rfi-table tbody { display: block; width: 100%; min-width: 0; }
  #rfi-table-wrap .rfi-table thead, #submittal-table-wrap .rfi-table thead { display: none; }
  #rfi-table-wrap .rfi-table tbody tr {
    display: grid;
    min-height: 106px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 3px 8px;
    margin-bottom: 9px;
    padding: 10px 12px;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  #rfi-table-wrap .rfi-table td { display: none; box-sizing: border-box; width: auto; height: auto; min-width: 0; padding: 0; border: 0; }
  #rfi-table-wrap .rfi-table .rfi-cell-number { display: block; grid-column: 1; grid-row: 1; }
  #rfi-table-wrap .rfi-table .rfi-cell-status { display: block; grid-column: 2; grid-row: 1; }
  #rfi-table-wrap .rfi-table .rfi-cell-dueDate { display: block; grid-column: 3; grid-row: 1; color: #717981; font-size: 10px; text-align: right; }
  #rfi-table-wrap .rfi-table .rfi-cell-name { display: block; grid-column: 1 / 4; grid-row: 2; }
  #rfi-table-wrap .rfi-table .rfi-cell-assignee { display: block; grid-column: 1 / 4; grid-row: 3; color: #6f777f; font-size: 9px; }
  #rfi-table-wrap .rfi-name-link { min-height: 38px; }
  #rfi-table-wrap .rfi-name-link strong { font-size: 12px; }
  #rfi-table-wrap .rfi-name-link span { font-size: 9px; }
  #rfi-table-wrap .rfi-number-link { min-height: 34px; padding: 0 4px; font-size: 11px; }
  #rfi-table-wrap .rfi-table-status { font-size: 9px; }

  #submittal-table-wrap .rfi-table tbody tr {
    display: grid;
    min-height: 124px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto auto;
    align-content: center;
    gap: 3px 8px;
    margin-bottom: 9px;
    padding: 10px 10px 10px 4px;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  #submittal-table-wrap .rfi-table td { display: none; box-sizing: border-box; width: auto; height: auto; min-width: 0; padding: 0; border: 0; }
  #submittal-table-wrap .rfi-table .submittal-checkbox-column { display: block; grid-column: 1; grid-row: 1 / 5; padding: 4px 8px; }
  #submittal-table-wrap .submittal-checkbox-column input { width: 18px; height: 18px; }
  #submittal-table-wrap .rfi-table .submittal-cell-number { display: block; grid-column: 2; grid-row: 1; }
  #submittal-table-wrap .rfi-table .submittal-cell-status { display: block; grid-column: 3; grid-row: 1; }
  #submittal-table-wrap .rfi-table .submittal-cell-name { display: block; grid-column: 2 / 4; grid-row: 2; }
  #submittal-table-wrap .rfi-table .submittal-cell-specification { display: block; grid-column: 2 / 4; grid-row: 3; overflow: hidden; color: #667078; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  #submittal-table-wrap .rfi-table .submittal-cell-responseDue { display: block; grid-column: 2 / 4; grid-row: 4; color: #717981; font-size: 9px; }
  #submittal-table-wrap .rfi-name-link { min-height: 38px; }
  #submittal-table-wrap .rfi-name-link strong { font-size: 12px; }
  #submittal-table-wrap .rfi-name-link span { font-size: 9px; }
  #submittal-table-wrap .rfi-number-link { min-height: 34px; padding: 0 4px; font-size: 11px; }
  #submittal-table-wrap .rfi-table-status { font-size: 9px; }

  /* Change Orders keep Fieldwire's register hierarchy, but use cards on phones. */
  #change-order-table-wrap { overflow: visible; margin: 10px 12px 86px; border: 0; background: transparent; }
  #change-order-table-wrap .change-order-table,
  #change-order-table-wrap .change-order-table tbody { display: block; width: 100%; min-width: 0; }
  #change-order-table-wrap .change-order-table thead { display: none; }
  #change-order-table-wrap .change-order-table tbody tr {
    display: grid;
    min-height: 126px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-content: center;
    gap: 7px 9px;
    margin-bottom: 9px;
    padding: 11px 12px;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  #change-order-table-wrap .change-order-table tbody tr.is-action-required { border-left: 4px solid #e2a43b; padding-left: 9px; }
  #change-order-table-wrap .change-order-table td { display: none; box-sizing: border-box; width: auto; height: auto; min-width: 0; padding: 0; border: 0; }
  #change-order-table-wrap .change-order-table td.change-order-cell-number { display: block; grid-column: 1; grid-row: 1; }
  #change-order-table-wrap .change-order-table td.change-order-cell-status { display: block; grid-column: 2; grid-row: 1; }
  #change-order-table-wrap .change-order-table td.change-order-cell-due { display: block; grid-column: 3; grid-row: 1; color: #717981; font-size: 10px; text-align: right; }
  #change-order-table-wrap .change-order-table td.change-order-cell-name { display: block; grid-column: 1 / 4; grid-row: 2; }
  #change-order-table-wrap .change-order-table td.change-order-cell-cost,
  #change-order-table-wrap .change-order-table td.change-order-cell-assignee { display: grid; grid-row: 3; gap: 2px; }
  #change-order-table-wrap .change-order-cell-cost { grid-column: 1 / 3; }
  #change-order-table-wrap .change-order-cell-cost::before { color: #8a9096; content: "总成本"; font-size: 8px; font-weight: 500; }
  #change-order-table-wrap .change-order-cell-cost strong { color: #343b43; font-size: 12px; }
  #change-order-table-wrap .change-order-cell-assignee { grid-column: 3; justify-items: end; color: #697078; font-size: 9px; text-align: right; }
  #change-order-table-wrap .change-order-cell-assignee small { display: block; color: #959ba1; font-size: 8px; }
  #change-order-table-wrap .rfi-name-link { min-height: 38px; }
  #change-order-table-wrap .rfi-name-link strong { font-size: 12px; }
  #change-order-table-wrap .rfi-name-link span { font-size: 9px; }
  #change-order-table-wrap .rfi-number-link { min-height: 34px; padding: 0 4px; font-size: 11px; }

  /* Budget becomes a forecast summary followed by expandable financial cards. */
  .budget-workspace { overflow: hidden; }
  .budget-toolbar {
    min-height: 52px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 12px;
    scrollbar-width: none;
  }
  .budget-toolbar::-webkit-scrollbar { display: none; }
  .budget-toolbar-primary, .budget-toolbar-secondary { width: max-content; flex: 0 0 auto; flex-wrap: nowrap; }
  .budget-toolbar .toolbar-button { min-height: 36px; white-space: nowrap; }
  #new-budget-line {
    position: fixed;
    z-index: 82;
    right: 16px;
    bottom: calc(var(--mobile-nav-height) + 16px);
    width: 54px;
    min-width: 54px;
    height: 54px;
    overflow: hidden;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 5px 16px rgba(23, 105, 246, .34);
    font-size: 0;
  }
  #new-budget-line::after { color: #fff; content: "+"; font-size: 28px; font-weight: 300; line-height: 1; }
  .budget-content { overflow-x: hidden; padding: 13px 12px 86px; }
  .budget-heading { margin-bottom: 10px; }
  .budget-heading h1 { font-size: 18px; }
  .budget-analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; margin-bottom: 12px; border-radius: 8px; }
  .budget-analytics > div { min-height: 68px; padding: 10px 12px; border-bottom: 1px solid #e1e4e6; }
  .budget-analytics > div:nth-of-type(3), .budget-analytics > div:nth-of-type(4) { border-bottom: 0; }
  .budget-analytics > span, .budget-analytics > i { display: none; }
  .budget-analytics small { font-size: 9px; }
  .budget-analytics strong { font-size: 14px; }
  .budget-table-wrap { min-width: 0; overflow: visible; border: 0; background: transparent; }
  .budget-table, .budget-table tbody { display: block; width: 100%; min-width: 0; }
  .budget-table thead, .budget-table tfoot, .budget-subtotal-row { display: none; }
  .budget-group-row { display: block; margin: 13px 0 7px; }
  .budget-group-row td { display: block; width: 100%; height: auto; min-width: 0 !important; padding: 0; border: 0; background: transparent !important; }
  .budget-group-row button { width: 100%; min-height: 44px; border: 0; border-bottom: 1px solid #ccd1d6; background: transparent; text-align: left; }
  .budget-line-row {
    display: block;
    margin-bottom: 9px;
    overflow: hidden;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  .budget-line-row:focus-visible { outline: 2px solid #1769f6; outline-offset: 2px; }
  .budget-line-row > td:not(.budget-mobile-card) { display: none; }
  .budget-line-row .budget-mobile-card { display: block; width: 100%; height: auto; min-width: 0; padding: 12px; border: 0; background: #fff; text-align: left; white-space: normal; }
  .budget-mobile-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .budget-mobile-card > header span { display: grid; min-width: 0; gap: 2px; }
  .budget-mobile-card > header strong { color: #2f3740; font-size: 13px; }
  .budget-mobile-card > header small { max-width: none; margin: 0; color: #7a828a; font-size: 9px; white-space: normal; }
  .budget-mobile-card > header b { flex: 0 0 auto; padding: 3px 7px; border-radius: 12px; background: #eef3fc; color: #4568a9; font-size: 8px; font-weight: 600; }
  .budget-mobile-card > p { margin: 8px 0 11px; color: #6e767e; font-size: 9px; line-height: 1.4; }
  .budget-mobile-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border-radius: 5px; background: #e5e8eb; }
  .budget-mobile-card dl > div { display: grid; gap: 3px; padding: 8px 9px; background: #f8f9fa; }
  .budget-mobile-card dt { color: #858c93; font-size: 8px; }
  .budget-mobile-card dd { margin: 0; color: #3c444c; font-size: 11px; font-weight: 600; }
  .budget-mobile-card dl .is-negative dd { color: #c74349; }
  .budget-mobile-card dl .is-positive dd { color: #3a8751; }

  /* People use editable cards; all permission controls remain available. */
  #new-project-user {
    position: fixed;
    z-index: 82;
    right: 16px;
    bottom: calc(var(--mobile-nav-height) + 16px);
    display: grid;
    width: 54px;
    min-width: 54px;
    height: 54px;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 5px 16px rgba(23, 105, 246, .34);
    font-size: 0;
  }
  #new-project-user::after { content: "+"; font-size: 28px; font-weight: 300; }
  .people-toolbar-actions { grid-template-columns: minmax(0, 1fr) 104px; }
  .people-sort-control { min-height: 44px; }
  .people-content { overflow-x: hidden; padding: 10px 12px 86px; }
  .people-table-wrap, .people-content .people-table-wrap:has(.people-company-column) { width: 100%; max-width: 100%; min-width: 0; overflow: visible; border: 0; background: transparent; }
  .people-table, .people-table tbody { display: block; width: 100%; }
  .people-table thead { display: none; }
  .people-table tbody tr {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 44px;
    gap: 7px 8px;
    margin-bottom: 9px;
    padding: 11px 10px 12px 4px;
    border: 1px solid #d9dde1;
    border-radius: 8px;
    background: #fff;
  }
  .people-table tr:hover td, .people-table tr.is-selected td { background: transparent; }
  .people-table tbody tr.is-selected { border-color: #8fb2f8; background: #f3f7ff; }
  .people-table td { display: flex; box-sizing: border-box; width: auto; height: auto; min-width: 0; padding: 0; border: 0; }
  .people-table .people-checkbox-column { width: auto; grid-column: 1; grid-row: 1 / 7; align-items: flex-start; padding: 8px 4px; }
  .people-table .people-checkbox-column input { width: 18px; height: 18px; }
  .people-user-cell-column { grid-column: 2; grid-row: 1; }
  .people-user-cell { width: 100%; grid-template-columns: 38px minmax(0, 1fr); }
  .people-avatar { width: 38px; height: 38px; font-size: 11px; }
  .people-user-copy strong { font-size: 12px; }
  .people-user-copy span { font-size: 9px; }
  .people-phone-cell { grid-column: 2; grid-row: 2; color: #747c84 !important; font-size: 10px !important; }
  .people-access-cell, .people-company-cell, .people-pm-cell, .people-account-cell {
    grid-column: 2 / 4;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    border-top: 1px solid #eceef0 !important;
  }
  .people-access-cell { grid-row: 3; }
  .people-company-cell { grid-row: 4; }
  .people-pm-cell { grid-row: 5; }
  .people-account-cell { grid-row: 6; }
  .people-access-cell::before, .people-company-cell::before, .people-pm-cell::before, .people-account-cell::before { flex: 0 0 86px; color: #7b8289; font-size: 9px; }
  .people-access-cell::before { content: "现场权限"; }
  .people-company-cell::before { content: "公司"; }
  .people-pm-cell::before { content: "项目管理"; }
  .people-account-cell::before { content: "订阅"; }
  .people-access-select, .people-company-select, .people-pm-select { width: min(190px, 58vw); min-height: 36px; text-align: right; }
  .people-action-column { grid-column: 3; grid-row: 1 / 3; align-items: flex-start; justify-content: center; }
  .people-remove-row { width: 44px; height: 44px; }

  /* Mobile model panels remain contextual and no longer feel like narrow desktop sidebars. */
  .model-object-tree, .model-task-panel { width: min(342px, calc(100vw - 24px)); border-radius: 0 12px 0 0; }
  .model-task-panel { border-radius: 12px 0 0 0; }
  .model-object-tree > header, .model-task-panel > header { min-height: 48px; padding: 8px 12px; }
  .model-object-tree > header strong, .model-task-panel > header strong { font-size: 12px; }
  .model-object-tree > header button, .model-task-panel > header button { width: 44px; height: 44px; }
  .model-viewer-status button { min-height: 38px; padding-inline: 12px; font-size: 10px; }
  .model-object-properties { width: calc(100vw - 24px); }

  /* Settings retain explanatory text and use the same card rhythm as other mobile modules. */
  .settings-content { padding: 10px 12px 86px; }
  .settings-card { border-radius: 8px; }
  .settings-card > summary { min-height: 50px; padding: 0 14px; }
  .settings-card h2 { font-size: 12px; }
  .settings-card-body, .settings-action-grid, .settings-single-action, .settings-project-actions, .settings-storage-body, .settings-integrations-body { padding: 14px; }
  .settings-card p { display: block; font-size: 10px; }

  .context-sidebar, .inspector, .version-modal, .photo-viewer-modal, .form-viewer-modal, .file-viewer-modal { bottom: var(--mobile-nav-height); }
  .compact-modal { inset: 0 0 var(--mobile-nav-height); }
}

/* v0.61 deployment design closure: remove repeated mobile hierarchy, restore
   icon contrast, and keep contextual tools clear of the primary navigation. */
@media (max-width: 720px) {
  .global-topbar {
    min-height: 58px;
    padding: max(8px, env(safe-area-inset-top)) 14px 8px;
    border-bottom-color: #d9dde1;
  }
  .mobile-page-heading { gap: 2px; }
  .mobile-page-heading small { color: #777f87; font-size: 10px; line-height: 1.25; }
  .mobile-page-heading strong { font-size: 18px; line-height: 1.2; }

  /* The global mobile header owns the page title. Module toolbars only expose
     controls, preventing duplicated headings and unnecessary vertical bulk. */
  .forms-heading,
  .rfi-heading,
  .people-heading,
  .budget-heading,
  .models-heading > div { display: none; }
  .models-heading:has(.model-back-to-plan[hidden]) { display: none; }
  .models-heading .model-back-to-plan:not([hidden]) { min-height: 40px; }

  .rfi-toolbar { padding: 8px 12px; }
  .rfi-toolbar-actions { gap: 7px; }
  .models-toolbar { padding: 8px 12px; }

  /* Rail icons were tuned for a charcoal sidebar. Give the white More sheet
     an explicit foreground and matching cutout backgrounds. */
  .mobile-module-grid > button {
    min-height: 78px;
    border-radius: 6px;
    color: #4d5963;
  }
  .mobile-module-grid .rail-icon,
  .mobile-module-grid .rail-footer-icon { color: #4d5963; }
  .mobile-module-grid > button.is-active .rail-icon,
  .mobile-module-grid > button.is-active .rail-footer-icon { color: #1769f6; }
  .mobile-module-grid .icon-forms::before,
  .mobile-module-grid .icon-rfis::before,
  .mobile-module-grid .icon-submittals::before { background: #fff; }
  .mobile-module-grid > button.is-active .icon-forms::before,
  .mobile-module-grid > button.is-active .icon-rfis::before,
  .mobile-module-grid > button.is-active .icon-submittals::before { background: #eef5ff; }

  /* A phone needs a contextual sheet instead of a full-height desktop tree.
     Leave the model visible above the panel and keep both panels exclusive. */
  .model-object-tree,
  .model-task-panel {
    top: auto;
    right: 0;
    bottom: 52px;
    left: 0;
    width: 100%;
    height: min(30dvh, 280px);
    max-height: calc(100% - 52px);
    border: 1px solid #cdd2d7;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 24px rgba(38, 43, 48, .18);
  }
  .model-object-tree-content,
  .model-task-list { overscroll-behavior: contain; }
  .model-object-properties {
    right: 12px;
    bottom: 64px;
    left: 12px;
    width: auto;
    max-height: 46dvh;
  }

  /* Shared compact rhythm: still touch friendly, but closer to Fieldwire's
     utilitarian density than large consumer-app cards. */
  .task-kanban-column,
  .file-table tbody tr,
  .spec-table tbody tr,
  .form-table tbody tr,
  #rfi-table-wrap .rfi-table tbody tr,
  #submittal-table-wrap .rfi-table tbody tr,
  #change-order-table-wrap .change-order-table tbody tr,
  .budget-line-row,
  .people-table tbody tr,
  .settings-card,
  .trash-row { border-radius: 6px; }

  .plans-browser .new-library-item,
  .tasks-workspace #new-project-task,
  .photos-workspace #photo-new-button,
  .files-workspace #new-file-button,
  .specs-library #new-specification-button,
  #new-budget-line,
  #new-project-user {
    right: 14px;
    bottom: calc(var(--mobile-nav-height) + 12px);
    width: 50px;
    min-width: 50px;
    height: 50px;
    box-shadow: 0 4px 13px rgba(23, 105, 246, .3);
  }
  .task-kanban,
  .files-content,
  .spec-table-wrap,
  .forms-content,
  .photo-gallery,
  .people-content,
  .budget-content { padding-bottom: 100px; }

  /* Tasks are scanned continuously in the field, so the create action belongs
     in the command row rather than floating over the record currently read. */
  .tasks-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }
  .tasks-toolbar-leading {
    display: block;
    width: 44px;
    grid-column: 2;
    grid-row: 1;
    overflow: visible;
  }
  .tasks-toolbar-actions {
    grid-column: 1;
    grid-row: 1;
  }
  .tasks-workspace #new-project-task {
    position: static;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 2px;
    box-shadow: none;
  }
  .tasks-workspace #new-project-task::before { font-size: 25px; }
  .task-kanban { padding-bottom: 24px; }
}

@media (max-width: 720px) {
  .task-detail-mobile-summary { display: grid; min-height: 88px; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 9px; padding: 12px 14px; border-bottom: 1px solid #d7dade; background: #fff; }
  .task-detail-mobile-summary .task-detail-marker { width: 34px; height: 34px; }
  .task-detail-mobile-summary > div { display: grid; min-width: 0; gap: 4px; color: #777d82; font-size: 11px; }
  .task-detail-mobile-summary strong { overflow-wrap: anywhere; color: #34393e; font-size: 15px; font-weight: 600; line-height: 1.35; }
  .task-detail-mobile-summary small { color: #777d82; font-size: 11px; }
  .task-detail-mobile-summary > button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #1769e8; cursor: pointer; }
  .task-detail-title-row { display: none; }
  .form-entry-table-wrap { overflow: visible; }
  .form-entry-table { min-width: 0; border-collapse: separate; border-spacing: 0; }
  .form-entry-table thead { display: none; }
  .form-entry-table tbody { display: grid; gap: 10px; padding: 10px 12px; }
  .form-entry-table tbody tr:not(.is-empty) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 10px; padding: 10px; border: 1px solid #d7dade; border-radius: 4px; background: #fff; }
  .form-entry-table tbody td { display: grid; min-width: 0; gap: 4px; padding: 0; border: 0; }
  .form-entry-table tbody tr:not(.is-empty) td::before { content: attr(data-label); color: #6d7379; font-size: 10px; font-weight: 600; }
  .form-entry-table tbody td input, .form-entry-table tbody td select { width: 100%; min-width: 0; height: 42px; padding: 7px 8px; border: 1px solid #cfd3d7; border-radius: 3px; background: #fff; }
  .form-entry-table tbody td[data-label="备注"], .form-entry-table tbody td[data-label="工作内容"], .form-entry-table tbody td[data-label="公司"], .form-entry-table tbody td[data-label="操作"] { grid-column: 1 / -1; }
  .form-entry-table tbody td[data-label="操作"] { justify-items: end; }
  .form-entry-table tbody td[data-label="操作"]::before { display: none; }
  .form-entry-table tbody tr.is-empty { display: table-row; }
  .form-entry-table tbody tr.is-empty td { display: table-cell; padding: 18px 8px; text-align: center; }
}

/* v0.62: phone plan controls need reliable touch targets without turning the
   desktop drawing toolbar into a loose consumer-style control palette. */
@media (max-width: 720px) {
  #single-plan-toolbar #sidebar-open { height: 44px; }

  .markup-toolbar {
    max-height: calc(100% - 28px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    touch-action: pan-y;
  }
  .markup-toolbar::-webkit-scrollbar { display: none; }
  .markup-toolbar .markup-tool-group button,
  .view-controls button { width: 40px; height: 40px; touch-action: manipulation; }
  .markup-toolbar .markup-tool-group { width: max-content; justify-self: start; }
  .markup-toolbar .markup-tool-group:has(#zoom-in-button),
  .markup-toolbar .markup-tool-group:has([data-markup-tool="select"]) { grid-template-columns: repeat(2, 40px); }

  .sheet-nav,
  .sheet-title-pill { height: 40px; }
  .sheet-nav { right: 12px; left: auto; }
  .sheet-nav button,
  .sheet-title-pill button { width: 40px; min-width: 40px; height: 40px; touch-action: manipulation; }
  .sheet-title-pill span { max-width: min(220px, calc(100vw - 142px)); padding-inline: 10px; font-size: 11px; }

  .plan-auto-link::before {
    position: absolute;
    inset: -9px;
    content: "";
  }

  .compact-dialog {
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .compact-dialog .floating-panel-header > button,
  .compact-dialog button { min-height: 44px; }
  .compact-dialog .floating-panel-header > button { width: 44px; min-width: 44px; height: 44px; }
  .compact-dialog input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .compact-dialog select { min-height: 44px; }
  .compact-dialog .dialog-actions { gap: 8px; }
  .compact-dialog form > .dialog-actions {
    position: sticky;
    z-index: 3;
    bottom: 0;
    margin: 8px -16px -16px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid #d9dde1;
    background: #fff;
    box-shadow: 0 -5px 12px rgba(37, 42, 47, .06);
  }
  .compact-dialog .dialog-actions > button { min-width: 72px; padding-inline: 14px; }
  .form-create-form select,
  .form-create-form input { height: 44px; }
}

/* A landscape phone can be wider than the phone breakpoint while still
   offering very little vertical space. Treat height as a first-class input so
   modal headers, fields and confirmation actions never leave the viewport. */
@media (max-height: 560px) {
  .compact-modal { padding: 10px; }
  .compact-dialog {
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .compact-dialog form > .dialog-actions {
    position: sticky;
    z-index: 3;
    bottom: 0;
    margin: 8px -16px -16px;
    padding: 9px 16px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid #d9dde1;
    background: #fff;
    box-shadow: 0 -5px 12px rgba(37, 42, 47, .06);
  }
  .spec-upload-modal,
  .photo-upload-modal,
  #file-upload-modal { place-items: center; padding: 10px; }
  .spec-upload-dialog,
  .photo-upload-dialog,
  .file-upload-dialog,
  .file-filter-dialog {
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  #spec-upload-form,
  .file-upload-form { min-height: 0; }
}

@media (max-height: 560px) and (pointer: coarse) {
  .compact-dialog .floating-panel-header > button,
  .compact-dialog button { min-height: 40px; }
  .compact-dialog input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  .compact-dialog select { min-height: 40px; }
}
