:root {
  --bg: #f4f6f5;
  --panel: #ffffff;
  --panel-2: #eef2f1;
  --ink: #16211f;
  --muted: #65706d;
  --line: #d8dfdc;
  --brand: #165c7d;
  --brand-dark: #0e4058;
  --accent: #f0a431;
  --good: #2f7d57;
  --warn: #a86413;
  --bad: #b64034;
  --blocked: #6f4f91;
  --shadow: 0 14px 36px rgba(18, 33, 31, 0.08);
  --mobile-bottom-nav-height: 0px;
}

/* Command Studio electrical coordination viewer */
.coordination-mode-selector{display:grid;grid-template-columns:repeat(3,minmax(44px,1fr));padding:3px;border-radius:10px;background:#0c2e3d;box-shadow:inset 0 0 0 1px #ffffff22;flex:0 0 auto}
.coordination-mode-selector button{border:0;border-radius:7px;padding:7px 12px;background:transparent;color:#c9d7dd;font-weight:750;cursor:pointer;white-space:nowrap}
.coordination-mode-selector button.active{color:#102d3a;background:#fff;box-shadow:0 1px 4px #00182244}
.coordination-stage{position:relative;min-width:0;min-height:620px;overflow:hidden;background:#edf2f3;isolation:isolate}
.coordination-canvas,.coordination-canvas canvas{display:block;width:100%;height:100%;touch-action:none}
.coordination-toolbar{position:absolute;z-index:5;top:10px;left:10px;right:10px;display:flex;align-items:flex-start;gap:8px;pointer-events:none}
.coordination-toolbar>*{pointer-events:auto}.coordination-primary-actions{display:flex;gap:5px;flex:0 0 auto}
.coordination-presets{display:flex;flex-wrap:wrap;gap:3px;padding:4px;border:1px solid #b9c7cd;border-radius:9px;background:#f9fbfce8;box-shadow:0 3px 12px #243c4833;backdrop-filter:blur(8px)}
.coordination-presets button,.coordination-controls summary{border:0;background:transparent;color:#173d50;padding:7px 9px;font:700 12px/1.1 system-ui;cursor:pointer;list-style:none}
.coordination-presets button:hover{background:#e2ebef;border-radius:6px}.coordination-controls{position:relative;border:1px solid #b9c7cd;border-radius:9px;background:#f9fbfce8;box-shadow:0 3px 12px #243c4833;backdrop-filter:blur(8px)}.coordination-controls[open] summary{border-bottom:1px solid #ccd7dc}
.coordination-control-grid,.coordination-filter-grid{position:absolute;top:100%;right:0;width:min(620px,80vw);display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:8px;padding:10px;background:#fff;border:1px solid #c5d0d5;border-radius:9px;box-shadow:0 9px 28px #173e5052}.coordination-control-grid{width:420px}.coordination-control-grid label,.coordination-filter-grid label{display:grid;gap:3px;color:#526671;font-size:11px;font-weight:700;text-transform:uppercase}.coordination-control-grid select,.coordination-filter-grid select{min-width:0;padding:7px;border:1px solid #b9c7cd;border-radius:6px;background:#fff;color:#163b4c;text-transform:none}
.coordination-inspector{position:absolute;z-index:4;top:64px;right:12px;width:min(310px,calc(100% - 24px));max-height:calc(100% - 148px);overflow:auto;padding:14px;border:1px solid #b9c7cd;border-radius:12px;background:#fbfcfdeb;box-shadow:0 8px 24px #173e5040;backdrop-filter:blur(10px)}.coordination-inspector-head{display:flex;align-items:center;gap:10px}.coordination-inspector-head small{display:block;color:#657781;max-width:220px;overflow:hidden;text-overflow:ellipsis}.coordination-kind-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;background:var(--system,#527080);color:#fff;font-weight:850}.coordination-inspector dl{margin:12px 0}.coordination-inspector dl div{display:grid;grid-template-columns:112px 1fr;gap:8px;border-top:1px solid #d7e0e4;padding:6px 0}.coordination-inspector dt{color:#677a83;font-size:11px;text-transform:uppercase}.coordination-inspector dd{margin:0;color:#173d50;font-weight:650;overflow-wrap:anywhere}.coordination-inspector-empty p{margin-bottom:0;color:#5f727c}
.coordination-warnings{position:absolute;z-index:4;left:12px;bottom:42px;max-width:min(520px,calc(100% - 24px));padding:7px 10px;border:1px solid #d3b16d;border-radius:8px;background:#fff9e8ee;color:#664b17;font-size:12px}.coordination-warnings p{margin:5px 0}.coordination-legend{position:absolute;z-index:3;bottom:8px;left:10px;right:10px;display:flex;gap:10px;flex-wrap:wrap;color:#2e4651;font-size:10px;text-transform:capitalize;pointer-events:none}.coordination-legend span{display:flex;align-items:center;gap:4px}.coordination-legend i{width:9px;height:9px;border-radius:50%;background:var(--system)}.coordination-legend i.inferred{border:2px solid #e89123;background:transparent}.coordination-empty{position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:30px;color:#36505c}.coordination-empty b{font-size:20px}.coordination-empty p{max-width:440px}
.command-studio-view-2d .coordination-stage{display:none}.command-studio-view-3d .drawing-sheet-panel,.command-studio-view-3d #drawing-stage,.command-studio-view-3d .drawing-properties-panel,.command-studio-view-3d .drawing-toolbar,.command-studio-view-3d .drawing-overlay-filters,.command-studio-view-3d .drawing-markup-list-panel{display:none!important}.command-studio-view-3d .drawing-workspace-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(620px,72vh)}.command-studio-view-3d .coordination-stage{grid-column:1;grid-row:1;height:100%}
.command-studio-view-split .drawing-workspace-grid{grid-template-columns:190px minmax(0,1fr) minmax(0,1fr);gap:1px}.command-studio-view-split .coordination-stage{grid-column:3;grid-row:1}.command-studio-view-split .drawing-properties-panel{display:none}.command-studio-view-split .coordination-inspector{top:60px;width:250px;max-height:42%}.command-studio-view-split .coordination-toolbar{right:270px}.command-studio-view-split .coordination-presets button:nth-child(n+3):nth-child(-n+7){display:none}
.command-studio-commercial .command-studio-header{grid-template-columns:48px minmax(255px,360px) minmax(0,1fr) auto auto}.command-studio-commercial.command-studio-view-3d .command-studio-workspace{grid-template-columns:54px minmax(0,1fr)}.command-studio-commercial.command-studio-view-3d .command-studio-sheet-rail,.command-studio-commercial.command-studio-view-3d .command-studio-inspector,.command-studio-commercial.command-studio-view-3d .command-studio-footer,.command-studio-commercial.command-studio-view-3d .print-viewer-drawer{display:none!important}.command-studio-view-3d .command-studio-canvas>.coordination-stage{position:absolute;inset:0;height:100%;min-height:0}.command-studio-view-split .command-studio-canvas{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.command-studio-view-split .command-studio-canvas>#drawing-stage{grid-column:1;min-width:0}.command-studio-view-split .command-studio-canvas>.coordination-stage{grid-column:2;min-height:0;height:100%}.command-studio-view-split .command-studio-canvas>.print-viewer-drawer{grid-column:1/-1}.command-studio-view-split .command-studio-footer{max-width:calc(50% - 16px)}
@media(max-width:768px){.drawing-workspace-header{flex-wrap:wrap}.coordination-mode-selector{margin-left:auto;order:2}.coordination-mode-selector button{padding:7px 9px}.command-studio-view-split .drawing-workspace-grid{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(360px,1fr) minmax(360px,1fr)}.command-studio-view-split .drawing-sheet-panel{display:none}.command-studio-view-split #drawing-stage{grid-column:1;grid-row:1}.command-studio-view-split .coordination-stage{grid-column:1;grid-row:2;height:100%;min-height:360px}.command-studio-view-split .command-studio-canvas{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.command-studio-view-split .command-studio-canvas>#drawing-stage{grid-column:1;grid-row:1}.command-studio-view-split .command-studio-canvas>.coordination-stage{grid-column:1;grid-row:2;min-height:320px}.command-studio-view-split .command-studio-footer{max-width:calc(100% - 12px)}.coordination-toolbar{right:8px;left:8px;overflow-x:auto}.coordination-primary-actions{position:sticky;left:0}.coordination-presets{flex-wrap:nowrap}.coordination-presets button:nth-child(n+2):nth-child(-n+6){display:none}.coordination-controls{flex:0 0 auto}.coordination-control-grid,.coordination-filter-grid{position:fixed;top:110px;left:8px;right:8px;width:auto;max-height:55vh;overflow:auto;grid-template-columns:repeat(2,minmax(0,1fr))}.coordination-inspector{top:auto;bottom:26px;right:8px;left:8px;width:auto;max-height:32%;padding:10px}.coordination-warnings{top:54px;bottom:auto}.coordination-legend{display:none}}
@media(max-width:430px){.coordination-mode-selector{width:100%;order:3}.coordination-mode-selector button{min-width:0;padding:7px 8px}.coordination-toolbar{top:6px}.coordination-filter-grid{grid-template-columns:1fr}.coordination-inspector dl div{grid-template-columns:96px 1fr}.command-studio-view-3d .drawing-workspace-header .actions{display:none}.command-studio-view-3d .coordination-stage{min-height:calc(100dvh - 150px)}}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(22, 92, 125, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 92, 125, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 18px;
}

.brand-copy {
  min-width: 0;
}

.brand-logo-mark {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: white;
  box-shadow: 0 5px 14px rgba(4, 38, 82, .12);
}

.brand-logo-mark img {
  position: absolute;
  width: 90px;
  height: 90px;
  max-width: none;
  left: -23px;
  top: -12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--brand);
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.22);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,.78);
}

.brand-mark::before { width: 22px; height: 2px; left: 8px; top: 13px; }
.brand-mark::after { width: 2px; height: 20px; left: 18px; top: 8px; }

.brand h1 {
  font-size: 17px;
  line-height: 1.05;
  margin: 0;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}

.nav {
  display: grid;
  gap: 5px;
}

.nav button,
.mobile-nav button,
.icon-btn {
  min-height: 42px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.nav button {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 0 10px;
  font-weight: 700;
}

.nav button.active,
.mobile-nav button.active {
  background: #e6f1f5;
  color: var(--brand-dark);
}

.nav-icon,
.mobile-nav .nav-icon {
  font-size: 17px;
  line-height: 1;
}

.sidebar .nav-icon { display: grid; place-items: center; }

.main {
  min-width: 0;
  padding: 20px 22px 96px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.topbar h2 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0;
}

.topbar p {
  color: var(--muted);
  margin: 4px 0 0;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  color: var(--ink);
  background: var(--panel-2);
}

.btn.primary {
  color: white;
  background: var(--brand);
}

.btn.warn {
  color: #271a04;
  background: #f8d894;
}

.btn.danger {
  color: white;
  background: var(--bad);
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.card {
  background: rgba(255,255,255,.95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.pad { padding: 16px; }

.metric {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric .value {
  font-size: 34px;
  font-weight: 900;
}

.metric .label {
  color: var(--muted);
  font-weight: 750;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 10px;
}

.section-title h3 {
  margin: 0;
  font-size: 18px;
}

.job-card {
  display: grid;
  gap: 12px;
}

.job-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.job-head h3,
.item-title {
  margin: 0;
  font-size: 18px;
}

.sub {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #e6f1f5;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.complete { color: #15533a; background: #ddf1e7; }
.badge.warn { color: #6c4304; background: #fff0ce; }
.badge.blocked { color: #533875; background: #eee4fa; }
.badge.danger { color: #7c261f; background: #f8dedb; }
.badge.inactive { color: #596460; background: #e6eae8; }

.progress {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e3e9e7;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--good), var(--accent));
}

.job-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.meta-box {
  background: #f7f9f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.meta-box b {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}

.phase-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.phase-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.phase-pill.active {
  color: white;
  background: var(--brand);
  border-color: var(--brand);
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 850;
  color: #394542;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
}

.tabs button {
  flex: 0 0 auto;
}

.tabs .active {
  background: var(--brand);
  color: white;
}

.table-list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.row-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.row-actions select,
.row-actions input {
  min-height: 38px;
  max-width: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: white;
}

.icon-btn {
  width: 42px;
  padding: 0;
  background: #f0f4f2;
  font-weight: 900;
}

.blueprint-drop {
  display: grid;
  place-items: center;
  min-height: 210px;
  border: 2px dashed #aac0c8;
  border-radius: 8px;
  background:
    linear-gradient(rgba(22, 92, 125, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 92, 125, .08) 1px, transparent 1px),
    #f8fcfd;
  background-size: 22px 22px;
  text-align: center;
  padding: 18px;
}

.blueprint-drop input {
  max-width: 100%;
}

.blueprint-art {
  width: min(520px, 100%);
  min-height: 210px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(255,255,255,.8) 14% 15%, transparent 15% 100%),
    linear-gradient(0deg, transparent 0 28%, rgba(255,255,255,.8) 28% 29%, transparent 29% 100%),
    #165c7d;
  position: relative;
  overflow: hidden;
}

.blueprint-art::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 3px solid rgba(255,255,255,.86);
  border-left-width: 6px;
}

.blueprint-art::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 88px;
  right: 40px;
  bottom: 34px;
  border: 2px solid rgba(255,255,255,.82);
  box-shadow: -175px -60px 0 -2px transparent, -175px -60px 0 0 rgba(255,255,255,.75);
}

.symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.symbol {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.symbol-img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f7f9f8;
  border: 1px solid var(--line);
  color: var(--brand);
  font-weight: 950;
  font-size: 22px;
  overflow: hidden;
}

.symbol-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.symbol-card {
  display: grid;
  gap: 11px;
  align-content: start;
}

.symbol-card-head {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: start;
}

.phase-badges,
.rule-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.rule-list {
  display: grid;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f8;
  color: #394542;
  font-size: 13px;
}

.phase-checks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.check-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #394542;
  font-weight: 800;
  font-size: 13px;
}

.check-pill input {
  width: 16px;
  height: 16px;
}

.workflow-tabs {
  padding-bottom: 4px;
}

.review-banner {
  border-color: #efc164;
  background: #fffaf0;
}

.warning-line {
  padding: 9px 10px;
  border: 1px solid #efc164;
  border-radius: 8px;
  background: #fff4d8;
  color: #6c4304;
  font-size: 13px;
  font-weight: 850;
}

.ai-detected-card {
  display: grid;
  gap: 12px;
}

.ai-detected-card.low-confidence {
  border-color: #e59b8f;
  box-shadow: 0 14px 36px rgba(182, 64, 52, 0.09);
}

.user-select,
.role-select {
  min-height: 42px;
  max-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.bell-btn {
  position: relative;
}

.bell-btn span {
  min-width: 22px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--bad);
  color: white;
  font-size: 12px;
}

.notifications-panel {
  margin-bottom: 16px;
  border-color: #bfd3da;
}

.unread-row {
  border-color: #efc164;
  background: #fffaf0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.photo-thumb {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border: 1px solid #c9d6d2;
  border-radius: 8px;
  background:
    linear-gradient(rgba(22, 92, 125, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 92, 125, .08) 1px, transparent 1px),
    #f8fbfa;
  background-size: 16px 16px;
  color: var(--brand-dark);
  font-weight: 950;
  overflow: hidden;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  position: relative;
  padding: 11px 12px 11px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: var(--brand);
}

.field-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.field-actions .btn {
  min-height: 48px;
}

.field-test-card {
  border-color: #b9d2dc;
  background: #f7fcfd;
}

.field-test-btn {
  min-height: 54px;
  min-width: 180px;
  font-size: 16px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-weight: 800;
  font-size: 13px;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #261a04;
  font-size: 11px;
  font-weight: 950;
}

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(460px, .98fr);
  overflow: hidden;
  background: white;
}

.login-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(30px, 5vw, 76px);
  background-color: #020d1e;
  background-image: url("/assets/login-construction-background.png");
  background-position: center;
  background-size: cover;
}

.login-copy {
  width: min(650px, 100%);
  color: white;
  display: grid;
  gap: clamp(14px, 2vh, 22px);
}

.login-brand-lockup {
  display: flex;
  align-items: center;
  gap: 20px;
  width: fit-content;
}

.login-brand-emblem {
  position: relative;
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  overflow: hidden;
}

.login-brand-emblem img {
  position: absolute;
  width: 228px;
  max-width: none;
  left: -58px;
  top: -31px;
}

.login-brand-type {
  display: grid;
  line-height: 1;
}

.login-brand-type b {
  color: white;
  font-size: clamp(25px, 2.6vw, 36px);
  letter-spacing: .08em;
}

.login-brand-type span {
  color: #1870ff;
  font-size: clamp(17px, 1.8vw, 23px);
  font-weight: 900;
  letter-spacing: .28em;
  margin-top: 7px;
}

.login-copy .login-headline {
  margin: 0;
  font-size: clamp(42px, 4.6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.login-headline span {
  color: #0d64f3;
}

.login-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: #c5d4e8;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.login-kicker::before {
  content: "";
  width: 42px;
  height: 2px;
  background: #1672ff;
}

.login-plan-preview {
  position: relative;
  width: min(590px, 100%);
  height: 220px;
  overflow: hidden;
  border: 1px solid #2383e8;
  border-radius: 8px;
  background: rgba(2, 24, 50, .76);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

.login-plan-preview .blueprint-art {
  width: 78%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
  background-color: rgba(9, 79, 131, .5);
}

.login-plan-schedule {
  position: absolute;
  right: 18px;
  top: 18px;
  bottom: 18px;
  width: 26%;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(75, 164, 255, .48);
  border-radius: 6px;
  color: #a9d4ff;
  background: rgba(1, 18, 39, .78);
  font-size: 9px;
  text-transform: uppercase;
}

.login-plan-schedule b {
  margin-bottom: 6px;
  color: white;
  font-size: 10px;
}

.login-benefit {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  color: #e5edf8;
  font-size: 16px;
  line-height: 1.45;
}

.login-benefit-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid #1672ff;
  border-radius: 50%;
  color: #1672ff;
  font-size: 20px;
}

.login-card {
  display: grid;
  align-content: center;
  padding: clamp(30px, 6vw, 88px);
  background: #ffffff;
}

.auth-box {
  max-width: 480px;
  width: 100%;
  margin: auto;
}

.auth-logo {
  display: none;
}

.auth-box h2 {
  font-size: clamp(36px, 4vw, 48px);
  letter-spacing: 0;
  margin: 0 0 10px;
}

.auth-box > .sub {
  margin: 0 0 34px;
  color: #758096;
  font-size: 17px;
}

.auth-form {
  gap: 24px;
}

.auth-form .field {
  gap: 9px;
}

.auth-form .field label {
  color: #101a2c;
  font-size: 14px;
}

.auth-input {
  min-height: 62px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cbd3df;
  border-radius: 8px;
  background: white;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input:focus-within {
  border-color: #1261df;
  box-shadow: 0 0 0 3px rgba(18, 97, 223, .12);
}

.auth-input > span {
  flex: 0 0 48px;
  color: #718099;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.auth-input input {
  min-width: 0;
  min-height: 60px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #12213a;
  background: transparent;
  font-size: 16px;
}

.auth-input button {
  min-height: 60px;
  padding: 0 16px;
  color: #52617a;
  background: transparent;
  font-size: 13px;
  font-weight: 850;
}

.auth-form > .btn {
  width: 100%;
  min-height: 58px;
  font-size: 16px;
}

.auth-form > .btn.primary {
  background: #0d58d8;
}

.auth-secondary {
  border: 1px solid #aec7ef;
  color: #0d58d8;
  background: white;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: #8490a3;
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: #d8dee7;
}

.mobile-nav {
  display: none;
}

/* Simplified production shell */
.job-primary-tabs {
  position: static;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: none;
}

.job-primary-tabs button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.job-primary-tabs button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--brand-dark);
  font-size: 11px;
}

.job-primary-tabs button.active {
  background: #e6f1f5;
  color: var(--brand-dark);
}

.simple-command-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
}

.simple-command-header h2 { margin: 4px 0; font-size: 25px; }
.command-section { margin: 0 0 18px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.attention-section { border-top: 4px solid #d6a036; }
.attention-section-toggle {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0 0 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.app-version-badge {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.pipeline-technical-diagnostics { margin-top: 8px; color: var(--muted); }
.pipeline-technical-diagnostics summary { min-height: 36px; display: flex; align-items: center; cursor: pointer; font-weight: 800; }
.pipeline-technical-diagnostics ul { margin: 8px 0 0; padding-left: 20px; overflow-wrap: anywhere; }
.pipeline-technical-diagnostics code { overflow-wrap: anywhere; }
.decipher-processing-row { align-items: flex-start; }
.attention-section-toggle > span:first-child { display: grid; gap: 3px; min-width: 0; }
.attention-section-toggle b { font-size: 17px; }
.attention-section-toggle small { color: var(--muted); font-size: 13px; font-weight: 500; }
.attention-section-toggle:focus-visible { outline: 3px solid rgba(22, 92, 125, .32); outline-offset: 3px; border-radius: 6px; }
.attention-section .command-center-list[hidden] { display: none; }
.attention-toggle-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff5df;
  color: #8c5a08;
  font-size: 22px;
  font-weight: 900;
}
.command-center-list { display: grid; gap: 2px; }
.command-center-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 9px 4px;
  border-top: 1px solid var(--line);
}
.command-center-row:first-child { border-top: 0; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #9ca5a2; }
.status-dot.complete { background: var(--good); }
.status-dot.warn { background: #d29a24; }
.status-dot.danger { background: var(--bad); }
.status-dot.progressing { background: var(--brand); }
.command-center-row-copy { display: grid; min-width: 0; gap: 3px; }
.command-center-row-copy b, .command-center-row-copy span { overflow-wrap: anywhere; }
.command-center-row-copy span { color: var(--muted); font-size: 13px; }
.status-text { padding: 4px 8px; border-radius: 4px; background: #eef1f0; color: var(--muted); font-size: 12px; font-weight: 850; white-space: nowrap; }
.status-text.complete { background: #e9f5ef; color: var(--good); }
.status-text.warn { background: #fff5df; color: #8c5a08; }
.status-text.danger { background: #fff0ee; color: var(--bad); }
.status-text.progressing { background: #e6f1f5; color: var(--brand-dark); }
.command-row-actions { display: flex; gap: 6px; }
.command-row-actions .btn { min-height: 38px; }
.compact-empty { min-height: 80px; }
.command-job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.command-job-card { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfc; }
.command-job-card h3, .command-job-card p { margin: 0; }
.command-job-card p { color: var(--muted); font-size: 13px; }
.command-job-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.command-job-facts span { display: grid; gap: 2px; padding: 8px; border-radius: 6px; background: var(--panel-2); font-size: 11px; color: var(--muted); }
.command-job-facts b { color: var(--ink); font-size: 14px; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.more-card h3 { margin: 0 0 10px; font-size: 17px; }
.more-link { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; }
.more-link b { color: var(--brand); font-size: 12px; }
.account-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.account-strip > div { display: grid; gap: 3px; }
.account-strip span { color: var(--muted); font-size: 13px; }
.job-list-toolbar { display: flex; align-items: end; gap: 8px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.job-list-toolbar label { flex: 1; display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; }
.job-list-toolbar input { min-height: 44px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; }
.job-list-toolbar select { min-height: 44px; min-width: 150px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.simplified-job-card { display: grid; gap: 12px; }
.job-list-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.job-list-facts span { display: grid; gap: 2px; padding: 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); font-size: 11px; }
.job-list-facts b { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.inline-file-filter { display: grid; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 800; }
.inline-file-filter select { min-height: 42px; min-width: 170px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.inspection-edit-panel { margin: 0 0 14px; border-left: 4px solid var(--brand); scroll-margin-top: 100px; }
.inspection-edit-panel textarea { min-height: 90px; }
.universal-add-popover { position: fixed; top: 76px; right: 22px; z-index: 95; display: grid; gap: 5px; width: min(300px, calc(100vw - 28px)); padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); }
.universal-add-popover > div { display: flex; align-items: center; justify-content: space-between; padding: 4px; }
.universal-add-popover > div button { background: transparent; color: var(--muted); }
.universal-add-popover > button { min-height: 46px; padding: 0 12px; border-radius: 6px; background: #f4f7f6; color: var(--ink); text-align: left; font-weight: 800; }

.empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.65);
  padding: 18px;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  width: min(430px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-region[hidden] { display: none; }

.toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
  pointer-events: auto;
}

.toast button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.13);
  color: white;
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main {
    padding: 14px 14px calc(var(--mobile-bottom-nav-height, 64px) + max(38px, calc(env(safe-area-inset-bottom, 0px) + 28px)));
    scroll-padding-bottom: calc(var(--mobile-bottom-nav-height, 64px) + max(38px, calc(env(safe-area-inset-bottom, 0px) + 28px)));
  }
  .grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-card { min-height: 100vh; min-height: 100dvh; }
  .auth-logo {
    display: block;
    width: min(270px, 68vw);
    height: auto;
    margin: 0 auto 18px;
  }
  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    z-index: 80;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255,255,255,.96);
    box-shadow: var(--shadow);
  }
  .mobile-nav button {
    display: grid;
    place-items: center;
    min-width: 0;
    font-size: 11px;
    font-weight: 850;
  }
  .mobile-nav .nav-icon { display: block; font-size: 16px; }

  .toast-region {
    left: 12px;
    right: 12px;
    bottom: calc(var(--mobile-bottom-nav-height, 64px) + max(22px, calc(env(safe-area-inset-bottom, 0px) + 12px)));
    width: auto;
    max-height: calc(100dvh - var(--mobile-bottom-nav-height, 64px) - 44px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    background: rgba(15, 27, 25, .32);
  }

  .mobile-more-panel.open {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 82px;
    z-index: 70;
    display: grid;
    gap: 8px;
    max-height: min(72vh, 620px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
  }

  .mobile-more-panel button {
    min-height: 46px;
    border-radius: 8px;
    background: #f7f9f8;
    color: var(--ink);
    font-weight: 900;
  }

  .topbar { align-items: flex-start; }
  .topbar > .actions { justify-content: flex-end; }
  .topbar .sync-indicator, .topbar .bell-btn, .topbar .user-menu-wrap { display: none; }
  .job-header { position: sticky; top: 0; z-index: 24; }
  .job-primary-tabs { overflow-x: auto; }
  .job-primary-tabs button { min-width: 88px; min-height: 50px; }
  .job-primary-tabs button span { display: none; }
  .simple-command-header { align-items: flex-start; flex-direction: column; }
  .command-section { padding: 12px; }
  .command-center-row { grid-template-columns: 12px minmax(0, 1fr) auto; align-items: start; }
  .status-text { grid-column: 2; width: max-content; }
  .command-row-actions { grid-column: 2 / 4; width: 100%; }
  .command-row-actions .btn { flex: 1; min-height: 44px; }
  .command-job-grid, .more-grid { grid-template-columns: 1fr; }
  .command-job-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .job-list-toolbar { align-items: stretch; flex-wrap: wrap; }
  .job-list-toolbar label { flex-basis: 100%; }
  .universal-add-button { min-height: 44px; }
  .universal-add-popover { top: auto; right: 12px; bottom: 82px; }
}

@media (max-width: 430px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .topbar h2 { font-size: 22px; }
  .topbar p { display: none; }
  .command-job-facts { grid-template-columns: 1fr; }
  .job-primary-tabs { margin-left: 0; margin-right: 0; }
  .job-header-actions .btn:not(.primary) { display: none; }
  .account-strip { align-items: stretch; flex-direction: column; }
  .job-list-facts { grid-template-columns: 1fr; }
  .inline-file-filter, .inline-file-filter select { width: 100%; }
}

@media (max-width: 640px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
  .actions .btn {
    flex: 1 1 140px;
  }
  .grid.cols-4, .grid.cols-3, .grid.cols-2,
  .job-meta {
    grid-template-columns: 1fr;
  }
  .list-row {
    grid-template-columns: 1fr;
  }
  .row-actions {
    justify-content: stretch;
  }
  .row-actions .btn,
  .row-actions .icon-btn,
  .row-actions select,
  .row-actions input {
    flex: 1;
    max-width: none;
  }
  .user-select,
  .role-select {
    flex: 1 1 150px;
    max-width: none;
  }
  .photo-grid,
  .field-actions {
    grid-template-columns: 1fr;
  }
  .field-test-btn {
    width: 100%;
  }
  .metric {
    min-height: 96px;
  }
}

.material-row {
  align-items: flex-start;
}

.material-row .row-actions {
  max-width: 360px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(11, 18, 32, .52);
}

.email-modal {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow: auto;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-right: 12px;
  font-weight: 800;
}

.print-viewer {
  margin-bottom: 14px;
}

.print-frame {
  position: relative;
  height: min(72vh, 760px);
  min-height: 420px;
  overflow: auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.print-note-layer,
.print-note-capture {
  position: absolute;
  inset: 0;
  transform-origin: center;
}

.print-note-layer {
  pointer-events: none;
}

.print-note-marker {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  background: #d1293d;
  color: #fff;
  box-shadow: 0 4px 12px rgba(18, 31, 36, .35);
  cursor: pointer;
  pointer-events: auto;
  font-weight: 950;
}

.print-note-capture {
  z-index: 8;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(20, 98, 218, .06);
  cursor: crosshair;
}

.print-frame.is-placing-note {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}

.print-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
  transform-origin: center;
}

.print-frame img {
  max-width: 100%;
  height: auto;
  transform-origin: center;
  transition: transform .16s ease;
}

.drawing-workspace {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #e8edf1;
  box-shadow: 0 16px 40px rgba(10, 26, 37, .16);
}

.drawing-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: #102d3f;
  color: #fff;
}

.drawing-workspace-header h3,
.drawing-workspace-header p {
  margin: 0;
}

.drawing-workspace-header p {
  margin-top: 3px;
  color: #bfd0da;
  font-size: .84rem;
}

.drawing-workspace-header .btn {
  border-color: rgba(255,255,255,.28);
  color: #fff;
  background: rgba(255,255,255,.08);
}

.drawing-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 8px 10px;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.drawing-toolbar button,
.drawing-tool {
  min-width: max-content;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.drawing-toolbar button:hover,
.drawing-toolbar button:focus-visible,
.drawing-tool.active {
  border-color: #1462da;
  background: #e9f1ff;
  color: #0c4bae;
}

.drawing-toolbar button:disabled {
  opacity: .46;
  cursor: not-allowed;
}

.drawing-toolbar-separator {
  width: 1px;
  height: 30px;
  margin: 0 3px;
  background: var(--line);
}

.drawing-ai-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  overflow-x: auto;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.drawing-ai-controls > label {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px);
  align-items: center;
  gap: 6px;
  min-width: max-content;
  font-size: .76rem;
  font-weight: 900;
}

.drawing-ai-controls select { min-height: 38px; }

.drawing-ai-legend {
  display: flex;
  gap: 8px;
  min-width: max-content;
  font-size: .7rem;
  color: var(--muted);
}

.drawing-ai-legend span { display: inline-flex; align-items: center; gap: 4px; }
.drawing-ai-legend i { width: 11px; height: 11px; border-radius: 50%; background: var(--legend-color); }

.drawing-tool-chest-label {
  display: grid;
  grid-template-columns: auto minmax(120px, 180px);
  gap: 6px;
  align-items: center;
  min-width: max-content;
  font-size: .78rem;
  font-weight: 900;
}

.drawing-tool-chest-label select {
  min-height: 38px;
  max-width: 180px;
}

#drawing-zoom-label {
  min-width: 52px;
  text-align: center;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.drawing-workspace-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 310px;
  min-height: min(72vh, 820px);
  max-height: min(76vh, 900px);
}

.drawing-sheet-panel,
.drawing-properties-panel {
  min-width: 0;
  overflow: auto;
  background: #f8fafc;
}

.drawing-sheet-panel {
  border-right: 1px solid var(--line);
}

.drawing-properties-panel {
  padding: 12px;
  border-left: 1px solid var(--line);
}

.drawing-search-label {
  display: grid;
  gap: 5px;
  padding: 10px;
  font-size: .78rem;
  font-weight: 900;
}

.drawing-search-label input,
.drawing-markup-list-panel input {
  width: 100%;
  min-height: 40px;
}

.drawing-sheet-list {
  display: grid;
  gap: 7px;
  padding: 0 8px 12px;
}

.drawing-sheet-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  grid-template-rows: auto auto;
  gap: 1px 6px;
  min-height: 68px;
  padding: 7px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.drawing-sheet-list button.active {
  border-color: #1462da;
  box-shadow: 0 0 0 2px rgba(20,98,218,.16);
}

.drawing-sheet-list span {
  font-weight: 950;
}

.drawing-sheet-list small {
  grid-column: 1;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-sheet-list canvas {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  width: 52px;
  max-height: 58px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #d6dde2;
}

.drawing-stage {
  position: relative;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background-color: #89959c;
  background-image: linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.08) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.08) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.08) 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  touch-action: none;
}

.drawing-stage.tool-pan {
  cursor: grab;
}

.drawing-stage.tool-pan:active {
  cursor: grabbing;
}

.drawing-stage:not(.tool-pan):not(.tool-select) {
  cursor: crosshair;
}

.drawing-page-surface {
  position: relative;
  margin: 14px auto;
  background: #fff;
  box-shadow: 0 7px 22px rgba(0,0,0,.3);
}

#drawing-pdf-canvas {
  position: absolute;
  inset: 0;
  display: block;
}

.drawing-pdf-layer-stack,
#drawing-overlay-layers,
.drawing-overlay-render-layer {
  position: absolute;
  inset: 0 auto auto 0;
  pointer-events: none;
}

.drawing-pdf-layer-stack { z-index: 1; width: 100%; height: 100%; overflow: visible; }
#drawing-overlay-layers { width: 100%; height: 100%; overflow: visible; }
.drawing-base-pdf-layer { z-index: 1; transition: opacity .15s ease; }
.drawing-base-pdf-layer.alignment-base-muted { opacity: .12; }
.drawing-overlay-render-layer { overflow: visible; transition: opacity .12s ease; will-change: transform; }
.drawing-overlay-pdf-canvas { position: absolute; inset: 0; display: block; mix-blend-mode: multiply; }
.drawing-overlay-source-markups { position: absolute; z-index: 2; inset: 0; overflow: visible; }
.drawing-overlay-source-markups.hidden { display: none; }
.drawing-overlay-render-layer.alignment-target { opacity: 1 !important; filter: drop-shadow(0 0 6px #37a2ff); }
.drawing-overlay-render-layer.overlay-render-error { display: grid; place-items: center; padding: 12px; color: #8a1423; background: #fff3f4; font-weight: 800; }

.drawing-markup-overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.drawing-markup {
  cursor: pointer;
  pointer-events: all;
}

.drawing-markup-overlay .print-note-marker {
  position: static;
  display: block;
  width: auto;
  height: auto;
  transform: none;
  pointer-events: auto;
  filter: drop-shadow(0 3px 5px rgba(18,31,36,.35));
}

.drawing-markup.source-ai {
  filter: drop-shadow(0 0 3px rgba(123, 48, 181, .65));
}

.drawing-markup.source-ai > :first-child {
  stroke-dasharray: 8 5;
}

.building-room-overlay {
  cursor: pointer;
  pointer-events: all;
  filter: drop-shadow(0 1px 2px rgba(255,255,255,.95));
}

.building-room-overlay polygon { transition: fill .15s ease, stroke-width .15s ease; }
.building-room-overlay:hover polygon,
.building-room-overlay.selected polygon { fill-opacity: .28; }
.building-room-overlay text { pointer-events: none; }
.cv-detection-overlay { cursor: pointer; pointer-events: auto; }
.cv-detection-overlay:hover rect,
.cv-detection-overlay:focus rect { filter: drop-shadow(0 0 5px rgba(20,98,218,.65)); }
.cv-detection-overlay.selected rect { filter: drop-shadow(0 0 7px rgba(20,98,218,.85)); }
.cv-detection-overlay.source-ai.status-pending rect,
.cv-detection-overlay.source-ai.status-needs_review rect { opacity: .82; }
.cv-detection-overlay.status-approved rect,
.cv-detection-overlay.status-corrected rect { filter: drop-shadow(0 0 2px rgba(35,139,87,.48)); }
.cv-detection-overlay.status-rejected { opacity: .38; }
.cv-detection-overlay.source-manual rect { stroke-width: 2; }
.cv-run-progress { display: inline-flex; gap: .35rem; align-items: center; white-space: nowrap; font-size: .78rem; color: var(--muted); }
.cv-detection-properties .drawing-property-grid { margin: .75rem 0; }

.drawing-measurement { pointer-events: none; filter: drop-shadow(0 1px 2px rgba(255,255,255,.9)); }

.drawing-detection-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: .75rem;
}

.drawing-detection-summary b,
.drawing-detection-summary small { grid-column: 1 / -1; }
.drawing-detection-summary small { color: var(--muted); }

.drawing-selection-box {
  pointer-events: none;
}

.drawing-markup-hit-target { pointer-events: stroke; cursor: pointer; }
.drawing-markup-hit-target.area { pointer-events: all; }
.drawing-resize-handle {
  fill: #fff;
  stroke: #1462da;
  stroke-width: 3;
  cursor: nwse-resize;
  pointer-events: all;
}
.drawing-resize-handle[data-resize-handle="ne"],
.drawing-resize-handle[data-resize-handle="sw"] { cursor: nesw-resize; }
.drawing-resize-handle[data-resize-handle="start"],
.drawing-resize-handle[data-resize-handle="end"] { cursor: move; }

.drawing-svg-text {
  overflow: hidden;
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.drawing-render-status,
.drawing-loading {
  position: absolute;
  z-index: 6;
  top: 16px;
  left: 50%;
  padding: 8px 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(16,45,63,.92);
  color: #fff;
  font-weight: 800;
}

.drawing-loading {
  position: relative;
  top: auto;
  left: auto;
  margin: 30px auto;
  transform: none;
  width: max-content;
}

.drawing-panel-tabs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.drawing-properties-form .grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.building-room-properties .section-title { align-items: start; }
.building-room-properties .actions { margin-top: 12px; }
.drawing-scale-panel { display: grid; gap: 12px; padding: 12px; }
.drawing-scale-panel .review-banner { margin: 0; }

.building-layout-workspace { margin-top: 14px; }
.building-room-list { display: grid; gap: 8px; margin-top: 12px; }
.building-room-list > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: #fff;
  text-align: left;
}
.building-room-list > button span { display: grid; gap: 3px; }
.building-room-list > button small { color: var(--muted); }

.drawing-layer-list {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.drawing-layer-list label {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #fff;
}

.drawing-layer-list small {
  color: var(--muted);
}

.drawing-markup-list-panel {
  padding: 12px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.drawing-markup-list-panel .section-title {
  align-items: end;
}

.drawing-markup-list-panel h4,
.drawing-markup-list-panel p {
  margin: 0;
}

.drawing-markup-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 7px;
  max-height: 210px;
  margin-top: 10px;
  overflow: auto;
}

.drawing-takeoff-totals {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
}

.drawing-takeoff-totals > span {
  min-width: max-content;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
  font-size: .75rem;
}

.drawing-takeoff-totals small { color: var(--muted); }

.drawing-markup-list-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 7px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.drawing-markup-list-row.selected {
  border-color: #1462da;
  background: #edf4ff;
}

.drawing-markup-list-row small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawing-markup-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #d1293d;
  color: #fff;
  font-size: .72rem;
  font-weight: 950;
}

@media (max-width: 1100px) {
  .drawing-workspace-grid {
    grid-template-columns: 150px minmax(0, 1fr) 270px;
  }
}

@media (max-width: 767px) {
  .drawing-workspace {
    margin-inline: -8px;
    border-radius: 0;
  }

  .drawing-workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .drawing-workspace-header .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .drawing-workspace-header .btn {
    min-width: 0;
    min-height: 44px;
    padding: 7px;
  }

  .drawing-toolbar button,
  .drawing-tool {
    min-height: 44px;
  }

  .drawing-ai-controls { align-items: stretch; }
  .drawing-ai-controls > label { grid-template-columns: 1fr; }

  .drawing-workspace-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(58vh, 1fr) auto;
    min-height: 70vh;
    max-height: none;
  }

  .drawing-sheet-panel {
    max-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .drawing-sheet-list {
    display: flex;
    overflow-x: auto;
  }

  .drawing-sheet-list button {
    min-width: 150px;
  }

  .drawing-stage {
    min-height: 58vh;
  }

  .drawing-properties-panel {
    max-height: 48vh;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .drawing-markup-list-panel .section-title {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 390px) {
  .drawing-workspace-header .actions {
    grid-template-columns: 1fr;
  }

  .drawing-properties-form .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Dedicated field drawing viewer. The original PDF remains immutable; all
   annotations and AI selections are vector overlays in normalized page space. */
body.drawing-viewer-open {
  overflow: hidden;
  max-width: 100vw;
}

body.drawing-viewer-open #app { max-width: 100vw; overflow: hidden; }

body.drawing-viewer-open .mobile-nav {
  display: none !important;
}

.drawing-fullscreen-viewer {
  position: fixed;
  z-index: 2400;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  height: 100dvh;
  margin: 0 !important;
  margin-inline: 0 !important;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #10161b;
  box-shadow: none;
}

.drawing-fullscreen-viewer > .drawing-viewer-header,
.drawing-fullscreen-viewer > .drawing-ai-controls,
.drawing-fullscreen-viewer > .drawing-viewer-bottom-stack,
.drawing-fullscreen-viewer .drawing-markup-toolbar,
.drawing-fullscreen-viewer .drawing-routing-panel {
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}

.drawing-viewer-header {
  min-height: 64px;
  padding: 8px 12px;
  background: #151b20;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.drawing-sheet-identity {
  min-width: 0;
  text-align: center;
}

.drawing-sheet-identity h3 {
  font-size: 1rem;
  letter-spacing: .02em;
}

.drawing-sheet-identity p {
  overflow: hidden;
  max-width: min(56vw, 760px);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.drawing-header-actions {
  display: flex;
  gap: 6px;
}

.drawing-icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  padding: 6px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  font-weight: 900;
  cursor: pointer;
}

.drawing-icon-button.active,
.drawing-icon-button:focus-visible {
  border-color: #43d5e8;
  background: #0d6676;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.drawing-icon-button:disabled { opacity: .35; cursor: default; }

.drawing-fullscreen-viewer .drawing-ai-controls {
  grid-row: 2;
  color: var(--ink);
}

.drawing-fullscreen-viewer .drawing-workspace-grid {
  grid-row: 3;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-height: none;
  height: 100%;
  overflow: hidden;
  background: #10161b;
}

.drawing-fullscreen-viewer .drawing-stage {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  contain: layout size;
  background-color: #242b31;
  background-image: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.drawing-fullscreen-viewer .drawing-pan-canvas {
  position: relative;
  flex: none;
  min-width: 100%;
  min-height: 100%;
}

.drawing-fullscreen-viewer .drawing-page-surface {
  position: absolute;
  margin: 0;
  transition: none;
  will-change: transform;
}

.drawing-fullscreen-viewer.viewer-controls-hidden {
  grid-template-rows: 0 0 minmax(0, 1fr) 0;
}

.drawing-fullscreen-viewer.viewer-controls-hidden > .drawing-viewer-header,
.drawing-fullscreen-viewer.viewer-controls-hidden > .drawing-ai-controls,
.drawing-fullscreen-viewer.viewer-controls-hidden > .drawing-viewer-bottom-stack,
.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-markup-toolbar,
.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-tool-flyout,
.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-object-actions {
  visibility: hidden;
  min-height: 0;
  padding-block: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-routing-panel {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.drawing-fullscreen-viewer.viewer-controls-hidden > .drawing-viewer-bottom-stack {
  border: 0;
  transform: translateY(8px);
}

.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-workspace-grid {
  grid-template-columns: 0 minmax(0, 1fr) 0;
}

.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-sheet-panel,
.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-properties-panel {
  display: none;
}

.drawing-markup-toolbar {
  position: absolute;
  z-index: 2410;
  top: calc(env(safe-area-inset-top, 0px) + 76px);
  left: calc(env(safe-area-inset-left, 0px) + 10px);
  display: grid;
  gap: 5px;
  max-height: calc(100dvh - 160px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  padding: 7px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(17,24,29,.94);
  box-shadow: 0 8px 28px rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
}

.drawing-markup-toolbar .drawing-tool {
  display: grid;
  grid-template-columns: 30px;
  place-items: center;
  min-width: 48px;
  min-height: 48px;
  padding: 5px;
  color: #fff;
  border-color: rgba(255,255,255,.14);
  background: transparent;
}

.drawing-markup-toolbar .drawing-tool span { font-size: 1rem; font-weight: 950; }
.drawing-markup-toolbar .drawing-tool small { font-size: .55rem; color: #cbd7dd; }
.drawing-markup-toolbar .drawing-tool.active { color: #071316; border-color: #43d5e8; background: #43d5e8; }
.drawing-markup-toolbar .drawing-tool.active small { color: #071316; }

.drawing-current-color {
  display: block;
  width: 21px;
  height: 21px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--current-color);
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
}

.drawing-tool-flyout {
  position: absolute;
  z-index: 2425;
  top: calc(env(safe-area-inset-top, 0px) + 122px);
  left: calc(env(safe-area-inset-left, 0px) + 78px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: min(310px, calc(100vw - 96px));
  padding: 9px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 11px;
  background: rgba(17,24,29,.97);
  box-shadow: 0 8px 28px rgba(0,0,0,.42);
}
.drawing-tool-flyout label { display: grid; gap: 3px; min-width: 92px; font-size: .72rem; font-weight: 850; }
.drawing-tool-flyout select,
.drawing-tool-flyout input { width: 100%; min-height: 36px; }
.drawing-color-flyout { width: auto; max-width: 210px; }
.drawing-color-choice {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  background: var(--choice-color);
}
.drawing-color-choice.active { border-color: #43d5e8; box-shadow: 0 0 0 2px #fff; }

.drawing-object-actions {
  position: absolute;
  z-index: 2440;
  display: flex;
  gap: 4px;
  max-width: calc(100vw - 16px);
  padding: 5px;
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  background: rgba(15,23,29,.97);
  box-shadow: 0 7px 24px rgba(0,0,0,.45);
}
.drawing-object-actions[hidden] { display: none; }
.drawing-object-actions button {
  min-height: 40px;
  padding: 7px 10px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 7px;
  background: #27343d;
  white-space: nowrap;
  font-weight: 850;
}
.drawing-object-actions button.danger { background: #8f1d2c; }

.drawing-object-modal-overlay {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4,9,12,.72);
}
.drawing-object-modal {
  display: grid;
  gap: 12px;
  width: min(430px, 100%);
  max-height: 86dvh;
  padding: 20px;
  overflow: auto;
  color: var(--ink);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0,0,0,.5);
}
.drawing-object-modal p { margin: 0; color: var(--muted); }
.drawing-object-modal label { display: grid; gap: 5px; font-weight: 850; }
.drawing-object-modal select { width: 100%; min-height: 46px; }

.drawing-ai-selection rect {
  fill: rgba(0,184,212,.16);
  stroke: #00b8d4;
  stroke-width: 3;
  stroke-dasharray: 10 6;
  cursor: pointer;
  pointer-events: all;
}

.drawing-ai-selection text {
  fill: #00788c;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  pointer-events: none;
}

.drawing-ai-selection.selected rect { fill: rgba(0,184,212,.27); stroke-width: 5; }
.drawing-ai-selection.status-approved rect { stroke: #1f9d55; fill: rgba(31,157,85,.16); }
.drawing-ai-selection.status-failed rect { stroke: #d1293d; fill: rgba(209,41,61,.12); }

.drawing-conduit-route { cursor: pointer; }
.drawing-conduit-route-line { stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(255,255,255,.7)); }
.drawing-conduit-route.status-ai_suggested .drawing-conduit-route-line,
.drawing-conduit-route.status-needs_review .drawing-conduit-route-line { opacity: .7; stroke-dasharray: 9 6; }
.drawing-conduit-route.selected .drawing-conduit-route-line { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 6px #43d5e8); }
.drawing-conduit-route-hit,
.drawing-route-node-hit { pointer-events: stroke; cursor: pointer; }
.drawing-route-node { cursor: grab; }
.drawing-route-node:active { cursor: grabbing; }
.drawing-route-label rect { fill: rgba(255,255,255,.93); stroke: rgba(17,24,39,.5); stroke-width: 1; vector-effect: non-scaling-stroke; }
.drawing-route-label text { fill: #111827; font-weight: 800; pointer-events: none; }
.drawing-route-point-handle { fill: #fff; stroke: #087f95; stroke-width: 2; cursor: grab; pointer-events: all; }
.drawing-route-preview { stroke-linecap: round; stroke-linejoin: round; }

.drawing-routing-panel {
  position: absolute;
  z-index: 2432;
  right: max(72px, calc(env(safe-area-inset-right, 0px) + 72px));
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 10px;
  width: min(680px, calc(100vw - 166px));
  max-height: min(52dvh, 520px);
  padding: 12px;
  overflow: auto;
  color: var(--ink);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 13px;
  background: rgba(248,251,252,.98);
  box-shadow: 0 14px 38px rgba(0,0,0,.48);
  transition: opacity .14s ease, transform .14s ease, visibility 0s linear .14s;
}
.drawing-routing-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawing-routing-panel-head > div { display: grid; gap: 2px; }
.drawing-routing-panel-head b { font-size: 1rem; }
.drawing-routing-panel-head small { color: var(--muted); }
.drawing-routing-panel-head > button { min-width: 40px; min-height: 40px; border-radius: 8px; }
.drawing-routing-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.drawing-routing-fields label { display: grid; gap: 4px; color: var(--muted); font-size: .75rem; font-weight: 850; }
.drawing-routing-fields input,
.drawing-routing-fields select { width: 100%; min-width: 0; min-height: 42px; }
.drawing-routing-fields select[multiple] { min-height: 92px; }
.drawing-routing-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.drawing-route-length { display: grid; gap: 3px; padding: 8px; border-radius: 8px; background: #eaf2f4; }
.drawing-route-label-toggle { display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: 7px; }
.drawing-route-label-toggle input { width: 20px; min-height: 20px; }
.command-studio-routing-drawer .drawing-routing-panel {
  position: static;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: 100%;
  max-height: none;
  padding: 10px;
  border-color: var(--line);
  box-shadow: none;
}
.command-studio-routing-drawer .drawing-route-filters {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
}
.command-studio-routing-drawer .drawing-route-filters > summary {
  min-height: 42px;
  cursor: pointer;
  font-weight: 850;
}

.drawing-viewer-bottom-stack {
  grid-row: 4;
  position: relative;
  z-index: 2408;
  min-width: 0;
  background: #151b20;
  border-top: 1px solid rgba(255,255,255,.12);
}

.drawing-viewer-bottom-controls {
  display: grid;
  grid-template-columns: 70px minmax(0, 360px) 70px;
  justify-content: center;
  gap: 12px;
  min-height: 68px;
  padding: 8px max(12px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
  background: #151b20;
}

.drawing-viewer-bottom-controls button {
  min-height: 48px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  background: #263039;
  font-size: 1.7rem;
  font-weight: 950;
}

.drawing-viewer-bottom-controls .drawing-selection-build-button {
  padding: 8px 16px;
  background: #0b6b82;
  font-size: .92rem;
}

.drawing-viewer-bottom-controls button:disabled { opacity: .35; }

.drawing-ai-review-dock {
  width: 100%;
  min-width: 0;
  color: #f7fbfd;
  background: #1b252c;
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 -9px 28px rgba(0,0,0,.2);
}

.drawing-ai-review-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  width: min(100%, 980px);
  min-height: 54px;
  margin: 0 auto;
  padding: 10px max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  color: inherit;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-x;
}

.drawing-ai-review-toggle:focus-visible {
  outline: 2px solid #63d9ea;
  outline-offset: -3px;
}

.drawing-ai-review-handle {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  transform: translateX(-50%);
}

.drawing-ai-review-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #0b6b82;
  color: #fff;
  font-size: .78rem;
  font-weight: 950;
}

.drawing-ai-review-summary { display: grid; min-width: 0; gap: 1px; }
.drawing-ai-review-summary b { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.drawing-ai-review-summary small { overflow: hidden; color: #c9d5dc; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.drawing-ai-review-chevron { padding-inline: 4px; color: #d9f7fb; font-size: .84rem; }
.drawing-ai-review-dock.state-ready .drawing-ai-review-icon,
.drawing-ai-review-dock.state-approved .drawing-ai-review-icon { background: #1f7a4c; }
.drawing-ai-review-dock.state-failed .drawing-ai-review-icon { background: #a92135; }

.drawing-ai-review-progress {
  width: 44px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
}

.drawing-ai-review-progress i {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: #63d9ea;
  animation: drawing-ai-review-progress 1.15s ease-in-out infinite alternate;
}

@keyframes drawing-ai-review-progress {
  from { transform: translateX(0); }
  to { transform: translateX(125%); }
}

.drawing-ai-review-sheet {
  box-sizing: border-box;
  width: min(100%, 980px);
  max-height: min(50dvh, 620px);
  margin: 0 auto;
  padding: 4px max(14px, env(safe-area-inset-right, 0px)) 14px max(14px, env(safe-area-inset-left, 0px));
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--ink);
  background: #f5f8fa;
  scrollbar-gutter: stable;
}

.drawing-ai-review-sheet[hidden] { display: none; }
.drawing-ai-review-dock.expanded .drawing-ai-review-toggle { background: #202d35; }
.drawing-ai-review-sheet .drawing-ai-selection-review { padding-top: 9px; }

.drawing-ai-selection-review { display: grid; gap: 10px; }
.drawing-ai-selection-help { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
.drawing-ai-selection-help p { margin-bottom: 0; color: var(--muted); }
.drawing-ai-run-status { padding: 10px; border-radius: 9px; background: #e9f4fb; }
.drawing-ai-run-status p { margin: 4px 0 0; }
.drawing-ai-facts,
.drawing-ai-tasks { display: grid; gap: 7px; }
.drawing-ai-facts article,
.drawing-ai-tasks article { padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.drawing-ai-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.drawing-ai-review-grid label,
.drawing-ai-tasks label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.drawing-ai-review-grid input,
.drawing-ai-tasks input,
.drawing-ai-tasks textarea { width: 100%; min-width: 0; }
.drawing-ai-facts p,
.drawing-ai-tasks p { margin: 4px 0; }
.drawing-ai-facts small,
.drawing-ai-tasks small { color: var(--muted); }

@media (max-width: 900px) {
  .drawing-fullscreen-viewer .drawing-viewer-header {
    flex-direction: row;
    align-items: center;
  }
  .drawing-fullscreen-viewer .drawing-workspace-grid {
    display: block;
    position: relative;
  }

  .drawing-fullscreen-viewer .drawing-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .drawing-fullscreen-viewer .drawing-sheet-panel {
    display: none;
  }

  .drawing-fullscreen-viewer .drawing-properties-panel {
    position: absolute;
    z-index: 2420;
    right: 8px;
    bottom: 8px;
    display: none;
    width: min(92vw, 390px);
    max-height: min(70vh, 620px);
    overflow: auto;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,.42);
  }

  .drawing-fullscreen-viewer .drawing-properties-panel.open { display: block; }
  .drawing-sheet-identity p { max-width: 42vw; }
}

@media (max-width: 540px) {
  .drawing-viewer-header { flex-direction: row; align-items: center; gap: 5px; padding-inline: 6px; }
  .drawing-header-actions .drawing-icon-button:nth-child(2),
  .drawing-header-actions .drawing-icon-button:nth-child(6) { display: none; }
  .drawing-icon-button { min-width: 40px; min-height: 40px; }
  .drawing-sheet-identity h3 { font-size: .88rem; }
  .drawing-sheet-identity p { max-width: 36vw; font-size: .68rem; }
  .drawing-markup-toolbar { right: calc(env(safe-area-inset-right, 0px) + 6px); left: auto; max-height: calc(100dvh - 152px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .drawing-markup-toolbar .drawing-tool { min-width: 46px; min-height: 46px; }
  .drawing-tool-flyout { right: calc(env(safe-area-inset-right, 0px) + 64px); left: auto; }
  .drawing-viewer-bottom-controls { grid-template-columns: 54px minmax(0,1fr) 54px; gap: 7px; }
  .drawing-ai-review-toggle { grid-template-columns: 32px minmax(0,1fr) auto; gap: 8px; min-height: 52px; padding-inline: 10px; }
  .drawing-ai-review-progress { display: none; }
  .drawing-ai-review-sheet { max-height: 48dvh; padding-inline: 10px; }
  .drawing-ai-review-grid { grid-template-columns: 1fr; }
  .drawing-routing-panel { right: calc(env(safe-area-inset-right, 0px) + 60px); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: calc(100vw - 68px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); max-height: 46dvh; padding: 10px; }
  .drawing-routing-fields { grid-template-columns: 1fr 1fr; }
  .drawing-routing-fields label:nth-last-child(1) { grid-column: 1 / -1; }
}

@media (orientation: landscape) and (max-height: 620px) {
  .drawing-viewer-bottom-stack { min-height: 56px; }
  .drawing-viewer-bottom-controls { min-height: 56px; padding-block: 4px; }
  .drawing-ai-review-dock {
    position: absolute;
    right: 64px;
    bottom: 100%;
    left: 64px;
    width: auto;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.14);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
  }
  .drawing-ai-review-toggle { min-height: 46px; padding-block: 8px 5px; }
  .drawing-ai-review-sheet { max-height: 36dvh; }
  .drawing-routing-panel { bottom: 61px; max-height: 44dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .drawing-ai-review-progress i { animation: none; width: 100%; }
}

.drawing-fullscreen-viewer.viewer-controls-hidden .drawing-properties-panel.open {
  display: none;
}

.linked-note-modal {
  width: min(920px, calc(100vw - 24px));
  max-height: 92dvh;
  overflow: auto;
}

/* Dedicated Print Viewer -------------------------------------------------- */
body.print-viewer-open {
  overflow: hidden;
  overscroll-behavior: none;
  background: #171a1d;
}

body.command-studio-open { background: #171a1d; }

body.print-viewer-open #app {
  min-height: 100dvh;
}

.print-viewer-shell {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  color: #f4f7f8;
  background: #171a1d;
}

.print-viewer-header {
  z-index: 20;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: max(5px, env(safe-area-inset-top)) 10px 5px;
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: rgba(22, 26, 29, .96);
  box-shadow: 0 5px 18px rgba(0,0,0,.3);
}

.viewer-icon-button,
.viewer-close-button,
.viewer-toolbar-toggle,
.print-viewer-footer button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-weight: 900;
  cursor: pointer;
}

.viewer-sheet-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 3px 6px;
  text-align: left;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.viewer-sheet-identity strong,
.viewer-sheet-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-sheet-identity strong { font-size: .96rem; }
.viewer-sheet-identity span { color: #b8c3c9; font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; }

.viewer-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.viewer-header-actions .viewer-icon-button { padding: 4px 7px; font-size: .72rem; }
.viewer-index-back { display: grid; place-items: center; gap: 0; width: 48px; padding: 2px; line-height: 1; }
.viewer-index-back span { font-size: 1rem; }
.viewer-index-back small { font-size: .52rem; font-weight: 850; }

.drawing-save-status {
  min-width: 48px;
  color: #9de5b9;
  font-size: .7rem;
  font-weight: 900;
  text-align: right;
}

.drawing-save-status.status-saving-,
.drawing-save-status.status-retrying- { color: #ffd77b; }
.drawing-save-status.status-save-failed { color: #ff9f9f; }

.viewer-old-revision {
  z-index: 19;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 38px;
  padding: 5px 10px;
  color: #2c2100;
  background: #ffd66b;
  font-size: .73rem;
  letter-spacing: .04em;
}

.viewer-old-revision button {
  min-height: 30px;
  border: 1px solid #6b5100;
  border-radius: 6px;
  background: #fff8dc;
  color: #443400;
  font-weight: 900;
}

.print-viewport-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.professional-drawing-stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  background-color: #282d31;
  background-image: radial-gradient(circle at center, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 18px 18px;
  scrollbar-color: #6c777d #252a2e;
}

.professional-drawing-stage .drawing-page-surface {
  margin: 18px auto;
  will-change: transform;
  box-shadow: 0 10px 38px rgba(0,0,0,.58);
}

.viewer-markup-toolbar {
  position: absolute;
  z-index: 15;
  top: 50%;
  right: max(8px, env(safe-area-inset-right));
  display: flex;
  align-items: stretch;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(23,27,30,.94);
  box-shadow: 0 7px 25px rgba(0,0,0,.42);
}

.viewer-markup-tools {
  display: grid;
  max-height: min(76dvh, 650px);
  padding: 4px;
  overflow-y: auto;
}

.viewer-toolbar-toggle {
  min-width: 26px;
  width: 26px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.12);
  border-radius: 9px 0 0 9px;
}

.viewer-markup-tool {
  display: grid;
  place-items: center;
  width: 50px;
  min-height: 46px;
  padding: 3px 2px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #f0f4f5;
  background: transparent;
  cursor: pointer;
}

.viewer-markup-tool span { font-size: 1.05rem; line-height: 1; }
.viewer-markup-tool small { font-size: .57rem; line-height: 1.05; }
.viewer-markup-tool.active { border-color: #69a9ff; color: #fff; background: #1456a9; }
.viewer-markup-tool:disabled { opacity: .38; cursor: not-allowed; }

.toolbar-collapsed .viewer-markup-tools { display: none; }
.toolbar-collapsed .viewer-toolbar-toggle { width: 48px; min-width: 48px; border-right: 0; border-radius: 9px; font-size: 1.1rem; }

.print-viewer-footer {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 54px;
  padding: 5px max(8px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border-top: 1px solid rgba(255,255,255,.13);
  background: rgba(22,26,29,.96);
}

.command-studio-footer {
  position: relative;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.command-studio-tools,
.command-studio-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.command-studio-tool {
  min-width: 52px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: #f4f7f8;
  background: rgba(255,255,255,.06);
  font-size: .71rem;
  font-weight: 850;
}

.command-studio-tool.active { border-color: #73b3ff; background: #1456a9; }
.command-studio-tool:disabled { opacity: .45; cursor: not-allowed; }
.command-studio-tool-count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; color: #12334b; background: #bde3ff; font-size: .62rem; }

.tool-place_symbol .drawing-markup-overlay,
.tool-move_symbol .drawing-markup-overlay,
.tool-freehand .drawing-markup-overlay,
.tool-highlighter .drawing-markup-overlay,
.tool-text_box .drawing-markup-overlay,
.tool-arrow .drawing-markup-overlay,
.tool-callout .drawing-markup-overlay,
.tool-rectangle .drawing-markup-overlay,
.tool-ellipse .drawing-markup-overlay,
.tool-cloud .drawing-markup-overlay,
.tool-polyline .drawing-markup-overlay,
.tool-capture_region .drawing-markup-overlay,
.tool-move_markup .drawing-markup-overlay,
.tool-measure_length .drawing-markup-overlay,
.tool-measure_path .drawing-markup-overlay,
.tool-measure_area .drawing-markup-overlay,
.tool-measure_perimeter .drawing-markup-overlay,
.tool-measure_count .drawing-markup-overlay,
.tool-calibrate .drawing-markup-overlay { cursor: crosshair; }

.tool-eraser .drawing-markup-overlay { cursor: not-allowed; }
.command-studio-markup,
.command-studio-measurement { cursor: pointer; }
.command-studio-markup.selected > :first-child,
.command-studio-measurement.selected > :first-child { filter: drop-shadow(0 0 4px rgba(20,98,218,.72)); }

.command-studio-m3-drawer { width: min(378px, calc(100vw - 16px)); }
.command-studio-m3-panel { display: grid; gap: 14px; padding: 12px; }
.command-studio-m3-panel > section { display: grid; gap: 7px; }
.command-studio-m3-panel h4 { margin: 0; color: #39535f; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.command-studio-m3-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.command-studio-m3-grid button,
.command-studio-scale-summary button { min-height: 42px; padding: 6px 8px; border: 1px solid #c5d2d8; border-radius: 7px; color: #24495d; background: #fff; font-size: .76rem; font-weight: 850; text-align: left; }
.command-studio-m3-grid button.active { border-color: #1462da; color: #fff; background: #1456a9; }
.command-studio-electrical-types { grid-template-columns: repeat(3, minmax(0,1fr)); }
.command-studio-electrical-types button { min-height: 38px; font-size: .68rem; }
.command-studio-scale-summary { grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 10px; border: 1px solid #b9d3d8; border-radius: 9px; color: #24515b; background: #ecf7f7; }
.command-studio-scale-summary b { font-size: .8rem; }
.command-studio-scale-summary span { grid-column: 1; color: #54707a; font-size: .73rem; line-height: 1.3; }
.command-studio-scale-summary button { grid-column: 2; grid-row: 1 / span 2; min-height: 34px; color: #075f6a; background: #fff; }
.command-studio-tool-list,
.command-studio-markups-list { display: grid; gap: 7px; }
.command-studio-tool-list button,
.command-studio-list-row { display: grid; gap: 3px; width: 100%; padding: 9px; border: 1px solid #d1dce1; border-radius: 8px; color: #2d4653; background: #fff; text-align: left; }
.command-studio-tool-list button:hover,
.command-studio-list-row:hover { border-color: #1462da; box-shadow: 0 0 0 2px rgba(20,98,218,.1); }
.command-studio-tool-list span,
.command-studio-list-row span { color: #59707d; font-size: .75rem; }
.command-studio-tool-list small,
.command-studio-list-row small { color: #6a7d87; font-size: .69rem; line-height: 1.25; }

.command-studio-symbol-highlight { cursor: pointer; }
.command-studio-symbol-highlight.selected rect:first-child { filter: drop-shadow(0 0 4px rgba(20,98,218,.72)); }
.command-studio-symbol-highlight.status-rejected { opacity: .4; }
.symbol-object-highlight { transition: filter .12s ease, opacity .12s ease; }

.command-studio-symbol-picker,
.command-studio-symbol-filters { display: grid; gap: 12px; padding: 12px; }
.command-studio-symbol-picker > section,
.command-studio-symbol-filters > section { display: grid; gap: 7px; }
.command-studio-symbol-picker h4,
.command-studio-symbol-filters h4 { display: flex; align-items: center; gap: 7px; margin: 2px 0 0; color: #29414d; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.command-studio-symbol-picker h4 i { width: 9px; height: 9px; border-radius: 50%; background: var(--symbol-category-color); }
.command-studio-symbol-count { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 9px; border: 1px solid #cfdae0; border-radius: 9px; color: #38505d; background: #f2f7f9; }
.command-studio-symbol-count b { color: #0e579e; font-size: 1.2rem; }
.command-studio-symbol-count span { font-size: .76rem; font-weight: 800; }
.command-studio-symbol-count button { min-height: 32px; border: 1px solid #9eb1bb; border-radius: 6px; color: #164d73; background: #fff; font-size: .72rem; font-weight: 850; }
.command-studio-symbol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.command-studio-symbol-grid button { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; min-height: 46px; gap: 7px; padding: 5px; border: 1px solid #d2dce1; border-radius: 7px; color: #263b46; background: #fff; text-align: left; }
.command-studio-symbol-grid button:hover,
.command-studio-symbol-grid button.active { border-color: #1462da; box-shadow: 0 0 0 2px rgba(20,98,218,.14); }
.command-studio-symbol-grid button > span { display: grid; place-items: center; width: 34px; height: 30px; border-radius: 6px; color: #fff; background: var(--symbol-color); font-size: .58rem; font-weight: 950; }
.command-studio-symbol-grid b { min-width: 0; font-size: .71rem; line-height: 1.1; }
.command-studio-symbol-filters label { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; min-height: 36px; gap: 7px; border-bottom: 1px solid #e2e8eb; font-size: .8rem; }
.command-studio-symbol-filters input { width: 18px; height: 18px; }
.command-studio-symbol-filters label b { color: #0e579e; }
.command-studio-symbol-filters select { min-height: 40px; padding: 6px; border: 1px solid #bdcbd2; border-radius: 7px; background: #fff; }
.command-studio-symbol-properties .section-title { align-items: start; }
.command-studio-symbol-tabs { position: sticky; z-index: 1; top: 58px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 8px; border-bottom: 1px solid #ccd8de; background: rgba(246,248,249,.98); }
.command-studio-symbol-tabs button { min-height: 42px; padding: 5px 3px; border: 1px solid #c5d1d7; border-radius: 7px; color: #34505e; background: #fff; font-size: .68rem; font-weight: 850; line-height: 1.15; }
.command-studio-symbol-tabs button.active { border-color: #1462da; color: #fff; background: #1456a9; }
.command-studio-symbol-mode { display: grid; gap: 12px; padding: 12px; }
.symbol-mode-callout { padding: 11px; border: 1px solid #bad0dc; border-radius: 9px; background: #edf6fa; }
.symbol-mode-callout p { margin: 5px 0 0; color: #435e6c; font-size: .8rem; line-height: 1.35; }
.command-studio-teach-ai ol { display: grid; gap: 7px; margin: 0; padding-left: 24px; color: #43535c; font-size: .82rem; }
.symbol-primary-action { min-height: 48px; }
.command-studio-template-form .field { margin: 0; }
.command-studio-template-form [data-new-template-fields] { display: grid; gap: 10px; }
.command-studio-template-form [data-new-template-fields][hidden] { display: none; }
.template-preview { display: grid; place-items: center; min-height: 130px; padding: 8px; border: 1px dashed #9bb0bb; border-radius: 9px; background: #fff; color: #60717a; text-align: center; }
.template-preview img { max-width: 100%; max-height: 190px; object-fit: contain; image-rendering: auto; }
.saved-symbol-templates > section { display: grid; gap: 8px; }
.saved-symbol-templates > section > h4 { margin: 0; color: #526772; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.saved-symbol-group { display: grid; gap: 9px; padding: 10px; border: 1px solid #ced9de; border-radius: 9px; background: #fff; }
.saved-symbol-group.disabled { opacity: .72; background: #eef1f2; }
.saved-symbol-group > div:first-child { display: grid; gap: 3px; }
.saved-symbol-group small { color: #637681; font-size: .72rem; }
.saved-symbol-group p { margin: 2px 0; color: #4c606a; font-size: .78rem; }
.saved-symbol-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.saved-symbol-actions button,.detected-symbol .actions button,.saved-template-examples button { min-height: 38px; padding: 5px 9px; border: 1px solid #b9c7ce; border-radius: 6px; color: #264b60; background: #f7fafb; font-size: .72rem; font-weight: 850; }
.saved-symbol-actions button.danger,.detected-symbol .actions button.danger,.saved-template-examples button.danger { color: #9d2631; }
.saved-symbol-group details summary { min-height: 38px; padding: 8px 0; cursor: pointer; font-weight: 800; }
.saved-template-examples { display: grid; gap: 6px; }
.saved-template-examples article { display: grid; grid-template-columns: 48px minmax(0,1fr) auto auto; align-items: center; gap: 6px; padding: 6px; border: 1px solid #dde5e9; border-radius: 7px; }
.saved-template-examples img { width: 48px; height: 42px; border: 1px solid #d7e0e4; border-radius: 5px; object-fit: contain; background: #fff; }
.saved-template-examples span { display: grid; min-width: 0; font-size: .76rem; font-weight: 800; }
.detected-symbol-list { gap: 8px; }
.detected-symbol { display: grid; gap: 7px; padding: 9px; border: 1px solid #cfd9de; border-left: 4px solid #8e44ad; border-radius: 8px; background: #fff; }
.detected-symbol.approved,.detected-symbol.corrected,.detected-symbol.user_added { border-left-color: #238b57; }
.detected-symbol.rejected,.detected-symbol.deleted { border-left-color: #aab4b9; opacity: .68; }
.detected-symbol-main { display: grid; gap: 3px; width: 100%; padding: 0; border: 0; color: #263b46; background: transparent; text-align: left; }
.detected-symbol-main span { color: #60717a; font-size: .74rem; }
.detected-symbol .actions { display: flex; flex-wrap: wrap; gap: 5px; }

@media (max-width: 520px) {
  .command-studio-symbol-drawer,
  .command-studio-m3-drawer,
  .command-studio-overlay-drawer { top: auto; right: 6px !important; bottom: 6px; left: 6px; width: auto; max-height: min(72dvh,660px); }
  .command-studio-symbol-tabs { top: 58px; }
  .saved-template-examples article { grid-template-columns: 44px minmax(0,1fr) auto; }
  .saved-template-examples article button.danger { grid-column: 2 / -1; }
  .command-studio-electrical-types { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.print-viewer-footer button:disabled { opacity: .32; }
.print-viewer-footer #drawing-zoom-label { min-width: 48px; color: #fff; }
.viewer-sheet-position { min-width: 72px !important; }

.viewer-chrome {
  transition: opacity .18s ease, transform .18s ease;
}

.controls-hidden .print-viewer-header { transform: translateY(-105%); opacity: 0; pointer-events: none; }
.controls-hidden .viewer-old-revision { transform: translateY(-160%); opacity: 0; pointer-events: none; }
.controls-hidden .print-viewer-footer { transform: translateY(105%); opacity: 0; pointer-events: none; }
.controls-hidden .viewer-markup-toolbar { transform: translate(120%, -50%); opacity: 0; pointer-events: none; }
.viewer-overlay-filters{position:absolute;z-index:14;top:8px;left:50%;width:min(720px,calc(100% - 130px));border:1px solid rgba(255,255,255,.18);border-radius:10px;transform:translateX(-50%);background:rgba(246,248,249,.96);box-shadow:0 5px 18px rgba(0,0,0,.28)}
.viewer-overlay-filters .drawing-ai-legend{display:none}.controls-hidden .viewer-overlay-filters{transform:translate(-50%,-150%);opacity:0;pointer-events:none}

.print-viewer-drawer {
  position: absolute;
  z-index: 25;
  top: 8px;
  bottom: 8px;
  width: min(390px, calc(100vw - 20px));
  overflow: auto;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  color: #182126;
  background: #f6f8f9;
  box-shadow: 0 12px 42px rgba(0,0,0,.5);
}

.print-viewer-drawer.drawer-left { left: max(8px, env(safe-area-inset-left)); }
.print-viewer-drawer.drawer-right { right: max(8px, env(safe-area-inset-right)); }

.viewer-drawer-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 58px;
  padding: 8px 10px;
  color: #fff;
  background: #172d39;
}

.viewer-drawer-head > div { display: grid; }
.viewer-drawer-head small { color: #c2d0d7; }
.viewer-drawer-head button { width: 44px; min-height: 44px; border: 0; border-radius: 8px; color: #fff; background: rgba(255,255,255,.1); font-size: 1.4rem; }

.viewer-sheet-picker { padding-bottom: 20px; }
.viewer-sheet-picker button { min-height: 82px; }
.viewer-sheet-picker em { grid-column: 1; color: #567; font-size: .65rem; font-style: normal; font-weight: 900; }

.studio-sheet-tree { display: grid; gap: 10px; padding: 10px; }
.studio-print-group { overflow: hidden; border: 1px solid #ccd7dc; border-radius: 10px; background: #fff; }
.studio-print-group > header { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 8px; padding: 9px 10px; background: #e9eff2; }
.studio-print-group > header div { display: grid; min-width: 0; }
.studio-print-group > header b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.studio-print-group > header small { color: #5c6e77; }
.studio-print-file-icon { display: grid; place-items: center; width: 34px; height: 28px; border-radius: 5px; color: #fff; background: #a82b3b; font-size: .65rem; font-weight: 950; }
.studio-print-group > button { position: relative; width: 100%; border: 0; border-top: 1px solid #e1e7ea; border-radius: 0; background: #fff; }
.studio-print-group > button.active { background: #eaf3ff; box-shadow: inset 4px 0 #1462da; }
.studio-sheet-page-badge { grid-column: 2; grid-row: 1 / span 3; align-self: center; justify-self: end; display: grid; place-items: center; width: 32px; height: 40px; border: 1px solid #aebcc3; border-radius: 4px; color: #52636b; background: #f9fbfc; font-size: .7rem; font-weight: 900; }

.command-studio-index-shell { grid-template-rows: auto minmax(0,1fr); background: #1d2226; }
.command-studio-index-header { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 12px; min-height: 82px; padding: max(10px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left)); border-bottom: 1px solid rgba(255,255,255,.13); background: #171b1f; box-shadow: 0 4px 18px rgba(0,0,0,.3); }
.command-studio-index-header > div { display: grid; gap: 1px; min-width: 0; }
.command-studio-index-header span { color: #79b6ff; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.command-studio-index-header h1 { margin: 0; color: #fff; font-size: 1.42rem; line-height: 1.1; }
.command-studio-index-header small { overflow: hidden; color: #b8c3c9; text-overflow: ellipsis; white-space: nowrap; }
.command-studio-index-body { min-height: 0; padding: 14px max(14px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left)); overflow: auto; }
.studio-index-warning { max-width: 1120px; margin: 0 auto 12px; padding: 10px 12px; border: 1px solid #d59745; border-radius: 9px; color: #fff0d5; background: #49341f; font-size: .82rem; font-weight: 750; }
.command-studio-index-search { position: sticky; z-index: 3; top: -14px; display: grid; gap: 5px; max-width: 760px; margin: 0 auto 14px; padding: 12px 0; background: linear-gradient(#1d2226 82%,transparent); color: #d7e1e6; font-size: .72rem; font-weight: 850; }
.command-studio-index-search input { width: 100%; min-height: 48px; padding: 9px 13px; border: 1px solid #64727a; border-radius: 10px; color: #fff; background: #272e33; font-size: 1rem; outline: none; }
.command-studio-index-search input:focus { border-color: #79b6ff; box-shadow: 0 0 0 3px rgba(75,151,242,.18); }
.command-studio-drawing-sets { display: grid; gap: 14px; max-width: 1120px; margin: 0 auto; }
.command-studio-drawing-set { overflow: hidden; border: 1px solid #465058; border-radius: 13px; background: #252b30; }
.command-studio-drawing-set-head { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; width: 100%; min-height: 68px; padding: 9px 14px; border: 0; color: #fff; background: #20262b; text-align: left; cursor: pointer; }
.command-studio-drawing-set-head > span { font-size: 1.5rem; }
.command-studio-drawing-set-head > div { display: grid; }
.command-studio-drawing-set-head b { font-size: 1.02rem; }
.command-studio-drawing-set-head small { color: #b9c4ca; }
.command-studio-drawing-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 12px; }
.studio-drawing-card { position: relative; display: grid; grid-template-columns: 118px minmax(0,1fr) 30px; align-items: center; gap: 13px; min-width: 0; min-height: 144px; padding: 12px; border: 1px solid #454f56; border-radius: 11px; color: #f5f7f8; background: #1c2125; box-shadow: 0 3px 12px rgba(0,0,0,.22); text-align: left; cursor: pointer; }
.studio-drawing-card[hidden],.command-studio-drawing-set[hidden],.studio-overlay-picker-list [data-overlay-picker-set][hidden] { display: none !important; }
.studio-drawing-card:hover,.studio-drawing-card:focus-visible,.studio-drawing-card.highlighted { border-color: #5c9eea; box-shadow: 0 0 0 2px rgba(73,145,231,.17),0 4px 16px rgba(0,0,0,.25); }
.studio-drawing-card.active { border-color: #79b6ff; box-shadow: inset 4px 0 #2f80ed; }
.studio-drawing-card.source-missing { border-color: #7c6767; cursor: not-allowed; opacity: .82; }
.studio-drawing-card.source-missing:hover { border-color: #7c6767; box-shadow: 0 3px 12px rgba(0,0,0,.22); }
.studio-drawing-thumbnail { position: relative; display: grid; place-items: center; width: 118px; height: 112px; overflow: hidden; border: 1px solid #5e6970; border-radius: 6px; color: #9eabb2; background: #eef1f2; font-size: .7rem; font-weight: 950; }
.studio-drawing-thumbnail canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; background: #fff; }
.studio-drawing-thumbnail.loaded canvas { opacity: 1; }
.studio-drawing-thumbnail.loaded > span { display: none; }
.studio-drawing-thumbnail.failed { background: #31383d; }
.studio-source-missing-icon { display: grid !important; place-items: center; width: 34px; height: 34px; border: 2px solid #b97777; border-radius: 50%; color: #8b2525; background: #fff3f3; font-size: 1.2rem; }
.studio-drawing-copy { display: grid; align-content: center; min-width: 0; gap: 4px; }
.studio-drawing-copy strong { color: #fff; font-size: 1rem; }
.studio-drawing-copy b { overflow: hidden; color: #e0e6e9; font-size: .76rem; line-height: 1.25; text-overflow: ellipsis; text-transform: uppercase; }
.studio-drawing-copy small { overflow: hidden; color: #b7c1c6; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.studio-drawing-copy em { color: #80b8f8; font-size: .68rem; font-style: normal; font-weight: 850; }
.studio-drawing-card.source-missing .studio-drawing-copy em { color: #f2b3b3; }
.studio-drawing-open { justify-self: end; color: #91a0a8; font-size: 1.8rem; }

.command-studio-overlay-drawer { width: min(430px, calc(100vw - 16px)); }
.studio-overlay-panel { display: grid; gap: 12px; padding: 12px; }
.studio-overlay-panel > section { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid #d7e0e4; }
.studio-overlay-panel label { display: grid; gap: 5px; font-size: .76rem; font-weight: 850; }
.studio-overlay-panel select,
.studio-overlay-panel input[type="text"],
.studio-overlay-panel input:not([type]) { width: 100%; min-height: 42px; border: 1px solid #b9c7ce; border-radius: 8px; background: #fff; }
.studio-overlay-add-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.studio-overlay-add-drawings { min-height: 48px; }
.command-studio-overlay-picker-drawer { width: min(540px,calc(100vw - 16px)); }
.studio-overlay-picker { display: grid; min-height: 100%; }
.studio-overlay-picker-base { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; margin: 12px; padding: 11px; border: 1px solid #86afd7; border-radius: 9px; color: #183d58; background: #eaf4ff; }
.studio-overlay-picker-base span { align-self: start; padding: 3px 7px; border-radius: 10px; color: #fff; background: #1462da; font-size: .62rem; font-weight: 950; }
.studio-overlay-picker-base small { grid-column: 1 / -1; color: #587180; }
.studio-overlay-picker .command-studio-index-search { position: static; margin: 0; padding: 0 12px 10px; color: #344f5d; background: none; }
.studio-overlay-picker .command-studio-index-search input { min-height: 44px; border-color: #b9c7ce; color: #1f3039; background: #fff; }
.studio-overlay-picker-list { display: grid; gap: 12px; padding: 0 12px 96px; }
.studio-overlay-picker-list section { display: grid; gap: 7px; }
.studio-overlay-picker-list h4 { margin: 5px 0 0; color: #4b626e; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.studio-overlay-picker .studio-drawing-card { grid-template-columns: 25px 76px minmax(0,1fr) 24px; min-height: 98px; padding: 8px; border-color: #c9d5da; color: #223640; background: #fff; box-shadow: none; }
.studio-overlay-picker .studio-drawing-card input { width: 20px; height: 20px; }
.studio-overlay-picker .studio-drawing-thumbnail { width: 76px; height: 76px; border-color: #c2cdd2; }
.studio-overlay-picker .studio-drawing-copy strong { color: #173a52; }
.studio-overlay-picker .studio-drawing-copy b { color: #2c414c; }
.studio-overlay-picker .studio-drawing-copy small { color: #60727b; }
.studio-drawing-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: transparent; background: #e7ecef; font-size: .72rem; font-weight: 950; }
.studio-drawing-card:has(input:checked) { border-color: #1462da; box-shadow: 0 0 0 2px rgba(20,98,218,.13); }
.studio-drawing-card:has(input:checked) .studio-drawing-check { color: #fff; background: #1462da; }
.studio-drawing-card:has(input:disabled) { opacity: .68; cursor: default; }
.studio-overlay-picker-action { position: sticky; z-index: 4; bottom: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 7px; padding: 10px 12px max(10px,env(safe-area-inset-bottom)); border-top: 1px solid #cbd6db; background: rgba(246,248,249,.97); box-shadow: 0 -6px 18px rgba(25,45,55,.1); }
.studio-overlay-picker-action button { min-height: 48px; }
.studio-overlay-picker-action small { grid-column: 1 / -1; color: #60727b; text-align: center; }
.studio-overlay-layer-list { display: grid; gap: 9px; }
.studio-overlay-layer-card { display: grid; gap: 9px; padding: 10px; border: 1px solid #c9d5da; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(18,45,57,.08); }
.studio-overlay-layer-card > header { display: flex; justify-content: space-between; gap: 8px; }
.studio-overlay-layer-card > header div { display: grid; min-width: 0; }
.studio-overlay-layer-card > header b { font-size: .8rem; }
.studio-overlay-layer-card > header small { color: #60727b; }
.studio-overlay-layer-card > header > button { width: 34px; min-height: 34px; border: 0; border-radius: 7px; background: #edf2f4; }
.studio-overlay-toggle { grid-template-columns: 22px minmax(0,1fr) !important; align-items: center; }
.studio-overlay-toggle input { width: 19px !important; min-height: 19px !important; }
.studio-overlay-layer-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.studio-overlay-layer-actions button { min-height: 38px; border: 1px solid #bdcbd1; border-radius: 7px; background: #f6f8f9; }
.studio-overlay-align-callout { padding: 11px; border: 1px solid #2784c7; border-radius: 9px; background: #e9f5ff; }
.studio-overlay-align-callout p { margin: 5px 0; }
.studio-overlay-align-callout button { margin-top: 7px; }
.studio-overlay-saved h4 { margin: 0; }
.studio-saved-overlay { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.studio-saved-overlay button { min-height: 42px; border: 1px solid #c7d2d7; border-radius: 7px; background: #fff; text-align: left; }
.studio-saved-overlay button:first-child { display: grid; }
.empty.compact { padding: 14px; }
.tool-overlay_align .drawing-markup-overlay { cursor: crosshair; }

.viewer-layer-groups { padding: 8px 12px 20px; }
.viewer-layer-groups section { padding: 8px 0; border-bottom: 1px solid #dce2e5; }
.viewer-layer-groups h4 { margin: 0 0 5px; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.viewer-layer-groups label { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; min-height: 40px; gap: 6px; }
.viewer-layer-groups input { width: 20px; height: 20px; }

.viewer-revision-list,
.viewer-option-list { display: grid; gap: 8px; padding: 12px; }
.viewer-revision-list button,
.viewer-option-list button { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 8px 10px; border: 1px solid #ccd5da; border-radius: 8px; color: #172126; background: #fff; text-align: left; }
.viewer-revision-list button.active { border-color: #1462da; box-shadow: 0 0 0 2px rgba(20,98,218,.15); }
.viewer-revision-list span { display: grid; }
.viewer-revision-list em { color: #0c6a36; font-size: .65rem; font-style: normal; font-weight: 950; }

.viewer-properties-drawer #drawing-properties-content { padding: 12px; }
.viewer-loading-screen,
.viewer-error-screen { grid-template-rows: 1fr; place-items: center; }
.viewer-error-screen section { width: min(560px, calc(100vw - 32px)); padding: 24px; border: 1px solid #4e575c; border-radius: 12px; background: #242a2e; }
.viewer-close-button { position: absolute; top: 10px; left: 10px; }

.print-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px 16px;
}

.print-list-open {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  padding: 0;
  text-align: left;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.print-list-thumbnail {
  display: grid;
  place-items: center;
  width: 96px;
  height: 74px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #617079;
  background: #eef2f4;
  font-size: .72rem;
  font-weight: 950;
}

.print-list-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.print-list-copy { display: grid; align-content: start; min-width: 0; gap: 2px; }
.print-list-sheet { color: #0e579e; font-size: .78rem; font-weight: 950; }
.print-list-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.print-list-meta,
.print-list-row .row-actions { grid-column: 1; }

@media (max-width: 760px) {
  .print-viewer-header { grid-template-columns: 44px minmax(0,1fr) auto; padding-inline: 5px; }
  .viewer-header-actions .drawing-save-status { display: none; }
  .viewer-markup-toolbar { right: 5px; }
  .viewer-markup-tools { max-height: 65dvh; }
  .viewer-markup-tool { width: 46px; min-height: 44px; }
  .professional-drawing-stage .drawing-page-surface { margin: 10px auto; }
  .print-list-row { grid-template-columns: 1fr; }
  .print-list-open { grid-template-columns: 78px minmax(0,1fr); }
  .print-list-thumbnail { width: 78px; height: 66px; }
  .print-list-row .row-actions { grid-column: 1; }
  .print-list-meta { grid-column: 1; }
  .viewer-overlay-filters{top:5px;left:5px;width:calc(100% - 68px);transform:none}.controls-hidden .viewer-overlay-filters{transform:translateY(-150%)}
  .command-studio-footer { justify-content: center; gap: 6px; }
  .command-studio-tools { order: 2; width: 100%; justify-content: space-between; }
  .command-studio-navigation { order: 1; }
  .command-studio-tool { flex: 1 1 0; min-width: 0; padding-inline: 4px; }
  .command-studio-shell .print-viewer-drawer.drawer-left { top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: 72dvh; border-radius: 14px 14px 0 0; }
  .command-studio-index-header { min-height: 76px; padding-inline: 10px; }
  .command-studio-index-body { padding: 10px 8px max(18px,env(safe-area-inset-bottom)); }
  .command-studio-index-search { top: -10px; margin-bottom: 8px; padding-block: 8px; }
  .command-studio-drawing-grid { grid-template-columns: 1fr; gap: 10px; padding: 8px; }
  .studio-drawing-card { grid-template-columns: 104px minmax(0,1fr) 24px; min-height: 128px; padding: 9px; }
  .studio-drawing-thumbnail { width: 104px; height: 104px; }
  .command-studio-shell .command-studio-overlay-picker-drawer { inset: 0 !important; width: 100%; max-height: none; border: 0; border-radius: 0; }
}

/* Command Studio field workflows */
.command-studio-field-drawer{width:min(420px,calc(100vw - 20px))!important}.command-studio-field-panel{display:grid;gap:14px}.studio-field-sheet-summary,.studio-field-actions,.studio-field-compare,.studio-field-rooms{display:grid;gap:9px;padding:11px;border:1px solid #263f56;border-radius:7px;background:#091b2a}.studio-field-system{display:grid;gap:4px}.studio-field-system h4{margin:4px 0 1px;color:#6fb4ff;font-size:10px;text-transform:uppercase;letter-spacing:.06em}.studio-field-system div{display:flex;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px solid #172f44;color:#cad7e2;font-size:10px}.studio-field-system div b{color:#fff}.studio-field-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.studio-field-metrics span{display:grid;gap:2px;padding:7px 3px;border:1px solid #203b52;border-radius:5px;background:#0d2234;color:#8ea4b7;font-size:7px;text-align:center}.studio-field-metrics b{color:#fff;font-size:13px}.studio-field-rooms summary{cursor:pointer;color:#dce8f2;font-size:10px;font-weight:850}.studio-field-rooms article{display:grid;gap:3px;padding:8px 0;border-bottom:1px solid #183147}.studio-field-rooms article>b{font-size:10px}.studio-field-rooms article small{color:#8399ac;font-size:8px}.studio-field-rooms article p{margin:2px 0;color:#bdccd8;font-size:8px;line-height:1.45}.studio-field-rooms article strong{margin-right:5px;color:#71b8ff}.studio-field-actions>label{display:grid;gap:4px;color:#8fa5b8;font-size:8px;font-weight:800}.studio-field-actions select{height:34px;padding:0 8px;border:1px solid #304a61;border-radius:5px;background:#0a1a29;color:#edf5fb}.studio-field-actions .actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.studio-field-actions .actions .btn{min-height:36px;margin:0;font-size:8px}.studio-field-compare>.btn{justify-self:start}.drawing-loading.compact{min-height:70px;font-size:10px}
@media(max-width:520px){.command-studio-field-drawer{right:5px!important;left:5px!important;width:auto!important}.studio-field-metrics{grid-template-columns:1fr 1fr}.studio-field-actions .actions{grid-template-columns:1fr}.studio-field-actions .actions .btn{min-height:42px;font-size:10px}}

@media (max-width: 900px) {
  .print-list-row { grid-template-columns: minmax(0, 1fr); }
  .print-list-row .row-actions,
  .print-list-meta { grid-column: 1; }
}

@media (max-width: 420px) {
  .viewer-sheet-identity strong { font-size: .84rem; }
  .viewer-sheet-identity span { font-size: .66rem; }
  .viewer-header-actions { gap: 3px; }
  .viewer-header-actions .viewer-icon-button { min-width: 40px; width: 40px; }
  .viewer-zoom-control { display: none; }
  .studio-drawing-card { grid-template-columns: 88px minmax(0,1fr) 20px; min-height: 112px; gap: 9px; }
  .studio-drawing-thumbnail { width: 88px; height: 88px; }
  .studio-drawing-copy b { font-size: .7rem; }
  .studio-overlay-picker .studio-drawing-card { grid-template-columns: 24px 68px minmax(0,1fr) 22px; }
  .studio-overlay-picker .studio-drawing-thumbnail { width: 68px; height: 68px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .print-viewer-header { min-height: 48px; }
  .print-viewer-footer { position: absolute; right: 8px; bottom: 8px; min-height: 48px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; }
  .viewer-markup-tools { grid-template-columns: repeat(2, 46px); max-height: 70dvh; }
}

.linked-note-modal .span-2 {
  grid-column: 1 / -1;
}

.pin-coordinate-readout {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fb;
  color: var(--muted);
}

.linked-task-picker {
  min-width: 0;
  max-height: 330px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.linked-task-picker legend {
  padding: 0 6px;
  font-weight: 900;
}

.linked-task-picker > label {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 4px;
  border-top: 1px solid var(--line);
}

.linked-task-picker input {
  width: 18px;
  height: 18px;
}

.linked-task-picker span,
.linked-task-list .list-row > span:first-child {
  display: grid;
  min-width: 0;
}

.linked-task-picker small,
.linked-task-list small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.note-link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.note-link-chips span {
  padding: 5px 8px;
  border: 1px solid #cfd9e5;
  border-radius: 999px;
  background: #f3f7fb;
  color: #345;
  font-size: 12px;
  font-weight: 800;
}

.note-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.linked-note-inline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  width: 100%;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #cfd9e5;
  border-radius: 6px;
  background: #f7faff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.linked-note-inline > span:last-child {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.linked-task-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

@media (max-width: 640px) {
  .login-visual {
    display: none;
  }

  .login-card {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
  }

  .auth-logo {
    display: block;
    width: min(250px, 76vw);
    margin-bottom: 12px;
  }

  .auth-box h2 {
    font-size: 34px;
  }

  .auth-box > .sub {
    margin-bottom: 24px;
  }

  .auth-form {
    gap: 17px;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 8px;
  }
  .email-modal {
    max-height: calc(100vh - 16px);
  }
  .print-frame {
    min-height: 360px;
    height: 62vh;
  }
  .linked-note-modal {
    width: 100%;
    max-height: 92dvh;
  }
  .linked-note-modal .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
  .linked-note-modal .span-2 {
    grid-column: auto;
  }
  .linked-task-picker {
    max-height: 42dvh;
  }
}

@media (min-width: 981px) and (max-height: 850px) {
  .login-copy {
    gap: 11px;
  }
  .login-brand-emblem {
    flex-basis: 86px;
    width: 86px;
    height: 86px;
  }
  .login-brand-emblem img {
    width: 176px;
    left: -45px;
    top: -24px;
  }
  .login-copy .login-headline {
    font-size: clamp(38px, 4vw, 54px);
  }
  .login-plan-preview {
    height: 160px;
  }
  .login-benefit {
    font-size: 14px;
  }
}
/* Production redesign: job shell, phase buttons, full-width checklist, feeder runs */
.job-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  position: relative;
}

.job-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.job-header h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.breadcrumbs {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}

.job-header-status,
.job-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-progress {
  min-width: 130px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.floating-menu {
  position: absolute;
  right: 16px;
  top: calc(100% - 8px);
  z-index: 40;
  min-width: 230px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.floating-menu button {
  min-height: 40px;
  border-radius: 8px;
  background: #f7f9f8;
  color: var(--ink);
  text-align: left;
  padding: 0 10px;
  font-weight: 800;
}

.floating-menu .danger-text { color: var(--bad); }

.job-workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.job-side-nav {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow);
}

.job-side-nav.collapsed {
  width: 76px;
}

.job-side-nav.collapsed h4,
.job-side-nav.collapsed b {
  display: none;
}

.job-nav-group {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.job-nav-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.job-nav-group button,
.nav-collapse {
  min-height: 42px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 8px;
  font-weight: 850;
}

.job-nav-group button span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef2f1;
  color: var(--brand-dark);
  font-size: 11px;
}

.job-nav-group button.active {
  background: #e6f1f5;
  color: var(--brand-dark);
}

.job-content {
  min-width: 0;
}

.phase-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.phase-button {
  min-height: 132px;
  display: grid;
  gap: 10px;
  align-content: start;
  text-align: left;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.phase-button.active,
.phase-button:hover {
  border-color: #8db9c9;
  background: #f4fbfd;
}

.phase-button-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.checklist-toolbar {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin-top: 14px;
  background: #fff;
}

.check-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 850;
  color: var(--muted);
}

.filter-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
  min-height: 30px;
}

.checklist-options {
  overflow: hidden;
  transition: max-height .18s ease, opacity .18s ease, margin-top .18s ease;
}

.checklist-options.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.checklist-options.open {
  max-height: 760px;
  opacity: 1;
}

.option-actions {
  margin-top: 10px;
  align-items: center;
}

.full-width-checklist {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.ai-approval-summary {
  margin-bottom: 14px;
}

.ai-approval-toolbar {
  position: sticky;
  top: 8px;
  z-index: 12;
}

.ai-approval-filters,
.ai-bulk-actions,
.ai-approval-form {
  margin-top: 14px;
}

.ai-approval-list,
.ai-area-group,
.ai-room-body,
.ai-phase-group {
  display: grid;
  gap: 12px;
}

.ai-approval-list {
  margin: 14px 0;
}

.ai-area-group > h3 {
  margin: 8px 0 0;
  font-size: 17px;
  text-transform: uppercase;
}

.ai-approval-room {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ai-approval-room.unassigned {
  border-color: #d89a38;
}

.ai-room-header {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #eef2f1;
}

.ai-room-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.ai-room-title span {
  font-size: 18px;
  font-weight: 950;
}

.ai-room-title small {
  color: var(--muted);
  font-weight: 800;
}

.ai-room-body {
  padding: 12px;
}

.ai-phase-group {
  padding-top: 4px;
}

.ai-phase-group + .ai-phase-group {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.ai-approval-task {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(260px, 1fr) minmax(220px, auto);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.ai-approval-task.approved {
  border-left: 4px solid var(--good);
  background: #f2f8f5;
}

.ai-approval-task.needs-review {
  border-color: #d89a38;
}

.ai-approval-task.editing {
  grid-template-columns: 1fr;
}

.ai-task-select {
  padding-top: 4px;
}

.ai-task-content {
  min-width: 0;
}

.ai-task-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 520px;
}

.ai-task-controls select {
  min-height: 38px;
  max-width: 230px;
}

.checklist-phase-section,
.checklist-room-group,
.checklist-system-group {
  display: grid;
  gap: 10px;
}

.checklist-phase-section {
  scroll-margin-top: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 12px;
  box-shadow: var(--shadow);
}

.checklist-section-header,
.room-group-header {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 0 12px;
  background: #eef2f1;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.checklist-section-header span {
  font-size: 18px;
}

.room-group-header {
  background: #f7f9f8;
}

.room-group-header small {
  color: var(--muted);
  font-weight: 800;
}

.system-label {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #e6f1f5;
  color: var(--brand-dark);
  font-weight: 900;
  font-size: 12px;
}

.checklist-table {
  display: grid;
  gap: 8px;
}

.checklist-task-row {
  display: grid;
  grid-template-columns: 70px minmax(260px, 1fr) minmax(150px, auto);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scroll-margin-top: 140px;
}

.checklist-task-row.is-targeted {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(21, 91, 214, 0.18);
  background: #f3f7ff;
}

.checklist-task-row.is-targeted:focus {
  outline: none;
}

.focused-task {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.focused-task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.focused-task-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-width: 0;
}

.focused-task-grid p { margin: 6px 0 0; overflow-wrap: anywhere; }

.job-assignment-section { margin-top: 14px; }
.job-assignment-chips, .job-assignment-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.team-chip, .job-assignment-cards article { display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; }
.team-chip small, .job-assignment-cards article > span { color: var(--muted); }
.team-chip em { color: var(--primary); font-size: 11px; font-style: normal; font-weight: 800; }
.assignment-editor { margin-top: 14px; }
.assignment-editor > summary { display: inline-flex; list-style: none; }
.assignment-editor form { margin-top: 12px; }
.assignment-editor select[multiple] { min-height: 180px; }

.public-auth-links { display: flex; justify-content: center; gap: 18px; margin-top: 18px; }
.public-auth-links button, .public-page button:not(.btn), .public-page a { border: 0; background: none; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; }
.public-page { min-height: 100vh; background: #f5f7fa; color: var(--ink); }
.public-page-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px clamp(16px, 4vw, 52px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.public-page-header nav { display: flex; align-items: center; gap: 14px; }
.public-brand { display: flex !important; align-items: center; gap: 10px; color: var(--ink) !important; text-decoration: none !important; font-weight: 900 !important; }
.public-brand img { width: 46px; height: 46px; object-fit: contain; }
.public-page-content { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 70px; }
.public-page-content > h1 { font-size: clamp(30px, 5vw, 48px); margin: 0 0 8px; }
.public-lead { color: var(--muted); font-size: 18px; margin-bottom: 28px; }
.public-contact-grid { display: grid; grid-template-columns: minmax(240px,.7fr) minmax(0,1.3fr); gap: 24px; }
.public-contact-grid > article, .public-contact-form, .privacy-section, .privacy-toc { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 20px; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; }
.privacy-toc { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 24px 0; }
.privacy-section { margin: 12px 0; scroll-margin-top: 90px; line-height: 1.65; }
.privacy-section h2 { font-size: 22px; }
.privacy-section h3 { font-size: 16px; margin-top: 18px; }
.terms-ai-notice { border: 1px solid #e0b252; border-left-width: 5px; border-radius: 8px; background: #fff8e8; padding: 14px 16px; line-height: 1.55; }
.terms-accept { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 12px; font-size: 13px; line-height: 1.45; color: var(--muted); text-align: left; cursor: pointer; }
.terms-accept input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); }
.terms-accept a { color: var(--primary); font-weight: 700; }
.public-page footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; border-top: 1px solid var(--line); padding: 24px; background: #fff; }

@media (max-width: 767px) {
  .public-page-header { align-items: flex-start; }
  .public-page-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .public-brand span { display: none; }
  .public-contact-grid { grid-template-columns: 1fr; }
  .privacy-toc { grid-template-columns: 1fr; }
}

.breakdown-set-manager { margin-bottom: 14px; }
.breakdown-group-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; }
.breakdown-group-tabs button { min-width: 150px; min-height: 58px; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: grid; gap: 3px; text-align: left; padding: 10px; }
.breakdown-group-tabs button.active { border-color: var(--primary); background: #f3f7ff; box-shadow: inset 0 0 0 1px var(--primary); }
.breakdown-group-tabs span { color: var(--muted); font-size: 12px; }
.breakdown-sheet-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 180px 180px auto auto; gap: 8px; margin: 10px 0; }
.breakdown-sheet-list { display: grid; gap: 7px; max-height: 520px; overflow: auto; margin-bottom: 12px; }
.breakdown-sheet-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(120px, 220px); gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.breakdown-sheet-row span { display: grid; min-width: 0; }
.breakdown-sheet-row small, .breakdown-sheet-row em { color: var(--muted); overflow-wrap: anywhere; }
.breakdown-sheet-row em { font-style: normal; font-size: 12px; }
.sheet-breakdown-modal { width: min(1040px, 100%); }
.sheet-breakdown-text { margin: 8px 0 0; padding: 12px; max-height: 42dvh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); background: #f7f9fb; font: inherit; line-height: 1.5; }

@media (max-width: 767px) {
  .breakdown-sheet-toolbar { grid-template-columns: 1fr 1fr; }
  .breakdown-sheet-toolbar input { grid-column: 1 / -1; }
  .breakdown-sheet-row { grid-template-columns: 28px minmax(0, 1fr); }
  .breakdown-sheet-row em { grid-column: 2; }
}

@media (max-width: 767px) {
  .focused-task-grid { grid-template-columns: 1fr 1fr; }
  .focused-task-actions .btn { min-height: 48px; flex: 1 1 140px; }
}

@media (max-width: 430px) {
  .focused-task-grid { grid-template-columns: 1fr; }
}

.task-leading-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.checklist-task-row.is-complete {
  background: #f2f8f5;
}

.task-check {
  width: 34px;
  height: 34px;
  border: 2px solid #a8b8b3;
  border-radius: 8px;
  background: white;
  color: var(--good);
  font-weight: 950;
}

.task-main {
  min-width: 0;
}

.task-main > b {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.task-meta,
.task-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-badges {
  justify-content: flex-end;
  max-width: 310px;
}

.task-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.task-detail {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f8;
}

.task-actions .btn {
  min-height: 38px;
  padding: 0 10px;
}

.task-actions {
  grid-column: 2 / 4;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.checklist-toolbar-menu,
.checklist-add-wrap {
  position: relative;
}

.checklist-toolbar-menu > summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.checklist-toolbar-menu > summary::-webkit-details-marker,
.task-mobile-actions > summary::-webkit-details-marker {
  display: none;
}

.checklist-toolbar-popover {
  position: absolute;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 6px;
  width: 170px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.checklist-toolbar-popover .btn {
  width: 100%;
  justify-content: flex-start;
}

.feeder-schedule {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.feeder-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(5, minmax(88px, .65fr)) minmax(130px, .8fr) minmax(230px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.feeder-row > div:not(:first-child):not(.row-actions):not(.feeder-calc) {
  display: grid;
  gap: 2px;
  font-weight: 900;
}

.feeder-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.feeder-calc {
  grid-column: 1 / -1;
  padding: 8px;
  border-radius: 8px;
  background: #f7f9f8;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.risk-dashboard-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.risk-chip {
  width: 100%;
  min-height: 40px;
  margin: 10px 0;
  border: 1px solid rgba(184, 73, 73, .28);
  border-radius: 8px;
  background: #fff6f3;
  color: #743024;
  font-weight: 900;
  text-align: left;
  padding: 8px 10px;
}

.risk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr) auto;
  gap: 14px;
  align-items: center;
}

.risk-hero h2 {
  margin: 4px 0 8px;
}

.risk-driver-list {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f9f8;
}

.risk-driver-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.risk-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.risk-list {
  display: grid;
  gap: 10px;
}

.risk-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #9aa7a3;
  border-radius: 8px;
  background: white;
}

.risk-card.severity-critical { border-left-color: #b3261e; }
.risk-card.severity-high { border-left-color: #ba5a12; }
.risk-card.severity-medium { border-left-color: #b58a00; }
.risk-card.severity-low { border-left-color: #4d7c59; }

.risk-card h3 {
  margin: 8px 0 6px;
  font-size: 18px;
}

.risk-card p {
  margin: 0 0 8px;
  color: var(--ink);
}

.risk-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-actions {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 180px;
}

.risk-quick-actions .card {
  align-content: start;
}

.risk-company-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.forecast-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.connection-tree {
  display: grid;
  gap: 5px;
}

.tree-node button {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 10px;
  background: #f7f9f8;
  color: var(--ink);
  font-weight: 850;
}

.mobile-more-panel {
  display: none;
}

.mobile-menu-overlay {
  display: none;
}

body.mobile-menu-lock {
  overflow: hidden;
}

.mobile-more-group {
  display: grid;
  gap: 6px;
}

.mobile-more-group h4 {
  margin: 6px 2px 2px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0;
}

@media (max-width: 1100px) {
  .job-workspace {
    grid-template-columns: 1fr;
  }

  .job-side-nav {
    display: none;
  }

  .job-header {
    grid-template-columns: 1fr;
  }

  .phase-button-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .phase-button {
    min-width: 220px;
  }

  .risk-hero,
  .risk-card {
    grid-template-columns: 1fr;
  }

  .risk-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .risk-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .main {
    padding: 12px 12px 96px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .breadcrumbs {
    display: none;
  }

  .job-header-main {
    align-items: flex-start;
  }

  .checklist-toolbar {
    top: 0;
  }

  .checklist-task-row {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }

  .ai-approval-toolbar {
    position: static;
  }

  .ai-approval-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-room-header,
  .ai-room-title,
  .ai-approval-task {
    grid-template-columns: 1fr;
  }

  .ai-room-title {
    display: grid;
  }

  .ai-room-header .actions,
  .ai-task-controls,
  .ai-bulk-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ai-room-header .btn,
  .ai-task-controls .btn,
  .ai-task-controls select,
  .ai-bulk-actions .btn,
  .ai-bulk-actions select {
    width: 100%;
    max-width: none;
    min-height: 46px;
  }

  .ai-task-select {
    position: absolute;
    margin: 8px;
  }

  .ai-task-content {
    padding-left: 30px;
  }

  .task-badges,
  .task-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .task-badges {
    justify-content: flex-start;
    max-width: none;
  }

  .task-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 10px;
  }

  .task-actions .btn,
  .task-actions select,
  .task-actions details,
  .task-actions summary {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 46px;
  }

  .feeder-row {
    grid-template-columns: 1fr;
  }

  .risk-filter-bar,
  .risk-actions {
    grid-template-columns: 1fr;
  }

  .risk-card {
    padding: 12px;
  }

  .risk-actions .btn {
    min-height: 46px;
  }

  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    background: rgba(15, 27, 25, .32);
  }

  .mobile-more-panel.open {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 82px;
    z-index: 70;
    display: grid;
    gap: 8px;
    max-height: min(72vh, 620px);
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
  }

  .mobile-more-panel button {
    min-height: 46px;
    border-radius: 8px;
    background: #f7f9f8;
    color: var(--ink);
    font-weight: 900;
  }
}
.checklist-add-wrap { position: relative; }
.checklist-add-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  width: 230px;
  padding: 6px;
  background: var(--panel, #fff);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.checklist-add-menu button {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.checklist-add-menu button:hover { background: rgba(85, 125, 145, .12); }
.full-process-panel { margin-top: 14px; scroll-margin-top: 90px; }
.phase-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
}
.phase-picker legend { padding: 0 6px; font-weight: 700; }
.phase-picker label { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; }
.full-process-review { display: grid; gap: 10px; margin: 14px 0; }
.full-process-task {
  padding: 14px;
  border: 1px solid var(--line, #cbd5e1);
  border-left: 4px solid var(--primary, #246080);
  border-radius: 6px;
  background: var(--panel, #fff);
}
.work-package-board { margin: 14px 0; }
.work-package-room + .work-package-room { margin-top: 18px; }
.work-package-room > h4, .work-package-drafts > h4 { margin: 10px 0 8px; }
.work-package-card {
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
}
.work-package-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.work-package-heading-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 12px;
}
.work-package-heading-row .work-package-heading { flex: 1 1 auto; min-width: 0; }
.work-package-heading-actions,
.work-package-phase-actions,
.work-package-task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.work-package-heading-actions .btn,
.work-package-phase-actions .btn,
.work-package-task-actions .btn { min-height: 40px; }
.work-package-heading span:first-child { display: grid; gap: 3px; }
.work-package-heading small { color: var(--muted, #64748b); }
.work-package-card .progress { height: 5px; margin: 0; border-radius: 0; background: rgba(100, 116, 139, .18); }
.work-package-card .progress span { display: block; height: 100%; background: #2f7d61; }
.work-package-history { padding: 8px 14px 14px; border-top: 1px solid var(--line, #cbd5e1); }
.work-package-phase + .work-package-phase { border-top: 1px solid var(--line, #cbd5e1); }
.work-package-phase-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 8px 0;
}
.work-package-task-list { display: grid; gap: 4px; padding: 0 0 10px 10px; }
.work-package-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255,255,255,.45);
  color: inherit;
}
.work-package-task-row:hover { background: rgba(85, 125, 145, .1); }
.work-package-task-row.is-complete .work-package-task-copy b { color: var(--muted, #64748b); text-decoration: line-through; }
.work-package-task-row.has-error { border-color: #c87b18; background: #fff8e8; }
.work-package-task-check {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 46px;
  cursor: pointer;
}
.work-package-task-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.work-package-task-check input:disabled + .work-package-checkbox { opacity: .5; cursor: not-allowed; }
.work-package-task-check input:focus-visible + .work-package-checkbox { outline: 3px solid #0b6b82; outline-offset: 2px; }
.work-package-checkbox {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #64748b;
  border-radius: 5px;
  background: #fff;
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
}
.work-package-task-check input:checked + .work-package-checkbox { border-color: #1f7a4c; background: #1f7a4c; }
.work-package-task-copy { display: grid; min-width: 0; gap: 2px; }
.work-package-task-copy b { overflow-wrap: anywhere; }
.work-package-task-copy small { color: var(--muted, #64748b); }
.work-package-inline-error { grid-column: 1 / -1; padding: 3px 5px 7px 39px; color: #8a310f; font-size: .78rem; }
.work-package-drafts { margin-top: 18px; }
.work-package-heading-actions .work-package-delete-trigger { min-height: 44px; white-space: nowrap; }
.work-package-delete-dialog { width: min(92vw, 480px); }
.work-package-delete-dialog h3 { margin-top: 0; }
.work-package-delete-dialog .actions { justify-content: flex-end; }
.work-package-delete-summary { display: grid; gap: 3px; margin: 14px 0; padding: 12px; border: 1px solid var(--line, #cbd5e1); border-radius: 10px; background: rgba(100, 116, 139, .08); }
.work-package-delete-summary span { color: var(--muted, #64748b); font-size: .86rem; }
.checklist-import-panel { margin: 14px 0; scroll-margin-top: 86px; }
.checklist-import-upload-actions { margin: 16px 0; }
.checklist-import-history { display: grid; gap: 8px; margin-top: 18px; }
.checklist-import-history .list-row { width: 100%; color: inherit; text-align: left; }
.checklist-import-history .list-row span:first-child { display: grid; gap: 3px; }
.checklist-import-preview {
  width: 100%;
  min-height: 220px;
  max-height: 520px;
  margin: 14px 0;
  overflow: auto;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
  background: #111719;
}
.checklist-import-preview img { display: block; width: 100%; height: auto; object-fit: contain; }
.checklist-import-preview iframe { display: block; width: 100%; height: 500px; border: 0; }
.checklist-import-review-list { display: grid; gap: 14px; margin-top: 14px; }
.checklist-import-room {
  padding: 14px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
  background: var(--panel, #fff);
}
.checklist-import-phase + .checklist-import-phase { margin-top: 16px; }
.checklist-import-phase > h4 { margin: 0 0 8px; text-transform: uppercase; }
.checklist-import-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line, #cbd5e1);
}
.checklist-import-item.needs-review { border-left: 4px solid #b7791f; }
.checklist-import-select { padding-top: 28px; }
.checklist-import-select input { width: 22px; height: 22px; }
.checklist-import-fields { min-width: 0; }
.checklist-import-actions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.checklist-import-add-form { margin-top: 14px; }
.sticky-import-actions {
  position: sticky;
  bottom: 72px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 6px;
  background: var(--panel, #fff);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
}
.ai-chat-actions .btn { min-height: 42px; }

@media (max-width: 767px) {
  .checklist-add-wrap { width: 100%; }
  .checklist-add-wrap > .btn { width: 100%; min-height: 48px; }
  .checklist-add-menu { position: fixed; left: 12px; right: 12px; bottom: 76px; top: auto; width: auto; }
  .checklist-add-menu button { min-height: 48px; }
  .phase-picker { display: grid; grid-template-columns: 1fr; }
  .full-process-task .grid { grid-template-columns: 1fr; }
  .work-package-board { margin-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .work-package-heading-row { align-items: stretch; flex-direction: column; padding: 0 10px 10px; }
  .work-package-heading-row .work-package-heading { padding-inline: 4px; }
  .work-package-heading-actions { justify-content: space-between; }
  .work-package-heading-actions .btn { min-height: 46px; }
  .work-package-delete-trigger { margin-left: auto; min-width: 96px; }
  .work-package-delete-dialog .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .work-package-delete-dialog .actions .btn { min-height: 48px; }
  .work-package-phase-heading { align-items: flex-start; flex-direction: column; }
  .work-package-phase-actions { width: 100%; justify-content: space-between; }
  .work-package-phase-actions .btn { min-height: 46px; }
  .work-package-task-list { padding-left: 0; }
  .work-package-task-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 60px; padding: 6px; }
  .work-package-task-check { min-height: 52px; }
  .work-package-task-actions .btn { min-width: 64px; min-height: 46px; }
  .checklist-import-upload-actions, .ai-chat-actions { display: grid; grid-template-columns: 1fr; }
  .checklist-import-upload-actions .btn, .ai-chat-actions .btn { width: 100%; min-height: 48px; }
  .checklist-import-preview { max-height: 380px; }
  .checklist-import-preview iframe { height: 360px; }
  .checklist-import-room { padding: 10px; }
  .checklist-import-item { grid-template-columns: 30px minmax(0, 1fr); padding: 12px 4px; }
  .checklist-import-item .grid { grid-template-columns: 1fr; }
  .checklist-import-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; }
  .checklist-import-actions .btn { min-height: 44px; flex: 1 1 120px; }
  .sticky-import-actions { bottom: 78px; }
  .ai-context-panel { display: none; }
  .ai-context-panel.open { display: block; }
}

/* User-arrangeable Command Center tile board */
.dashboard-tile-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 18px;
  align-items: stretch;
}
.dashboard-tile-shell {
  min-width: 0;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.dashboard-tile-shell.tile-size-compact { grid-column: span 4; }
.dashboard-tile-shell.tile-size-standard { grid-column: span 6; }
.dashboard-tile-shell.tile-size-wide { grid-column: span 8; }
.dashboard-tile-shell.tile-size-full { grid-column: 1 / -1; }
.dashboard-tile-shell > .card {
  flex: 1;
  width: 100%;
  height: 100%;
  margin: 0;
}
.dashboard-tile-shell.arranging {
  padding: 8px;
  border: 2px dashed #78909a;
  border-radius: 8px;
  background: #eef3f3;
  cursor: grab;
}
.dashboard-tile-shell.arranging.dragging { opacity: .5; cursor: grabbing; }
.dashboard-tile-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 2px 8px;
}
.dashboard-tile-controls button,
.dashboard-tile-controls select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}
.dashboard-tile-controls button { padding: 5px 10px; cursor: pointer; }
.dashboard-tile-controls label { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12px; font-weight: 900; }
.tile-drag-label { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.arrange-help {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--primary);
  background: #eef5f3;
}
.dashboard-tile-shell .today-command-tile { min-height: 360px; }
.dashboard-tile-shell .command-list-card { min-height: 360px; max-height: 440px; }
.dashboard-tile-shell .risk-dashboard-card { min-height: 360px; }
.dashboard-tile-shell .command-crew,
.dashboard-tile-shell .command-agenda { margin-top: 0; min-height: 300px; }
.command-summary-tile { min-height: 360px; }
.command-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.command-summary-item { display: grid; gap: 3px; min-height: 118px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9f8; }
.command-summary-item span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.command-summary-item b { font-size: 30px; }
.command-summary-item small { color: var(--muted); }

@media (max-width: 1100px) {
  .dashboard-tile-shell.tile-size-compact,
  .dashboard-tile-shell.tile-size-standard,
  .dashboard-tile-shell.tile-size-wide { grid-column: span 6; }
}

@media (max-width: 767px) {
  .command-center-heading { flex-direction: column; }
  .command-center-heading > .actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .command-center-heading > .actions .btn { width: 100%; }
  .dashboard-tile-board { grid-template-columns: 1fr; gap: 14px; }
  .dashboard-tile-shell,
  .dashboard-tile-shell.tile-size-compact,
  .dashboard-tile-shell.tile-size-standard,
  .dashboard-tile-shell.tile-size-wide,
  .dashboard-tile-shell.tile-size-full { grid-column: 1; min-height: 0; }
  .dashboard-tile-shell .today-command-tile { min-height: 330px; }
  .dashboard-tile-shell .command-list-card { min-height: 300px; max-height: 420px; padding: 16px; }
  .dashboard-tile-shell .command-list-card .section-title { flex-direction: row; align-items: center; }
  .dashboard-tile-shell .command-list-card .calendar-event-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); }
  .dashboard-tile-shell .command-list-card .event-icon { display: inline-grid; }
  .dashboard-tile-shell .command-list-card .calendar-event-card .deadline-badge { display: inline-flex; grid-column: 2; }
  .dashboard-tile-shell .risk-dashboard-card { min-height: 220px; }
  .dashboard-tile-controls { flex-wrap: wrap; }
  .dashboard-tile-controls .tile-drag-label { width: 100%; }
  .dashboard-tile-controls label { width: 100%; margin-left: 0; justify-content: space-between; }
  .dashboard-tile-controls select { flex: 1; }
  .arrange-help { align-items: flex-start; flex-direction: column; }
  .command-summary-grid { grid-template-columns: 1fr 1fr; }
  .command-summary-item { min-height: 105px; padding: 12px; }
}

@media (max-width: 360px) {
  .command-center-heading > .actions { grid-template-columns: 1fr; }
  .command-summary-grid { grid-template-columns: 1fr; }
}

/* Per-job notes */
.job-notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.job-notes-toolbar h3,
.job-note-composer h3,
.job-note-card h3 { margin: 0; }
.job-notes-filters { display: flex; gap: 10px; min-width: min(100%, 460px); }
.job-notes-filters input { flex: 1; }
.job-notes-filters input,
.job-notes-filters select { min-height: 44px; }
.job-note-composer { margin-bottom: 14px; }
.job-notes-list { display: grid; gap: 12px; }
.job-note-card { border-left: 4px solid #78909a; }
.job-note-card.pinned,
.project-note-card { border-left-color: var(--primary); }
.note-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.job-note-body { margin: 14px 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-footer { padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 767px) {
  .job-notes-toolbar { align-items: stretch; flex-direction: column; }
  .job-notes-filters { display: grid; grid-template-columns: 1fr; min-width: 0; }
  .job-note-card .job-head { align-items: flex-start; flex-direction: column; }
  .job-note-card .job-head > .actions { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .job-note-card .job-head > .actions .btn { min-height: 44px; }
}
.action-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 15, 18, 0.68);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.action-modal {
  width: min(920px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  margin: auto;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

/* Command Center and centralized calendar */
.command-center-heading,
.calendar-toolbar,
.calendar-toolbar-main,
.calendar-filters,
.calendar-detail-grid > div,
.crew-schedule-card,
.calendar-conflict,
.unassigned-crew {
  display: flex;
  align-items: center;
  gap: 12px;
}
.command-center-heading { justify-content: space-between; margin-bottom: 14px; }
.command-alert-badge { display:inline-flex; align-items:center; min-height:38px; padding:0 12px; border:1px solid var(--border); background:var(--panel); font-size:13px; font-weight:900; }
.command-alert-badge.has-alerts { color:#9f1d20; border-color:#d98989; background:#fff2f2; }
.command-job-health { min-height:280px; }
.job-health-list { display:grid; gap:10px; margin-top:12px; }
.job-health-overview { margin-top:14px; }
.job-health-row { width:100%; display:grid; grid-template-columns:minmax(190px, .8fr) 2fr; gap:16px; align-items:center; padding:14px; border:1px solid var(--border); background:var(--panel); color:inherit; text-align:left; cursor:pointer; }
.job-health-row:hover { border-color:var(--primary); }
.job-health-row > div:first-child { display:grid; grid-template-columns:auto 1fr; gap:5px 10px; align-items:center; }
.job-health-row > div:first-child small { grid-column:2; color:var(--muted); }
.job-health-stats { display:grid; grid-template-columns:repeat(6,minmax(72px,1fr)); gap:8px; }
.job-health-stats span { display:grid; gap:2px; color:var(--muted); font-size:12px; }
.job-health-stats b { color:var(--text); font-size:18px; }
.foreman-metrics { margin-bottom:14px; }
.foreman-grid { align-items:start; }
.compact-form { padding-bottom:14px; margin-bottom:10px; border-bottom:1px solid var(--border); }
.assignment-list { display:grid; gap:10px; }
.assignment-row { display:grid; grid-template-columns:minmax(230px,1.8fr) minmax(180px,1fr) minmax(140px,.8fr) minmax(135px,.7fr) auto; gap:10px; align-items:end; padding:12px 0; border-bottom:1px solid var(--border); }
.assignment-task { display:grid; gap:4px; align-self:center; }
.assignment-task span { color:var(--muted); font-size:13px; }
.assignment-row .field { margin:0; }
.crew-chip-list { display:flex; flex-wrap:wrap; gap:8px; }
.crew-task-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.crew-task-facts span { display:grid; gap:2px; padding:10px; background:var(--panel-2); border-left:3px solid var(--border); font-size:13px; }
.field-task-notes,.field-material-note { margin:8px 0; padding:10px; background:var(--panel-2); }
.huddle-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.huddle-header h2 { margin:4px 0; font-size:22px; }
.huddle-columns { align-items:start; }
.huddle-item,.huddle-assignment,.huddle-problem { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.huddle-item,.huddle-assignment > div,.huddle-problem { align-items:flex-start; }
.huddle-item { display:grid; }
.huddle-item span,.huddle-assignment span,.huddle-problem span { display:block; color:var(--muted); font-size:13px; margin-top:3px; }
.huddle-problem { display:grid; grid-template-columns:minmax(0,1fr) auto; }
.huddle-problem span { grid-column:1; }
.huddle-problem button { grid-row:1 / span 2; grid-column:2; }
.huddle-inspections { display:grid; gap:6px; padding-top:14px; }
.inspection-readiness-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:12px; margin-bottom:14px; }
.inspection-readiness-card { padding:16px; border:1px solid var(--border); background:var(--panel); }
.inspection-readiness-card h4 { margin:8px 0 2px; }
.inspection-readiness-card p { margin:4px 0; color:var(--muted); }
.inspection-readiness-meter { height:9px; overflow:hidden; background:var(--panel-2); margin:12px 0; }
.inspection-readiness-meter span { display:block; height:100%; background:var(--primary); }
.inspection-system-list { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0; }
.inspection-system-list span { padding:5px 7px; border:1px solid var(--border); font-size:12px; }
.material-shortage-panel { margin-top:14px; border-left:4px solid #b4232c; }
.sync-indicator { display:inline-flex; align-items:center; min-height:38px; padding:0 11px; border:1px solid var(--border); background:var(--panel); color:var(--text); font-size:12px; font-weight:900; cursor:pointer; }
.sync-synced { border-color:#5f8d70; color:#225d39; background:#eef8f1; }
.sync-offline,.sync-conflict { border-color:#c46d6d; color:#8d1c23; background:#fff1f1; }
.sync-syncing { border-color:#c99b3f; color:#73500d; background:#fff8e7; }
.offline-job-card { border-left:4px solid var(--primary); }
.offline-job-facts,.offline-sync-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:16px 0; }
.offline-job-facts span,.offline-sync-summary span { display:grid; gap:3px; padding:12px; background:var(--panel-2); color:var(--muted); }
.offline-job-facts b,.offline-sync-summary b { color:var(--text); font-size:19px; }
.voice-review-modal { width:min(620px,calc(100vw - 24px)); }
.voice-review-modal textarea { min-height:150px; }
.voice-detected-item { display:grid; gap:7px; padding:14px; margin:12px 0; border:1px solid #c99b3f; background:#fff8e7; }
.voice-detected-item label { display:flex; gap:8px; align-items:center; font-weight:800; }
.voice-detected-item small { color:var(--muted); }
.photo-timeline-toolbar { display:flex; justify-content:space-between; gap:20px; align-items:center; }
.photo-timeline-toolbar input { width:min(420px,100%); }
.photo-timeline { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; margin-top:14px; }
.photo-timeline-card { display:grid; grid-template-rows:220px 1fr; min-width:0; border:1px solid var(--border); background:var(--panel); }
.photo-preview { width:100%; height:220px; padding:0; border:0; background:#171b1d; cursor:pointer; overflow:hidden; }
.photo-preview img { width:100%; height:100%; object-fit:contain; display:block; }
.photo-preview.empty { display:grid; place-items:center; color:#fff; }
.photo-timeline-body { padding:14px; }
.photo-timeline-body h4 { margin:10px 0 5px; font-size:17px; }
.photo-timeline-body p { margin:0 0 10px; color:var(--muted); }
.photo-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; font-size:12px; color:var(--muted); }

@media (max-width: 767px) {
  .command-center-heading .actions { align-items:stretch; }
  .command-alert-badge { justify-content:center; }
  .job-health-row { grid-template-columns:1fr; }
  .job-health-stats { grid-template-columns:repeat(3,1fr); }
  .assignment-row { grid-template-columns:1fr; padding:16px 0; }
  .assignment-row .btn { min-height:48px; width:100%; }
  .crew-task-facts { grid-template-columns:1fr; }
  .field-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .field-actions .btn { min-height:48px; width:100%; }
  .huddle-header { align-items:flex-start; flex-direction:column; }
  .huddle-header .actions { width:100%; display:grid; grid-template-columns:1fr; }
  .huddle-header .btn { width:100%; min-height:48px; }
  .huddle-columns { grid-template-columns:1fr; }
  .inspection-readiness-grid { grid-template-columns:1fr; }
  .sync-indicator { min-height:46px; justify-content:center; }
  .offline-job-facts,.offline-sync-summary { grid-template-columns:1fr 1fr; }
  .photo-timeline-toolbar { align-items:stretch; flex-direction:column; }
  .photo-timeline-toolbar input { width:100%; min-height:48px; }
  .photo-timeline { grid-template-columns:1fr; }
  .photo-timeline-card { grid-template-rows:200px 1fr; }
  .photo-preview { height:200px; }
  .photo-meta { grid-template-columns:1fr; }
}
.command-center-heading h2 { margin: 3px 0; font-size: 24px; }
.eyebrow { display: block; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.command-top-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) repeat(3, minmax(210px, 1fr));
  gap: 14px;
}
.today-command-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 310px;
  border-left: 5px solid var(--primary);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.today-command-tile > strong { margin-top: 8px; font-size: 20px; }
.today-command-tile h3 { margin: auto 0 3px; font-size: 22px; }
.today-command-tile p { margin: 0; color: var(--muted); font-weight: 800; }
.today-clock { font-size: 34px; font-weight: 900; }
.today-details { display: grid; gap: 3px; margin: 14px 0; }
.today-progress { display: flex; justify-content: space-between; gap: 20px; width: 100%; padding: 10px 0; border-top: 1px solid var(--line); }
.command-list-card { min-width: 0; max-height: 310px; overflow: auto; }
.command-list-card .calendar-event-card { padding: 9px 0; }
.command-list-card > .btn { width: 100%; margin-top: 8px; }
.risk-dashboard-card { min-height: 180px; border: 1px solid var(--line); color: inherit; text-align: left; cursor: pointer; }
.command-crew, .command-agenda, .command-metrics { margin-top: 14px; }
.crew-schedule-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.crew-schedule-card { justify-content: space-between; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.crew-schedule-card > div:first-child { display: grid; gap: 3px; }
.calendar-conflict { margin-bottom: 10px; padding: 10px 12px; border-left: 4px solid #b42318; background: #fff1ef; color: #7a271a; }
.unassigned-crew { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }

.deadline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.deadline-badge.on-track, .deadline-badge.complete { color: #17633c; background: #e9f7ef; border-color: #86c8a5; }
.deadline-badge.due-soon { color: #775500; background: #fff7d6; border-color: #d9b83e; }
.deadline-badge.overdue { color: #8a1c13; background: #fff0ee; border-color: #e29a92; }
.deadline-badge.none { color: #4b5563; background: #f0f2f3; border-color: #c5cbd0; }

.calendar-event-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.calendar-event-card:hover { background: #f4f7f6; }
.event-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 5px; background: #253f4a; color: white; font-size: 11px; font-weight: 900; }
.event-copy { display: grid; min-width: 0; gap: 2px; }
.event-copy b, .event-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-copy small { color: var(--muted); }
.calendar-toolbar { justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.calendar-toolbar-main { flex-wrap: wrap; }
.calendar-view-picker { display: flex; }
.calendar-view-picker button { min-height: 40px; }
.calendar-filters { flex-wrap: wrap; margin: 10px 0; }
.calendar-filters select { min-width: 170px; min-height: 42px; }
.calendar-surface { overflow-x: auto; }
.calendar-week-grid { display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); min-width: 980px; border: 1px solid var(--line); }
.calendar-day-column { min-height: 520px; border-right: 1px solid var(--line); background: #fff; }
.calendar-day-column:last-child { border-right: 0; }
.calendar-day-column.today, .calendar-month-day.today { background: #f0f7f4; }
.calendar-day-column > header { display: flex; justify-content: space-between; padding: 11px; border-bottom: 1px solid var(--line); background: #f7f9f8; }
.calendar-day-column .calendar-event-card { grid-template-columns: 30px minmax(0, 1fr); align-items: start; border-left: 3px solid #567985; }
.calendar-day-column .calendar-event-card .deadline-badge { grid-column: 2; width: max-content; }
.calendar-empty-day { display: block; padding: 14px 10px; color: var(--muted); font-size: 12px; }
.calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); min-width: 910px; border: 1px solid var(--line); }
.calendar-month-day { min-height: 125px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-month-day > b { display: block; margin-bottom: 5px; }
.calendar-month-day button { display: block; width: 100%; margin: 3px 0; padding: 5px; overflow: hidden; border: 0; border-radius: 4px; background: #eaf0f1; color: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.calendar-agenda { display: grid; gap: 16px; }
.agenda-day h3 { position: sticky; top: 0; z-index: 2; margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--line); background: white; font-size: 15px; }
.calendar-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.calendar-detail-grid > div { align-items: flex-start; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: 6px; }
.calendar-detail-grid > div span { min-width: 0; }
.integration-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.integration-row:last-child { border-bottom: 0; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.summary-strip > div {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.summary-strip b { font-size: 24px; }
.summary-strip span { color: var(--muted); font-size: 12px; font-weight: 800; }
.check-list { display: grid; gap: 7px; padding: 8px 0; }
.safety-record-list { max-height: 70vh; overflow: auto; }
.safety-record { align-items: flex-start; }
.safety-record > div { width: 100%; }
.asset-toolbar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.asset-toolbar input { flex: 1; min-width: 180px; min-height: 44px; }
.asset-row { align-items: flex-start; }
.asset-row details { margin-top: 6px; }
.asset-row summary { color: var(--muted); cursor: pointer; font-weight: 800; }
.asset-row .tool-main { flex: 1; min-width: 0; }
.asset-row .tool-pick { display: flex; align-items: center; padding: 4px 8px 0 0; }
.asset-row .tool-pick input { width: 22px; height: 22px; }
.tool-counts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tool-counts .chip { min-height: 36px; border: 1px solid var(--line, #c9d1cf); border-radius: 999px; padding: 6px 14px; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.tool-counts .chip.active { background: var(--accent, #1f6feb); border-color: var(--accent, #1f6feb); color: #fff; }
.tool-label-size { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.tool-label-size span { font-weight: 700; }
.tool-scan-card .field select { min-height: 48px; }
.tool-scanner-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, .85); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tool-scanner-box { width: min(480px, 100%); color: #fff; text-align: center; }
.tool-scanner-box video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #000; border: 3px solid rgba(255, 255, 255, .6); }
.tool-scanner-box .row-actions { justify-content: center; }

@media (max-width: 1180px) {
  .command-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-command-tile { grid-row: span 2; }
}

@media (max-width: 767px) {
  .operations-layout { grid-template-columns: 1fr; }
  .operations-layout > .card { width: 100%; }
  .operations-layout .grid.cols-2 { grid-template-columns: 1fr; }
  .operations-layout .btn.primary { width: 100%; min-height: 48px; }
  .asset-toolbar { align-items: stretch; flex-direction: column; }
  .asset-toolbar input, .asset-toolbar .btn { width: 100%; min-height: 48px; }
  .asset-row { align-items: stretch; flex-direction: column; }
  .asset-row .row-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .asset-row .row-actions .btn { min-height: 46px; }
  .safety-quality-layout { grid-template-columns: 1fr; }
  .safety-quality-layout > .card { width: 100%; }
  .safety-quality-layout .grid.cols-2 { grid-template-columns: 1fr; }
  .safety-quality-layout .btn.primary { width: 100%; min-height: 48px; }
  .safety-record-list { max-height: none; }
  .safety-record .actions { display: grid; grid-template-columns: 1fr; }
  .safety-record .actions .btn { width: 100%; min-height: 46px; }
  .command-center-heading { align-items: flex-start; }
  .command-center-heading h2 { font-size: 20px; }
  .command-center-heading .btn { min-height: 48px; }
  .command-top-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .today-command-tile { grid-column: 1 / -1; grid-row: auto; min-height: 290px; }
  .command-list-card, .risk-dashboard-card { min-height: 150px; max-height: 210px; padding: 10px; }
  .command-list-card .section-title { align-items: flex-start; flex-direction: column; }
  .command-list-card .calendar-event-card:nth-of-type(n+3) { display: none; }
  .command-list-card .calendar-event-card { grid-template-columns: minmax(0, 1fr); }
  .command-list-card .event-icon, .command-list-card .calendar-event-card .deadline-badge { display: none; }
  .risk-dashboard-card .value { font-size: 28px; }
  .crew-schedule-list { grid-template-columns: 1fr; }
  .crew-schedule-card { flex-direction: column; }
  .calendar-toolbar { align-items: stretch; }
  .calendar-toolbar-main, .calendar-view-picker { width: 100%; overflow-x: auto; }
  .calendar-toolbar-main .btn, .calendar-view-picker button { flex: 0 0 auto; min-height: 44px; }
  .calendar-toolbar > .btn.primary { width: 100%; min-height: 48px; }
  .calendar-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-filters select { min-width: 0; width: 100%; }
  .calendar-surface { padding: 10px; }
  .calendar-week-grid { grid-template-columns: 1fr; min-width: 0; border: 0; }
  .calendar-day-column { min-height: 0; border: 1px solid var(--line); margin-bottom: 10px; }
  .calendar-month-grid { min-width: 720px; }
  .calendar-event-card { grid-template-columns: 34px minmax(0, 1fr); min-height: 58px; }
  .calendar-event-card .deadline-badge { grid-column: 2; width: max-content; }
  .calendar-detail-grid { grid-template-columns: 1fr; }
  .integration-row { align-items: stretch; flex-direction: column; }
  .command-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 390px) {
  .command-top-grid { grid-template-columns: 1fr 1fr; }
  .today-command-tile { grid-column: 1 / -1; }
  .risk-dashboard-card { grid-column: 1 / -1; min-height: 120px; }
  .calendar-filters { grid-template-columns: 1fr; }
  .today-clock { font-size: 30px; }
}

@media (max-width: 767px) {
  .action-modal-overlay {
    align-items: end;
    padding: 0;
  }

  .action-modal {
    width: 100%;
    max-height: min(88dvh, 760px);
    border-radius: 8px 8px 0 0;
  }
}

.checklist-edit-modal { width:min(980px,calc(100vw - 28px)); }
.task-bulk-select { display:grid; place-items:center; min-width:28px; min-height:42px; }
.task-bulk-select input { width:18px; height:18px; }
.task-inline-fields { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
.task-inline-fields label { display:grid; gap:4px; color:var(--muted); font-size:11px; font-weight:900; text-transform:uppercase; }
.task-inline-fields input,.task-inline-fields select { width:100%; min-height:40px; }
.task-history { margin-top:12px; border-top:1px solid var(--border); padding-top:10px; }
.task-history summary { cursor:pointer; color:var(--muted); font-weight:900; }
.task-history-list { margin-top:8px; max-height:260px; overflow:auto; }
.task-mobile-actions { display:block; position:relative; }
.task-mobile-actions summary { min-height:40px; padding:9px 12px; border:1px solid var(--border); border-radius:6px; background:var(--panel-2); cursor:pointer; font-weight:900; list-style:none; }
.task-mobile-action-menu { display:grid; position:absolute; right:0; z-index:20; width:220px; padding:8px; border:1px solid var(--border); background:var(--panel); box-shadow:0 12px 30px rgba(18,31,36,.18); }
.task-mobile-action-menu .btn { width:100%; justify-content:flex-start; }
.sticky-form-actions { position:sticky; bottom:-16px; z-index:4; margin:12px -16px -16px; padding:12px 16px; border-top:1px solid var(--border); background:var(--panel); }
.offline-file-picker { display:grid; gap:8px; max-height:300px; overflow:auto; margin:12px 0; }
.offline-file-picker label { display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:46px; padding:8px 10px; border:1px solid var(--border); border-radius:6px; background:var(--panel-2); }
.offline-file-picker input { width:18px; height:18px; }
.sync-issues { margin-top:14px; }
.sync-conflict-card { display:grid; gap:10px; padding:12px 0; border-top:1px solid var(--border); }
.sync-compare { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.sync-compare pre { max-height:260px; overflow:auto; margin:0; padding:10px; border:1px solid var(--border); border-radius:6px; background:var(--panel-2); white-space:pre-wrap; word-break:break-word; }

@media (max-width: 767px) {
  .sync-compare { grid-template-columns:1fr; }
  .checklist-toolbar { position:static; }
  .checklist-toolbar .job-head { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  .checklist-toolbar .job-head > .actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:6px; }
  .checklist-toolbar .job-head > .actions > .btn,
  .checklist-toolbar .job-head > .actions > details,
  .checklist-toolbar .job-head > .actions > .checklist-add-wrap,
  .checklist-toolbar .job-head > .actions summary { width:100%; min-width:0; }
  .checklist-toolbar .job-head > .actions .btn,
  .checklist-toolbar .job-head > .actions summary { justify-content:center; padding:0 6px; }
  .checklist-toolbar .filter-summary .sub { display:none; }
  .checklist-toolbar .filter-summary:empty { display:none; }
  .checklist-edit-modal { width:100%; }
  .checklist-edit-modal .grid.cols-2 { grid-template-columns:1fr; }
  .task-edit-desktop { display:none !important; }
  .task-mobile-actions { display:block; }
  .task-inline-fields { grid-template-columns:1fr; }
  .task-mobile-action-menu { position:fixed; right:12px; bottom:76px; left:12px; width:auto; max-height:65dvh; overflow:auto; }
  .sticky-form-actions { display:grid; grid-template-columns:1fr 1fr; }
  .sticky-form-actions .btn { min-height:48px; }
  .sticky-form-actions .btn:last-child { grid-column:1 / -1; }
}
/* Structured electrical construction analysis */
.ai-pipeline-hero,.ai-pipeline-run-picker,.ai-pipeline-publish,.ai-pipeline-review-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.ai-pipeline-hero h2,.ai-pipeline-start h3,.ai-pipeline-review-toolbar h3,.ai-pipeline-publish h3{margin:4px 0 6px}
.ai-pipeline-file-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.file-choice{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line,#d9dee8);border-radius:6px;padding:12px;background:#fff}
.file-choice input{margin-top:3px;width:18px;height:18px}.file-choice span{display:grid;gap:3px}.file-choice small{color:var(--muted,#667085)}
.ai-pipeline-stage-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:14px 0}
.ai-pipeline-overall{margin:14px 0;min-width:0}
.ai-pipeline-overall .section-title{align-items:center}
.ai-pipeline-overall .section-title>div{min-width:0}
.ai-pipeline-overall h3{margin:4px 0 6px;overflow-wrap:anywhere}
.ai-pipeline-overall .section-title>b{font-size:28px;color:var(--primary)}
.ai-pipeline-progress-track{height:10px;border-radius:999px;background:#e5eaf0;overflow:hidden}
.ai-pipeline-progress-track>span{display:block;height:100%;max-width:100%;border-radius:inherit;background:var(--primary);transition:width .2s ease}
.ai-stage{padding:14px;border-left:4px solid #aab2c0;min-height:150px;display:flex;flex-direction:column;gap:8px}
.ai-stage>div{display:flex;align-items:flex-start;gap:9px}.ai-stage>div>span{display:grid;place-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:#eef2f7;font-weight:800}.ai-stage h4{font-size:15px;margin:3px 0;line-height:1.25}.ai-stage small{color:var(--muted,#667085)}
.ai-stage.complete{border-left-color:#16835f}.ai-stage.warn{border-left-color:#c98612}.ai-stage.danger{border-left-color:#c93d45}.ai-stage.info{border-left-color:#1467d9}
.ai-pipeline-controls{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.ai-pipeline-controls select,.ai-pipeline-controls input{min-height:42px}
.ai-pipeline-artifact-list{display:grid;gap:10px;margin:12px 0}.ai-pipeline-artifact{padding:14px}.ai-pipeline-artifact-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.ai-pipeline-artifact-head h4{margin:6px 0 0;font-size:16px}.ai-pipeline-meta{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0}.ai-pipeline-meta span{background:#f0f3f7;border:1px solid #dfe4eb;border-radius:4px;padding:3px 7px;font-size:12px}.ai-source-line{border-top:1px solid var(--line,#e2e7ef);padding-top:9px;margin-top:10px;font-size:13px;color:var(--muted,#667085)}
.ai-review-queue-tabs{display:grid;grid-template-columns:repeat(5,minmax(125px,1fr));gap:8px;width:100%}.ai-review-queue-tabs button{align-items:center;background:#f6f8fb;border:1px solid #d9e1eb;border-radius:10px;color:#344054;display:flex;gap:8px;justify-content:space-between;min-height:46px;padding:9px 12px;text-align:left}.ai-review-queue-tabs button.active{background:#eaf2ff;border-color:#1462da;color:#0c4ca8;box-shadow:inset 0 0 0 1px #1462da}.ai-review-queue-tabs b{border-radius:99px;background:#fff;min-width:26px;padding:3px 7px;text-align:center}.ai-pipeline-review-toolbar{display:grid;grid-template-columns:1fr;align-items:stretch}.ai-review-group{display:grid;gap:10px}.ai-review-group>header{align-items:center;display:grid;grid-template-columns:1fr auto;gap:2px 12px;padding:10px 4px 0}.ai-review-group>header .eyebrow{grid-column:1}.ai-review-group>header h3{grid-column:1;margin:0}.ai-review-group>header .badge{grid-column:2;grid-row:1/3}.ai-review-card{border-left:5px solid #1462da;display:grid;gap:14px;padding:18px}.ai-review-card.needs-information{border-left-color:#d98b12;background:linear-gradient(90deg,#fff8eb 0,#fff 11%)}.ai-review-card>header{align-items:flex-start;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px}.ai-review-card>header h4{font-size:20px;line-height:1.25;margin:8px 0 5px}.ai-review-card>header p{color:#475467;line-height:1.5;margin:0;max-width:850px}.ai-review-confidence{align-items:center;background:#f3f6fa;border:1px solid #dce3ec;border-radius:10px;display:flex;flex-direction:column;min-width:86px;padding:10px}.ai-review-confidence b{font-size:18px}.ai-review-confidence small{color:#667085}.ai-review-source-preview{margin:0;max-width:760px}.ai-review-source-preview figcaption{color:#475467;font-size:12px;font-weight:800;letter-spacing:.04em;margin-bottom:6px;text-transform:uppercase}.ai-review-source-preview>div{background:#eef1f5;border:1px solid #cfd8e3;border-radius:10px;overflow:hidden;position:relative}.ai-review-source-preview img{display:block;height:auto;max-height:420px;object-fit:contain;width:100%}.ai-review-source-preview span{background:#ffd64042;border:3px solid #e01f3d;box-shadow:0 0 0 2px #fff8;pointer-events:none;position:absolute}.ai-review-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:8px;margin:0}.ai-review-facts div{background:#f6f8fa;border:1px solid #e1e6ed;border-radius:8px;padding:9px 11px}.ai-review-facts dt{color:#667085;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.ai-review-facts dd{font-weight:700;margin:3px 0 0;overflow-wrap:anywhere}.ai-review-card h5{font-size:12px;letter-spacing:.08em;margin:0 0 7px;text-transform:uppercase}.ai-review-evidence,.ai-review-interpretation,.ai-review-missing{border-radius:9px;padding:13px 15px}.ai-review-evidence{background:#f3f7fc;border:1px solid #d8e5f5}.ai-review-evidence ul{display:grid;gap:8px;list-style:none;margin:0;padding:0}.ai-review-evidence li{display:grid;gap:2px}.ai-review-evidence li b{font-size:12px}.ai-review-evidence li span{line-height:1.45;overflow-wrap:anywhere}.ai-review-interpretation{background:#f6f5fc;border:1px solid #e1dcf5}.ai-review-interpretation p,.ai-review-missing p{line-height:1.5;margin:0}.ai-review-missing{background:#fff5e5;border:1px solid #f2cf91}.ai-review-missing ul{margin:0 0 8px;padding-left:20px}.ai-review-confidence-reason summary,.ai-review-more>summary{color:#344054;cursor:pointer;font-weight:700}.ai-review-confidence-reason ul{color:#667085;margin:8px 0 0;padding-left:20px}.ai-review-approval-effect{border-top:1px solid #e2e7ef;margin:0;padding-top:12px}.ai-review-card footer{align-items:flex-start;border-top:1px solid #e2e7ef;display:flex;gap:12px;justify-content:space-between;padding-top:13px}.ai-review-primary-actions{display:flex;flex-wrap:wrap;gap:8px}.ai-review-primary-actions .btn{min-height:44px}.ai-review-more{position:relative}.ai-review-more>div{background:#fff;border:1px solid #d8e0e9;border-radius:10px;box-shadow:0 12px 35px #18223024;display:grid;gap:7px;margin-top:7px;max-width:min(440px,90vw);padding:10px;position:absolute;right:0;z-index:20}.ai-review-more pre{background:#101828;color:#e8edf5;max-height:300px;max-width:400px;overflow:auto;padding:10px;white-space:pre-wrap}.ai-review-studio-panel{background:#fff;border:1px solid #d6dee8;border-left:5px solid #e01f3d;border-radius:12px;box-shadow:0 12px 45px #1018283b;display:grid;gap:12px;left:16px;max-width:390px;padding:14px;position:absolute;top:16px;z-index:40}.ai-review-studio-panel h3{margin:4px 0}.ai-review-studio-panel p{line-height:1.4;margin:0}.ai-review-source-highlight{filter:drop-shadow(0 0 7px #ffd640)}.tool-ai_review_locate .drawing-markup-overlay{cursor:crosshair}
.link-button{border:0;background:transparent;color:#075ed1;text-decoration:underline;padding:4px;cursor:pointer}.ai-conflict-list{display:grid;gap:9px}.ai-conflict-list article{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px;border:1px solid #f0c5c8;background:#fff8f8;border-radius:6px}.ai-conflict-list b{display:block;margin:5px 0}.ai-conflict-list p{margin:0;color:#5d2430}
.ai-pipeline-comparison{margin:14px 0}.ai-pipeline-comparison .summary-grid{grid-template-columns:repeat(4,minmax(100px,1fr))}.ai-pipeline-comparison .summary-grid>div{display:grid;gap:3px}.ai-pipeline-comparison .summary-grid b{font-size:24px}.ai-pipeline-editor{width:min(760px,calc(100vw - 24px));max-height:90vh;overflow:auto}.ai-pipeline-editor .span-2{grid-column:1/-1}
@media(max-width:767px){.ai-pipeline-hero,.ai-pipeline-run-picker,.ai-pipeline-publish,.ai-pipeline-review-toolbar,.ai-pipeline-artifact-head,.ai-conflict-list article{display:grid;grid-template-columns:1fr}.ai-pipeline-overall .section-title{display:grid;grid-template-columns:minmax(0,1fr) auto}.ai-pipeline-file-grid,.ai-pipeline-stage-grid{grid-template-columns:minmax(0,1fr)}.ai-pipeline-controls{display:grid;grid-template-columns:minmax(0,1fr);width:100%}.ai-pipeline-controls>*{width:100%;min-width:0}.ai-pipeline-artifact-head .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.ai-pipeline-artifact-head .actions .btn{min-height:44px}.ai-pipeline-comparison .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-pipeline-editor .two-col{grid-template-columns:minmax(0,1fr)}.ai-pipeline-editor .span-2{grid-column:auto}}
@media(max-width:767px){.ai-review-queue-tabs{grid-template-columns:1fr 1fr}.ai-review-queue-tabs button:last-child{grid-column:1/-1}.ai-review-card{padding:14px}.ai-review-card>header{grid-template-columns:1fr}.ai-review-confidence{align-items:baseline;flex-direction:row;gap:7px;min-width:0;width:max-content}.ai-review-facts{grid-template-columns:1fr}.ai-review-card footer{display:grid}.ai-review-primary-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.ai-review-primary-actions .btn{min-width:0;width:100%}.ai-review-more{width:100%}.ai-review-more>div{left:0;right:auto;width:100%}.ai-review-studio-panel{bottom:74px;left:8px;max-height:38vh;max-width:none;overflow:auto;right:8px;top:auto}.ai-review-source-preview img{max-height:300px}}
.ai-accuracy-dashboard{display:grid;gap:16px;margin:14px 0}.ai-sheet-review-grid{display:grid;gap:10px}.ai-sheet-review-grid article{align-items:center;background:var(--surface-soft,#f5f8fa);border:1px solid var(--line,#d8e0e5);border-radius:12px;display:flex;gap:12px;justify-content:space-between;min-width:0;padding:12px}.ai-sheet-review-grid article>div{display:grid;gap:3px;min-width:0}.ai-sheet-review-grid small{overflow-wrap:anywhere}.ai-accuracy-dashboard .summary-grid>div{min-width:0}.ai-pipeline-artifact .actions{flex-wrap:wrap}
@media(max-width:767px){.ai-sheet-review-grid article{align-items:stretch;flex-direction:column}.ai-sheet-review-grid .btn{width:100%}.ai-accuracy-dashboard .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-pipeline-artifact-head .actions .btn{min-width:0;width:100%}}

.blueprint-information-package{display:grid;gap:16px;margin:14px 0}.information-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.information-input-grid article{background:var(--surface-soft,#f5f8fa);border:1px solid var(--line,#d8e0e5);border-radius:12px;display:grid;gap:5px;padding:14px}.information-input-grid article h4,.information-input-grid article p{margin:0}.blueprint-information-package .summary-grid{grid-template-columns:repeat(5,minmax(90px,1fr))}.blueprint-information-package .summary-grid>div{display:grid;gap:3px;min-width:0}.information-package-progress summary{cursor:pointer;font-weight:700}.information-package-progress ol{display:grid;gap:7px;margin:12px 0 0;padding-left:24px}.information-package-progress li{padding-left:4px}.information-package-progress li span{color:var(--muted,#60717c);display:block;font-size:12px}.information-package-progress li.failed{color:var(--danger,#b42318)}
.information-package-project-work{border:1px solid var(--line,#d8e0e5);border-radius:12px;padding:12px}.information-package-project-work summary{cursor:pointer;font-weight:800}.information-package-proposals{display:grid;gap:8px;margin-top:10px}.information-package-proposals article{align-items:flex-start;background:var(--surface-soft,#f5f8fa);border-radius:9px;display:flex;flex-direction:column;gap:3px;padding:10px 12px}.information-package-proposals small{color:var(--muted,#60717c)}.information-package-publish{align-items:center;background:var(--surface-soft,#f5f8fa);border:1px solid var(--line,#d8e0e5);border-radius:12px;display:flex;gap:16px;justify-content:space-between;padding:14px}.information-package-publish p{margin:4px 0}
@media(max-width:767px){.information-input-grid{grid-template-columns:minmax(0,1fr)}.blueprint-information-package .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.information-package-publish{align-items:stretch;flex-direction:column}.information-package-publish .actions,.information-package-publish .btn{width:100%}}

/* Structured electrical field log */
.job-notes-primary-search{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:8px;min-width:0}
.job-notes-primary-search input{min-width:0}
.note-view-tabs{display:flex;gap:7px;overflow-x:auto;padding:4px 0;scrollbar-width:thin}
.note-view-tabs button{background:var(--surface-soft,#f3f6f8);border:1px solid var(--line,#d8e0e5);border-radius:999px;cursor:pointer;flex:0 0 auto;min-height:40px;padding:7px 13px}
.note-view-tabs button.active{background:var(--primary);border-color:var(--primary);color:#fff}
.note-filter-panel{border-top:1px solid var(--line,#d8e0e5);padding-top:10px}
.note-filter-panel summary{cursor:pointer;font-weight:700;min-height:40px;padding:8px 0}
.job-notes-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;padding-top:10px}
.note-boolean-filters{display:flex;flex-wrap:wrap;gap:8px;grid-column:1/-1}
.note-boolean-filters .check{align-items:center;background:var(--surface-soft,#f4f6f8);border-radius:8px;display:flex;gap:6px;min-height:42px;padding:8px 10px}
.note-search-actions{align-items:center;display:flex;flex-wrap:wrap;gap:8px}
.job-note-card.needs-attention{border-left:5px solid var(--danger,#c43232)}
.note-result-context,.note-tag-list,.note-conversion-actions{display:flex;flex-wrap:wrap;gap:7px;margin:9px 0}
.note-result-context span,.note-tag-list span,.note-tag-list button{background:var(--surface-soft,#eef3f5);border:1px solid var(--line,#d8e0e5);border-radius:999px;color:inherit;font-size:12px;padding:4px 8px}
.note-tag-list button{cursor:pointer}
.job-note-body mark{background:#ffeb85;border-radius:3px;padding:0 2px}
.structured-note-template{border:1px solid var(--line,#d8e0e5);border-radius:12px;box-sizing:border-box;margin:4px 0;max-width:100%;min-width:0;padding:12px;width:100%}
.structured-note-template legend{font-weight:800;max-width:100%;overflow-wrap:anywhere;padding:0 6px}
.structured-note-template .form,.structured-note-template .field{max-width:100%;min-width:0}
.structured-note-readout{border:1px solid var(--line,#d8e0e5);border-radius:10px;margin:12px 0;padding:10px}
.structured-note-readout summary,.note-history summary{cursor:pointer;font-weight:700}
.structured-note-readout dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}
.structured-note-readout dl div{background:var(--surface-soft,#f4f7f8);border-radius:8px;padding:8px}
.structured-note-readout dt{font-size:12px;font-weight:800;text-transform:capitalize}
.structured-note-readout dd{margin:4px 0 0;overflow-wrap:anywhere}
.note-comments{border-top:1px solid var(--line,#d8e0e5);margin-top:14px;padding-top:12px}
.note-comments article{display:grid;gap:3px;padding:8px 0}
.note-comment-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,220px) auto;gap:8px}
.note-comment-form>*{min-width:0}
.note-speech{margin-top:6px;width:max-content}
.linked-note-modal{box-sizing:border-box;max-width:100%;overscroll-behavior:contain}
.linked-note-modal *{box-sizing:border-box}
.ai-sheet-review-grid .field{margin:0;min-width:180px}
.ai-pipeline-controls{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));max-width:100%;min-width:0}
.ai-pipeline-controls>*{min-width:0}

@media(max-width:767px){
  .job-notes-primary-search,.note-comment-form{grid-template-columns:minmax(0,1fr)}
  .job-notes-primary-search .btn,.note-comment-form .btn{min-height:46px;width:100%}
  .job-notes-filter-grid{grid-template-columns:minmax(0,1fr)}
  .note-boolean-filters{display:grid;grid-template-columns:minmax(0,1fr)}
  .note-search-actions{display:grid;grid-template-columns:minmax(0,1fr)}
  .note-search-actions>*{min-width:0;width:100%}
  .linked-note-modal{max-height:calc(100dvh - 12px);width:calc(100vw - 12px)}
  .linked-note-modal input,.linked-note-modal select,.linked-note-modal textarea{font-size:16px;max-width:100%;min-height:46px;min-width:0}
  .structured-note-template .two-col{grid-template-columns:minmax(0,1fr)}
  .structured-note-template .span-2{grid-column:auto}
  .linked-note-modal .section-title,.job-note-card .job-head{align-items:stretch;display:grid;grid-template-columns:minmax(0,1fr)}
  .linked-note-modal .actions,.job-note-card .actions{display:grid;grid-template-columns:minmax(0,1fr)}
  .linked-note-modal .actions .btn,.job-note-card .actions .btn{min-height:46px;width:100%}
}

@media(max-width:420px){
  .job-notes-toolbar,.job-note-card,.linked-note-modal{padding:12px}
  .linked-note-modal .sticky-form-actions{margin:12px -12px -12px;padding:12px}
  .note-view-tabs{margin-inline:-4px}
  .ai-pipeline-controls{grid-template-columns:minmax(0,1fr)}
  .ai-pipeline-stage-grid,.ai-pipeline-file-grid{grid-template-columns:minmax(0,1fr)}
}
.decipher-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px;background:linear-gradient(135deg,var(--card),color-mix(in srgb,var(--accent) 9%,var(--card)))}
.decipher-hero h2{margin:.25rem 0}
.decipher-sheet-list,.decipher-findings{display:grid;gap:8px;max-height:680px;overflow:auto;overscroll-behavior:contain;margin-top:12px}
.decipher-sheet-row{display:grid;grid-template-columns:auto 64px minmax(260px,1fr) minmax(190px,260px) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--card)}
.decipher-sheet-thumb{display:grid;place-items:center;width:60px;height:44px;border:1px solid var(--border);border-radius:6px;background:var(--surface);font-weight:800;font-size:.78rem;overflow:hidden}
.decipher-inline-input{width:120px;margin-right:6px;border:1px solid transparent;background:transparent;font-weight:800;padding:4px}.decipher-inline-input.title{width:min(420px,65%);font-weight:600}.decipher-inline-input:focus{border-color:var(--accent);background:var(--input)}
.compact-toggle{display:flex;align-items:center;gap:5px;white-space:nowrap;font-size:.85rem}
.decipher-finding-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--card)}
.decipher-finding-row p{margin:.3rem 0}
@media(max-width:760px){.decipher-hero,.decipher-finding-row{display:block}.decipher-hero .actions,.decipher-finding-row .actions{margin-top:10px}.decipher-sheet-row{grid-template-columns:auto 50px minmax(0,1fr)}.decipher-sheet-row>select,.decipher-sheet-row>.compact-toggle{grid-column:3}.decipher-inline-input,.decipher-inline-input.title{width:100%;margin:0}.decipher-sheet-list{max-height:none}.breakdown-sheet-toolbar{position:sticky;top:0;z-index:2;background:var(--card);padding:8px 0}}
@media(max-width:767px){.breakdown-sheet-toolbar>*{box-sizing:border-box;width:100%;min-width:0;max-width:100%}}

.ai-remodel-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:14px;background:linear-gradient(135deg,var(--card),color-mix(in srgb,var(--accent) 12%,var(--card)))}
.ai-remodel-hero h2{margin:.25rem 0}.ai-remodel-hero p{max-width:780px;margin:.35rem 0 0}
.ai-remodel-metrics strong{display:block;margin:.4rem 0;font-size:clamp(1.15rem,2vw,1.65rem)}
.ai-remodel-sections{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:14px 0}
.ai-remodel-section{display:grid;gap:7px;padding:14px;border-left:4px solid var(--accent)}
.ai-remodel-section span{font-weight:850}.ai-remodel-section small{color:var(--muted)}
.ai-remodel-section.future{border-left-color:#8a929b}.ai-remodel-section.foundation{border-left-color:#8e44ad}.ai-remodel-section.ready{border-left-color:#238b57}
.ai-remodel-foundations{margin:14px 0}.ai-remodel-foundations>*{min-width:0}.ai-foundation-counts{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}.ai-foundation-counts span{padding:7px 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface)}
.warning-line.compact{margin:10px 0;padding:9px 11px}.ai-code-profile-form,.ai-code-profile-form .grid,.ai-remodel-foundations details{min-width:0;max-width:100%}.ai-code-profile-form{margin-top:12px;overflow:hidden}.ai-code-profile-form input,.ai-code-profile-form textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%}.ai-code-profile-form textarea{min-height:86px}
.drawing-markup.source-development_test{filter:drop-shadow(0 0 3px #ff8a00)}
@media(max-width:760px){.ai-remodel-hero{display:block}.ai-remodel-hero .actions{display:grid;grid-template-columns:1fr 1fr;margin-top:14px}.ai-remodel-hero .actions .btn{min-height:46px}.ai-remodel-sections{grid-template-columns:1fr 1fr}.ai-remodel-foundations{grid-template-columns:1fr}.ai-code-profile-form .grid{grid-template-columns:1fr}}
@media(max-width:430px){.ai-remodel-hero .actions,.ai-remodel-sections{grid-template-columns:1fr}}

.command-studio-draft-controls{position:absolute;left:50%;bottom:calc(100% + 10px);transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:rgba(17,24,39,.94);color:#fff;box-shadow:0 10px 30px rgba(0,0,0,.3);white-space:nowrap}
.command-studio-draft-controls button{min-height:34px;padding:6px 10px;border-radius:8px}
.command-studio-draft-controls button.primary{background:#0f8f96;color:#fff}
.measurement-draft-summary{border:1px solid rgba(0,143,156,.35);border-radius:12px;padding:12px;background:rgba(0,143,156,.08)}
@media(max-width:700px){.command-studio-draft-controls{width:min(94vw,520px);justify-content:center;white-space:normal}}
.saved-symbol-library-identity{display:flex;align-items:flex-start;gap:10px;width:100%;min-width:0;padding:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer}
.saved-symbol-library-identity>img,.saved-symbol-library-identity>.symbol-library-abbr{width:48px;height:48px;flex:0 0 48px;border:1px solid var(--border);border-radius:8px;background:#fff;object-fit:contain}
.saved-symbol-library-identity>.symbol-library-abbr{display:grid;place-items:center;color:var(--symbol-color);font-weight:900}
.saved-symbol-library-identity>span:last-child{display:grid;gap:3px;min-width:0}
.saved-symbol-thumbnail{display:grid;place-items:center;width:72px;height:72px;flex:0 0 72px;overflow:hidden;border:1px solid var(--border);border-radius:9px;background:#fff}
.saved-symbol-thumbnail img{width:100%;height:100%;object-fit:contain}
.saved-symbol-thumbnail.missing,.saved-symbol-thumbnail.unavailable{padding:6px;background:#fff7e8;color:#9a5b00;text-align:center}
.example-unavailable{display:grid;place-items:center;width:100%;height:100%;min-height:48px;padding:5px;color:#8a4f00;background:#fff6e2;font-size:.69rem;font-weight:850;text-align:center}
.template-status{font-size:.7rem}.template-status.ready{color:#147343}.template-status.missing{color:#a35e00}
.symbol-details-panel{display:grid;gap:12px}.symbol-details-panel>header{display:grid;grid-template-columns:112px 1fr;gap:12px;align-items:center}.symbol-details-panel h3{margin:2px 0}.symbol-details-panel header p{margin:2px 0;color:#60717a}
.symbol-detail-primary{display:grid;place-items:center;width:112px;height:112px;overflow:hidden;border:1px solid #cfd9de;border-radius:10px;background:#fff}.symbol-detail-primary img{width:100%;height:100%;object-fit:contain}
.symbol-example-detail-list{display:grid;gap:10px}.symbol-example-detail{display:grid;gap:8px;padding:10px;border:1px solid #cfd9de;border-radius:9px;background:#fff}.symbol-example-detail.disabled{opacity:.68}.symbol-example-title{display:flex;justify-content:space-between;gap:8px;align-items:center}
.symbol-example-comparison,.cv-review-comparison{display:grid;grid-template-columns:1fr 1fr;gap:8px}.symbol-example-comparison figure,.cv-review-comparison figure{display:grid;gap:4px;margin:0}.symbol-example-comparison figcaption,.cv-review-comparison figcaption{color:#60717a;font-size:.68rem;font-weight:850;text-transform:uppercase}.symbol-example-comparison figure>div,.cv-review-comparison figure>div{display:grid;place-items:center;min-height:86px;overflow:hidden;border:1px solid #d6dfe3;border-radius:7px;background:#fff}.symbol-example-comparison img,.cv-review-comparison img{width:100%;height:100%;max-height:130px;object-fit:contain}
.quality-warning-list{margin:0;padding-left:20px;color:#8a5700;font-size:.75rem}.symbol-detection-settings summary{cursor:pointer;font-weight:850}.cv-review-comparison{margin-top:2px}
@media(max-width:520px){.symbol-details-panel>header{grid-template-columns:88px 1fr}.symbol-detail-primary{width:88px;height:88px}.saved-symbol-thumbnail{width:64px;height:64px;flex-basis:64px}}
.cv-threshold-control{display:grid;grid-template-columns:auto minmax(90px,1fr) auto;align-items:center;gap:8px;margin-top:10px;font-size:.82rem;color:var(--muted)}

/* Blueprint Command commercial application shell — authenticated UI only. */
.shell{
  --bc-navy:#061f43;--bc-navy-2:#082957;--bc-blue:#0b6ff4;--bc-blue-soft:#eaf3ff;
  --bc-ink:#10203a;--bc-muted:#65738a;--bc-border:#e1e7ef;--bc-surface:#f7f9fc;
  --bc-success:#159a63;--bc-warning:#f29a2e;--bc-danger:#e34254;--bc-purple:#7848df;
  min-height:100vh;grid-template-columns:206px minmax(0,1fr);background:#fff;color:var(--bc-ink)
}
.shell .sidebar{position:fixed;inset:0 auto 0 0;z-index:50;width:206px;height:100dvh;padding:0 10px 106px;border:0;background:linear-gradient(180deg,#061f43 0%,#041936 100%);color:#fff;box-shadow:none;backdrop-filter:none}
.shell .brand{height:66px;margin:0 -10px 12px;padding:0 17px;border-bottom:1px solid rgba(255,255,255,.12);gap:9px}
.shell .brand-logo-mark{width:30px;height:40px;flex-basis:30px;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:hidden}
.shell .brand-logo-mark img{width:66px;height:66px;left:-18px;top:-7px;filter:saturate(1.25)}
.shell .brand-copy h1{color:#fff;font-size:14px;letter-spacing:.02em;line-height:1}
.shell .brand-copy span{color:#fff;font-size:14px;font-weight:800;letter-spacing:.02em;line-height:1.15;margin:1px 0 0}
.shell .nav{display:grid;gap:3px}.shell .nav button{position:relative;display:grid;grid-template-columns:26px 1fr auto;gap:7px;min-height:42px;padding:0 10px;border-radius:7px;color:#e3ebf7;font-size:13px;font-weight:650}
.shell .nav button:hover{background:rgba(255,255,255,.07);color:#fff}.shell .nav button.active{background:#123e78;color:#fff;box-shadow:inset 3px 0 #1680ff}
.shell .nav button em{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#ffd84a;color:#172035;font-size:10px;font-style:normal;font-weight:850}
.shell .nav-icon{color:currentColor}.shell .bc-icon{display:block}.shell .bc-nav-divider{height:1px;margin:10px 5px;background:rgba(255,255,255,.14)}
.bc-sidebar-user{position:absolute;left:0;right:0;bottom:0;padding:14px 14px 17px;border-top:1px solid rgba(255,255,255,.12)}
.bc-sidebar-user>button{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;padding:0;background:transparent;color:#fff;text-align:left}
.bc-sidebar-user .avatar,.shell .avatar{display:inline-grid;place-items:center;width:32px;height:32px;flex:0 0 32px;border-radius:50%;background:#0b6ff4;color:#fff;font-size:11px;font-style:normal;font-weight:850}
.bc-sidebar-user b{display:block;font-size:12px}.bc-sidebar-user small{display:block;color:#b7c7da;font-size:10px;margin-top:2px}.bc-sidebar-user strong{color:#9eb2cb;font-size:18px}
.shell .main{grid-column:2;min-width:0;padding:0 28px 64px;background:#fff}
.bc-global-header{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:13px;height:58px;margin:0 -28px 16px;padding:0 26px;border-bottom:1px solid var(--bc-border);background:rgba(255,255,255,.96);backdrop-filter:blur(16px)}
.bc-breadcrumbs{display:flex;align-items:center;gap:10px;min-width:0;margin-right:auto;font-size:12px;color:var(--bc-muted);white-space:nowrap}.bc-breadcrumbs button{max-width:260px;padding:0;background:none;color:inherit;overflow:hidden;text-overflow:ellipsis}.bc-breadcrumbs button:hover{color:var(--bc-blue)}.bc-breadcrumbs b{color:var(--bc-ink);overflow:hidden;text-overflow:ellipsis}.bc-breadcrumbs span{color:#a8b2c1}
.bc-global-search{display:flex;align-items:center;gap:8px;width:min(292px,28vw);height:36px;padding:0 10px;border:1px solid var(--bc-border);border-radius:7px;background:#fff;color:#7d899a}.bc-global-search input{min-width:0;flex:1;border:0;outline:0;color:var(--bc-ink);background:transparent;font-size:12px}.bc-global-search kbd{padding:2px 5px;border:1px solid var(--bc-border);border-radius:4px;background:#fafbfd;color:#7b8799;font:10px inherit}
.bc-header-icon,.bc-header-avatar,.bc-mobile-menu{position:relative;display:grid;place-items:center;width:36px;height:36px;padding:0;border-radius:50%;background:transparent;color:#1b2c49}.bc-header-icon:hover{background:var(--bc-surface)}.bc-header-icon>span{position:absolute;right:-2px;top:-3px;display:grid;place-items:center;min-width:17px;height:17px;padding:0 4px;border:2px solid #fff;border-radius:999px;background:#e22335;color:#fff;font-size:8px;font-weight:800}.bc-header-avatar{background:var(--bc-navy);color:#fff;font-size:11px;font-weight:850}.bc-mobile-menu{display:none}
.shell .topbar{align-items:flex-start;margin:0 0 15px;gap:18px}.shell .topbar>div:first-child{min-width:0}.shell .topbar h2{margin:0;color:#0d1e38;font-size:24px;line-height:1.25;letter-spacing:-.025em}.shell .topbar p{margin:3px 0 0;color:var(--bc-muted);font-size:12px}.shell .app-version-badge{display:none}.shell .topbar>.actions{align-items:center;justify-content:flex-end}
.shell .btn{min-height:38px;padding:0 14px;border:1px solid var(--bc-border);border-radius:7px;background:#fff;color:var(--bc-ink);font-size:12px;font-weight:700;box-shadow:0 1px 2px rgba(15,35,62,.02)}.shell .btn:hover:not(:disabled){border-color:#b9c6d8;background:#f9fbfe}.shell .btn.primary{border-color:var(--bc-blue);background:var(--bc-blue);color:#fff}.shell .btn.danger{border-color:var(--bc-danger);background:var(--bc-danger);color:#fff}.shell .btn.warn{border-color:#f4ca8b;background:#fff7e9;color:#925511}
.shell .card{border:1px solid var(--bc-border);border-radius:9px;background:#fff;box-shadow:0 1px 3px rgba(15,35,62,.04)}.shell .pad{padding:15px}.shell .sub{color:var(--bc-muted);font-size:11px}.shell .section-title{margin:0 0 12px}.shell input,.shell select,.shell textarea{border-color:var(--bc-border);border-radius:7px;background:#fff;color:var(--bc-ink)}
.shell .badge{display:inline-flex;align-items:center;min-height:20px;padding:2px 7px;border-radius:5px;border:0;background:#eef2f7;color:#5d6a7e;font-size:9px;font-weight:750;font-style:normal}.shell .badge.complete,.shell .badge.success{background:#e9f8f0;color:#118250}.shell .badge.warn{background:#fff3df;color:#b16c12}.shell .badge.danger{background:#ffebee;color:#c92b40}.shell .badge.info{background:#eaf3ff;color:#1466cf}
.shell .progress,.bc-progress i,.bc-table-progress i,.bc-milestones i{height:5px;border-radius:999px;background:#e8edf4;overflow:hidden}.shell .progress>span,.bc-progress i em,.bc-table-progress i em,.bc-milestones i em{display:block;height:100%;border-radius:inherit;background:var(--bc-blue)}
.bc-metric-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:14px}.bc-metric-grid-four{grid-template-columns:repeat(4,minmax(0,1fr))}.bc-metric-card{display:flex;align-items:center;gap:12px;min-height:88px;padding:14px;border:1px solid var(--bc-border);border-radius:9px;background:#fff;box-shadow:0 1px 3px rgba(15,35,62,.035)}.bc-metric-icon{display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;border-radius:11px;background:#eef5ff;color:var(--bc-blue)}.bc-metric-card>span:last-child{display:grid;min-width:0}.bc-metric-card small{color:#4f5c70;font-size:10px;font-weight:650}.bc-metric-card strong{margin:2px 0;color:#111f36;font-size:22px;line-height:1}.bc-metric-card em{margin-top:5px;color:var(--bc-muted);font-size:9px;font-style:normal}.bc-metric-card.tone-warning .bc-metric-icon{background:#fff4e3;color:var(--bc-warning)}.bc-metric-card.tone-purple .bc-metric-icon{background:#f2edff;color:var(--bc-purple)}.bc-metric-card.tone-green .bc-metric-icon{background:#eaf9f1;color:var(--bc-success)}.bc-metric-card.tone-cyan .bc-metric-icon{background:#e7f9fa;color:#119ba3}.bc-metric-card.tone-danger .bc-metric-icon{background:#ffedef;color:var(--bc-danger)}.bc-metric-card.tone-neutral .bc-metric-icon{background:#eef1f5;color:#667085}
.bc-dashboard-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:12px}.bc-panel{padding:0;overflow:hidden}.bc-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:13px 14px 10px}.bc-panel-heading h3{display:flex;align-items:center;gap:7px;margin:0;color:#14233b;font-size:13px}.bc-panel-heading p{margin:3px 0 0;color:var(--bc-muted);font-size:10px}.bc-link{padding:2px 0;background:none;color:#176ad4;font-size:10px;font-weight:700;white-space:nowrap}.bc-list{display:grid}.bc-list>button,.bc-list>.bc-activity-row{border-top:1px solid #edf1f6}.bc-work-row,.bc-attention-row,.bc-activity-row{display:grid;grid-template-columns:55px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;min-height:52px;padding:8px 14px;background:#fff;text-align:left}.bc-work-row:hover,.bc-attention-row:hover,.bc-activity-row:hover{background:#f9fbfe}.bc-work-row time,.bc-activity-row time{color:#627087;font-size:9px}.bc-work-row span,.bc-attention-row span,.bc-activity-row span{min-width:0}.bc-work-row b,.bc-attention-row b,.bc-activity-row b{display:block;color:#17253b;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bc-work-row small,.bc-attention-row small,.bc-activity-row small{display:block;margin-top:3px;color:#6c788a;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bc-attention-row{grid-template-columns:13px minmax(0,1fr) auto}.bc-status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#7d8897}.bc-status-dot.tone-warning{background:var(--bc-warning)}.bc-status-dot.tone-info{background:var(--bc-blue)}.bc-status-dot.tone-success{background:var(--bc-success)}.bc-status-dot.tone-danger{background:var(--bc-danger)}.bc-status-dot.tone-neutral{background:#7d8897}.bc-summary-footer{display:flex;gap:24px;padding:10px 14px;border-top:1px solid var(--bc-border);color:#69768a;font-size:9px}.bc-summary-footer b{margin-right:4px;color:#1b2c48;font-size:12px}.bc-panel-subhead{display:flex;justify-content:space-between;padding:11px 14px 6px;border-top:1px solid var(--bc-border);font-size:10px}.bc-crew-rows{display:grid}.bc-crew-rows>button{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:48px;padding:7px 14px;border-top:1px solid #edf1f6;background:#fff;text-align:left}.bc-crew-rows b,.bc-crew-rows small{display:block}.bc-crew-rows b{font-size:10px}.bc-crew-rows small{margin-top:2px;color:var(--bc-muted);font-size:9px}.bc-crew-rows em{padding:4px 7px;border-radius:5px;background:#eaf8f0;color:#118250;font-size:8px;font-style:normal}.bc-activity-row{grid-template-columns:28px minmax(0,1fr) auto}.bc-activity-mark{display:grid!important;place-items:center;width:26px;height:26px;border-radius:50%;background:#eef5ff;color:var(--bc-blue)}
.bc-job-progress-list>button{display:grid;grid-template-columns:minmax(150px,1.2fr) minmax(140px,1fr) auto;align-items:center;gap:12px;width:100%;min-height:53px;padding:8px 14px;border-top:1px solid #edf1f6;background:#fff;text-align:left}.bc-job-progress-list span>b,.bc-job-progress-list small{display:block;font-size:10px}.bc-job-progress-list small{margin-top:3px;color:var(--bc-muted);font-size:9px}.bc-progress{display:grid;grid-template-columns:1fr 34px;align-items:center;gap:7px}.bc-progress b{font-size:9px}.bc-quick-actions{grid-column:1/-1;margin-top:12px}.bc-quick-actions>div:last-child{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:0 14px 14px}.bc-quick-actions>div:last-child>button{display:flex;align-items:center;gap:10px;min-height:63px;padding:11px;border:1px solid #e9edf3;border-radius:8px;background:#fff;color:var(--bc-blue);text-align:left}.bc-quick-actions>div:last-child>button:hover{border-color:#a9c9f6;background:#f8fbff}.bc-quick-actions b,.bc-quick-actions small{display:block}.bc-quick-actions b{color:#14233b;font-size:10px}.bc-quick-actions small{margin-top:3px;color:var(--bc-muted);font-size:8px}
.bc-filter-bar{display:flex;align-items:end;gap:9px;margin:14px 0;padding:0}.bc-filter-bar label{display:grid;gap:4px}.bc-filter-bar label>span{color:#536177;font-size:9px;font-weight:700}.bc-filter-bar input,.bc-filter-bar select{height:38px;min-width:135px;padding:0 10px;border:1px solid var(--bc-border);font-size:10px}.bc-filter-search{position:relative;display:flex!important;align-items:center!important;gap:7px;min-width:190px;flex:1;height:38px;padding:0 10px;border:1px solid var(--bc-border);border-radius:7px;color:#78869a}.bc-filter-search input{min-width:0!important;width:100%;height:auto!important;padding:0!important;border:0!important;outline:0}.bc-data-card{overflow:hidden}.bc-job-table{min-width:1050px}.bc-job-table-head,.bc-job-table-row{display:grid;grid-template-columns:1.7fr .8fr 1fr .9fr .85fr .7fr .65fr .45fr .7fr .72fr .6fr;align-items:center;gap:10px}.bc-job-table-head{height:39px;padding:0 12px;border-bottom:1px solid var(--bc-border);background:#fbfcfe;color:#58667a;font-size:8px;font-weight:750}.bc-job-table-row{min-height:83px;padding:9px 12px;border-bottom:1px solid var(--bc-border);color:#26364e;font-size:9px}.bc-job-table-row:hover{background:#fbfdff}.bc-job-table-row>span{min-width:0}.bc-job-identity{display:grid;grid-template-columns:53px minmax(0,1fr);gap:9px;align-items:center;min-width:0;padding:0;background:none;text-align:left}.bc-job-thumb{display:grid;place-items:center;width:53px;height:48px;border:1px solid #dce4ef;border-radius:5px;background:linear-gradient(135deg,#f7f9fc,#e9eef5);color:#8794a7}.bc-job-identity b,.bc-job-identity small{display:block;overflow:hidden;text-overflow:ellipsis}.bc-job-identity b{color:#14233b;font-size:10px}.bc-job-identity small{margin:3px 0;color:var(--bc-muted);font-size:8px}.bc-job-table-row [data-label="Project Manager"]{display:flex;align-items:center;gap:5px}.bc-job-table-row .avatar{width:22px;height:22px;flex-basis:22px;font-size:7px}.bc-table-progress{display:grid;gap:4px}.bc-table-progress i{display:block}.bc-table-progress small{color:var(--bc-muted);font-size:7px}.bc-row-actions{display:grid;gap:3px}.bc-row-actions button{padding:0;background:none;color:#253750;font-size:8px;text-align:left}.bc-row-actions button:hover{color:var(--bc-blue)}.bc-table-footer{padding:13px;color:var(--bc-muted);font-size:9px}
.job-header.card{padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important}.job-header-main>.btn,.job-header .breadcrumbs,.job-header-status{display:none!important}.job-header-main h2{font-size:0}.job-header-main h2:after{content:"Job Workspace";font-size:0}.job-header-main .sub{display:none}.job-header-actions{display:none!important}.job-primary-tabs{display:flex;align-items:center;gap:20px;overflow-x:auto;margin:0 0 18px;padding:0 8px;border-bottom:1px solid var(--bc-border);scrollbar-width:none}.job-primary-tabs button{display:flex;align-items:center;gap:6px;min-height:41px;padding:0 4px;border-bottom:2px solid transparent;background:none;color:#526076;white-space:nowrap}.job-primary-tabs button span{display:grid;place-items:center}.job-primary-tabs button b{font-size:10px}.job-primary-tabs button.active{border-bottom-color:var(--bc-blue);color:var(--bc-blue)}.job-content{min-width:0}.bc-overview-grid{display:grid;grid-template-columns:1.05fr 1fr 1fr;gap:12px}.bc-project-details dl{display:grid;gap:10px;margin:0;padding:8px 14px 15px}.bc-project-details dl>div{display:grid;grid-template-columns:105px minmax(0,1fr);gap:9px;font-size:9px}.bc-project-details dt{color:#6e7a8d}.bc-project-details dd{display:flex;align-items:center;gap:6px;margin:0;color:#24344c}.bc-project-details .avatar{width:21px;height:21px;flex-basis:21px;font-size:7px}.bc-milestones{display:grid;padding:0 14px 12px}.bc-milestones>button{display:grid;grid-template-columns:90px minmax(60px,1fr) 30px 62px;align-items:center;gap:7px;min-height:32px;padding:0;border-top:1px solid #f0f3f7;background:#fff;text-align:left}.bc-milestones>button:first-child{border-top:0}.bc-milestones span,.bc-milestones b{font-size:8px}.bc-recent-prints>button,.bc-inspection-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:48px;padding:7px 14px;border-top:1px solid #edf1f6;background:#fff;text-align:left}.bc-recent-prints b,.bc-recent-prints small{display:block}.bc-recent-prints b,.bc-inspection-row b{font-size:9px}.bc-recent-prints small,.bc-inspection-row small{margin-top:2px;color:var(--bc-muted);font-size:8px}.bc-recent-prints em{color:#617087;font-size:8px;font-style:normal}.bc-inspection-row{grid-template-columns:24px minmax(0,1fr) auto auto}.bc-inspection-row time{font-size:8px}.bc-job-tools{grid-column:1/-1;margin-top:12px}.bc-job-tools>.actions{padding:0 14px 14px}
.bc-prints-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:13px}.bc-prints-filters{margin:0 0 12px}.bc-print-list{display:grid;overflow:hidden}.bc-print-list .print-list-row{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(150px,.8fr) auto;gap:12px;min-height:125px;padding:11px;border-bottom:1px solid var(--bc-border)}.bc-print-list .print-list-row:last-child{border-bottom:0}.bc-print-list .print-list-open{display:grid;grid-template-columns:175px minmax(0,1fr);gap:13px;padding:0;background:none;text-align:left}.bc-print-list .print-list-thumbnail{width:175px;height:96px;border:1px solid #dce3ec;border-radius:6px;background:#f5f7fa;overflow:hidden}.bc-print-list .print-list-thumbnail img{width:100%;height:100%;object-fit:cover}.bc-print-list .print-list-copy{display:block;min-width:0}.bc-print-list .print-list-sheet{display:block;margin-bottom:3px;color:#12223b;font-size:19px;font-weight:800}.bc-print-list .print-list-copy>b{display:block;font-size:12px}.bc-print-list .print-list-badges{display:flex;gap:5px;margin-top:7px}.bc-print-list .print-list-meta{align-self:center}.bc-print-list .row-actions{display:grid;align-content:center;grid-template-columns:1fr 1fr;gap:5px}.bc-print-list .row-actions .btn{min-height:30px;padding:0 8px;font-size:8px}.bc-print-aside{display:grid;align-content:start;gap:12px}.bc-breakdown-sets{display:grid;padding:0 10px 10px}.bc-breakdown-sets>button:not(.bc-create-set){display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:61px;padding:8px;border:1px solid #edf1f6;border-radius:7px;background:#fff;text-align:left;margin-top:6px}.bc-breakdown-sets>button>span:first-child{display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#eef5ff;color:var(--bc-blue)}.bc-breakdown-sets b,.bc-breakdown-sets small{display:block}.bc-breakdown-sets b{font-size:10px}.bc-breakdown-sets small{margin-top:3px;color:var(--bc-muted);font-size:8px}.bc-create-set{min-height:34px;margin-top:8px;border:1px dashed #8db9f6;border-radius:6px;background:#f8fbff;color:var(--bc-blue);font-size:9px;font-weight:700}.bc-print-overview{display:grid;gap:11px;padding:4px 14px 16px}.bc-print-overview span{display:grid;grid-template-columns:8px 1fr auto;align-items:center;gap:7px;color:#526076;font-size:9px}.bc-print-overview i{width:7px;height:7px;border-radius:50%;background:#8793a5}.bc-print-overview .tone-success{background:var(--bc-success)}.bc-print-overview .tone-warning{background:var(--bc-warning)}.bc-print-overview .tone-danger{background:var(--bc-danger)}
.bc-review-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:13px}.bc-review-summary button{display:grid;grid-template-columns:10px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:47px;padding:0 12px;border:1px solid var(--bc-border);border-radius:8px;background:#fff;text-align:left}.bc-review-summary b{font-size:9px}.bc-review-summary strong{font-size:15px}.ai-analysis-mode .ai-pipeline-review-toolbar,.ai-analysis-mode .ai-pipeline-artifact-list,.ai-analysis-mode .ai-pipeline-publish,.ai-analysis-mode .ai-finalize-gate{display:none!important}.ai-review-mode .ai-pipeline-start,.ai-review-mode .ai-pipeline-overall,.ai-review-mode .ai-pipeline-stage-grid,.ai-review-mode .ai-pipeline-file-grid,.ai-review-mode .ai-pipeline-run-picker,.ai-review-mode>.warning-line,.ai-review-mode .ai-accuracy-dashboard,.ai-review-mode .ai-pipeline-comparison{display:none!important}.ai-review-mode .ai-pipeline-hero{display:none}.ai-pipeline-hero{margin-bottom:12px;background:linear-gradient(135deg,#f8fbff,#eef5ff)!important}.ai-pipeline-review-toolbar{border-radius:9px 9px 0 0!important}.ai-review-queue-tabs{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.ai-review-queue-tabs button{border:1px solid var(--bc-border)!important;border-radius:7px!important;background:#fff!important}.ai-review-queue-tabs button.active{border-color:#8ab8f6!important;background:#eef6ff!important;color:#095fce!important}.ai-review-card,.ai-review-finding-card{border-color:var(--bc-border)!important;border-radius:9px!important;box-shadow:none!important}.ai-pipeline-stage-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}.ai-stage{min-height:118px}.ai-pipeline-progress-track{background:#e7edf5!important}.ai-pipeline-progress-track>span{background:var(--bc-blue)!important}
.bc-report-templates{margin-bottom:13px}.bc-report-templates>.bc-panel-heading{padding-bottom:8px}.bc-report-templates>div:last-child{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;padding:0 12px 13px}.bc-report-templates button{display:grid;justify-items:center;align-content:center;gap:8px;min-height:130px;padding:12px;border:1px solid var(--bc-border);border-radius:8px;background:#fff;text-align:center}.bc-report-templates button>span{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#eef5ff;color:var(--bc-blue)}.bc-report-templates b{font-size:10px}.bc-report-templates small{color:var(--bc-muted);font-size:8px;line-height:1.45}.bc-report-workspace{gap:12px!important}.bc-checklist-metrics+.phase-progress-section{margin-top:0}.checklist-toolbar{border-radius:9px!important}.checklist-toolbar .job-head{align-items:center}.checklist-toolbar .grid{grid-template-columns:repeat(4,minmax(0,1fr))}.full-width-checklist .card,.work-package-progress-section{border-color:var(--bc-border)!important}.checklist-group,.checklist-phase-group{border-radius:8px!important}
.mobile-menu-overlay{z-index:45!important}.user-menu{z-index:100!important;color:var(--bc-ink)!important}.bc-global-header>.user-menu{position:absolute!important;right:20px!important;top:48px!important}.empty{color:var(--bc-muted);background:#fafbfd;border-color:var(--bc-border)}
.bc-attention-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-width:0;flex:1;padding:0;background:none;color:inherit;text-align:left}.bc-attention-heading>span{min-width:0}.bc-attention-heading>b{color:#738198;font-size:13px}
.shell [hidden]{display:none!important}
@media(max-width:1200px){.bc-metric-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.bc-metric-grid>.bc-metric-card:nth-child(n+4){grid-column:auto}.bc-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bc-prints-layout{grid-template-columns:minmax(0,1fr) 250px}.bc-print-list .print-list-open{grid-template-columns:125px minmax(0,1fr)}.bc-print-list .print-list-thumbnail{width:125px}.bc-report-templates>div:last-child{grid-template-columns:repeat(3,minmax(0,1fr))}.ai-pipeline-stage-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:980px){.shell{grid-template-columns:72px minmax(0,1fr)}.shell .sidebar{width:72px;padding-inline:8px}.shell .brand{justify-content:center}.shell .brand-copy,.shell .nav button>span:nth-child(2),.shell .nav button em,.bc-sidebar-user>button>span:nth-child(2),.bc-sidebar-user>button>strong{display:none}.shell .nav button{grid-template-columns:1fr;justify-items:center;padding:0}.shell .bc-nav-divider{margin-inline:8px}.bc-sidebar-user{padding-inline:18px}.shell .main{grid-column:2}.bc-dashboard-grid{grid-template-columns:1fr}.bc-quick-actions>div:last-child{grid-template-columns:repeat(3,minmax(0,1fr))}.bc-prints-layout{grid-template-columns:1fr}.bc-print-aside{grid-template-columns:1fr 1fr}.bc-job-table{min-width:0}.bc-job-table-head{display:none}.bc-job-table-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px}.bc-job-identity{grid-column:1/-1}.bc-job-table-row>span[data-label]::before{content:attr(data-label);display:block;margin-bottom:3px;color:#748096;font-size:7px;font-weight:700;text-transform:uppercase}.bc-row-actions{grid-column:1/-1;display:flex!important;gap:14px}.bc-row-actions button{font-size:9px}.bc-overview-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.shell{display:block;min-height:100dvh}.shell .sidebar{display:block;position:fixed;inset:0 auto 0 0;width:min(82vw,300px);padding:0 12px 100px;transform:translateX(-102%);transition:transform .2s ease}.shell:has(.mobile-menu-overlay) .sidebar{transform:translateX(0)}.shell .brand{justify-content:flex-start}.shell .brand-copy,.shell .nav button>span:nth-child(2),.shell .nav button em,.bc-sidebar-user>button>span:nth-child(2),.bc-sidebar-user>button>strong{display:block}.shell .nav button{grid-template-columns:28px 1fr auto;justify-items:stretch}.bc-sidebar-user{padding-inline:16px}.bc-sidebar-user>button{grid-template-columns:36px minmax(0,1fr) auto}.shell .main{padding:0 14px 88px}.bc-global-header{height:52px;margin:0 -14px 13px;padding:0 12px;gap:7px}.bc-mobile-menu{display:grid}.bc-breadcrumbs{font-size:10px}.bc-breadcrumbs button:first-child,.bc-breadcrumbs span:first-of-type{display:none}.bc-global-search{display:none}.bc-help{display:none}.shell .topbar{display:grid;grid-template-columns:1fr}.shell .topbar h2{font-size:21px}.shell .topbar>.actions{justify-content:flex-start;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px}.shell .topbar>.actions .btn{flex:0 0 auto}.bc-metric-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;margin-inline:-14px;padding:0 14px 4px;scrollbar-width:none}.bc-metric-card{flex:0 0 185px;min-height:78px;scroll-snap-align:start}.bc-dashboard-grid,.bc-overview-grid{grid-template-columns:1fr}.bc-quick-actions>div:last-child{grid-template-columns:1fr 1fr}.bc-filter-bar{display:grid;grid-template-columns:1fr 1fr;align-items:end}.bc-filter-search{grid-column:1/-1}.bc-filter-bar label,.bc-filter-bar input,.bc-filter-bar select{width:100%;min-width:0}.bc-job-table-row{grid-template-columns:1fr 1fr}.job-primary-tabs{margin-inline:-14px;padding-inline:14px;gap:16px}.bc-prints-filters{display:grid}.bc-print-aside{grid-template-columns:1fr}.bc-print-list .print-list-row{grid-template-columns:1fr}.bc-print-list .print-list-open{grid-template-columns:100px minmax(0,1fr)}.bc-print-list .print-list-thumbnail{width:100px;height:78px}.bc-print-list .print-list-meta{padding-left:113px}.bc-print-list .row-actions{grid-template-columns:1fr 1fr}.bc-review-summary{display:flex;overflow-x:auto;margin-inline:-14px;padding:0 14px 4px;scrollbar-width:none}.bc-review-summary button{flex:0 0 155px}.ai-review-queue-tabs{display:flex!important;overflow-x:auto}.ai-review-queue-tabs button{flex:0 0 140px}.ai-pipeline-stage-grid{grid-template-columns:1fr 1fr!important}.ai-pipeline-controls{grid-template-columns:1fr 1fr!important}.bc-report-templates>div:last-child{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}.bc-report-templates button{flex:0 0 170px;scroll-snap-align:start}.bc-report-workspace{grid-template-columns:1fr!important}.checklist-toolbar .grid{grid-template-columns:1fr 1fr}.mobile-nav{display:flex!important;position:fixed;z-index:44;left:0;right:0;bottom:0;height:67px;padding:5px 6px calc(5px + env(safe-area-inset-bottom));border-top:1px solid var(--bc-border);background:rgba(255,255,255,.98);overflow-x:auto}.mobile-nav button{flex:1 0 67px;display:grid;justify-items:center;align-content:center;gap:3px;min-height:52px;color:#68758a;font-size:8px}.mobile-nav button.active{background:#edf5ff;color:var(--bc-blue)}body{--mobile-bottom-nav-height:67px}}
@media(max-width:470px){.bc-quick-actions>div:last-child{grid-template-columns:1fr}.bc-work-row{grid-template-columns:46px minmax(0,1fr)}.bc-work-row>.badge{grid-column:2;justify-self:start}.bc-job-progress-list>button{grid-template-columns:1fr auto}.bc-job-progress-list .bc-progress{grid-column:1/-1}.bc-filter-bar{grid-template-columns:1fr}.bc-filter-search{grid-column:auto}.bc-job-table-row{grid-template-columns:1fr}.bc-job-identity,.bc-row-actions{grid-column:1}.bc-row-actions{flex-wrap:wrap}.bc-project-details dl>div{grid-template-columns:90px minmax(0,1fr)}.bc-milestones>button{grid-template-columns:75px minmax(50px,1fr) 28px}.bc-milestones small{display:none}.bc-print-list .print-list-open{grid-template-columns:82px minmax(0,1fr)}.bc-print-list .print-list-thumbnail{width:82px;height:70px}.bc-print-list .print-list-meta{padding-left:95px}.bc-print-list .row-actions{grid-template-columns:1fr}.ai-pipeline-stage-grid,.ai-pipeline-controls,.checklist-toolbar .grid{grid-template-columns:1fr!important}.bc-review-summary button{flex-basis:140px}}
@media(min-width:761px) and (max-width:840px){body{--mobile-bottom-nav-height:67px}.shell{display:block}.shell .main{padding-bottom:120px;scroll-padding-bottom:140px}.mobile-nav{display:flex!important;position:fixed;z-index:44;left:0;right:0;bottom:0;height:67px;padding:5px 6px calc(5px + env(safe-area-inset-bottom));border-top:1px solid var(--bc-border);background:rgba(255,255,255,.98);overflow-x:auto}.mobile-nav button{flex:1 0 67px;display:grid;justify-items:center;align-content:center;gap:3px;min-height:52px;color:#68758a;font-size:8px}.mobile-nav button.active{background:#edf5ff;color:var(--bc-blue)}}

/* Jobs and job dashboard ------------------------------------------------ */
.job-project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.job-project-card{display:flex;min-width:0;overflow:hidden;border:1px solid #dfe5ed;border-radius:12px;background:#fff;box-shadow:0 4px 14px rgba(20,40,68,.06);flex-direction:column}.job-cover-media{position:relative;display:grid;place-items:center;width:100%;min-width:0;overflow:hidden;border:0;background:#eaf0f6;text-align:left}.job-project-cover{height:168px;border-radius:0}.job-cover-media img{width:100%;height:100%;object-fit:cover}.job-cover-media[role=button],button.job-cover-media{cursor:pointer}.job-cover-media[role=button]:hover img,button.job-cover-media:hover img{transform:scale(1.015)}.job-cover-media img{transition:transform .2s ease}.job-cover-placeholder{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;gap:5px;padding:18px;background-color:#edf3f9;background-image:linear-gradient(rgba(37,93,150,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(37,93,150,.08) 1px,transparent 1px),linear-gradient(135deg,transparent 48%,rgba(21,91,161,.08) 49%,rgba(21,91,161,.08) 51%,transparent 52%);background-size:22px 22px,22px 22px,100% 100%;color:#2d6da9;text-align:center}.job-cover-placeholder[hidden]{display:none}.job-cover-placeholder b{color:#173657;font-size:12px;letter-spacing:.04em;text-transform:uppercase}.job-cover-placeholder small{color:#6d8298;font-size:10px}.job-project-card-body{display:grid;gap:13px;padding:16px}.job-project-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.job-project-card-heading>div{min-width:0}.job-project-card-heading .eyebrow{display:block;margin-bottom:4px;color:#3178bf;font-size:9px;font-weight:800;letter-spacing:.08em}.job-project-card-heading h3{margin:0;color:#15263e;font-size:16px;line-height:1.25}.job-project-card-heading p{display:flex;align-items:center;gap:4px;margin:6px 0 0;color:#69778b;font-size:10px}.job-project-progress{display:grid;grid-template-columns:1fr auto;gap:6px;color:#536177;font-size:10px}.job-project-progress b{color:#142b47;font-size:13px}.job-project-progress>i{grid-column:1/-1;display:block;height:6px;overflow:hidden;border-radius:999px;background:#e8edf3}.job-project-progress>i em{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#0878ec,#2d95f5)}.job-project-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid #e7ebf1;border-radius:9px;background:#fbfcfe}.job-project-metrics button{display:grid;gap:2px;min-width:0;min-height:58px;padding:9px 7px;border-left:1px solid #e7ebf1;background:none;text-align:center}.job-project-metrics button:first-child{border-left:0}.job-project-metrics b{color:#142842;font-size:15px}.job-project-metrics span{overflow:hidden;color:#68768a;font-size:8px;text-overflow:ellipsis;white-space:nowrap}.job-project-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#778497;font-size:9px}.job-project-card-footer>span:first-child{display:flex;align-items:center;gap:5px;min-width:0}.job-health-label{flex:0 0 auto;color:#15835f;font-weight:750}.job-health-label.warn{color:#c5790a}.job-health-label.danger{color:#c33e4d}.job-project-actions{display:flex;justify-content:flex-end;gap:8px}.job-project-actions .btn{min-height:38px}.job-project-actions .btn.primary{display:flex;align-items:center;gap:7px}.job-project-count{padding:16px 0 4px;color:#768396;font-size:10px;text-align:center}.job-project-empty{margin-top:14px;text-align:center}
.job-overview-metric{width:100%;border:1px solid var(--bc-border);text-align:left}.job-overview-metric:where(button):hover{border-color:#9dc9f2;box-shadow:0 6px 16px rgba(22,104,187,.1);transform:translateY(-1px)}.job-overview-layout{display:grid;grid-template-columns:1.08fr 1fr 1fr;gap:13px}.job-overview-layout>.bc-panel{min-width:0;overflow:hidden}.job-dashboard-project,.job-dashboard-milestones,.job-dashboard-activity{min-height:355px}.job-project-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,36%);min-height:300px}.job-project-detail-layout dl{align-content:start}.job-project-detail-layout .project-description{grid-template-columns:1fr!important;gap:4px!important}.job-dashboard-cover{height:100%;min-height:290px;border-left:1px solid #e8edf3;border-radius:0}.job-dashboard-cover .job-cover-placeholder b{font-size:10px}.job-dashboard-cover .job-cover-placeholder small{font-size:8px}.job-dashboard-milestones .bc-milestones{padding-bottom:10px}.job-dashboard-milestones .bc-milestones>button{grid-template-columns:112px minmax(55px,1fr) 31px 65px;min-height:29px}.job-dashboard-milestones .bc-milestones span{font-size:8px}.job-dashboard-activity .bc-activity-row{grid-template-columns:28px minmax(0,1fr) auto auto;min-height:49px}.job-dashboard-activity .bc-activity-row time{max-width:95px;font-size:7px;white-space:normal}.job-dashboard-crews .bc-crew-rows button{grid-template-columns:30px minmax(0,1fr) auto;min-height:60px;padding:8px 14px}.job-dashboard-crews .bc-crew-rows small{display:block;margin-top:2px}.job-dashboard-prints .bc-recent-prints>button{grid-template-columns:48px minmax(0,1fr) auto;min-height:62px}.recent-print-thumb{display:grid;place-items:center;width:45px;height:40px;overflow:hidden;border:1px solid #dce4ee;border-radius:5px;background:#f1f5f9;color:#6e849b}.recent-print-thumb img{width:100%;height:100%;object-fit:cover}.recent-print-thumb i{display:grid}.job-dashboard-inspections .bc-inspection-row{min-height:55px}.job-ai-summary{margin-top:13px}.job-ai-summary>.bc-panel-heading{border-bottom:1px solid #e9edf3}.job-ai-summary>div:last-child{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:13px}.job-ai-summary>div:last-child button{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;align-items:center;gap:2px 8px;min-height:58px;padding:10px 13px;border:1px solid #e5eaf1;border-radius:8px;background:#fff;text-align:left}.job-ai-summary>div:last-child button:hover{border-color:#9fcaf3;background:#f8fbff}.job-ai-summary .bc-status-dot{grid-row:1/3}.job-ai-summary b{color:#142842;font-size:17px}.job-ai-summary small{color:#66758a;font-size:9px}.topbar>.actions{position:relative}.topbar>.actions>.floating-menu{top:42px;right:0;z-index:30}
.job-edit-layout{display:grid;gap:16px}.job-edit-form{order:1}.job-cover-editor{order:2;display:grid;gap:16px;padding:18px;border:1px solid #dfe5ed;border-radius:12px}.job-cover-editor-preview{display:grid;grid-template-columns:minmax(240px,38%) minmax(0,1fr);align-items:center;gap:20px}.job-cover-editor-preview>.job-cover-media{height:220px;border:1px solid #dce4ed;border-radius:9px}.job-cover-editor-preview h3{margin:5px 0 8px;color:#172941;font-size:18px}.job-cover-editor-preview p{max-width:640px;color:#607086;font-size:11px;line-height:1.55}.job-cover-editor-preview small{color:#758398;font-size:9px}.job-cover-editor-actions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}.job-cover-upload-button{position:relative;overflow:hidden}.job-cover-upload-button input{position:absolute;inset:0;opacity:0;cursor:pointer}.job-cover-print-picker{display:flex;align-items:center;gap:7px;min-width:min(100%,480px)}.job-cover-print-picker select{min-width:220px;flex:1}.job-cover-print-picker input{width:68px}.job-cover-position{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:15px;padding-top:14px;border-top:1px solid #e7ebf1}.job-cover-position label{display:grid;gap:5px;color:#536176;font-size:10px;font-weight:700}.job-cover-position input{width:100%;padding:0}.job-cover-create-note{margin:0;color:#6d7b8f;font-size:9px}
@media(max-width:1250px){.job-project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.job-overview-layout{grid-template-columns:repeat(2,minmax(0,1fr))}.job-dashboard-activity{grid-column:1/-1}.job-dashboard-project,.job-dashboard-milestones{min-height:360px}}
@media(max-width:760px){.job-project-grid{grid-template-columns:1fr}.job-project-cover{height:180px}.job-project-card-body{padding:15px}.job-overview-layout{grid-template-columns:1fr}.job-dashboard-project,.job-dashboard-milestones,.job-dashboard-activity{min-height:0}.job-project-detail-layout{display:flex;flex-direction:column}.job-dashboard-cover{order:-1;height:210px;min-height:210px;border:0;border-bottom:1px solid #e8edf3}.job-project-detail-layout dl{order:2}.job-dashboard-activity{grid-column:auto}.job-ai-summary>div:last-child{display:flex;overflow-x:auto;scroll-snap-type:x mandatory}.job-ai-summary>div:last-child button{flex:0 0 150px;scroll-snap-align:start}.job-cover-editor{padding:14px}.job-cover-editor-preview{grid-template-columns:1fr}.job-cover-editor-preview>.job-cover-media{height:200px}.job-cover-editor-actions{display:grid;grid-template-columns:1fr 1fr}.job-cover-editor-actions>.btn,.job-cover-editor-actions>.job-cover-upload-button{width:100%;min-height:44px}.job-cover-print-picker{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) 68px}.job-cover-print-picker .btn{grid-column:1/-1;min-height:44px}.job-cover-position{grid-template-columns:1fr}.job-cover-position .btn{min-height:44px}.job-dashboard-milestones .bc-milestones>button{grid-template-columns:100px minmax(50px,1fr) 30px}.job-dashboard-milestones .bc-milestones small{display:none}}
@media(max-width:430px){.job-project-cover{height:158px}.job-project-card-heading h3{font-size:15px}.job-project-card-heading p{font-size:9px}.job-project-metrics button{min-height:55px;padding-inline:4px}.job-project-metrics span{font-size:7px}.job-project-card-footer{align-items:flex-start;flex-direction:column}.job-project-actions .btn{flex:1}.job-cover-editor-actions{grid-template-columns:1fr}.job-cover-print-picker{grid-column:1;grid-template-columns:minmax(0,1fr) 62px}.job-dashboard-crews .bc-crew-rows button{grid-template-columns:30px minmax(0,1fr)}.job-dashboard-crews .bc-crew-rows em{grid-column:2;justify-self:start}.job-dashboard-activity .bc-activity-row{grid-template-columns:28px minmax(0,1fr)}.job-dashboard-activity .bc-activity-row time,.job-dashboard-activity .bc-activity-row em{grid-column:2;justify-self:start}.job-dashboard-prints .bc-recent-prints>button{grid-template-columns:45px minmax(0,1fr)}.job-dashboard-prints .bc-recent-prints em{grid-column:2;justify-self:start}.job-dashboard-inspections .bc-inspection-row{grid-template-columns:24px minmax(0,1fr)}.job-dashboard-inspections .bc-inspection-row time,.job-dashboard-inspections .bc-inspection-row em{grid-column:2;justify-self:start}}

/* Command Studio commercial workspace ---------------------------------- */
.command-studio-commercial{grid-template-rows:46px 64px minmax(0,1fr);color:#eef5ff;background:#03101d;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.command-studio-product-bar{z-index:35;display:grid;grid-template-columns:54px minmax(260px,1fr) auto minmax(220px,290px) 38px 38px 42px;align-items:center;gap:8px;min-height:46px;border-bottom:1px solid #203247;background:#061321;box-shadow:0 2px 12px rgba(0,0,0,.25)}
.studio-product-mark{align-self:stretch;border:0;border-right:1px solid #203247;background:linear-gradient(145deg,#0876f4,#0759c3);color:#8fd1ff;font-size:25px;font-weight:950;text-shadow:0 0 18px rgba(53,158,255,.85)}
.command-studio-product-bar>nav{display:flex;align-items:center;gap:10px;min-width:0;padding-left:16px;color:#8fa2b8;font-size:11px;white-space:nowrap}.command-studio-product-bar>nav button{max-width:290px;padding:0;border:0;background:none;color:#c6d2df;overflow:hidden;text-overflow:ellipsis}.command-studio-product-bar>nav b{color:#fff}.command-studio-product-bar>nav span{color:#61748b;font-size:16px}
.studio-global-search{display:flex;align-items:center;gap:8px;height:31px;padding:0 9px;border:1px solid #293c51;border-radius:5px;background:#091725;color:#7f92a8}.studio-global-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:#e8f0f8;font-size:10px}.studio-global-search kbd{padding:2px 5px;border:1px solid #2d4056;border-radius:4px;color:#91a2b5;font:9px inherit}
.studio-product-icon,.studio-product-avatar{position:relative;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:#cbd8e5}.studio-product-icon:hover{background:#112337}.studio-product-icon em{position:absolute;right:-3px;top:-4px;display:grid;place-items:center;min-width:16px;height:16px;padding:0 3px;border:2px solid #061321;border-radius:99px;background:#e0263d;color:#fff;font-size:7px;font-style:normal}.studio-product-avatar{background:#26374d;color:#fff;font-size:9px;font-weight:900}
.command-studio-commercial .command-studio-header{z-index:30;display:grid;grid-template-columns:48px minmax(255px,360px) minmax(0,1fr) auto;gap:10px;min-height:64px;padding:0 12px 0 5px;border-bottom:1px solid #24384e;background:#071523;box-shadow:none}.command-studio-commercial .viewer-index-back{border:0;background:transparent}.command-studio-commercial .viewer-index-back small{color:#8fa3b8}.command-studio-commercial .viewer-sheet-identity{padding:8px 10px}.command-studio-commercial .viewer-sheet-identity strong{color:#fff;font-size:15px;letter-spacing:.005em}.command-studio-commercial .viewer-sheet-identity strong i{margin:0 4px;color:#8598ad;font-style:normal}.command-studio-commercial .viewer-sheet-identity>span{display:flex;align-items:center;gap:10px;color:#8092a6;font-size:9px;text-transform:none}.command-studio-commercial .viewer-sheet-identity em{padding:3px 7px;border:1px solid #285841;border-radius:4px;background:#0c251f;color:#65d797;font-style:normal;font-weight:800}
.studio-toolbar-tools{display:flex;align-self:stretch;justify-content:center;min-width:0;overflow-x:auto;scrollbar-width:none}.command-studio-commercial .command-studio-tool.studio-top-tool{position:relative;display:grid;grid-template-rows:22px 14px;place-items:center;align-content:center;gap:2px;min-width:68px;min-height:63px;padding:4px 8px;border:0;border-left:1px solid transparent;border-right:1px solid transparent;border-radius:0;background:transparent;color:#c6d2df;font-size:9px;font-weight:650}.command-studio-commercial .studio-top-tool .command-studio-tool-count{position:absolute;top:7px;right:8px;min-width:14px;height:14px;background:#174a78;color:#bde1ff;font-size:7px}.command-studio-commercial .studio-top-tool:hover:not(:disabled){background:#0d2033;color:#fff}.command-studio-commercial .studio-top-tool.active{border-color:#1f3d5c;background:#0b2848;color:#69adff;box-shadow:inset 0 -2px #1680ff}.command-studio-commercial .studio-top-tool:disabled{opacity:.48}
.studio-command-actions{gap:7px}.studio-command-actions>button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:0 11px;border:1px solid #2a3d52;border-radius:5px;background:#091725;color:#e5edf5;font-size:9px;font-weight:800}.studio-command-actions .studio-share-button:hover{background:#10253a}.studio-command-actions .studio-export-button{border-color:#147bed;background:#0878ef;color:#fff}.studio-command-actions .studio-export-button:disabled{border-color:#29425e;background:#17304a;color:#7691ad;opacity:.72}.studio-command-actions .viewer-icon-button{display:none;width:35px;min-width:35px;padding:0}
.studio-command-actions .studio-sheets-toggle,.studio-command-actions .studio-more-toggle{display:flex}
.command-studio-workspace{display:grid;grid-template-columns:54px 212px minmax(0,1fr) 280px;min-width:0;min-height:0;background:#03101d}.command-studio-commercial.sheets-collapsed .command-studio-workspace{grid-template-columns:54px minmax(0,1fr) 280px}.command-studio-commercial.inspector-collapsed .command-studio-workspace{grid-template-columns:54px 212px minmax(0,1fr)}.command-studio-commercial.sheets-collapsed.inspector-collapsed .command-studio-workspace{grid-template-columns:54px minmax(0,1fr)}
.command-studio-commercial.sheets-collapsed .command-studio-sheet-rail,.command-studio-commercial.inspector-collapsed .command-studio-inspector{display:none}
.command-studio-app-rail{display:grid;grid-template-rows:repeat(8,43px) 1fr 43px;justify-items:center;min-height:0;padding:9px 5px 8px;border-right:1px solid #21364b;background:#061421}.command-studio-app-rail button{display:grid;place-items:center;width:39px;height:39px;padding:0;border:0;border-radius:5px;background:transparent;color:#9eb0c2}.command-studio-app-rail button:hover{background:#10253a;color:#fff}.command-studio-app-rail button.active{background:#153e70;color:#73b5ff;box-shadow:inset 2px 0 #1885ff}
.command-studio-sheet-rail{display:grid;grid-template-rows:42px auto auto minmax(0,1fr) auto;min-width:0;min-height:0;border-right:1px solid #24384e;background:#081725;color:#dce6f0}.command-studio-sheet-rail>header{display:flex;align-items:center;justify-content:space-between;padding:0 13px;border-bottom:1px solid #1e3348}.command-studio-sheet-rail>header b{font-size:12px}.command-studio-sheet-rail>header button,.command-studio-inspector>header>button{width:28px;height:28px;padding:0;border:0;border-radius:4px;background:transparent;color:#8498ad;font-size:17px}.command-studio-sheet-rail>header button:hover,.command-studio-inspector>header>button:hover{background:#11273c;color:#fff}
.studio-sheet-set-select{padding:10px 12px 6px}.studio-sheet-set-select select{width:100%;height:33px;padding:0 9px;border:1px solid #2b4055;border-radius:5px;background:#0a1b2a;color:#d6e0ea;font-size:9px}.studio-sheet-search{display:flex;align-items:center;gap:7px;height:33px;margin:0 12px 8px;padding:0 9px;border:1px solid #283d52;border-radius:5px;background:#091a29;color:#7890a7}.studio-sheet-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:#e7eef5;font-size:9px}
.studio-sheet-rail-list{display:block!important;min-height:0;padding:0 7px 12px!important;overflow-y:auto;scrollbar-color:#344b61 #081725}.studio-sheet-rail-list .studio-print-group{margin:0 0 8px;border:0;border-radius:0;background:transparent}.studio-sheet-rail-list .studio-print-group>header{display:flex;align-items:center;justify-content:space-between;min-height:25px;padding:2px 5px;background:transparent;color:#7f93a8}.studio-sheet-rail-list .studio-print-group>header b{font-size:8px;letter-spacing:.07em;text-transform:uppercase}.studio-sheet-rail-list .studio-print-group>header small{font-size:8px}
.studio-sheet-rail-item{display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;align-items:center;gap:9px;min-height:72px!important;margin:0 0 5px;padding:5px!important;border:1px solid transparent!important;border-radius:6px!important;background:#0a1a28!important;color:#dce7f1;text-align:left}.studio-sheet-rail-item:hover{border-color:#365674!important;background:#0e2235!important}.studio-sheet-rail-item.active{border-color:#1685ff!important;background:#0c2945!important;box-shadow:0 0 0 1px rgba(18,125,243,.2),inset 2px 0 #1685ff!important}.studio-sheet-rail-item .studio-drawing-thumbnail{width:72px;height:54px;border-color:#34495d;border-radius:4px}.studio-sheet-rail-item>span:last-child{display:grid;min-width:0;gap:2px}.studio-sheet-rail-item strong,.studio-sheet-rail-item b,.studio-sheet-rail-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.studio-sheet-rail-item strong{color:#e8f2fb;font-size:10px}.studio-sheet-rail-item b{color:#c0cddd;font-size:8px;line-height:1.25;text-transform:none}.studio-sheet-rail-item small{color:#8092a6;font-size:7px}.studio-manage-sheets{display:flex;align-items:center;justify-content:center;gap:6px;min-height:38px;margin:7px 12px 11px;border:1px solid #2a4056;border-radius:5px;background:#0a1a29;color:#bfd0df;font-size:9px;font-weight:750}
.command-studio-canvas{position:relative;min-width:0;min-height:0;border-right:1px solid #22364b;background:#020e19}.command-studio-canvas .professional-drawing-stage{background-color:#020f1c;background-image:radial-gradient(circle at center,rgba(88,125,158,.15) 1px,transparent 1px);background-size:20px 20px}.command-studio-canvas .professional-drawing-stage .drawing-page-surface{margin:50px auto 88px;box-shadow:0 12px 44px rgba(0,0,0,.72)}
.command-studio-commercial .command-studio-footer{position:absolute;z-index:22;right:auto;bottom:13px;left:50%;width:max-content;min-height:45px;padding:4px 6px;border:1px solid #253b51;border-radius:8px;background:rgba(5,17,29,.94);box-shadow:0 8px 25px rgba(0,0,0,.55);transform:translateX(-50%)}.command-studio-commercial .command-studio-navigation{gap:3px}.command-studio-commercial .command-studio-navigation>button{display:grid;place-items:center;min-width:35px;min-height:35px;padding:0;border:0;border-radius:5px;background:transparent;color:#c4d1dd}.command-studio-commercial .command-studio-navigation>button:hover{background:#12283d;color:#fff}.command-studio-commercial .command-studio-navigation>button.active{background:#0e74e6;color:#fff}.command-studio-commercial .command-studio-navigation>button:disabled{opacity:.28}.command-studio-commercial .command-studio-navigation>i{width:1px;height:24px;margin:0 3px;background:#273b4f}.command-studio-commercial .viewer-sheet-position{min-width:52px!important;color:#e2ebf3!important;font-size:9px}.command-studio-commercial .studio-zoom-value{display:flex!important;grid-auto-flow:column!important;gap:5px;min-width:62px!important;font-size:9px}.command-studio-commercial .print-viewer-footer #drawing-zoom-label{min-width:0;color:inherit}
.command-studio-inspector{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;min-width:0;min-height:0;background:#071624;color:#dbe6f0}.command-studio-inspector>header{display:grid;grid-template-columns:minmax(0,1fr) 28px;gap:8px;padding:13px 12px 10px;border-bottom:1px solid #20364b}.command-studio-inspector>header>div{display:grid;gap:3px;min-width:0}.command-studio-inspector>header small{color:#7f93a8;font-size:7px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.command-studio-inspector>header b{overflow:hidden;color:#fff;font-size:12px;text-overflow:ellipsis}.command-studio-inspector>header span{overflow:hidden;color:#a6b7c7;font-size:9px;text-overflow:ellipsis}.studio-inspector-status{justify-self:start;margin:9px 12px 0}.studio-inspector-tabs{display:flex;gap:15px;margin:0 12px;border-bottom:1px solid #20364b}.studio-inspector-tabs button{min-height:38px;padding:0 0;border:0;border-bottom:2px solid transparent;background:transparent;color:#8498ad;font-size:9px}.studio-inspector-tabs button.active{border-bottom-color:#1685ff;color:#fff}.studio-inspector-body{min-height:0;padding:11px 12px;overflow:auto}.studio-inspector-body dl{display:grid;gap:0;margin:0}.studio-inspector-body dl>div{display:grid;grid-template-columns:78px minmax(0,1fr);gap:8px;padding:8px 0;border-bottom:1px solid #142a3e}.studio-inspector-body dt{color:#7f93a8;font-size:8px}.studio-inspector-body dd{margin:0;color:#dce7f1;font-size:9px;overflow-wrap:anywhere}.studio-inspector-callout{margin-top:14px;padding:11px;border-top:1px solid #254057;border-bottom:1px solid #254057;background:#091b2a}.studio-inspector-callout b{font-size:9px}.studio-inspector-callout p{margin:6px 0 0;color:#aebdca;font-size:8px;line-height:1.5}.studio-inspector-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:12px}.studio-inspector-summary button{display:grid;gap:3px;min-height:53px;padding:7px 3px;border:1px solid #20394e;border-radius:5px;background:#0a1c2c;color:#8298ad;font-size:7px}.studio-inspector-summary b{color:#e5eef6;font-size:14px}.studio-inspector-note{padding:11px;border:1px solid #20384e;border-radius:6px;background:#0a1b2a}.studio-inspector-note p{margin:0 0 10px;color:#c1cfdb;font-size:9px;line-height:1.5}.studio-inspector-note button{min-height:30px;border:1px solid #34516a;border-radius:4px;background:#0f2940;color:#d7e3ed;font-size:8px}.studio-inspector-activity{display:grid}.studio-inspector-activity article{display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;padding:9px 0;border-bottom:1px solid #172d41}.studio-inspector-activity .avatar{width:27px;height:27px;font-size:7px}.studio-inspector-activity p{display:grid;margin:0}.studio-inspector-activity b{font-size:8px}.studio-inspector-activity small{margin-top:3px;color:#7f93a8;font-size:7px}.command-studio-inspector>footer{display:flex;gap:7px;padding:10px 12px;border-top:1px solid #20364b}.command-studio-inspector>footer button{flex:1;min-height:35px;border:1px solid #2c455c;border-radius:5px;background:#0b1d2c;color:#d8e3ed;font-size:8px;font-weight:800}.command-studio-inspector>footer button.primary{border-color:#147bed;background:#0878ef;color:#fff}
.command-studio-inspector{display:flex;flex-direction:column}.command-studio-inspector>header,.studio-inspector-status,.studio-inspector-tabs,.command-studio-inspector>footer{flex:0 0 auto}.studio-inspector-status{align-self:flex-start}.studio-inspector-body{flex:1 1 auto}
.command-studio-commercial>.notifications-panel,.command-studio-commercial>.user-menu{position:absolute;z-index:80;top:45px;right:12px;color:#17253b}
.command-studio-commercial .print-viewer-drawer{top:10px;bottom:68px;border-color:#395067}.command-studio-commercial .drawer-right{right:10px}.command-studio-commercial .drawer-left{left:10px}.command-studio-commercial.controls-hidden .command-studio-product-bar{opacity:1;transform:none;pointer-events:auto}
@media(max-width:1180px){.command-studio-commercial .command-studio-header{grid-template-columns:44px minmax(210px,290px) minmax(0,1fr) auto}.command-studio-commercial .command-studio-tool.studio-top-tool{min-width:58px;padding-inline:5px}.studio-command-actions .studio-share-button span,.studio-command-actions .studio-export-button span{display:none}.studio-command-actions>button{width:35px;padding:0}.command-studio-workspace{grid-template-columns:48px 200px minmax(0,1fr)}.command-studio-commercial.sheets-collapsed .command-studio-workspace,.command-studio-commercial.sheets-collapsed.inspector-collapsed .command-studio-workspace{grid-template-columns:48px minmax(0,1fr)}.command-studio-inspector{display:none}.command-studio-app-rail{padding-inline:3px}.studio-details-toggle{display:flex!important}}
@media(max-width:900px){.command-studio-commercial{grid-template-rows:44px auto minmax(0,1fr)}.command-studio-product-bar{grid-template-columns:44px minmax(0,1fr) auto 34px 34px 36px;min-height:44px}.studio-takeoff-launch{padding:6px 9px;font-size:12px;white-space:nowrap}.command-studio-product-bar>nav{padding-left:9px;font-size:9px}.command-studio-product-bar>nav button:first-child,.command-studio-product-bar>nav span:first-of-type{display:none}.studio-global-search,.command-studio-product-bar>.studio-product-icon:nth-of-type(2){display:none}.command-studio-commercial .command-studio-header{grid-template-columns:42px minmax(0,1fr) auto;grid-template-rows:56px 54px;gap:0;min-height:110px;padding:0 6px}.command-studio-commercial .viewer-sheet-identity{padding-inline:6px}.command-studio-commercial .viewer-sheet-identity strong{font-size:12px}.command-studio-commercial .viewer-sheet-identity>span{font-size:8px}.studio-command-actions{gap:3px}.studio-command-actions .studio-share-button,.studio-command-actions .studio-export-button{display:none}.studio-command-actions .viewer-icon-button{display:flex}.studio-toolbar-tools{grid-column:1/-1;grid-row:2;justify-content:flex-start;border-top:1px solid #1c3044}.command-studio-commercial .command-studio-tool.studio-top-tool{flex:1 0 57px;min-width:57px;min-height:53px;grid-template-rows:20px 12px;font-size:8px}.command-studio-workspace,.command-studio-commercial.sheets-collapsed .command-studio-workspace,.command-studio-commercial.inspector-collapsed .command-studio-workspace,.command-studio-commercial.sheets-collapsed.inspector-collapsed .command-studio-workspace{display:block}.command-studio-app-rail,.command-studio-sheet-rail,.command-studio-inspector{display:none}.command-studio-canvas{width:100%;height:100%;border:0}.command-studio-canvas .professional-drawing-stage .drawing-page-surface{margin:24px auto 82px}.command-studio-commercial .command-studio-footer{bottom:9px;max-width:calc(100% - 12px);overflow-x:auto}.command-studio-commercial .command-studio-navigation{width:max-content}.command-studio-commercial .print-viewer-drawer{bottom:7px}.command-studio-commercial .command-studio-shell .print-viewer-drawer.drawer-left{top:auto}.studio-product-mark{font-size:21px}}
@media(max-width:520px){.command-studio-commercial .viewer-sheet-identity strong{font-size:11px}.command-studio-commercial .viewer-sheet-identity>span em{display:none}.command-studio-commercial .studio-details-toggle{display:none}.command-studio-commercial .command-studio-navigation>button{min-width:33px}.command-studio-commercial .command-studio-navigation>i{display:none}.command-studio-commercial .viewer-sheet-position{min-width:45px!important}.command-studio-commercial .studio-zoom-value{min-width:52px!important}}

/* AI Review → Locate Source. This panel lives inside the dark Command Studio canvas.
   It explicitly supplies both surface and text colors so it cannot inherit light text
   onto the prior white/translucent surface. */
.command-studio-commercial .ai-review-studio-panel{--review-surface:#0b1724;--review-surface-raised:#112438;--review-border:#36516d;--review-muted:#b9c9d8;--review-accent:#61adff;position:absolute;z-index:45;display:grid;gap:12px;width:min(370px,calc(100% - 32px));max-height:min(72vh,650px);overflow:auto;padding:15px;border:1px solid var(--review-border);border-left:4px solid #ffd640;border-radius:10px;background:var(--review-surface)!important;color:#f4f8fc!important;color-scheme:dark;opacity:1!important;isolation:isolate;box-shadow:0 18px 52px rgba(0,0,0,.68);text-align:left;backdrop-filter:none!important}.command-studio-commercial .ai-review-studio-panel.panel-left{left:16px;right:auto}.command-studio-commercial .ai-review-studio-panel.panel-right{right:16px;left:auto}.command-studio-commercial .ai-review-studio-panel.panel-top{top:16px;bottom:auto}.command-studio-commercial .ai-review-studio-panel.panel-bottom{top:auto;bottom:76px}.command-studio-commercial .ai-review-studio-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid #294158}.command-studio-commercial .ai-review-studio-panel header b{display:block;color:#fff;font-size:13px}.command-studio-commercial .ai-review-studio-panel h3{margin:4px 0 5px;color:#fff!important;font-size:17px;line-height:1.25}.command-studio-commercial .ai-review-studio-panel p{margin:0;color:#e7eef5!important;font-size:12px;line-height:1.5}.command-studio-commercial .ai-review-studio-panel section{display:grid;gap:5px}.command-studio-commercial .ai-review-studio-label{color:#87bfff!important;font-size:10px;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.command-studio-commercial .ai-review-studio-meta{color:var(--review-muted)!important;font-size:10px!important;font-weight:750}.command-studio-commercial .ai-review-studio-confidence{justify-self:start;padding:3px 7px;border:1px solid #365b7b;border-radius:4px;background:#102e49;color:#cfe8ff!important;font-size:10px;font-weight:850}.command-studio-commercial .ai-review-studio-reference{color:var(--review-muted)!important;font-size:11px!important}.command-studio-commercial .ai-review-studio-reference b{margin-right:5px;color:#f5f9fd}.command-studio-commercial .ai-review-studio-location-status{padding:8px 9px;border:1px solid #315171;border-radius:6px;background:#102033!important;color:#d9e9f8!important;font-size:11px!important}.command-studio-commercial .ai-review-studio-panel blockquote{margin:2px 0 0;padding:8px 10px;border-left:2px solid #61adff;background:#102238;color:#cfdeec;font-size:11px;line-height:1.45}.command-studio-commercial .ai-review-studio-locate-instructions{padding:10px;border:1px solid #5b5428;border-radius:7px;background:#292611}.command-studio-commercial .ai-review-studio-locate-instructions p{color:#fff1ad!important}.command-studio-commercial .ai-review-studio-panel footer{display:flex;flex-wrap:wrap;gap:8px;padding-top:10px;border-top:1px solid #294158}.command-studio-commercial .ai-review-studio-panel .btn{min-height:36px;border:1px solid #42617d;background:#142c42!important;color:#f3f8fc!important;font-size:11px;font-weight:800}.command-studio-commercial .ai-review-studio-panel .btn.primary{border-color:#1784f5;background:#0878ef!important;color:#fff!important}.ai-review-studio-panel-header-actions{display:flex;gap:5px}.ai-review-studio-panel-header-actions button,.ai-review-studio-panel-toggle{display:grid;place-items:center;min-width:28px;height:28px;padding:0;border:1px solid #3c5872;border-radius:5px;background:#132b41!important;color:#eaf4fc!important;font:700 17px/1 inherit}.ai-review-studio-panel-header-actions button:hover,.ai-review-studio-panel-toggle:hover{border-color:#79b7f3;background:#1a3852!important;color:#fff!important}.ai-review-studio-panel-toggle{position:absolute;z-index:45;width:auto;height:34px;padding:0 10px;color:#eaf4fc!important;font-size:11px}.ai-review-studio-panel-toggle.panel-left{left:16px;right:auto}.ai-review-studio-panel-toggle.panel-right{right:16px;left:auto}.ai-review-studio-panel-toggle.panel-top{top:16px;bottom:auto}.ai-review-studio-panel-toggle.panel-bottom{top:auto;bottom:76px}.ai-review-source-highlight{filter:drop-shadow(0 0 8px #ffd640);pointer-events:none}.ai-review-source-highlight-pulse{transform-origin:center;animation:ai-review-source-pulse 1.35s ease-out infinite}@keyframes ai-review-source-pulse{0%,100%{opacity:1;stroke-width:3}50%{opacity:.22;stroke-width:11}}
@media(max-width:767px){.command-studio-commercial .ai-review-studio-panel{right:8px!important;bottom:72px!important;left:8px!important;top:auto!important;width:auto;max-height:35dvh;padding:12px;border-radius:12px 12px 8px 8px}.command-studio-commercial .ai-review-studio-panel h3{font-size:15px}.command-studio-commercial .ai-review-studio-panel p{font-size:11px}.command-studio-commercial .ai-review-studio-panel footer{position:sticky;bottom:-12px;padding:9px 0 0;background:var(--review-surface)}.command-studio-commercial .ai-review-studio-panel footer .btn{flex:1;min-height:40px}.ai-review-studio-panel-toggle{right:8px!important;bottom:72px!important;left:auto!important;top:auto!important}.ai-review-source-highlight-pulse{animation-duration:1.6s}}

/* Milestone 3: compact cards for source-aware electrical rules. */
.knowledge-router-workspace{margin-top:14px}.knowledge-rule-list{display:grid;gap:10px;margin-top:14px}.knowledge-rule-card{padding:14px;border:1px solid var(--line,#d7e0e9);border-radius:12px;background:var(--card,#fff)}.knowledge-rule-card h4{margin:7px 0 5px}.knowledge-rule-card p{margin:0;color:var(--muted,#526173)}.knowledge-rule-card dl{display:grid;gap:7px;margin:13px 0}.knowledge-rule-card dl>div{display:grid;grid-template-columns:minmax(105px,140px) minmax(0,1fr);gap:10px}.knowledge-rule-card dt{color:var(--muted,#526173);font-weight:700}.knowledge-rule-card dd{margin:0;overflow-wrap:anywhere}.knowledge-rule-card .actions{margin-top:12px}.knowledge-router-workspace .checklist-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
@media(max-width:767px){.knowledge-rule-card{padding:12px}.knowledge-rule-card dl>div{display:block}.knowledge-rule-card dd{margin-top:2px}.knowledge-router-workspace .checklist-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.knowledge-rule-card .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.knowledge-rule-card .actions .btn{width:100%}}
.electrical-object-overlay { cursor: pointer; pointer-events: all; }
.electrical-object-overlay:hover rect,
.electrical-object-overlay:focus rect { filter: drop-shadow(0 0 4px rgba(20, 98, 218, .5)); }
.receptacle-object-properties fieldset { border: 1px solid var(--line, #d9e1ea); border-radius: 12px; padding: 12px; }
.receptacle-object-properties legend { font-weight: 800; padding: 0 6px; }
.receptacle-underground .segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.receptacle-underground .segmented label { position: relative; }
.receptacle-underground .segmented input { position: absolute; opacity: 0; }
.receptacle-underground .segmented span { display: block; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 6px; text-align: center; font-size: 12px; font-weight: 800; }
.receptacle-underground .segmented input:checked + span { border-color: #1462da; background: #e8f0ff; color: #0b4eb5; }
.receptacle-breakdown-groups { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.receptacle-breakdown-groups > section { border: 1px solid var(--line, #d9e1ea); border-radius: 12px; padding: 12px; }
.receptacle-breakdown-groups h4 { margin: 0 0 8px; }
.receptacle-breakdown-groups section > div { padding: 8px 0; border-top: 1px solid var(--line, #e5eaf0); }
.receptacle-breakdown-groups button { width: 100%; display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; border: 0; border-radius: 8px; padding: 8px; background: var(--surface-muted, #f5f7fa); text-align: left; }
@media (max-width: 720px) { .receptacle-underground .segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.complete-print-breakdown { margin-top: 14px; }
.complete-print-breakdown-body { display: grid; gap: 12px; margin-top: 14px; }
.print-breakdown-group { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft, #f8fafc); }
.print-breakdown-group > h4 { margin: 0; }
.print-breakdown-group details { border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); overflow: hidden; }
.print-breakdown-group summary { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; cursor: pointer; }
.print-breakdown-system-group { display: grid; gap: 8px; padding: 0 12px 12px; }
.print-breakdown-system-group h5 { margin: 8px 0 0; }
.print-breakdown-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.print-breakdown-item > div:first-child { display: grid; gap: 5px; min-width: 0; }
.print-breakdown-item p, .print-breakdown-item small { margin: 0; }
.print-breakdown-item.revision-review { border-color: #d69e2e; background: #fffaf0; }
@media (max-width: 760px) {
  .print-breakdown-item { grid-template-columns: 1fr; }
  .print-breakdown-item > .actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .print-breakdown-item > .actions .btn { width: 100%; }
  .print-breakdown-group summary { align-items: flex-start; flex-direction: column; }
}
.construction-buildout-workspace { margin-top: 14px; }
.construction-buildout-list { display: grid; gap: 10px; margin-top: 14px; }
.construction-buildout-list > details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); overflow: hidden; }
.construction-buildout-list > details > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px; }
.construction-buildout-list summary span { display: grid; gap: 3px; }
.construction-buildout-list summary small { color: var(--muted); }
.construction-task-list { display: grid; gap: 8px; padding: 0 14px 14px; }
.construction-task { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.construction-task > div:first-child { display: grid; gap: 6px; }
.construction-task p { margin: 0; line-height: 1.45; }
.construction-task small { color: var(--muted); }
@media (max-width: 700px) {
  .construction-buildout-list > details > summary, .construction-task { grid-template-columns: 1fr; display: grid; }
  .construction-task > .actions { justify-content: flex-start; }
}

/* Recent backlog: structured Command Studio context + field lookahead */
.command-context-drawer { width: min(470px, 100vw); }
.command-context-panel { display: grid; gap: 18px; }
.command-context-panel > section { display: grid; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.context-source-list, .context-record-list { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
.context-source-row, .context-record-list article, .context-suggestion { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--surface, #fff); }
.context-source-row > span, .context-record-list article > div, .context-suggestion > div:first-child { display: grid; min-width: 0; gap: 3px; }
.context-source-row input { width: 22px; height: 22px; flex: 0 0 auto; }
.context-source-row select { margin-left: auto; min-height: 40px; max-width: 145px; }
.context-source-row small, .context-record-list small, .context-suggestion small { color: var(--muted); }
.context-record-list article, .context-suggestion { justify-content: space-between; }
.context-record-checkbox { width: 22px; height: 22px; flex: 0 0 auto; }
.context-filter-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.context-filter-grid label { display: grid; gap: 4px; font-size: 12px; font-weight: 800; }
.context-list-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.context-list-actions span { color: var(--muted); font-size: 12px; font-weight: 800; }
.context-bulk-form { display: grid; grid-template-columns: minmax(150px,.8fr) minmax(180px,1fr) auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft,#f8fafc); }
.context-bulk-form select, .context-bulk-form input { min-height: 42px; }
.context-recent-circuits { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.context-recent-circuits small { color: var(--muted); font-weight: 800; }
.context-recent-circuits button { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; background: var(--surface,#fff); color: inherit; font-weight: 800; }
.context-group-summary { display: flex; justify-content: space-between; gap: 8px; border-left: 4px solid #167349; padding: 8px 10px; background: #1673490d; }
.context-group-summary span { color: var(--muted); font-size: 12px; }
.command-context-overlay { cursor: pointer; }
.three-week-hero { margin-bottom: 12px; }
.lookahead-week-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.lookahead-week-tabs button { display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface,#fff); color: inherit; }
.lookahead-week-tabs button.active { border-color: var(--primary,#1462da); box-shadow: inset 0 0 0 1px var(--primary,#1462da); }
.lookahead-week-tabs small { color: var(--muted); }
.lookahead-summary { grid-template-columns: repeat(8,minmax(0,1fr)); margin-bottom: 12px; }
.lookahead-summary article { display: grid; gap: 3px; min-width: 0; }
.lookahead-summary b { font-size: 24px; }
.lookahead-summary span { color: var(--muted); font-size: 12px; }
.lookahead-days { display: grid; gap: 10px; }
.lookahead-day { overflow: hidden; }
.lookahead-day > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.lookahead-day > header div { display: grid; gap: 2px; }
.lookahead-day > header small { color: var(--muted); }
.lookahead-day > header button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface,#fff); font-size: 22px; }
.lookahead-day > div { display: grid; gap: 8px; padding: 10px; min-height: 74px; }
.lookahead-task-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface,#fff); }
.lookahead-task-card.blocked { border-left: 5px solid #d1293d; }
.lookahead-task-card.overdue { border-left: 5px solid #d86f13; }
.lookahead-task-card.at-risk { border-left: 5px solid #d8a013; }
.lookahead-task-card.dragging { opacity: .48; }
.lookahead-task-main, .lookahead-task-main > div:first-child { display: grid; gap: 7px; }
.lookahead-task-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.lookahead-task-main p { margin: 0; }
.lookahead-task-main dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 0; }
.lookahead-task-main dl div { display: grid; gap: 2px; }
.lookahead-task-main dt { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.lookahead-task-main dd { margin: 0; font-size: 13px; }
.lookahead-blocker { color: #a51d2d; background: #d1293d0d; border-radius: 8px; padding: 8px; }
.lookahead-risk { color: #765b08; background: #d8a01312; border-radius: 8px; padding: 8px; }
.lookahead-task-details summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 800; }
.lookahead-task-details > div { display: grid; gap: 4px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.lookahead-task-card > .actions { align-content: start; }
.lookahead-overdue-backlog { display: grid; gap: 10px; margin-bottom: 12px; border-left: 5px solid #d86f13; }
.lookahead-overdue-backlog > div:last-child { display: grid; gap: 8px; }
.lookahead-task-modal { width: min(760px,calc(100vw - 24px)); max-height: calc(100vh - 30px); overflow: auto; }
.lookahead-extra-fields { display: grid; gap: 12px; margin: 12px 0; }
.lookahead-crew-picker { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 8px; }
.lookahead-crew-picker legend { font-weight: 800; padding: 0 6px; }
.lookahead-crew-picker label { display: flex; align-items: center; gap: 7px; min-height: 38px; }
.lookahead-crew-picker input { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .lookahead-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .lookahead-task-card { grid-template-columns: 1fr; }
  .lookahead-task-main dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .context-filter-grid { grid-template-columns: 1fr; }
  .context-source-row { align-items: flex-start; flex-wrap: wrap; }
  .context-source-row > span { flex: 1 1 calc(100% - 42px); }
  .context-source-row select { width: 100%; max-width: none; margin-left: 32px; }
  .context-bulk-form { grid-template-columns: 1fr; }
  .context-record-list article { align-items: flex-start; flex-wrap: wrap; }
  .context-record-list article > div:nth-of-type(1) { flex: 1 1 calc(100% - 42px); }
  .context-record-list article > .actions { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lookahead-week-tabs button { padding: 10px 8px; }
  .lookahead-week-tabs small { font-size: 10px; }
  .lookahead-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lookahead-task-main dl { grid-template-columns: 1fr 1fr; }
  .lookahead-task-card > .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .lookahead-task-card > .actions select { grid-column: 1/-1; min-height: 44px; }
}
/* AI Knowledge 2.0 */
.ai-knowledge-workspace{display:grid;gap:18px}.ai-knowledge-tabs{display:flex;gap:6px;overflow:auto;padding:5px;background:#eef2f7;border:1px solid #d8e0ea;border-radius:12px}.ai-knowledge-tabs button{border:0;background:transparent;border-radius:9px;padding:10px 16px;font-weight:800;white-space:nowrap;color:#4a5668}.ai-knowledge-tabs button.active{background:#fff;color:#1f4f9a;box-shadow:0 1px 5px #21395b18}.ai-knowledge-tabs b{margin-left:7px;background:#f2a427;color:#201500;padding:2px 7px;border-radius:999px}.ai-knowledge-teach-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.ai-knowledge-teach-grid article{display:grid;align-content:start;gap:10px;min-height:220px}.ai-knowledge-source-list,.ai-knowledge-run-list{display:grid;gap:8px}.ai-knowledge-source-list article,.ai-knowledge-run-list article{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:12px;border:1px solid #e1e7ef;border-radius:10px}.ai-knowledge-review-list{display:grid;gap:14px}.ai-knowledge-finding{padding:18px;border-left:4px solid #e5a120}.ai-knowledge-finding.status-approved{border-left-color:#18805a}.ai-knowledge-finding header{display:flex;justify-content:space-between;gap:16px}.ai-knowledge-finding small{display:block;color:#697487;margin:10px 0}.ai-knowledge-correction{width:min(760px,calc(100vw - 28px))}.ai-knowledge-correction textarea{width:100%;min-height:42vh;font:13px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}.ai-knowledge-eye.active{color:#7140be;background:#f0e9ff}.ai-knowledge-eye.muted{opacity:.6}.source-pulse rect{animation:ai-knowledge-source-pulse 1s ease-in-out 3}@keyframes ai-knowledge-source-pulse{50%{stroke-width:9;filter:drop-shadow(0 0 8px #7c3aed)}}
.drawing-toolbar button[onclick*="runCvOnCurrentSheet"],.drawing-toolbar button[onclick*="runCvOnProjectSheets"]{display:none!important}
@media(max-width:768px){.ai-knowledge-teach-grid{grid-template-columns:1fr}.ai-knowledge-workspace .bc-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ai-knowledge-finding .actions{display:grid;grid-template-columns:1fr 1fr}.ai-knowledge-finding .actions button{width:100%}.print-viewer-drawer.drawer-right[aria-label="AI Knowledge"]{position:fixed;inset:auto 0 0;width:100%;max-height:72dvh;border-radius:18px 18px 0 0;z-index:80}}
@media(max-width:430px){.ai-knowledge-workspace .bc-metric-grid{grid-template-columns:1fr 1fr}.ai-knowledge-source-list article,.ai-knowledge-run-list article{grid-template-columns:1fr auto}.ai-knowledge-source-list article span,.ai-knowledge-run-list article small{grid-column:1/-1}.ai-knowledge-finding header{align-items:flex-start}.ai-knowledge-tabs button{padding:9px 12px}}
:root { --studio-region-accent: #1976d2; }
.studio-shape-controls { position: absolute; z-index: 70; bottom: 86px; left: 12px; right: 76px; max-width: 560px; max-height: 32vh; overflow: auto; padding: 10px; border-radius: 12px; background: #102639f5; color: white; box-shadow: 0 3px 16px #0004; }
.studio-shape-controls .actions { display: flex; flex-wrap: wrap; gap: 5px; }
.studio-shape-controls .btn { min-height: 44px; min-width: 44px; }
.studio-shape-controls .btn.active { background: var(--studio-region-accent); color: white; }
.studio-room-tools .btn { min-height: 44px; margin-bottom: 5px; }
.tool-shape_edit, .tool-shape_edit svg { touch-action: none; user-select: none; }
.building-room-overlay:not(.selected) polygon { stroke-width: 1.5px; }
.building-room-overlay.origin-ai polygon { stroke-dasharray: 7 4; }
@media (orientation: landscape) and (max-height: 500px) { .studio-shape-controls { bottom: 65px; left: auto; right: 8px; width: 210px; max-height: calc(100% - 76px); } }
.studio-shape-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.studio-shape-header strong { min-width: 0; font-size: 13px; line-height: 1.3; }
.studio-shape-collapse { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; font-size: 24px; }
.studio-shape-controls #studio-shape-options[hidden] { display: none; }
.studio-shape-controls.is-collapsed { bottom: 76px; left: 8px; right: 8px; width: auto; max-width: 390px; max-height: none; padding: 3px 8px; overflow: visible; }
@media (orientation: landscape) and (max-height: 500px) { .studio-shape-controls.is-collapsed { bottom: 65px; left: auto; right: 8px; width: 280px; max-width: calc(100vw - 16px); } }
.studio-shared-room-layouts { display:grid; gap:8px; padding:10px; border:1px solid #52677b; border-radius:8px; }
.studio-shared-room-layouts article { display:grid; gap:6px; padding-block:8px; border-top:1px solid #52677b; }
.studio-shared-room-layouts label { display:grid; gap:5px; }
.studio-shared-room-layouts select { max-width:100%; min-width:0; }
.studio-shared-room-layouts .btn { min-height:44px; white-space:normal; }

/* Active commercial Command Studio mode placement. */
body .command-studio-commercial .command-studio-header{grid-template-columns:48px minmax(255px,360px) minmax(0,1fr) auto auto}
body .command-studio-commercial.command-studio-view-3d .command-studio-workspace{grid-template-columns:54px minmax(0,1fr)}
body .command-studio-commercial.command-studio-view-3d .command-studio-sheet-rail,body .command-studio-commercial.command-studio-view-3d .command-studio-inspector,body .command-studio-commercial.command-studio-view-3d .command-studio-footer,body .command-studio-commercial.command-studio-view-3d .print-viewer-drawer{display:none!important}
body .command-studio-view-3d .command-studio-canvas>.coordination-stage{position:absolute;inset:0;height:100%;min-height:0}
body .command-studio-view-split .command-studio-canvas{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
body .command-studio-view-split .command-studio-canvas>#drawing-stage{grid-column:1;min-width:0}
body .command-studio-view-split .command-studio-canvas>.coordination-stage{grid-column:2;min-height:0;height:100%}
body .command-studio-view-split .command-studio-footer{max-width:calc(50% - 16px)}
@media(max-width:1180px){body .command-studio-commercial .command-studio-header{grid-template-columns:44px minmax(210px,290px) minmax(0,1fr) auto auto}}
@media(max-width:900px){body .command-studio-commercial .command-studio-header{grid-template-columns:42px minmax(0,1fr) auto;grid-template-rows:56px 54px 46px;min-height:156px}body .command-studio-commercial .command-studio-header>.coordination-mode-selector{grid-column:1/-1;grid-row:3;width:min(320px,calc(100% - 12px));margin:3px auto}body .command-studio-commercial.command-studio-view-3d{grid-template-rows:44px auto minmax(0,1fr)}body .command-studio-view-split .command-studio-canvas{grid-template-columns:1fr;grid-template-rows:1fr 1fr}body .command-studio-view-split .command-studio-canvas>#drawing-stage{grid-column:1;grid-row:1}body .command-studio-view-split .command-studio-canvas>.coordination-stage{grid-column:1;grid-row:2;min-height:280px}body .command-studio-view-split .command-studio-footer{max-width:calc(100% - 12px)}}


/* Ask AI secure action agent */
.ask-ai-launcher{position:fixed;right:24px;bottom:24px;z-index:18;display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:0 18px;border:1px solid color-mix(in srgb,var(--accent) 72%,white);border-radius:999px;background:var(--accent);color:white;font:800 14px/1 system-ui;box-shadow:0 10px 30px #00182055;cursor:pointer}
.ask-ai-launcher:hover{filter:brightness(1.08);transform:translateY(-1px)}.ask-ai-launcher span{font-size:19px}
.ask-ai-scope{display:grid;gap:8px;margin-bottom:14px;padding:14px 16px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--border));border-radius:12px;background:color-mix(in srgb,var(--accent) 8%,var(--card))}.ask-ai-scope>div{display:flex;flex-wrap:wrap;gap:6px}.ask-ai-scope small{color:var(--muted)}
.ai-action-result{display:grid;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.ai-action-result-head{display:flex;flex-wrap:wrap;gap:6px}.ai-action-counts{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:8px}.ai-action-counts span{display:grid;padding:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--muted);font-size:11px;text-transform:uppercase}.ai-action-counts b{color:var(--text);font-size:18px}
.ai-activity-list{display:grid;gap:8px;margin-top:10px;max-height:360px;overflow:auto}.ai-activity-row{display:flex;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--border);border-radius:9px;background:var(--surface)}.ai-activity-row p{margin:4px 0;font-size:13px}.ai-activity-row>div:last-child{display:flex;align-items:flex-start;gap:5px;flex-wrap:wrap;justify-content:flex-end}
@media(max-width:768px){.ask-ai-launcher{right:12px;bottom:76px;min-width:112px;min-height:48px}.ai-activity-row{display:grid}.ai-activity-row>div:last-child{justify-content:flex-start}.ai-action-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.work-package-heading-actions .work-package-delete-trigger { min-height: 44px; }

.ai-dictionary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}
.ai-dictionary-grid article{display:flex;flex-direction:column;gap:8px;border:1px solid var(--border,#dce3eb);border-radius:12px;padding:12px}
.ai-dictionary-grid img{height:90px;max-width:100%;object-fit:contain;background:white}
.coordination-walk-controls{position:absolute;left:8px;right:8px;bottom:8px;display:flex;gap:6px;flex-wrap:wrap;z-index:5}

/* Job Backlog — room-indexed print record */
.backlog-room-detail .section-title { align-items: flex-start; }
.backlog-system { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin-top: 10px; overflow: hidden; }
.backlog-system > summary { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; cursor: pointer; }
.backlog-system > summary span { color: var(--muted); font-weight: 600; }
.backlog-system .table-list, .backlog-system .rule-list { padding: 0 10px 10px; }
.backlog-item .sub { overflow-wrap: anywhere; }
.backlog-questions { margin-top: 12px; display: grid; gap: 8px; }
.backlog-questions h4 { margin: 0; }
.table-list .list-row.selected { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 10px; }
.checklist-room-first .room-group-header { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 768px) {
  .backlog-room-detail .section-title { flex-direction: column; }
  .backlog-room-detail .section-title .actions { width: 100%; }
  .backlog-item { grid-template-columns: 1fr; }
  .backlog-item .row-actions { justify-content: flex-start; }
}

/* ---------------------------------------------------------------------------
   Command Studio › Takeoff (command-studio-takeoff.js) — dark workspace:
   Actions/Layers/Properties left, canvas center, Legend right, pad bottom.
   --------------------------------------------------------------------------- */
.studio-takeoff-launch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid #2ec4b6; background: #0f2f33; color: #c9fff8; font-weight: 600; cursor: pointer; }
.studio-takeoff-launch:hover { background: #134a50; }
.tc-root { --tc-bg: #12151a; --tc-panel: #1a1f26; --tc-panel-2: #222832; --tc-line: #2e3642; --tc-text: #e6eaf0; --tc-dim: #9aa5b4; --tc-accent: #2ec4b6; --tc-warn: #ffbe0b; --tc-danger: #ef476f;
  color: var(--tc-text); font-size: 13px; }
.tc-root button, .tc-root input, .tc-root select { font: inherit; color: inherit; }
.tc-root button { background: var(--tc-panel-2); border: 1px solid var(--tc-line); border-radius: 6px; padding: 4px 9px; cursor: pointer; }
.tc-root button:hover:not(:disabled) { border-color: var(--tc-accent); }
.tc-root button:disabled { opacity: .45; cursor: not-allowed; }
.tc-root button.active { background: #0f3b3f; border-color: var(--tc-accent); color: #c9fff8; }
.tc-root button.danger { color: #ffb3c4; border-color: #6b2a3a; }
.tc-root button.link { background: none; border: 0; color: var(--tc-accent); padding: 0 4px; text-decoration: underline; }
.tc-root .tc-primary { background: var(--tc-accent); color: #062320; border-color: var(--tc-accent); font-weight: 700; }
.tc-root input, .tc-root select { background: #0e1116; border: 1px solid var(--tc-line); border-radius: 5px; padding: 4px 6px; min-width: 0; }
.tc-root input[type=checkbox], .tc-root input[type=range] { padding: 0; }
.tc-root label { display: flex; flex-direction: column; gap: 3px; color: var(--tc-dim); font-size: 12px; }
.tc-root h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--tc-dim); }
.tc-root h2 { margin: 0; font-size: 20px; }
.tc-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #0c0f13; border-bottom: 1px solid var(--tc-line); flex-wrap: wrap; }
.tc-back { font-weight: 600; }
.tc-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tc-crumbs > button { background: none !important; border: 0 !important; color: var(--tc-dim); padding: 2px; }
.tc-crumbs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.tc-crumbs small { color: var(--tc-dim); }
.tc-crumbs .tc-arrow { background: var(--tc-panel-2) !important; border: 1px solid var(--tc-line) !important; color: var(--tc-text); }
.tc-views { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.tc-bar-actions { display: flex; gap: 6px; }
.tc-body { flex: 1; min-height: 0; overflow: hidden; }
.tc-empty { display: grid; place-items: center; height: 100%; color: var(--tc-dim); gap: 8px; }
.tc-ws { display: grid; grid-template-columns: 300px 1fr 240px; height: 100%; min-height: 0; }
.tc-left, .tc-right { background: var(--tc-panel); overflow-y: auto; min-height: 0; }
.tc-left { border-right: 1px solid var(--tc-line); }
.tc-right { border-left: 1px solid var(--tc-line); padding: 10px; }
.tc-panel { padding: 10px; border-bottom: 1px solid var(--tc-line); }
.tc-action { padding: 8px; margin-bottom: 6px; background: var(--tc-panel-2); border-radius: 8px; display: grid; gap: 6px; }
.tc-action > div:first-child { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-action small { color: var(--tc-dim); font-weight: 400; }
.tc-action .beta { color: var(--tc-warn); font-weight: 700; }
.tc-sub { width: 100%; }
.tc-action-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-fields { display: grid; gap: 6px; }
.tc-dot { width: 9px; height: 9px; border-radius: 50%; background: #4a5462; display: inline-block; }
.tc-dot.done { background: #06d6a0; }
.tc-dot.running { background: var(--tc-warn); animation: tc-pulse 1s infinite alternate; }
@keyframes tc-pulse { to { opacity: .35; } }
.tc-hint { color: var(--tc-dim); font-size: 12px; margin: 4px 0; }
.tc-warn { color: var(--tc-warn); }
.tc-batch { flex-direction: row !important; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--tc-text) !important; }
.tc-qa-buttons { display: grid; gap: 4px; }
.tc-layer { flex-direction: row !important; align-items: center; gap: 6px; color: var(--tc-text) !important; padding: 2px 0; }
.tc-props { display: grid; gap: 7px; }
.tc-props p { margin: 0; }
.tc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tc-features { border: 1px solid var(--tc-line); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; }
.tc-features label { flex-direction: row; align-items: center; gap: 3px; color: var(--tc-text); }
.tc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px !important; border-radius: 999px !important; background: #263241 !important; border: 1px solid #3a4a5e !important; font-size: 12px; cursor: pointer; }
.tc-chip button { background: none !important; border: 0 !important; padding: 0 2px !important; }
.tc-stepper { display: flex; align-items: center; gap: 6px; }
.tc-stepper small { color: var(--tc-dim); }
.tc-center { display: grid; grid-template-rows: auto 1fr minmax(160px, 34%); min-height: 0; min-width: 0; }
.tc-ws.pad-closed .tc-center { grid-template-rows: auto 1fr 0; }
.tc-ws.pad-closed .tc-pad { display: none; }
.tc-pad-reopen { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 3; min-height: 34px; padding: 0 14px; border: 1px solid var(--tc-line); border-radius: 17px; background: rgba(12,15,19,.9); color: #dce6f0; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.tc-ws.pad-max .tc-center { grid-template-rows: auto 30% 1fr; }
.tc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; background: var(--tc-panel); border-bottom: 1px solid var(--tc-line); }
.tc-sep { width: 1px; align-self: stretch; background: var(--tc-line); margin: 0 4px; }
.tc-seg { display: inline-flex; }
.tc-seg button { border-radius: 0; }
.tc-seg button:first-child { border-radius: 6px 0 0 6px; }
.tc-seg button:last-child { border-radius: 0 6px 6px 0; }
.tc-qa-badge { background: #1e6bff; color: #fff; padding: 3px 8px; border-radius: 999px; font-weight: 600; font-size: 12px; }
.tc-end-qa { border-color: #1e6bff !important; }
.tc-sel { color: var(--tc-accent); margin-left: auto; }
.tc-canvas { position: relative; overflow: hidden; background: #0a0c10; outline: none; cursor: default; touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: contain; }
.tc-canvas.tool-pan { cursor: grab; }
.tc-canvas.tool-add, .tc-canvas.tool-no_fly, .tc-canvas.tool-preferred, .tc-canvas.tool-box, .tc-canvas.tool-measure { cursor: crosshair; }
.tc-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 0 0 1px #333; background: #fff; }
/* The base sheet and the sharp detail layer share one wrapper so the wash is
   applied once and the detail tile blends seamlessly over the base. */
/* The drawing is faded so takeoff marks stand out. No CSS filter/opacity on
   this layer: at high zoom a tablet can't hold that whole effect at screen
   resolution and blurs it. The sheet is turned gray when it is drawn, and a
   plain white veil (cheap at any zoom) fades it. */
.tc-stage .tc-bg { position: absolute; inset: 0; }
.tc-stage .tc-bg::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.5); pointer-events: none; }
/* Print darkness: Dark keeps a light veil so the colored runs still stand out; Darker drops it. */
.tc-stage.tc-ink-normal .tc-bg::after { background: rgba(255,255,255,.18); }
.tc-stage.tc-ink-strong .tc-bg::after { background: none; }
.tc-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tc-stage canvas.hidden, .tc-stage canvas.hidden ~ canvas { visibility: hidden; }
.tc-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tc-feeder-result table { width: 100%; border-collapse: collapse; }
.tc-feeder-result td { color: var(--tc-text, #e9ecef); background: transparent; padding: 6px 8px; border-bottom: 1px solid var(--tc-line, #2b3442); vertical-align: top; font-size: 13px; }
.tc-feeder-result td small { color: var(--tc-dim, #9aa5b1); }
.tc-feeder-result h4 { margin: 12px 0 6px; }
.tc-focus-chip { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 24px); padding: 6px 6px 6px 12px; border: 2px solid #e63946; border-radius: 999px; background: rgba(17, 21, 28, .92); color: #f1f3f5; font-size: 13px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.tc-focus-chip span { overflow: hidden; text-overflow: ellipsis; }
.tc-focus-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tc-focus-chip.has-levels { flex-direction: column; align-items: stretch; gap: 6px; width: min(440px, calc(100% - 24px)); border-radius: 14px; padding: 8px 8px 8px 12px; white-space: normal; }
.tc-focus-chip.has-levels .tc-focus-head { justify-content: space-between; }
.tc-level-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-level-row small { min-width: 96px; color: #adb5bd; }
.tc-focus-chip .tc-level { min-height: 32px; padding: 4px 10px; background: transparent; color: #f1f3f5; border: 1px solid #6c757d; font-weight: 600; }
.tc-focus-chip .tc-level.active { background: #f1f3f5; color: #11151c; border-color: #f1f3f5; }
.tc-focus-chip .tc-level:disabled { opacity: .55; cursor: default; }
.tc-level-note { color: #adb5bd; }
.tc-focus-chip .tc-level-toggle { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 32px; padding: 4px 10px; background: rgba(255,255,255,.06); color: #f1f3f5; border: 1px solid #495057; border-radius: 10px; font-weight: 500; text-align: left; }
.tc-focus-chip .tc-level-toggle b { font-weight: 700; }
.tc-focus-chip button { flex: none; min-height: 30px; padding: 4px 12px; border: 0; border-radius: 999px; background: #f1f3f5; color: #11151c; font-weight: 700; cursor: pointer; }
.tc-run-hit { cursor: pointer; }
.tc-root .tc-ws:has(.tc-qa-badge) .tc-stage { background: #f4f6f8; }
.tc-device { cursor: pointer; }
.tc-device.verified rect, .tc-device.manual rect { stroke-dasharray: none; }
.tc-zone { cursor: move; }
.tc-zone.selected { stroke-dasharray: 6 3; }
.tc-tag { cursor: grab; }
.tc-tag.unlinked { stroke-dasharray: 3 2; }
.tc-scale-badge { position: absolute; left: 10px; bottom: 10px; background: rgba(12,15,19,.85); border: 1px solid var(--tc-line); border-radius: 6px; padding: 3px 8px; color: var(--tc-dim); pointer-events: none; }
.tc-status { position: absolute; right: 10px; bottom: 10px; color: var(--tc-warn); background: rgba(12,15,19,.85); border-radius: 6px; padding: 0 8px; }
.tc-status:empty { display: none; }
.tc-pad { display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--tc-line); background: var(--tc-panel); }
.tc-pad-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--tc-line); flex-wrap: wrap; }
.tc-groupby { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 200px; padding: 3px 6px; border: 1px dashed #3a4a5e; border-radius: 8px; min-height: 28px; flex-wrap: wrap; }
.tc-groupby small, .tc-groupby em, .tc-groupby i { color: var(--tc-dim); font-style: normal; }
.tc-chip-source { position: relative; }
.tc-chip-source summary { cursor: pointer; color: var(--tc-dim); list-style: none; padding: 3px 8px; border: 1px solid var(--tc-line); border-radius: 6px; }
.tc-chip-source > div { position: absolute; z-index: 5; bottom: 110%; left: 0; width: 320px; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--tc-panel-2); border: 1px solid var(--tc-line); border-radius: 8px; }
.tc-pad-total { color: var(--tc-dim); }
.tc-pad-table { overflow: auto; flex: 1; min-height: 0; }
.tc-pad-table table, .tc-ref, .tc-circuits { border-collapse: collapse; width: 100%; }
.tc-pad-table th, .tc-ref th, .tc-circuits th { position: sticky; top: 0; background: #11151b; text-align: left; padding: 5px 8px; font-weight: 600; color: var(--tc-dim); border-bottom: 1px solid var(--tc-line); white-space: nowrap; cursor: pointer; z-index: 1; }
.tc-pad-table td, .tc-ref td, .tc-circuits td { padding: 3px 8px; border-bottom: 1px solid #222a35; white-space: nowrap; }
.tc-group-row { background: #1d242e; font-weight: 600; cursor: pointer; }
.tc-group-row.depth-0 { background: #232c38; }
.tc-row { cursor: pointer; }
.tc-row:hover { background: #1c2733; }
.tc-row.selected { background: #11393d; }
.tc-caret { padding: 0 4px !important; background: none !important; border: 0 !important; }
.tc-right h4 { margin: 10px 0 4px; color: var(--tc-dim); font-size: 12px; }
.tc-legend-actions { display: flex; gap: 6px; }
.tc-legend-row { display: grid; grid-template-columns: 18px 1fr auto 22px; align-items: center; gap: 6px; padding: 2px 0; }
.tc-legend-row.off { opacity: .45; }
.tc-legend-row.empty { opacity: .6; }
.tc-swatch { width: 14px; height: 14px; border: 1px solid #000; cursor: pointer; position: relative; }
.tc-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tc-legend-name { background: none !important; border: 0 !important; text-align: left; padding: 0 !important; color: var(--tc-text) !important; }
.tc-eye { padding: 0 !important; background: none !important; border: 0 !important; }
.tc-findings p { font-size: 12px; margin: 4px 0; }
.tc-findings .rfi, .tc-findings-list .rfi { color: #ffb3c4; }
.tc-findings .warning, .tc-findings-list .warning { color: var(--tc-warn); }
.tc-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 40; }
.tc-modal { background: var(--tc-panel); border: 1px solid var(--tc-line); border-radius: 12px; width: min(560px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; padding: 14px; color: var(--tc-text); }
.tc-modal header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tc-form { display: grid; gap: 8px; }
.tc-check-list { display: grid; gap: 4px; max-height: 280px; overflow: auto; }
.tc-check-list label, .tc-column-row label { flex-direction: row; align-items: center; gap: 6px; color: var(--tc-text); }
.tc-column-row { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; }
.tc-columns { display: grid; gap: 2px; }
.tc-hr-list { display: grid; gap: 8px; }
.tc-hr { background: var(--tc-panel-2); padding: 8px; border-radius: 8px; }
.tc-hr > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tc-ckt { display: inline-flex; align-items: center; gap: 4px; border: 2px solid; border-radius: 8px; padding: 2px 6px; }
.tc-ckt select { padding: 1px 2px; font-size: 11px; }
.tc-inline { flex-direction: row !important; align-items: center; gap: 6px; }
.tc-help ol { padding-left: 18px; display: grid; gap: 6px; }
.tc-page { padding: 16px 20px; overflow: auto; height: 100%; box-sizing: border-box; }
.tc-page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.tc-page-head p { color: var(--tc-dim); margin: 0; flex-basis: 100%; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tc-tile { background: var(--tc-panel); border: 1px solid var(--tc-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.tc-tile.picked { border-color: var(--tc-accent); }
.tc-thumb { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; aspect-ratio: 4 / 3; position: relative; overflow: hidden; }
.tc-thumb canvas { width: 100%; height: 100%; object-fit: contain; }
.tc-thumb-label { position: absolute; top: 6px; left: 6px; background: var(--tc-accent); color: #062320; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.tc-tile-meta { padding: 8px; display: grid; gap: 2px; }
.tc-tile-meta small { color: var(--tc-dim); }
.tc-pick { flex-direction: row !important; align-items: center; gap: 4px; }
.tc-add button { flex: 1; min-height: 180px; display: grid; place-items: center; font-size: 14px; border-style: dashed !important; background: transparent !important; }
.tc-add span { font-size: 32px; }
.tc-panels { display: grid; grid-template-columns: 240px 1fr; height: 100%; min-height: 0; }
.tc-panel-list { background: var(--tc-panel); border-right: 1px solid var(--tc-line); padding: 10px; display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.tc-panel-list > button { display: grid; text-align: left; }
.tc-panel-list small { color: var(--tc-dim); }
.tc-panel-detail { padding: 14px 18px; overflow: auto; min-width: 0; }
.tc-prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tc-table-wrap { overflow: auto; margin-bottom: 8px; border: 1px solid var(--tc-line); border-radius: 8px; }
.tc-circuits input:not([type=checkbox]) { width: 100%; min-width: 60px; }
.tc-phase { display: inline-block; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; text-align: center; line-height: 14px; font-style: normal; margin-left: 4px; border: 1px solid rgba(255, 255, 255, 0.55); box-sizing: border-box; vertical-align: middle; }
.tc-flag { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.tc-flag.rfi { background: #6b2a3a; color: #ffd6df; }
.tc-flag.ok { background: #1f4d3d; color: #bff5dc; }
.tc-flag.warning { background: #5c4a12; color: #ffe8a3; }
.tc-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.tc-ref-wrap h3 { margin-top: 18px; }
.tc-ref { margin-bottom: 8px; }
.tc-ref td input:not([type=checkbox]) { width: 100%; max-width: 220px; }
.tc-jobs td small { display: block; color: var(--tc-dim); }
.tc-status-pill { padding: 1px 8px; border-radius: 999px; background: #2b3441; }
.tc-status-pill.completed { background: #1f4d3d; }
.tc-status-pill.failed { background: #6b2a3a; }
.tc-status-pill.running, .tc-status-pill.queued { background: #5c4a12; }
.tc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tc-cards div { background: var(--tc-panel); border: 1px solid var(--tc-line); border-radius: 10px; padding: 12px; display: grid; gap: 4px; }
.tc-cards b { font-size: 26px; color: var(--tc-accent); }
.tc-cards span { color: var(--tc-dim); }
.tc-chart { width: 100%; max-width: 640px; }
.tc-chart-label { fill: var(--tc-text); font-size: 12px; }
.tc-chart-value { fill: var(--tc-dim); font-size: 11px; }
.tc-total td { font-weight: 700; border-top: 2px solid var(--tc-line); }
.tc-findings-list { padding-left: 18px; display: grid; gap: 4px; }
@media (max-width: 1100px) { .tc-ws { grid-template-columns: 240px 1fr; } .tc-right { display: none; } }
@media (max-width: 760px) {
  .tc-ws { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .tc-left { max-height: 32vh; border-right: 0; border-bottom: 1px solid var(--tc-line); }
  .tc-panels { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .tc-panel-list { max-height: 30vh; }
  .tc-views { margin-left: 0; }
  .tc-page { padding: 12px 16px; }
}
@media print { .tc-root { position: static; background: #fff; color: #000; } .tc-bar, .tc-page-head button { display: none; } }


/* ---- Command Studio = takeoff workspace, in the original Studio frame ---- */
.tc-studio .command-studio-workspace{grid-template-columns:54px 220px minmax(0,1fr) 310px}
.tc-studio.sheets-collapsed .command-studio-workspace{grid-template-columns:54px minmax(0,1fr) 310px}
.tc-studio.inspector-collapsed .command-studio-workspace{grid-template-columns:54px 220px minmax(0,1fr)}
.tc-studio.sheets-collapsed.inspector-collapsed .command-studio-workspace{grid-template-columns:54px minmax(0,1fr)}
.tc-studio .tc-body{position:relative;min-width:0;min-height:0;overflow:hidden}
.tc-studio .tc-ws{display:block;height:100%}
.tc-studio .tc-center{height:100%;grid-template-rows:minmax(0,1fr) minmax(160px,34%)}
.tc-studio .tc-ws.pad-closed .tc-center{grid-template-rows:minmax(0,1fr) 0}
.tc-studio .tc-ws.pad-max .tc-center{grid-template-rows:30% minmax(0,1fr)}
.tc-studio .tc-canvas{background:#020e19}
.tc-studio .tc-page{height:100%;overflow:auto}
.tc-studio .tc-rail-close{display:none}
/* Header: sheet identity, takeoff tools, actions */
.tc-studio-header .tc-identity{display:flex;align-items:center;gap:8px;min-width:0}
.tc-studio-header .tc-identity>div{display:grid;gap:2px;min-width:0}
.tc-studio-header .tc-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tc-studio-header .tc-identity span{overflow:hidden;color:#8fa3b8;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.tc-studio-header .tc-arrow{flex:0 0 auto;width:28px;height:28px;padding:0;border:1px solid #2a4157;border-radius:6px;background:#0b1d2e;color:#dce6f0;font-size:17px}
.tc-studio-header .tc-arrow:disabled{opacity:.35}
.tc-studio-header .tc-tools{display:flex;align-items:center;gap:4px;min-width:0;overflow-x:auto;scrollbar-width:thin}
.tc-studio-header .tc-tools>button:not(.command-studio-tool),.tc-studio-header .tc-tools select,.tc-studio-header .tc-seg button{height:30px;padding:0 9px;border:1px solid #2a4157;border-radius:6px;background:#0b1d2e;color:#dce6f0;font:inherit;font-size:12px;white-space:nowrap}
.tc-studio-header .tc-tools button.active{border-color:#1885ff;background:#153e70;color:#cfe5ff}
.tc-studio-header .tc-seg{display:flex;gap:2px;flex:0 0 auto}
.tc-studio-header .tc-sep{flex:0 0 1px;align-self:stretch;margin:10px 4px;background:#24384e}
.tc-studio-header .tc-qa-badge,.tc-studio-header .tc-sel{flex:0 0 auto;padding:4px 8px;border-radius:999px;background:#2b2410;color:#ffd166;font-size:11px;white-space:nowrap}
.tc-studio-header .tc-sel{background:#10283f;color:#9fd0ff}
.tc-studio-header .command-studio-tool{flex:0 0 auto}
.tc-header-actions{display:flex;align-items:center;gap:6px}
.tc-head-btn{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1px solid #2a4157;border-radius:6px;background:#0b1d2e;color:#dce6f0;font:inherit;font-size:12px;white-space:nowrap;cursor:pointer}
.tc-head-btn:disabled{opacity:.45;cursor:not-allowed}
.tc-tools-toggle{display:none}
/* Sheet rail: views + drawings */
.tc-sheet-rail .tc-views{display:grid;gap:2px;margin:0;padding:8px}
.tc-sheet-rail .tc-views button{justify-content:flex-start;width:100%;padding:7px 10px;border:0;background:transparent;text-align:left;color:#c6d2df}
.tc-sheet-rail .tc-views button.active{background:#153e70;color:#fff;box-shadow:inset 2px 0 #1885ff}
.tc-sheet-list{display:grid;align-content:start;gap:2px;min-height:0;padding:4px 8px 8px;overflow-y:auto}
.tc-sheet-item{position:relative;display:grid !important;gap:2px;width:100%;padding:7px 34px 7px 10px !important;border:1px solid transparent !important;background:transparent !important;text-align:left}
.tc-sheet-item b{overflow:hidden;color:#fff;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.tc-sheet-item small{overflow:hidden;color:#8fa3b8;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.tc-sheet-item em{position:absolute;top:50%;right:8px;transform:translateY(-50%);padding:1px 6px;border-radius:999px;background:#10283f;color:#9fd0ff;font-size:10px;font-style:normal}
.tc-sheet-item.active{border-color:#1885ff !important;background:#0f2a47 !important}
.tc-sheet-item[hidden]{display:none !important}
.tc-rail-foot{display:grid;gap:4px;padding:8px;border-top:1px solid #1e3348}
.tc-rail-foot button{display:flex;align-items:center;gap:7px;width:100%;border:0 !important;background:transparent !important;color:#8fa3b8;text-align:left}
/* Inspector: Actions / Layers / Properties / Legend */
.tc-inspector{border-left:1px solid #24384e}
.tc-inspector .tc-inspector-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:2px;padding:6px 8px;border-bottom:1px solid #20364b}
.tc-inspector .tc-inspector-tabs button{padding:6px 2px;border:0;background:transparent;color:#8fa3b8;font-size:11px}
.tc-inspector .tc-inspector-tabs button.active{background:#153e70;color:#fff}
.tc-inspector-body{flex:1 1 auto;min-height:0;overflow-y:auto}
.tc-studio .tc-left,.tc-studio .tc-right{display:block;border:0;background:transparent;overflow:visible}
.tc-inspector [data-pane]{display:none !important}
.tc-inspector[data-tab="actions"] [data-pane="actions"],.tc-inspector[data-tab="layers"] [data-pane="layers"],.tc-inspector[data-tab="properties"] [data-pane="properties"],.tc-inspector[data-tab="legend"] [data-pane="legend"]{display:block !important}
.tc-pad-hint{padding:12px}
.tc-scrim{display:none}
.studio-product-spacer{display:block}
/* Phones and small tablets: rail and inspector become drawers */
@media(max-width:900px){
  .tc-studio .command-studio-workspace{display:block;height:100%}
  .tc-studio .tc-body{height:100%}
  .tc-studio .tc-center{grid-template-rows:minmax(0,1fr) minmax(130px,36%)}
  .tc-studio .tc-ws.pad-max .tc-center{grid-template-rows:25% minmax(0,1fr)}
  body .command-studio-commercial .command-studio-header.tc-studio-header{grid-template-columns:42px minmax(0,1fr) auto;grid-template-rows:52px 54px;min-height:106px}
  .tc-studio-header .tc-tools{grid-column:1/-1;grid-row:2;padding:0 4px;border-top:1px solid #1c3044}
  .tc-head-btn span{display:none}
  .tc-head-btn{padding:0 8px}
  .tc-tools-toggle{display:inline-flex}
  .tc-studio .tc-rail-close{display:block}
  .tc-studio .tc-sheet-rail,.tc-studio .tc-inspector{position:fixed;top:0;bottom:0;z-index:46;display:none !important;box-shadow:0 0 30px rgba(0,0,0,.5)}
  .tc-studio .tc-sheet-rail{left:0;width:min(86vw,320px)}
  .tc-studio .tc-inspector{right:0;width:min(94vw,400px)}
  .tc-studio.tc-sheets-open .tc-sheet-rail{display:grid !important}
  .tc-studio.tc-inspector-open .tc-inspector{display:flex !important}
  .tc-studio.tc-sheets-open .tc-scrim,.tc-studio.tc-inspector-open .tc-scrim{display:block;position:fixed;inset:0;z-index:45;border:0;background:rgba(0,0,0,.5)}
}
@media(min-width:901px){.tc-studio:not(.inspector-collapsed) .tc-inspector{display:flex}.tc-studio:not(.sheets-collapsed) .tc-sheet-rail{display:grid}}
/* Takeoff pad: the table scrolls sideways inside the pad (phones, landscape,
   narrow windows) instead of widening the pad past the screen edge, and the
   Group column stays pinned while you drag across the other columns. */
.tc-studio .tc-center > *, .tc-studio .tc-pad { min-width: 0; }
.tc-studio .tc-pad { overflow: hidden; }
.tc-studio .tc-pad-table { overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.tc-studio .tc-pad-table table { width: max-content; min-width: 100%; }
/* One long description can't make a column screens wide: cut it with "…". */
.tc-studio .tc-pad-table .tc-cell { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-studio .tc-pad-table td:first-child .tc-cell { max-width: 300px; }
.tc-studio .tc-pad-table tr.tc-row:not(.selected) { background: var(--tc-panel); }
.tc-studio .tc-pad-table th:first-child, .tc-studio .tc-pad-table td:first-child { position: sticky; left: 0; z-index: 1; background: inherit; box-shadow: 1px 0 0 var(--tc-line); }
.tc-studio .tc-pad-table th:first-child { z-index: 2; background: #11151b; }
/* Drawing ↔ takeoff pad selection, tappable tags, background modes */
.tc-studio .tc-tag-hit { cursor: pointer; }
.tc-studio .tc-pad-table tr.tc-row, .tc-studio .tc-pad-table tr.tc-group-row { cursor: pointer; }
.tc-studio .tc-pad-table tr.tc-row.selected { background: #11393d; box-shadow: inset 3px 0 #ffbe0b; }
.tc-studio .tc-pad-table tr.tc-group-row.holds-selection > td:first-child { color: #ffd166; }
.tc-studio-header .tc-tools > button.tc-edit-sel { border-color: #ffbe0b; background: #2b2410; color: #ffd166; font-weight: 700; }
.tc-studio .tc-tag-props { margin-bottom: 10px; padding: 8px; border: 1px solid #5c4a14; border-radius: 8px; background: #1f1a0c; }
.tc-studio .tc-tag-props small { color: var(--tc-dim); }
.tc-studio .tc-bg-mode { margin-bottom: 4px; color: var(--tc-text); }

/* ---- AI tab cleanup ------------------------------------------------------ */
.ai-knowledge-workspace{gap:14px}
.ai-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.ai-stats button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px 14px;border:1px solid #dfe6ef;border-radius:12px;background:#fff;text-align:left;cursor:pointer;min-width:0}
.ai-stats button strong{font-size:22px;line-height:1.1;color:#14233b}
.ai-stats button span{font-size:12px;font-weight:700;color:#5d6a7d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.ai-stats button.attention{border-color:#f2b14a;background:#fff8ec}
.ai-stats button.attention strong{color:#a35d00}
.ai-knowledge-tabs{display:grid;grid-template-columns:repeat(7,minmax(0,auto));justify-content:start;overflow:visible}
.ai-knowledge-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:4px}
.ai-pill{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:800;line-height:1.3;white-space:nowrap;border:1px solid transparent}
.ai-pill-warn{background:#fff3dc;color:#8a5100;border-color:#f6d39a}
.ai-pill-ok{background:#e4f6ec;color:#11683f;border-color:#b6e3c9}
.ai-pill-bad{background:#fde8e8;color:#a3261f;border-color:#f5c2bf}
.ai-pill-info{background:#e7f0ff;color:#1f4f9a;border-color:#c3d6fb}
.ai-pill-muted{background:#eef1f5;color:#556173;border-color:#dde3ea}
.ai-pill-row{display:inline-flex;flex-wrap:wrap;gap:6px}
.ai-guide-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.ai-guide h2{margin:2px 0 10px}
.ai-progress{height:8px;border-radius:999px;background:#e9eef5;overflow:hidden;margin:0 0 14px}
.ai-progress span{display:block;height:100%;background:linear-gradient(90deg,#2f6fe0,#5aa0ff);border-radius:inherit;transition:width .4s}
.ai-steps{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.ai-step{display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;padding:12px 0;border-top:1px solid #edf1f6}
.ai-step:first-child{border-top:0}
.ai-step-num{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:900;background:#eef1f5;color:#556173}
.ai-step-active .ai-step-num{background:#2f6fe0;color:#fff}
.ai-step-done .ai-step-num{background:#18805a;color:#fff}
.ai-step b{display:block;font-size:16px;color:#14233b}
.ai-step p{margin:3px 0 8px;color:#5d6a7d;font-size:14px}
.ai-step .actions .btn{flex:1 1 140px;min-width:0}
.ai-step .actions{display:flex;flex-wrap:wrap;gap:8px}
.ai-problems{margin-top:10px;border:1px solid #f6d39a;background:#fffaf0;border-radius:10px;padding:10px 12px}
.ai-problems summary{cursor:pointer;font-weight:800;color:#8a5100}
.ai-problems ul{margin:8px 0 0;padding-left:18px;display:grid;gap:6px;color:#4a3a1a}
.ai-run{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
.ai-run header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.ai-run header div{display:grid;gap:2px}
.ai-run header span{color:#5d6a7d;font-size:14px}
.ai-run .actions{display:flex;flex-wrap:wrap;gap:8px}
.ai-run .actions:empty{display:none}
.ai-older-runs{margin-top:12px}
.ai-older-runs summary,.ai-teach-manual>summary{cursor:pointer;font-weight:800;color:#1f4f9a}
.ai-teach-manual>summary{display:flex;flex-direction:column;gap:2px}
.ai-teach-manual[open]>summary{margin-bottom:12px}
.ai-teach-manual .ai-knowledge-teach-grid article{min-height:0;border:1px solid #e1e7ef;border-radius:12px;padding:14px}
.ai-source-group{border:1px solid #e1e7ef;border-radius:12px;margin-top:8px;background:#fff}
.ai-source-group>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:center;padding:12px 14px;cursor:pointer;list-style:none}
.ai-source-group>summary::-webkit-details-marker{display:none}
.ai-source-group>summary>span:nth-child(2){font-weight:900;color:#14233b}
.ai-source-group>summary .ai-pill-row{grid-column:1/-1}
.ai-source-group .ai-knowledge-source-list{padding:0 12px 12px}
.ai-source-group .ai-knowledge-source-list article{grid-template-columns:minmax(0,1fr) auto auto;padding:8px 10px}
.ai-knowledge-finding header h3{margin:4px 0 0;font-size:17px;line-height:1.3}
.ai-finding-meta{margin:6px 0 10px!important}
.ai-finding-text,.ai-finding-notes{margin:8px 0;border-radius:10px;padding:8px 12px;background:#f6f8fb}
.ai-finding-notes{background:#fffaf0;border:1px solid #f6d39a}
.ai-finding-text summary,.ai-finding-notes summary{cursor:pointer;font-weight:800;color:#33425a}
.ai-finding-notes summary{color:#8a5100}
.ai-finding-text p{white-space:pre-wrap;margin:8px 0 0;font-size:14px}
.ai-finding-notes ul{margin:8px 0 0;padding-left:18px;display:grid;gap:6px}
.ai-symbol-missing{height:90px;display:grid;place-items:center;border:1px dashed #d4dbe5;border-radius:8px;color:#8a96a8;font-size:12px;font-weight:700;background:#f8fafc}
.ai-dictionary-grid article .actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
@media(max-width:768px){
  .ai-knowledge-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
  .ai-knowledge-tabs button{padding:9px 6px;font-size:13px;white-space:normal;text-align:center}
  .ai-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ai-stats button{padding:10px 12px}
  .ai-dictionary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ai-knowledge-process .section-title{flex-direction:column;align-items:stretch}
}
@media(max-width:430px){.ai-dictionary-grid{grid-template-columns:1fr 1fr}.ai-dictionary-grid article{padding:10px}.ai-dictionary-grid article .actions{grid-template-columns:1fr}}
.ai-correction-form{display:grid;gap:8px;margin:10px 0;padding:12px;border:1px solid #f6d39a;background:#fffaf0;border-radius:10px}
.ai-correction-form textarea,.ai-correction-form input{width:100%;box-sizing:border-box}
.ai-correction{margin:10px 0;padding:10px 12px;border-radius:10px;border:1px solid #cfe5d8;background:#f3faf6}
.ai-correction.pending{border-color:#f6d39a;background:#fffaf0}
.ai-correction p{margin:6px 0}
.ai-correction .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}

/* Shown on page load while the saved sign-in is checked. */
/* The whole screen is the logo's own white, so the logo fills it instead of
   sitting in a small white square. */
.session-restoring { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: #fefefe; }
.session-restoring-box { display: grid; justify-items: center; gap: 10px; text-align: center; color: #1e3a8a; font-weight: 600; }
.session-restoring-logo { display: block; width: min(88vw, 62vh, 560px); height: auto; aspect-ratio: 1; }
.session-restoring-box p { margin: 0; color: #4b5563; }
.session-restoring-spinner { color: #2563eb; width: 28px; height: 28px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: session-restoring-spin .8s linear infinite; }
@keyframes session-restoring-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .session-restoring-spinner { animation-duration: 2.4s; } }

/* Command Studio › Drawings: prints organized by discipline (collapsible rows). */
.tc-drawings-page { max-width: 1180px; margin: 0 auto; width: 100%; }
.tc-drawings-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tc-drawings-top h2 { margin: 0; font-size: 26px; color: #fff; }
.tc-drawings-top small { color: var(--tc-dim); }
.tc-root .tc-sets-button { padding: 9px 18px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.tc-root .tc-refresh-card { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin-bottom: 8px; border-radius: 12px; background: #161a20; border-color: transparent; color: var(--tc-text); text-align: left; }
.tc-refresh-card span { display: grid; gap: 3px; }
.tc-root .tc-scan-all { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; margin-bottom: 8px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #1f6f8b, #2a9d8f); color: #fff; text-align: left; cursor: pointer; font: inherit; }
.tc-root .tc-scan-all:disabled { opacity: .55; cursor: default; }
.tc-root .tc-facts { margin: 0 0 8px; border: 1px solid var(--line, #2b3440); border-radius: 12px; background: rgba(42,157,143,.08); }
.tc-root .tc-facts-head { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.tc-root .tc-facts-head span:first-child { display: grid; gap: 2px; }
.tc-root .tc-facts-head small { opacity: .8; }
.tc-root .tc-facts-body { padding: 0 14px 12px; }
.tc-root .tc-facts-body h4 { margin: 10px 0 4px; font-size: .9rem; }
.tc-root .tc-facts-body ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; font-size: .88rem; }
.tc-root .tc-scan-all span { display: grid; gap: 3px; }
.tc-root .tc-scan-all b { font-size: 17px; font-weight: 600; }
.tc-root .tc-scan-all small { color: rgba(255,255,255,.85); }
.tc-root .tc-scan-all.busy { flex-direction: column; align-items: stretch; cursor: default; background: #16313b; }
.tc-root .tc-scan-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.tc-root .tc-scan-bar i { display: block; height: 100%; background: #2a9d8f; transition: width .4s ease; }
.tc-scan-all-dialog ul { margin: 6px 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.tc-refresh-card b { font-size: 17px; font-weight: 500; }
.tc-refresh-card small { color: var(--tc-dim); font-size: 13px; }
.tc-refresh-card .tc-cloud { flex: none; color: #fff; }
.tc-refresh-card[disabled] { opacity: .7; }
.tc-batch-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; margin: 8px 0; border: 1px solid var(--tc-accent); border-radius: 10px; }
.tc-disciplines { display: grid; }
.tc-discipline { border-bottom: 1px solid var(--tc-line); }
.tc-discipline-head { display: flex; align-items: center; gap: 4px; }
.tc-root .tc-discipline-toggle { flex: 1; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 6px; background: transparent; border: 0; border-radius: 0; color: var(--tc-text); text-align: left; }
.tc-discipline-toggle > span:last-child { display: grid; gap: 4px; min-width: 0; }
.tc-discipline-toggle b { font-size: 21px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-discipline-toggle small { font-size: 15px; color: #c9d1db; }
.tc-chevron { width: 22px; flex: none; color: var(--tc-dim); font-size: 20px; line-height: 1; transform: rotate(-90deg); transition: transform .15s; text-align: center; }
.tc-discipline.open .tc-chevron { transform: none; }
.tc-discipline > .tc-grid { padding: 4px 0 16px 42px; margin: 0; }
.tc-discipline-menu { position: relative; }
.tc-discipline-menu summary { list-style: none; cursor: pointer; padding: 10px 14px; font-size: 24px; font-weight: 700; color: #fff; border-radius: 8px; }
.tc-discipline-menu summary::-webkit-details-marker { display: none; }
.tc-discipline-menu[open] summary { background: var(--tc-panel-2); }
.tc-discipline-menu > div { position: absolute; right: 0; top: 100%; z-index: 20; display: grid; min-width: 200px; padding: 6px; background: var(--tc-panel-2); border: 1px solid var(--tc-line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.45); }
.tc-root .tc-discipline-menu > div button { border: 0; background: transparent; text-align: left; padding: 9px 10px; }
.tc-root .tc-discipline-menu > div button:hover:not([disabled]) { background: var(--tc-panel); }
.tc-drawings-more { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tc-sheet-group { display: grid; gap: 2px; border-bottom: 1px solid #1c2a3a; }
.tc-sheet-group[hidden] { display: none; }
/* Side list drop-downs, matching the Drawings page rows. */
.tc-root .tc-sheet-group-head { display: flex !important; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 8px 6px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #fff; text-align: left; }
.tc-sheet-group-head > span:last-child { display: grid; gap: 2px; min-width: 0; }
.tc-sheet-group-head b { font-size: 16px; font-weight: 700; color: #fff; }
.tc-sheet-group-head small { font-size: 12px; color: #a9b8c8; }
.tc-sheet-group-head .tc-chevron { width: 18px; flex: none; color: #8fa3b8; font-size: 16px; line-height: 1; text-align: center; transform: rotate(-90deg); transition: transform .15s; }
.tc-sheet-group.open .tc-sheet-group-head .tc-chevron { transform: none; }
.tc-sheet-group-items { display: none; gap: 2px; padding: 0 0 8px 22px; }
.tc-sheet-group.open .tc-sheet-group-items, .tc-sheet-list.searching .tc-sheet-group-items { display: grid; }
@media (max-width: 640px) {
  .tc-drawings-top h2 { font-size: 22px; }
  .tc-root .tc-discipline-toggle { min-height: 68px; gap: 10px; }
  .tc-discipline-toggle b { font-size: 19px; }
  .tc-discipline-toggle small { font-size: 14px; }
  .tc-discipline > .tc-grid { padding-left: 0; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Recon: tag note read for the selected device or tag bubble */
.tc-studio .tc-keynote { margin: 8px 0; padding: 8px; border: 1px solid #7a1f1f; border-radius: 8px; background: #241112; }
.tc-studio .tc-keynote dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 4px 0; font-size: 13px; }
.tc-studio .tc-keynote dt { color: var(--tc-dim); }
.tc-studio .tc-keynote dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tc-studio .tc-keynote-text { font-size: 12px; line-height: 1.35; margin: 4px 0; max-height: 9em; overflow: auto; }

/* Recon: Delete and False find actions for the selected devices. */
.tc-root .tc-false-btn { border-color: #ff9f1c; color: #ffc078; }
.tc-selbar { position: absolute; left: 50%; top: 12px; z-index: 6; transform: translateX(-50%); max-width: calc(100% - 24px); pointer-events: none; }
.tc-selbar-inner { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; border: 1px solid #2a4157; border-radius: 999px; background: rgba(11, 22, 34, .96); box-shadow: 0 8px 24px rgba(0,0,0,.45); pointer-events: auto; white-space: nowrap; }
.tc-selbar-inner b { color: #9fd0ff; font-size: 13px; margin-right: 4px; }
.tc-root .tc-selbar-inner button { min-height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 13px; }
.tc-root .tc-selbar-inner .tc-false-sel { border-color: #ff9f1c; background: #2e1d08; color: #ffc078; }
.tc-root .tc-selbar-inner .tc-delete-sel { border-color: #ef476f; background: #2c0f18; color: #ff8fa8; }
.tc-root .tc-selbar-inner .tc-selbar-close { padding: 0 10px; background: transparent; border-color: transparent; font-size: 18px; }
@media (max-width: 640px) { .tc-selbar-inner { gap: 4px; padding-left: 10px; } .tc-root .tc-selbar-inner button { padding: 0 10px; } }

/* Recon: job rules */
.tc-job-rules { margin-bottom: 16px; padding: 10px; border: 1px solid #2f5d8a; border-radius: 10px; background: #0f1d2b; }
.tc-job-rules-text { display: grid; gap: 4px; margin-top: 8px; }
.tc-job-rules-text textarea { width: 100%; box-sizing: border-box; }

/* Job Backlog › Scope checklist */
.scope-summary { margin: 6px 0 2px; }
.scope-tabs button { min-width: 130px; min-height: 52px; }
.scope-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 4px; }
.scope-toolbar input[type="search"] { flex: 1 1 240px; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.scope-toolbar label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.scope-toolbar select, .scope-status select { min-height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: #fff; }
.scope-coordination-link { margin: 4px 0; }
.scope-task-list { display: grid; gap: 10px; padding: 8px 0; }
.scope-task { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; display: grid; gap: 8px; }
.scope-task.flagged { border-left: 4px solid #e2a23a; }
.scope-task.approved { border-left: 4px solid #2f9e6a; }
.scope-task.rejected { opacity: .65; }
.scope-task-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.scope-task-head b { line-height: 1.35; }
.scope-task-badges, .scope-task-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.scope-task-tags { justify-content: flex-start; }
.scope-flags { margin: 0; padding: 8px 10px 8px 26px; background: #fff8ea; border-radius: 6px; color: #6c4304; font-size: 13px; }
.scope-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-source { display: grid; gap: 2px; max-width: 100%; text-align: left; border: 1px solid #c9d8f2; background: #f3f7ff; color: inherit; border-radius: 6px; padding: 6px 8px; cursor: pointer; font-size: 12px; }
.scope-source b { color: #0b4fae; }
.scope-source span { color: #4b5566; overflow-wrap: anywhere; }
.scope-actions { justify-content: flex-start; }
.scope-edit { display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.scope-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.scope-edit .field { display: grid; gap: 4px; font-size: 13px; }
.scope-edit input, .scope-edit select { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
@media (max-width: 640px) {
  .scope-task-head { flex-direction: column; }
  .scope-task-badges { justify-content: flex-start; }
  .scope-tabs button { min-width: 112px; }
}

/* Job Backlog › Install methods */
.install-methods { display: grid; gap: 12px; }
.install-methods-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.install-methods .field { display: grid; gap: 6px; font-size: 13px; }
.install-methods select { min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; max-width: 100%; }
.install-room { gap: 10px; }
.install-room select { min-width: 150px; }
@media (max-width: 640px) { .install-room { flex-direction: column; align-items: stretch; } .install-room select { width: 100%; } }

/* Field checklist card — kept simple for the crew */
.task-warning { margin-top: 8px; }
.task-description { white-space: pre-line; overflow-wrap: anywhere; }
.task-description-more > summary { list-style: none; cursor: pointer; display: grid; gap: 4px; }
.task-description-more > summary::-webkit-details-marker { display: none; }
.task-description-more[open] > summary { display: none; }
.task-count { display: grid; gap: 8px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.task-count-status { margin: 0; font-size: 15px; }
.task-count-form { display: grid; gap: 8px; }
.task-count-label { display: grid; gap: 6px; font-weight: 900; font-size: 15px; }
.task-count-row { display: flex; align-items: center; gap: 10px; font-weight: 750; }
.task-count-row input { width: 120px; min-height: 48px; font-size: 20px; font-weight: 900; text-align: center; }
.task-count-note summary { cursor: pointer; color: var(--muted); font-weight: 800; font-size: 13px; }
.task-count-note input { width: 100%; box-sizing: border-box; min-height: 42px; margin-top: 6px; }
.task-count-form .actions .btn { min-height: 46px; min-width: 110px; }
.task-tech { margin-top: 10px; }
.task-tech summary { cursor: pointer; color: var(--muted); font-weight: 800; font-size: 13px; }
@media (max-width: 767px) {
  .task-bulk-select { display: none; }
  .task-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .task-actions .task-primary { grid-column: 1 / -1; font-size: 16px; }
  .task-count-form .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .task-count-form .actions .btn:only-child { grid-column: 1 / -1; }
}

/* Recon tool bar: scrollable with a mouse (wheel, drag, ‹ › arrows). */
.tc-studio-header .tc-tools { scroll-behavior: auto; scrollbar-width: auto; scrollbar-color: #3b5a7a transparent; }
.tc-studio-header .tc-tools::-webkit-scrollbar { height: 8px; }
.tc-studio-header .tc-tools::-webkit-scrollbar-thumb { background: #3b5a7a; border-radius: 4px; }
.tc-studio-header .tc-tools.dragging { cursor: grabbing; user-select: none; }
.tc-studio-header .tc-tools > .tc-tools-arrow { position: sticky; z-index: 2; flex: 0 0 auto; display: none; width: 30px; height: 34px; padding: 0; border: 1px solid #2a4157; border-radius: 8px; background: #0b1d2e; color: #fff; font-size: 22px; line-height: 1; box-shadow: 0 0 14px 8px #08121c; cursor: pointer; }
.tc-studio-header .tc-tools > .tc-tools-arrow.left { left: 0; order: -1; margin-right: -30px; }
.tc-studio-header .tc-tools > .tc-tools-arrow.right { right: 0; order: 99; margin-left: -30px; }
.tc-studio-header .tc-tools.can-left > .tc-tools-arrow.left, .tc-studio-header .tc-tools.can-right > .tc-tools-arrow.right { display: inline-flex; align-items: center; justify-content: center; }
.tc-studio-header .tc-tools > .tc-tools-arrow:hover { background: #153e70; border-color: #1885ff; }
@media (pointer: coarse) { .tc-studio-header .tc-tools > .tc-tools-arrow { display: none !important; } }
/* A centered flex row that overflows pushes its first items off the left
   edge where scrolling cannot reach them. Center only while it fits. */
.studio-toolbar-tools { justify-content: flex-start; }
.studio-toolbar-tools > :first-child { margin-left: auto; }
.studio-toolbar-tools > :last-child { margin-right: auto; }
.tc-studio-header .tc-tools > :first-child, .tc-studio-header .tc-tools > :last-child { margin-left: 0; margin-right: 0; }
.tc-studio-header .tc-tools > .tc-tools-arrow.left { margin-right: -30px; }
.tc-studio-header .tc-tools > .tc-tools-arrow.right { margin-left: -30px; }

/* Checklist → print: the highlighted spots and the bar naming the item. */
.task-print-btn { display: inline-flex; align-items: center; gap: 5px; border-color: #ff9f1c !important; font-weight: 700; }
.tc-focus-box { animation: tc-focus-pulse 1.4s ease-in-out infinite; }
.tc-focus-box.current { stroke: #ef476f; fill: #ef476f; }
@keyframes tc-focus-pulse { 0%, 100% { stroke-opacity: 1; fill-opacity: .14; } 50% { stroke-opacity: .45; fill-opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .tc-focus-box { animation: none; } }
.tc-focusbar { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 5; display: flex; justify-content: center; pointer-events: none; }
.tc-focusbar:empty { display: none; }
.tc-focusbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; padding: 8px 8px 8px 14px; border: 1px solid #ff9f1c; border-radius: 14px; background: rgba(28, 19, 6, .96); box-shadow: 0 8px 24px rgba(0,0,0,.45); pointer-events: auto; }
.tc-focus-copy { display: grid; gap: 1px; min-width: 0; flex: 1 1 200px; }
.tc-focus-copy small { color: #ffc078; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.tc-focus-copy b { color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-focus-copy span { color: #e6d3b3; font-size: 12px; }
.tc-root .tc-focusbar-inner button, .tc-focus-sheet { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid #5c4320; background: #2e1d08; color: #ffe2b8; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; }
.tc-root .tc-focusbar-inner .tc-focus-close { background: transparent; border-color: transparent; font-size: 18px; }
/* With a checklist highlight showing, the selection bar sits under it. */
.tc-focusbar:not(:empty) ~ .tc-selbar, .tc-selbar:has(~ .tc-focusbar:not(:empty)) { top: 92px; }
.tc-focus-also { color: #e6d3b3; font-size: 12px; }
.install-underground h4 { margin: 12px 0 6px; font-size: 14px; }
.install-ug-rooms { display: grid; gap: 10px; }
.install-ug-room { display: grid; gap: 6px; }
.install-ug-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.install-ug-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-size: 13px; background: #fff; min-height: 36px; }
.install-ug-chip:has(input:checked) { border-color: #8a5a1a; background: #fff3df; }
.install-underground .field input { min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; width: 100%; }

/* Recon: the sharp drawing tile at exactly screen scale shows its pixels as
   they are (see tcMarkDetailExact); smoothing them blurs thin lines. */
.tc-stage canvas.tc-hd-exact { image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated; }

/* Open questions on a checklist task: answer what the AI missed. */
.open-questions { display: grid; gap: 8px; margin: 4px 0 10px; }
.open-questions h4 { margin: 0; font-size: 1rem; }
.open-questions ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.open-question { border: 1px solid var(--line, #d7dddb); border-radius: 10px; padding: 10px 12px; background: var(--panel, #fff); display: grid; gap: 6px; }
.open-question.is-answered { border-color: #9cc9a8; background: #f2faf4; }
.open-question p { margin: 0; }
.open-question-text { font-weight: 600; }
.open-question .question-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.question-answer-form { display: grid; gap: 8px; }
.question-answer-form textarea { width: 100%; min-height: 72px; font: inherit; }
.question-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.question-answer-form .question-quick .chip { width: auto; min-height: 34px; display: inline-flex; align-items: center; text-align: left; border: 1px solid var(--line, #c9d1cf); border-radius: 999px; padding: 5px 12px; background: #fff; color: inherit; font: inherit; font-size: .88rem; line-height: 1.25; cursor: pointer; }

/* ---- Simplified navigation (main menu, job workflow tabs, next step, quick tour) ---- */
.shell .nav .bc-nav-current-job{min-height:34px;margin:-1px 0 3px 14px;padding:0 10px;font-size:12px;font-weight:600;color:#bcd0ea;box-shadow:none;background:rgba(255,255,255,.05)}
.shell .nav .bc-nav-current-job span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shell .nav .bc-nav-current-job .nav-icon{font-size:13px;opacity:.7}
.job-primary-tabs{gap:6px}
.job-primary-tabs button{padding:0 10px;min-height:46px}
.job-primary-tabs button b{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:700}
.job-primary-tabs .job-tab-step{display:inline-grid;place-items:center;width:19px;height:19px;border-radius:999px;background:#eef2f7;color:#526076;font-size:11px;font-style:normal;font-weight:800}
.job-primary-tabs button.active .job-tab-step{background:var(--bc-blue);color:#fff}
.job-tab-guide{margin:-8px 0 18px;padding:0 8px}
.job-tab-help{margin:0 0 10px;color:var(--bc-muted);font-size:13px;line-height:1.45}
.job-tab-tools{display:flex;flex-wrap:wrap;gap:8px}
.job-tab-tools button{min-height:34px;padding:0 13px;border:1px solid var(--bc-border);border-radius:999px;background:#fff;color:#334360;font-size:12.5px;font-weight:650}
.job-tab-tools button:hover{border-color:#b9c7da}
.job-tab-tools button.active{border-color:var(--bc-blue);background:var(--bc-blue-soft);color:var(--bc-blue)}
.bc-area-tabs{display:flex;gap:6px;overflow-x:auto;margin:0 0 6px;border-bottom:1px solid var(--bc-border);scrollbar-width:none}
.bc-area-tabs button{min-height:42px;padding:0 12px;border-bottom:2px solid transparent;background:none;color:#526076;font-size:13px;font-weight:700;white-space:nowrap}
.bc-area-tabs button.active{border-bottom-color:var(--bc-blue);color:var(--bc-blue)}
.bc-area-help{margin:0 0 16px;color:var(--bc-muted);font-size:13px}
.bc-next-step{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);gap:20px;align-items:center;margin-bottom:14px;padding:18px 20px;border:1px solid #cfe1fb;border-left:4px solid var(--bc-blue);border-radius:10px;background:#f6faff}
.bc-next-step h3{margin:2px 0 6px;color:var(--bc-ink);font-size:20px}
.bc-next-step p{margin:0 0 14px;color:#41526b;font-size:14px;line-height:1.5}
.bc-next-step .btn.primary{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 18px;font-size:14px}
.bc-next-step-stages{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.bc-next-step-stages li{display:flex;align-items:center;gap:10px;color:#6e7a8d;font-size:13px;font-weight:600}
.bc-next-step-stages i{display:inline-grid;place-items:center;flex:0 0 24px;height:24px;border:1px solid #cbd5e3;border-radius:999px;background:#fff;font-size:11px;font-style:normal;font-weight:800}
.bc-next-step-stages li.done{color:var(--bc-success)}
.bc-next-step-stages li.done i{border-color:var(--bc-success);background:var(--bc-success);color:#fff}
.bc-next-step-stages li.current{color:var(--bc-ink)}
.bc-next-step-stages li.current i{border-color:var(--bc-blue);background:var(--bc-blue);color:#fff}
.bc-tour-backdrop{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:16px;background:rgba(6,31,67,.45)}
.bc-tour-card{width:min(440px,100%);padding:22px;border-radius:12px;background:#fff;box-shadow:0 18px 50px rgba(6,31,67,.28)}
.bc-tour-card h3{margin:4px 0 8px;color:var(--bc-ink);font-size:20px}
.bc-tour-card p{margin:0;color:#41526b;font-size:15px;line-height:1.55}
.bc-tour-dots{display:flex;gap:6px;margin:18px 0}
.bc-tour-dots i{width:8px;height:8px;border-radius:999px;background:#d6dee9}
.bc-tour-dots i.active{width:22px;background:var(--bc-blue)}
.bc-tour-actions{display:flex;justify-content:space-between;align-items:center;gap:8px}
.bc-tour-actions>span{display:flex;gap:8px}
.bc-tour-actions .btn{min-height:40px;font-size:14px}
@media(max-width:980px){.shell .nav .bc-nav-current-job{display:none}}
@media(max-width:760px){
  .shell .nav .bc-nav-current-job{display:grid;margin-left:14px}
  .bc-help{display:grid}
  .job-primary-tabs{gap:2px}
  .job-primary-tabs button{min-width:0;padding:0 8px}
  .job-primary-tabs button span{display:none}
  .job-tab-guide{padding:0}
  .job-tab-tools{flex-wrap:nowrap;overflow-x:auto;margin-inline:-14px;padding:0 14px 4px;scrollbar-width:none}
  .job-tab-tools button{flex:0 0 auto}
  .bc-next-step{grid-template-columns:1fr;padding:16px}
  .bc-next-step .btn.primary{width:100%;justify-content:center}
  .mobile-nav button{font-size:11px}
}

/* ---- Movable tiles ---- */
.job-overview-layout>.job-ai-summary{grid-column:1/-1;margin:0}
.bc-arrange-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px;padding:12px 16px;border:1px solid #cfe1fb;border-left:4px solid var(--bc-blue);border-radius:10px;background:#f6faff}
.bc-arrange-banner>div:first-child{display:grid;gap:2px}
.bc-arrange-banner b{color:var(--bc-ink);font-size:15px}
.bc-arrange-banner span{color:#41526b;font-size:13px}
.bc-arrange-banner>div:last-child{display:flex;gap:8px}
.bc-tile-group.arranging>[data-tile-id]{position:relative;outline:2px dashed #9fc2f3;outline-offset:2px;cursor:default}
.bc-tile-group.arranging>[data-tile-id]>*:not(.bc-tile-controls){pointer-events:none}
.bc-tile-group.arranging>[data-tile-id].dragging{opacity:.55;outline-color:var(--bc-blue)}
.bc-tile-controls{position:absolute;top:6px;right:6px;z-index:3;display:flex;gap:4px;padding:3px;border:1px solid var(--bc-border);border-radius:8px;background:#fff;box-shadow:0 2px 8px rgba(6,31,67,.12)}
.bc-tile-controls>*{display:grid;place-items:center;width:34px;height:34px;border-radius:6px;background:#f2f6fb;color:#24344c;font-size:16px;font-weight:800;line-height:1}
.bc-tile-controls button:disabled{opacity:.35}
.bc-tile-grip{cursor:grab;touch-action:none;user-select:none;letter-spacing:-3px}
body.bc-tile-dragging,body.bc-tile-dragging *{cursor:grabbing!important;user-select:none}
@media(max-width:760px){
  .bc-tile-group.arranging.bc-metric-grid{display:grid;grid-template-columns:1fr;overflow:visible}
  .bc-tile-group.arranging .bc-metric-card{min-height:84px}
  .bc-arrange-banner>div:last-child{width:100%}
  .bc-arrange-banner>div:last-child .btn{flex:1}
}

/* ---- Overview To-do and Calendar tiles ---- */
.bc-todo-rows{display:grid;padding:0 14px 12px}
.bc-todo-row{display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:10px;min-height:48px;padding:0 4px;border-top:1px solid #edf1f6;background:#fff;color:#24344c;text-align:left;font-size:14px;font-weight:600}
.bc-todo-row:first-child{border-top:0}
.bc-todo-row b{min-width:34px;padding:3px 9px;border-radius:999px;background:#eef2f7;color:#526076;font-size:13px;text-align:center}
.bc-todo-row.has-danger b{background:#fdecee;color:var(--bc-danger)}
.bc-todo-row.has-warning b{background:#fff3e2;color:#b5650c}
.bc-todo-row.has-info b{background:var(--bc-blue-soft);color:var(--bc-blue)}
.bc-todo-row.is-clear{color:#7a879a}
.bc-todo-row svg{color:#9aa6b8}
.bc-todo-clear{margin:0 18px 14px;color:var(--bc-success);font-size:13px;font-weight:600}
.bc-calendar-row{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:54px;padding:7px 14px;border-top:1px solid #edf1f6;background:#fff;text-align:left}
.bc-calendar-row:first-child{border-top:0}
.bc-calendar-date{display:grid;justify-items:center;padding:4px 0;border-radius:8px;background:var(--bc-blue-soft);color:var(--bc-blue)}
.bc-calendar-date b{font-size:13px}
.bc-calendar-date small{font-size:10px;color:#4f76b0}
.bc-calendar-row>span:nth-child(2) b{display:block;color:#24344c;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bc-calendar-row>span:nth-child(2) small{display:block;margin-top:2px;color:var(--bc-muted);font-size:12px}
.bc-calendar-tile-actions{padding:6px 14px 14px}
.bc-filter-chip-banner{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px;padding:10px 14px;border:1px solid #cfe1fb;border-radius:10px;background:#f6faff;font-size:14px;color:#24344c}
.job-primary-tabs .job-tab-step{display:none}

/* ---- Daily report task picker ---- */
.report-task-field .report-task-pick{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;font-size:14px}
.report-task-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.report-task-count{flex-basis:100%;margin:0;color:#24344c;font-size:13px;font-weight:700}
.report-task-none{margin:0;color:var(--bc-muted);font-size:13px}
.report-task-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;padding:6px 6px 6px 12px;border:1px solid #cfe1fb;border-radius:10px;background:#f6faff}
.report-task-chip>span{display:grid;min-width:0}
.report-task-chip b{overflow:hidden;color:#24344c;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.report-task-chip small{color:var(--bc-muted);font-size:11.5px}
.report-task-chip button{flex:0 0 32px;height:32px;border-radius:8px;background:#e4eefc;color:#34507a;font-size:14px;font-weight:800}
.report-picker-backdrop{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:16px;background:rgba(6,31,67,.45)}
.report-picker{display:grid;grid-template-rows:auto auto minmax(0,1fr);width:min(720px,100%);height:min(86vh,900px);overflow:hidden;border-radius:12px;background:#fff;box-shadow:0 18px 50px rgba(6,31,67,.28)}
.report-picker header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--bc-border)}
.report-picker header h3{margin:0;color:var(--bc-ink);font-size:18px}
.report-picker header span{color:var(--bc-blue);font-size:13px;font-weight:700}
.report-picker header .btn{min-height:42px;padding:0 20px;font-size:15px}
.report-picker-filters{display:grid;grid-template-columns:minmax(0,1fr) 170px 150px;gap:8px;padding:12px 16px;border-bottom:1px solid var(--bc-border);background:#f9fbfd}
.report-picker-search{display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid var(--bc-border);border-radius:8px;background:#fff}
.report-picker-search input{flex:1;min-width:0;min-height:42px;border:0;outline:0;background:none;font-size:15px}
.report-picker-filters select{min-height:44px;padding:0 10px;border:1px solid var(--bc-border);border-radius:8px;background:#fff;font-size:14px}
.report-picker-done-toggle{grid-column:1/-1;display:flex;align-items:center;gap:8px;color:#41526b;font-size:13px}
.report-picker-list{overflow-y:auto;padding:4px 16px 20px;overscroll-behavior:contain}
.report-picker-room{padding-top:10px}
.report-picker-room-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 0;background:#fff;border-bottom:1px solid var(--bc-border)}
.report-picker-room-head b{color:var(--bc-ink);font-size:15px}
.report-picker-room-head .btn{min-height:36px;font-size:12.5px}
.report-picker-task{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:12px;min-height:56px;padding:8px 6px;border-bottom:1px solid #f0f3f7;cursor:pointer}
.report-picker-task input{width:24px;height:24px;accent-color:var(--bc-blue)}
.report-picker-task b{display:block;color:#24344c;font-size:14.5px;font-weight:600;line-height:1.3}
.report-picker-task small{display:block;margin-top:3px;color:var(--bc-muted);font-size:12.5px}
.report-picker-task.on{background:#f3f8ff}
.report-picker-more{margin:14px 0 0;color:var(--bc-muted);font-size:13px;text-align:center}
@media(max-width:760px){
  .report-picker-backdrop{padding:0}
  .report-picker{width:100%;height:100dvh;border-radius:0}
  .report-picker-filters{grid-template-columns:1fr 1fr}
  .report-picker-search{grid-column:1/-1}
}

/* Edit Job: Darken prints for AI scans */
.print-ink-field .sub { margin: 6px 0 0; }

/* Recon: details on other sheets */
.tc-detail-row { display: flex; flex-direction: column; gap: 3px; padding: 6px 0; border-top: 1px solid var(--tc-line, #2e3642); }
.tc-detail-row small { display: block; }
.tc-detail-row .tc-warn-text, .tc-action .tc-warn-text { color: var(--tc-warn, #ffbe0b); }
.tc-canvas.tool-detail_room { cursor: crosshair; }

/* Recon Panel Editor: power distribution diagram */
.tc-dist-tree, .tc-dist-tree ul { list-style: none; margin: 0; padding: 0; }
.tc-dist-tree ul { margin-left: 14px; padding-left: 14px; border-left: 2px solid var(--tc-line, #2e3642); }
.tc-dist-tree li { position: relative; margin: 6px 0; }
.tc-dist-tree ul > li::before { content: ""; position: absolute; left: -14px; top: 18px; width: 12px; border-top: 2px solid var(--tc-line, #2e3642); }
.tc-dist-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: min(100%, 360px); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--tc-line, #2e3642); background: var(--tc-panel-2, #222832); color: var(--tc-text, #e6eaf0); cursor: pointer; }
.tc-dist-card small { color: var(--tc-dim, #9aa5b4); }
.tc-dist-card .tc-dist-standby, .tc-dist-standby { color: var(--tc-warn, #ffbe0b); }
.tc-dist-load { font-size: 13px; color: var(--tc-dim, #9aa5b4); }
.tc-dist-load span { display: inline-block; min-width: 2.2em; color: var(--tc-text, #e6eaf0); }
.tc-one-line-props { margin-top: 8px; }

/* Offline: "Saved on this device · updated 5 min ago" on assigned jobs. */
.offline-status-line { margin: 6px 0 0; font-size: 13px; color: var(--muted, #5b6b7d); }
.offline-status-line::before { content: "⤓ "; }
.offline-auto-toggle { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-weight: 600; }

/* Recon: boxing a detail by hand across two sheets */
.tc-hand-banner { align-self: center; padding: 4px 10px; border-radius: 6px; background: var(--tc-warn, #ffbe0b); color: #111; font-weight: 700; white-space: nowrap; }
.tc-canvas.tool-hand_detail { cursor: crosshair; }
.tc-offline-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #ffbe0b; color: #111; font-size: 11px; font-weight: 800; vertical-align: middle; }

/* Studio: print changes made offline, waiting for approval. */
.tc-approvals-page { max-width: 980px; margin: 0 auto; width: 100%; }
.tc-approval { margin: 0 0 14px; padding: 12px; border: 1px solid var(--tc-line); border-radius: 12px; background: var(--tc-panel); }
.tc-approval.pending { border-color: #ffbe0b; }
.tc-approval > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.tc-approval > header b { display: block; color: #fff; font-size: 16px; }
.tc-approval > header small { color: var(--tc-dim); }
.tc-change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tc-change { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 8px; padding: 8px 4px; border-top: 1px solid var(--tc-line); }
.tc-change input { width: 20px; height: 20px; }
.tc-change-text { display: grid; gap: 2px; min-width: 0; }
.tc-change-text small { color: #ffc078; }
.tc-change-state { padding: 2px 8px; border-radius: 999px; background: var(--tc-panel-2); color: var(--tc-dim); font-size: 12px; font-weight: 700; white-space: nowrap; }
.tc-change-state.ok { background: #10331f; color: #6ee7a8; }
.tc-change-state.no { background: #3a1018; color: #ff8fa8; }
.tc-change-state.warn { background: #2e1d08; color: #ffc078; }
.tc-root .tc-link { background: transparent; border: 0; color: #9fd0ff; text-decoration: underline; padding: 4px; }
.tc-approval-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tc-root .tc-approval-actions button { min-height: 40px; padding: 0 16px; font-weight: 700; }
.tc-approvals-done { margin: 22px 0 8px; color: var(--tc-dim); }
.tc-empty-line { color: var(--tc-dim); padding: 18px 0; }
.tc-root .tc-approvals-banner { display: grid; gap: 2px; width: 100%; margin-bottom: 8px; padding: 14px 18px; border-radius: 12px; border: 1px solid #ffbe0b; background: #2b2410; color: #ffd166; text-align: left; }
.tc-approvals-banner small { color: #e6d3b3; }
.tc-views .tc-count { margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #ffbe0b; color: #111; font-style: normal; font-size: 11px; font-weight: 800; }
@media (max-width: 640px) { .tc-change { grid-template-columns: 26px 1fr; } .tc-change .tc-change-state, .tc-change .tc-link { grid-column: 2; justify-self: start; } }

/* Free trial banner */
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; border-left: 4px solid #2f80ed; }
.trial-banner b { display: block; }
.trial-banner .sub { margin: 4px 0 0; }
.trial-banner-expired { border-left-color: #d9822b; }
.trial-banner-note { font-size: 0.9rem; opacity: 0.85; }
.trial-includes { margin: 4px 0 10px; }

/* Upgrade plan picker */
.plan-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.plan-choice { display: flex; flex-direction: column; gap: 8px; }
.plan-choice-price { font-size: 28px; font-weight: 900; }
.plan-choice-price small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.plan-choice .btn { margin-top: auto; }

/* Command Center */
.cc-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cc-metric { display: flex; flex-direction: column; gap: 4px; min-height: 92px; }
.cc-metric-label { color: var(--muted); font-size: 13px; font-weight: 750; }
.cc-metric-value { font-size: 26px; font-weight: 900; line-height: 1.1; }
.cc-metric.cc-warn { border-left: 4px solid #d9822b; }
.cc-metric.cc-bad { border-left: 4px solid #c0392b; }
.cc-metric.cc-good { border-left: 4px solid #2e9e6a; }
.cc-toolbar { align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.cc-toolbar .tabs { margin-bottom: 0; }
.cc-page section.card + section.card, .cc-page .cc-two + section.card, .cc-page section.card + .cc-two, .cc-page .cc-metrics + section.card { margin-top: 14px; }
.cc-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.cc-callout { border-left: 4px solid #d9822b; margin-bottom: 14px; }
.cc-alert { border-left: 4px solid #c0392b; }
.cc-table-wrap { overflow-x: auto; margin-top: 10px; }
.cc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cc-table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 800; padding: 6px 8px; border-bottom: 1px solid rgba(0,0,0,.1); white-space: nowrap; }
.cc-table td { padding: 8px; border-bottom: 1px solid rgba(0,0,0,.06); vertical-align: top; }
.cc-table tr.cc-row-alert td { background: #fdf0ee; }
.cc-actions { white-space: nowrap; text-align: right; }
.cc-actions .btn { min-height: 32px; padding: 0 10px; font-size: 13px; }
.cc-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; margin-top: 12px; }
.cc-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.cc-bar-fill { width: 100%; max-width: 48px; background: var(--brand, #1f6f8b); border-radius: 4px 4px 0 0; }
.cc-bar small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; }
.cc-toolbar .tabs .btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cc-page .cc-two > section.card { margin-top: 0; }
.cc-page .item-title + .table-list, .cc-page .job-head + .table-list { margin-top: 10px; }
.cc-table.cc-wide { min-width: 640px; }
#upgrade-plans { scroll-margin-top: 80px; margin-bottom: 14px; }
.cc-page .cc-two > section.card + section.card { margin-top: 0; }
.plan-interval { margin-top: 10px; }
.plan-interval .btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.plan-interval small { font-weight: 700; opacity: .85; margin-left: 4px; }
.plan-choice-credits { font-weight: 800; color: var(--brand); }
.ai-credits { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.08); }
.ai-credits-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ai-credits-bar { height: 10px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden; margin: 8px 0 4px; }
.ai-credits-bar > div { height: 100%; background: var(--brand); border-radius: 999px; }
.ai-credits-warn .ai-credits-bar > div { background: #d9822b; }
.ai-credits-danger .ai-credits-bar > div { background: #c0392b; }
.cc-out { color: #c0392b; font-weight: 800; }

/* Owner console: the whole page for the Blueprint Command owner login. */
.owner-console { min-height: 100vh; background: var(--bg); }
.owner-console-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.owner-console-brand { display: flex; align-items: center; gap: 10px; }
.owner-console-brand img { width: 36px; height: 36px; object-fit: contain; }
.owner-console-brand b { display: block; font-size: 16px; }
.owner-console-brand small { display: block; color: var(--muted, #5f6b66); font-size: 12px; }
.owner-console-account { display: flex; align-items: center; gap: 10px; }
.owner-console-main { max-width: 1280px; margin: 0 auto; padding: 18px 20px 40px; }
@media (max-width: 640px) {
  .owner-console-header { padding: 10px 12px; }
  .owner-console-account small { display: none; }
  .owner-console-main { padding: 12px 10px 32px; }
}

/* Offices: filter on Home and Jobs, inline home office picker in Users */
.office-filter-bar { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.office-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.office-filter select { min-height: 36px; max-width: 220px; }
.office-inline { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.office-inline select { min-height: 32px; max-width: 200px; }
@media (max-width: 640px) { .office-filter-bar { justify-content: stretch; } .office-filter, .office-filter select { width: 100%; max-width: none; } }

/* Account links, forgot password, CSV import */
.auth-link { justify-self: center; margin-top: 4px; padding: 6px 8px; background: none; border: 0; color: var(--bc-blue, #0b6cff); font-weight: 600; text-decoration: underline; cursor: pointer; }
.user-import summary { cursor: pointer; padding: 6px 0; }
.user-import .import-row-error { border-color: #f1b8b8; background: #fff7f7; }
.user-import .warning-text { color: #b42318; }
.user-import .import-link { width: min(100%, 420px); margin-left: 4px; font-size: 12px; }
.user-import-rows { max-height: 420px; overflow: auto; }
.audit-search { display: flex; gap: 8px; }
.audit-search input { flex: 1; min-width: 0; }
.audit-rows { max-height: 520px; overflow: auto; }

/* Home page header: company, office, greeting. */
.home-greeting { display: grid; gap: 2px; }
.home-greeting .home-company { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #5b6b7d); }
.home-greeting .home-office { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted, #5b6b7d); }
.home-greeting h2 { margin: 4px 0 0; }

/* Password box with a Show/Hide button (outside the sign-in screen). */
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 72px; }
.password-field button { position: absolute; top: 0; right: 0; bottom: 0; min-width: 64px; padding: 0 12px; border: 0; background: transparent; color: #52617a; font-size: 13px; font-weight: 850; cursor: pointer; }

/* Ask AI: ask box, "Your questions" list, one question open at a time */
.ask-ai{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;width:100%;max-width:880px;margin:0 auto;min-width:0}
.ask-ai>*,.ask-ai-composer>*,.ask-ai-settings>*{min-width:0}
.ask-ai-head h2{margin:0;font-size:22px;letter-spacing:-.01em;color:var(--ink)}
.ask-ai-head .sub{margin:4px 0 0}
.ask-ai-composer{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--panel);box-shadow:var(--shadow)}
.ask-ai-composer textarea{width:100%;min-height:64px;resize:vertical;padding:12px 14px;border:1px solid var(--line);border-radius:10px;font:inherit;font-size:16px;line-height:1.45;color:var(--ink);background:var(--bg)}
.ask-ai-composer textarea:focus{outline:2px solid color-mix(in srgb,var(--brand) 45%,transparent);border-color:var(--brand);background:var(--panel)}
.ask-ai-composer-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.ask-ai-tools{display:flex;gap:6px;flex-wrap:wrap}
.ask-ai-tools .btn{min-height:36px;padding:6px 10px;font-size:13px}
.ask-ai-send{min-width:110px;min-height:42px;font-size:15px}
.ask-ai-suggestions{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.ask-ai-suggestions::-webkit-scrollbar{display:none}
.ask-ai-chip{flex:0 0 auto;border:1px solid var(--line);border-radius:999px;padding:6px 12px;background:var(--panel-2);color:var(--ink);font-family:inherit;font-size:13px;font-weight:600;line-height:1.2;cursor:pointer;white-space:nowrap}
.ask-ai-chip:hover{border-color:var(--brand);color:var(--brand)}
.ask-ai-list{display:grid;gap:8px}
.ask-ai-list-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.ask-ai-list-head h3{margin:0;font-size:16px}.ask-ai-list-head h3 .sub{font-weight:600;margin-left:4px}
.ask-ai-search{flex:1 1 220px;max-width:320px;padding:8px 12px;border:1px solid var(--line);border-radius:999px;font:inherit;font-size:14px;background:var(--panel);color:var(--ink)}
.ask-ai-day{margin:8px 2px 0;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.ask-ai-item{display:grid;gap:5px;width:100%;text-align:left;padding:12px 14px;border:1px solid var(--line);border-left:3px solid var(--brand);border-radius:12px;background:var(--panel);color:var(--ink);font:inherit;cursor:pointer;transition:border-color .15s,box-shadow .15s}
.ask-ai-item:hover,.ask-ai-item:focus-visible{border-color:var(--brand);box-shadow:var(--shadow);outline:none}
.ask-ai-item-q{font-weight:700;font-size:15px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ask-ai-item-a{color:var(--muted);font-size:13px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ask-ai-item-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;color:var(--muted);font-size:12px}
.ask-ai-item-meta .badge{font-size:11px}
.ask-ai-detail{display:grid;gap:12px}
.ask-ai-detail-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:0;z-index:2;padding:6px 0;background:var(--bg)}
.ask-ai-detail-step{display:flex;gap:6px}
.ask-ai-label{display:block;color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.ask-ai-question{padding:14px 16px;border-radius:14px;background:color-mix(in srgb,var(--brand) 9%,var(--panel));border:1px solid color-mix(in srgb,var(--brand) 25%,var(--line))}
.ask-ai-question h3{margin:6px 0 0;font-size:18px;line-height:1.35;color:var(--ink);white-space:pre-wrap}
.ask-ai-answer{display:grid;gap:12px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);box-shadow:var(--shadow)}
.ask-ai-answer-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.ask-ai-answer-body{font-size:15px;line-height:1.6;color:var(--ink);overflow-wrap:anywhere}
.ask-ai-answer-body p{margin:0 0 10px}.ask-ai-answer-body p:last-child{margin-bottom:0}
.ask-ai-answer-body h4{margin:14px 0 6px;font-size:15px}
.ask-ai-answer-body ol,.ask-ai-answer-body ul{margin:0 0 10px;padding-left:22px;display:grid;gap:5px}
.ask-ai-callout{padding:10px 12px;border-radius:10px;font-size:14px;line-height:1.5}
.ask-ai-callout p,.ask-ai-callout ul{margin:4px 0 0}.ask-ai-callout ul{padding-left:20px}
.ask-ai-callout.next{background:color-mix(in srgb,var(--good) 10%,var(--panel));border:1px solid color-mix(in srgb,var(--good) 30%,var(--line))}
.ask-ai-callout.review{background:color-mix(in srgb,var(--accent) 12%,var(--panel));border:1px solid color-mix(in srgb,var(--accent) 40%,var(--line))}
.ask-ai-sources{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ask-ai-sources .ask-ai-label{margin-right:2px}
.ask-ai-answer-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:flex-start;padding-top:10px;border-top:1px solid var(--line)}
.ask-ai-answer-actions .btn{min-height:38px;font-size:13px}
.ask-ai-more{position:relative}
.ask-ai-more summary{list-style:none;cursor:pointer}.ask-ai-more summary::-webkit-details-marker{display:none}
.ask-ai-more[open]>div{display:grid;gap:6px;margin-top:6px}
.ask-ai-settings{border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:10px 14px}
.ask-ai-settings>summary{cursor:pointer;font-weight:700;color:var(--muted);font-size:14px}
.ask-ai-settings[open]>summary{margin-bottom:10px}
@media (max-width:640px){
  .ask-ai-composer-row{flex-wrap:wrap}.ask-ai-send{flex:1 1 100%}
  .ask-ai-tools{flex:1 1 100%}.ask-ai-tools .btn{flex:1}
  .ask-ai-answer-actions .btn,.ask-ai-more{flex:1 1 calc(50% - 6px)}.ask-ai-more summary{width:100%}
  .ask-ai-question h3{font-size:17px}
}

/* Outlook / Google events pulled into the calendar */
.calendar-import-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.calendar-import-status { margin: 0; flex: 1 1 200px; }
.calendar-import-status.error { color: #b42318; }
.calendar-event-card.calendar-event-imported { border-left: 4px solid #0f6cbd; background: #f3f8fd; }
.calendar-event-card.imported-google { border-left-color: #1a73e8; }
